From a4ac575bf62fb0e4018991c1cd19b2f971544c6f Mon Sep 17 00:00:00 2001 From: Jacek Lebioda <jacek.lebioda.001@student.uni.lu> Date: Wed, 18 Jan 2017 15:00:14 +0100 Subject: [PATCH] Go back and cancel goes back in history --- smash/web/templates/doctors/details.html | 4 ++-- smash/web/templates/doctors/edit.html | 4 ++-- smash/web/templates/subjects/delete.html | 4 ++-- smash/web/templates/subjects/details.html | 4 ++-- smash/web/templates/subjects/edit.html | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/smash/web/templates/doctors/details.html b/smash/web/templates/doctors/details.html index 17c7668e..b6c7ba95 100644 --- a/smash/web/templates/doctors/details.html +++ b/smash/web/templates/doctors/details.html @@ -22,7 +22,7 @@ {% block content %} <div class="box box-info"> <div class="box-header with-border"> - <a href="{% url 'web.views.doctors' %}" class="btn btn-block btn-default">Go back</a> + <a href="{% url 'web.views.doctors' %}" class="btn btn-block btn-default" onclick="history.back()">Go back</a> </div> {% comment %} <div class="box-header with-border"> @@ -53,7 +53,7 @@ </div><!-- /.box-body --> <div class="box-footer"> - <a href="{% url 'web.views.doctors' %}" class="btn btn-block btn-default">Go back</a> + <a href="{% url 'web.views.doctors' %}" class="btn btn-block btn-default" onclick="history.back()">Go back</a> </div><!-- /.box-footer --> </form> </div> diff --git a/smash/web/templates/doctors/edit.html b/smash/web/templates/doctors/edit.html index fa775366..02cd4fc0 100644 --- a/smash/web/templates/doctors/edit.html +++ b/smash/web/templates/doctors/edit.html @@ -22,7 +22,7 @@ {% block content %} <div class="box box-info"> <div class="box-header with-border"> - <a href="{% url 'web.views.doctors' %}" class="btn btn-block btn-default">Go back (without change)</a> + <a href="{% url 'web.views.doctors' %}" class="btn btn-block btn-default" onclick="history.back()">Go back (without change)</a> </div> {% comment %} <div class="box-header with-border"> @@ -57,7 +57,7 @@ <button type="submit" class="btn btn-block btn-success">Save</button> </div> <div class="col-sm-6"> - <a href="{% url 'web.views.doctors' %}" class="btn btn-block btn-default">Cancel</a> + <a href="{% url 'web.views.doctors' %}" class="btn btn-block btn-default" onclick="history.back()">Cancel</a> </div> </div><!-- /.box-footer --> </form> diff --git a/smash/web/templates/subjects/delete.html b/smash/web/templates/subjects/delete.html index 91edd282..967724f9 100644 --- a/smash/web/templates/subjects/delete.html +++ b/smash/web/templates/subjects/delete.html @@ -23,7 +23,7 @@ {% block content %} <div class="box box-info"> <div class="box-header with-border"> - <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default">Go back (without change)</a> + <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default" onclick="history.back()">Go back (without change)</a> </div> {% comment %} <div class="box-header with-border"> @@ -58,7 +58,7 @@ <button type="submit" class="btn btn-block btn-danger">Delete</button> </div> <div class="col-sm-6"> - <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default">Cancel</a> + <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default" onclick="history.back()">Cancel</a> </div> </div><!-- /.box-footer --> </form> diff --git a/smash/web/templates/subjects/details.html b/smash/web/templates/subjects/details.html index 38e98ec5..11df9435 100644 --- a/smash/web/templates/subjects/details.html +++ b/smash/web/templates/subjects/details.html @@ -22,7 +22,7 @@ {% block content %} <div class="box box-info"> <div class="box-header with-border"> - <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default">Back</a> + <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default" onclick="history.back()">Back</a> </div> {% comment %} <div class="box-header with-border"> @@ -54,7 +54,7 @@ </div><!-- /.box-body --> <div class="box-footer"> - <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default">Back</a> + <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default" onclick="history.back()">Back</a> </div><!-- /.box-footer --> </form> </div> diff --git a/smash/web/templates/subjects/edit.html b/smash/web/templates/subjects/edit.html index 2ad479d3..ec2b5730 100644 --- a/smash/web/templates/subjects/edit.html +++ b/smash/web/templates/subjects/edit.html @@ -22,7 +22,7 @@ {% block content %} <div class="box box-info"> <div class="box-header with-border"> - <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default">Go back (without change)</a> + <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default" onclick="history.back()">Go back (without change)</a> </div> {% comment %} <div class="box-header with-border"> @@ -57,7 +57,7 @@ <button type="submit" class="btn btn-block btn-success">Save</button> </div> <div class="col-sm-6"> - <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default">Cancel</a> + <a href="{% url 'web.views.subjects' %}" class="btn btn-block btn-default" onclick="history.back()">Cancel</a> </div> </div><!-- /.box-footer --> </form> -- GitLab