https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38842

--- Comment #1 from Emily Lamancusa (emlam) 
<[email protected]> ---
Created attachment 178875
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178875&action=edit
Bug 38842: Add reusable modal wrapper

This patch adds the block modal_wrapper to html_helpers.inc.

Minimal usage:
[% WRAPPER modal_wrapper modal_id=<id> modal_header_contents=<contents> %]
    <modal body goes here>
[ % END %]

The above will produce an informational modal with an "OK" button to
dismiss, and no actions taken.

Optional parameters to add functionality to the modal:
noblock=1 - if the modal should not block
modal_action - if the modal should submit a form, the action url for
               the form

To add a "confirm" button that will submit the modal form:
modal_confirm_text - text to show on the button (must be specified)
modal_confirm_name - (optional) specify a name attribute
modal_confirm_val - (optional) specify a value attribute
modal_confirm_accesskey - (optional) specify an accesskey attribute

To add a "print" button that will open a print window to the specified url:
modal_print_text - text to show on the button (must be specified)
modal_print_url - url of the page to print (must be specified)
modal_print_name - (optional) specify a name attribute
modal_print_accesskey - (optional) specify an accesskey attribute

To add a "cancel/deny/dismiss" button:
modal_deny_text - text to show on the button (must be specified)
modal_deny_action - "submit" if the deny button should submit the modal
                     (to take some denial/cancellation action)
                  - "dismiss" if the deny button should dismiss the
                     modal without submitting the form
                  - This parameter can be omitted if the button should
                    neither submit nor dismiss the modal (for example,
                    if the button click will be handled with JS)
modal_deny_name - (optional) specify a name attribute
modal_deny_val - (optional) specify a value attribute
modal_deny_accesskey - (optional) specify an accesskey attribute

If the above generic buttons do not suffice, the below parameters can be
used in addition or instead of the above options to specify custom
button code and/or other customized footer content:
modal_custom_confirm
modal_custom_utility_button
modal_custom_deny
modal_footer_append

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
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/

Reply via email to