https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38378
--- Comment #13 from Phil Ringnalda <[email protected]> --- Yeah, avoid those more complicated early-on examples of jamming a form into the space where a link was, submit-form-link is The Way :) Once you have one to copy-paste from, it really doesn't take much: - If the template doesn't already have one, add [% USE Asset %] up top - If the template doesn't already have one, down in the [% MACRO jsinclude BLOCK %] at the bottom add [% Asset.js("js/form-submit.js") | $raw %] which is what does all the hard work for you - Add the class submit-form-link to the link - Replace the href attribute with "#" - Put the path and filename from the href in a data-action attribute - Add a data-method="post" attribute - For all the paramters after the ? in the original href, add an attribute where the name is 'data-' plus the key, and the value is the value, so href="?goats=fun" becomes data-goats="fun". And that's where you need to change the ?op=del to data-op=cud-del, because there shouldn't be an op named del which does deletion - If you need a confirmation alert (and you do, for delete), add data-confirmation-msg="[% t('Really?!?') | html %] only with better text than Really?!?, typically 'Are you sure you want to delete this frequency?' -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
