1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-23 18:29:15 +03:00
Files
phpmyadmin/resources/templates/sql/_bookmark.twig
Maurício Meneghini Fauth 81104b0146 Refactor the sql/bookmark.twig template
Renames the template to _bookmark.twig to indicate that it's a partial
template. And uses Twig's include function to include the bookmark
template.

Extracts the onsubmit event from the form tag.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2026-01-17 14:27:57 -03:00

28 lines
1.5 KiB
Twig

<form action="{{ url('/sql') }}" method="post" class="card bookmarkQueryForm d-print-none disableAjax">
{{ get_hidden_inputs() }}
<input type="hidden" name="db" value="{{ db|e('html_attr') }}">
<input type="hidden" name="goto" value="{{ url('/sql', {'db': db, 'table': table, 'sql_query': sql_query, 'id_bookmark': 1})|e('html_attr') }}">
<input type="hidden" name="bkm_fields[bkm_database]" value="{{ db|e('html_attr') }}">
<input type="hidden" name="bkm_fields[bkm_user]" value="{{ user|e('html_attr') }}">
<input type="hidden" name="bkm_fields[bkm_sql_query]" value="{{ complete_sql_query|e('html_attr') }}">
<input type="hidden" name="store_bkm" value="1">
<div class="card-header">{{ get_icon('b_bookmark', t('Bookmark this SQL query'), true) }}</div>
<div class="card-body">
<div class="mb-3">
<label class="form-label" for="bookmarkLabelField">{{ t('Bookmark label:') }}</label>
<input class="form-control" id="bookmarkLabelField" type="text" name="bkm_fields[bkm_label]" value="">
</div>
{% if is_shared_bookmarks_allowed %}
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="bookmarkAllUsersCheckbox" name="bkm_all_users" value="true">
<label class="form-check-label" for="bookmarkAllUsersCheckbox">{{ t('Let every user access this bookmark') }}</label>
</div>
{% endif %}
</div>
<div class="card-footer">
<input class="btn btn-secondary" type="submit" value="{{ t('Create new bookmark') }}">
</div>
</form>