generated from GARAGENUM/flask_secure
44 lines
1.7 KiB
HTML
44 lines
1.7 KiB
HTML
{% import 'admin/static.html' as admin_static with context %}
|
|
|
|
{% macro dropdown(actions) -%}
|
|
<div class="dropdown is-active is-overlay">
|
|
<a class="dropdown-trigger" aria-controls="dropdown-menu" role="button" aria-haspopup="true"
|
|
aria-expanded="false">
|
|
<span>{{ _gettext('With selected') }}</span>
|
|
<span class="icon is-small">
|
|
<i class="fa fa-angle-down" aria-hidden="true"></i>
|
|
</span>
|
|
</a>
|
|
<div class="dropdown-menu" id="dropdown-menu" role="menu">
|
|
<div class="dropdown-content">
|
|
{% for p in actions %}
|
|
<a class="dropdown-item" href="javascript:void(0)"
|
|
onclick="return modelActions.execute('{{ p[0] }}');">{{ _gettext(p[1]) }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro form(actions, url) %}
|
|
{% if actions %}
|
|
<form id="action_form" action="{{ url }}" method="POST" style="display: none">
|
|
{% if action_form.csrf_token %}
|
|
{{ action_form.csrf_token }}
|
|
{% elif csrf_token %}
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
{% endif %}
|
|
{{ action_form.url(value=return_url) }}
|
|
{{ action_form.action() }}
|
|
</form>
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro script(message, actions, actions_confirmation) %}
|
|
{% if actions %}
|
|
<div id="actions-confirmation-data" style="display:none;">{{ actions_confirmation|tojson|safe }}</div>
|
|
<div id="message-data" style="display:none;">{{ message|tojson|safe }}</div>
|
|
<script src="{{ admin_static.url(filename='admin/js/actions.js', v='1.0.0') }}"></script>
|
|
{% endif %}
|
|
{% endmacro %}
|