{% macro icon_submit_link(form, icon, link_class, badge) %}
{% if badge|default(0) > 0 %} {{ badge }} {% endif %} {{ form_row(form._token) }}
{% endmacro %} {% macro modal_dialog(modal_id, title, message, button_text, onClickCode) %} {% endmacro %} {% macro editable_value(class, data_name, data_type, data_pk, data_value, data_title, data_url, data_source, select_value) %} {{ data_value|default('(empty)') }} {% endmacro %} {# Shows a QR Code #} {% macro qrcode_data_uri(message, params) %} {% if params|default('') != '' %} {% else %} {% endif %} {% endmacro %} {# Shows a QR Code in a modal #} {% macro qrcode_modal(modalId, qrCodeMessage, qrCodeParams) %} {% import _self as forms %} {% set title = 'QR Code' %} {% if modalId|default('') == '' %} {% set modalId = 'qrCodeModal' %} {% endif %} {% if qrCodeMessage|default('') == '' %} {% set message = '
No QR Code.
' %} {% else %} {% set message = '
'~ forms.qrcode_data_uri(qrCodeMessage|json_encode(constant('JSON_PRETTY_PRINT')), qrCodeParams) ~ '
' %} {% endif %} {{ forms.modal_dialog(modalId, title, message) }} {% endmacro %} {# Shows a date filter on a dropdown list #} {% macro date_filter_dropdown(buttonText, listId, listUrl, dropdownUrl) %} {% if listId is not empty and listUrl is not empty and dropdownUrl is not empty %} {% endif %} {% endmacro %}