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>
[% 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>