Skip to content

Commit dfe47a1

Browse files
committed
Convert SQL bookmark creation to Bootstrap's card
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent 12ff485 commit dfe47a1

3 files changed

Lines changed: 27 additions & 32 deletions

File tree

templates/display/results/table.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
{{ navigation_html }}
252252

253253
{% if operations is not empty %}
254-
<div class="card d-print-none">
254+
<div class="card mb-3 d-print-none">
255255
<div class="card-header">{% trans 'Query results operations' %}</div>
256256

257257
<div class="card-body">

templates/sql/bookmark.twig

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
1-
<form action="{{ url('/sql') }}" method="post" class="bookmarkQueryForm d-print-none"
2-
onsubmit="return ! Functions.emptyCheckTheField(this, 'bkm_fields[bkm_label]');">
3-
{{ get_hidden_inputs() }}
4-
<input type="hidden" name="db" value="{{ db }}">
5-
<input type="hidden" name="goto" value="{{ goto }}">
6-
<input type="hidden" name="bkm_fields[bkm_database]" value="{{ db }}">
7-
<input type="hidden" name="bkm_fields[bkm_user]" value="{{ user }}">
8-
<input type="hidden" name="bkm_fields[bkm_sql_query]" value="{{ sql_query }}">
9-
<fieldset class="pma-fieldset">
10-
<legend>
11-
{{ get_icon('b_bookmark', 'Bookmark this SQL query'|trans, true) }}
12-
</legend>
13-
<div class="formelement">
14-
<label>
15-
{% trans 'Label:' %}
16-
<input type="text" name="bkm_fields[bkm_label]" value="">
17-
</label>
18-
</div>
19-
<div class="formelement">
20-
<label>
21-
<input type="checkbox" name="bkm_all_users" value="true">
22-
{% trans 'Let every user access this bookmark' %}
23-
</label>
24-
</div>
25-
<div class="clearfloat"></div>
26-
</fieldset>
27-
<fieldset class="pma-fieldset tblFooters">
28-
<input type="hidden" name="store_bkm" value="1">
29-
<input class="btn btn-secondary" type="submit" value="{% trans 'Bookmark this SQL query' %}">
30-
</fieldset>
1+
<form action="{{ url('/sql') }}" method="post" class="card bookmarkQueryForm d-print-none"
2+
onsubmit="return ! Functions.emptyCheckTheField(this, 'bkm_fields[bkm_label]');">
3+
{{ get_hidden_inputs() }}
4+
<input type="hidden" name="db" value="{{ db }}">
5+
<input type="hidden" name="goto" value="{{ goto }}">
6+
<input type="hidden" name="bkm_fields[bkm_database]" value="{{ db }}">
7+
<input type="hidden" name="bkm_fields[bkm_user]" value="{{ user }}">
8+
<input type="hidden" name="bkm_fields[bkm_sql_query]" value="{{ sql_query }}">
9+
<input type="hidden" name="store_bkm" value="1">
10+
11+
<div class="card-header">{{ get_icon('b_bookmark', 'Bookmark this SQL query'|trans, true) }}</div>
12+
<div class="card-body">
13+
<div class="mb-3">
14+
<label class="form-label" for="bookmarkLabelField">{% trans 'Bookmark label:' %}</label>
15+
<input class="form-control" id="bookmarkLabelField" type="text" name="bkm_fields[bkm_label]" value="">
16+
</div>
17+
18+
<div class="form-check form-switch">
19+
<input class="form-check-input" type="checkbox" role="switch" id="bookmarkAllUsersCheckbox" name="bkm_all_users" value="true">
20+
<label class="form-check-label" for="bookmarkAllUsersCheckbox">{% trans 'Let every user access this bookmark' %}</label>
21+
</div>
22+
</div>
23+
<div class="card-footer">
24+
<input class="btn btn-secondary" type="submit" value="{% trans 'Create new bookmark' %}">
25+
</div>
3126
</form>

templates/sql/no_results_returned.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ profiling_chart|raw }}
66

77
{% if not is_procedure %}
8-
<fieldset class="pma-fieldset d-print-none">
8+
<fieldset class="pma-fieldset mb-3 d-print-none">
99
<legend>{% trans 'Query results operations' %}</legend>
1010
<span>
1111
{{ link_or_button(

0 commit comments

Comments
 (0)