Bug 16400 [Follow-up] Proposal to uniform the placement of submit buttons
authorOwen Leonard <oleonard@myacpl.org>
Mon, 16 May 2016 18:01:34 +0000 (14:01 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 24 Jun 2016 13:34:45 +0000 (13:34 +0000)
This follow-up makes some corrections to the markup of the cancel
button:

- Use <a> instead of <button> to eliminate the need for an "onclick"
  attribute.
- Remove the "cancel" class which adds unwanted padding.
- Correct the destination of the cancel button when cancelling during an
  edit (should redirect to the patron detail page).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

index 616c48a..17eeb5b 100644 (file)
@@ -183,12 +183,12 @@ $(document).ready(function() {
 [% UNLESS ( check_member ) %]
     <button class="btn btn-small" id="saverecord" type="submit" name="save" onclick="return check_form_borrowers();"><i class="fa fa-save"></i> Save</button>
     [% IF opadd %]
-    <button class="btn btn-small cancel" onclick="/cgi-bin/koha/members/member.pl">
+        <a class="btn btn-small" href="/cgi-bin/koha/members/member.pl">
     [% ELSE %]
-    <a class='btn btn-small cancel" onclick="/cgi-bin/koha/members/member.pl?borrowernumber=[% borrowernumber %]">
+        <a class="btn btn-small" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
     [% END %]
         <i class="fa fa-times"></i> Cancel
-    </button>
+    </a>
 [% END %]
 </div>