|
1 | | -<a id="db_search"></a> |
2 | | -<form id="db_search_form" method="post" action="{{ url('/database/search') }}" name="db_search" class="ajax lock-page"> |
| 1 | +<div class="container"> |
| 2 | + <h2>{% trans 'Search in database' %}</h2> |
| 3 | + |
| 4 | + <a id="db_search"></a> |
| 5 | + <form id="db_search_form" method="post" action="{{ url('/database/search') }}" name="db_search" class="card mb-3 ajax lock-page"> |
3 | 6 | {{ get_hidden_inputs(db) }} |
4 | | - <fieldset class="pma-fieldset"> |
5 | | - <legend>{% trans 'Search in database' %}</legend> |
6 | | - <p> |
7 | | - <label for="criteriaSearchString" class="d-block"> |
8 | | - {% trans 'Words or values to search for (wildcard: "%"):' %} |
9 | | - </label> |
10 | | - <input id="criteriaSearchString" name="criteriaSearchString" class="w-75" type="text" value=" |
11 | | - {{- criteria_search_string }}"> |
12 | | - </p> |
| 7 | + <div class="card-body"> |
| 8 | + <div class="mb-3"> |
| 9 | + <label for="criteriaSearchString" class="form-label">{% trans 'Words or values to search for (wildcard: "%"):' %}</label> |
| 10 | + <input type="text" class="form-control" id="criteriaSearchString" name="criteriaSearchString" value="{{ criteria_search_string }}"> |
| 11 | + </div> |
| 12 | + |
| 13 | + <fieldset class="mb-3"> |
| 14 | + <legend>{% trans 'Find:' %}</legend> |
13 | 15 |
|
14 | | - <fieldset class="pma-fieldset"> |
15 | | - <legend>{% trans 'Find:' %}</legend> |
| 16 | + <div class="form-check"> |
| 17 | + <input class="form-check-input" type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio1" value="1"{{ criteria_search_type == '1' ? ' checked' }}> |
| 18 | + <label class="form-check-label" for="criteriaSearchTypeRadio1">{% trans 'at least one of the words' %} {{ show_hint('Words are separated by a space character (" ").'|trans) }}</label> |
| 19 | + </div> |
| 20 | + <div class="form-check"> |
| 21 | + <input class="form-check-input" type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio2" value="2"{{ criteria_search_type == '2' ? ' checked' }}> |
| 22 | + <label class="form-check-label" for="criteriaSearchTypeRadio2">{% trans 'all of the words' %} {{ show_hint('Words are separated by a space character (" ").'|trans) }}</label> |
| 23 | + </div> |
| 24 | + <div class="form-check"> |
| 25 | + <input class="form-check-input" type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio3" value="3"{{ criteria_search_type == '3' ? ' checked' }}> |
| 26 | + <label class="form-check-label" for="criteriaSearchTypeRadio3">{% trans 'the exact phrase as substring' %}</label> |
| 27 | + </div> |
| 28 | + <div class="form-check"> |
| 29 | + <input class="form-check-input" type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio4" value="4"{{ criteria_search_type == '4' ? ' checked' }}> |
| 30 | + <label class="form-check-label" for="criteriaSearchTypeRadio4">{% trans 'the exact phrase as whole field' %}</label> |
| 31 | + </div> |
| 32 | + <div class="form-check"> |
| 33 | + <input class="form-check-input" type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio5" value="5"{{ criteria_search_type == '5' ? ' checked' }}> |
| 34 | + <label class="form-check-label" for="criteriaSearchTypeRadio5">{% trans 'as regular expression' %} {{ show_mysql_docu('Regexp') }}</label> |
| 35 | + </div> |
| 36 | + </fieldset> |
16 | 37 |
|
17 | | - <div> |
18 | | - <input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio1" value="1"{{ criteria_search_type == '1' ? ' checked' }}> |
19 | | - <label for="criteriaSearchTypeRadio1">{% trans 'at least one of the words' %} {{ show_hint('Words are separated by a space character (" ").'|trans) }}</label> |
20 | | - </div> |
21 | | - <div> |
22 | | - <input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio2" value="2"{{ criteria_search_type == '2' ? ' checked' }}> |
23 | | - <label for="criteriaSearchTypeRadio2">{% trans 'all of the words' %} {{ show_hint('Words are separated by a space character (" ").'|trans) }}</label> |
24 | | - </div> |
25 | | - <div> |
26 | | - <input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio3" value="3"{{ criteria_search_type == '3' ? ' checked' }}> |
27 | | - <label for="criteriaSearchTypeRadio3">{% trans 'the exact phrase as substring' %}</label> |
28 | | - </div> |
29 | | - <div> |
30 | | - <input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio4" value="4"{{ criteria_search_type == '4' ? ' checked' }}> |
31 | | - <label for="criteriaSearchTypeRadio4">{% trans 'the exact phrase as whole field' %}</label> |
32 | | - </div> |
33 | | - <div> |
34 | | - <input type="radio" name="criteriaSearchType" id="criteriaSearchTypeRadio5" value="5"{{ criteria_search_type == '5' ? ' checked' }}> |
35 | | - <label for="criteriaSearchTypeRadio5">{% trans 'as regular expression' %} {{ show_mysql_docu('Regexp') }}</label> |
36 | | - </div> |
37 | | - </fieldset> |
| 38 | + <fieldset class="mb-3"> |
| 39 | + <legend>{% trans 'Inside tables:' %}</legend> |
38 | 40 |
|
39 | | - <fieldset class="pma-fieldset"> |
40 | | - <legend>{% trans 'Inside tables:' %}</legend> |
41 | | - <p> |
42 | | - <a href="#" id="select_all"> |
43 | | - {% trans 'Select all' %} |
44 | | - </a> / |
45 | | - <a href="#" id="unselect_all"> |
46 | | - {% trans 'Unselect all' %} |
47 | | - </a> |
48 | | - </p> |
49 | | - <select class="resize-vertical" id="criteriaTables" name="criteriaTables[]" multiple> |
50 | | - {% for each_table in tables_names_only %} |
51 | | - <option value="{{ each_table }}" |
52 | | - {% if criteria_tables|length > 0 %} |
53 | | - {{- each_table in criteria_tables ? ' selected' }} |
54 | | - {% else %} |
55 | | - {{- ' selected' }} |
56 | | - {% endif %} |
57 | | - > |
58 | | - {{ each_table }} |
59 | | - </option> |
60 | | - {% endfor %} |
61 | | - </select> |
62 | | - </fieldset> |
| 41 | + <div> |
| 42 | + <button type="button" class="btn btn-link" id="select_all">{% trans 'Select all' %}</button> |
| 43 | + <button type="button" class="btn btn-link" id="unselect_all">{% trans 'Unselect all' %}</button> |
| 44 | + </div> |
| 45 | + <select class="form-select" id="criteriaTables" name="criteriaTables[]" multiple> |
| 46 | + {% for each_table in tables_names_only %} |
| 47 | + <option value="{{ each_table }}" |
| 48 | + {% if criteria_tables|length > 0 %} |
| 49 | + {{- each_table in criteria_tables ? ' selected' }} |
| 50 | + {% else %} |
| 51 | + {{- ' selected' }} |
| 52 | + {% endif %} |
| 53 | + > |
| 54 | + {{ each_table }} |
| 55 | + </option> |
| 56 | + {% endfor %} |
| 57 | + </select> |
| 58 | + </fieldset> |
63 | 59 |
|
64 | | - <p> |
65 | | - {# Inputbox for column name entry #} |
66 | | - <label for="criteriaColumnName" class="d-block"> |
67 | | - {% trans 'Inside column:' %} |
68 | | - </label> |
69 | | - <input id="criteriaColumnName" type="text" name="criteriaColumnName" class="w-75" value=" |
70 | | - {{- criteria_column_name is not empty ? criteria_column_name }}"> |
71 | | - </p> |
72 | | - </fieldset> |
73 | | - <fieldset class="pma-fieldset tblFooters"> |
74 | | - <input id="buttonGo" class="btn btn-primary" type="submit" name="submit_search" value="{% trans 'Go' %}"> |
75 | | - </fieldset> |
76 | | -</form> |
77 | | -<div id="togglesearchformdiv"> |
| 60 | + <div> |
| 61 | + <label for="criteriaColumnName" class="form-label">{% trans 'Inside column:' %}</label> |
| 62 | + <input type="text" class="form-control" id="criteriaColumnName" name="criteriaColumnName" value="{{ criteria_column_name is not empty ? criteria_column_name }}"> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + <div class="card-footer"> |
| 66 | + <input id="buttonGo" class="btn btn-primary" type="submit" name="submit_search" value="{% trans 'Search' %}"> |
| 67 | + </div> |
| 68 | + </form> |
| 69 | + <div id="togglesearchformdiv"> |
78 | 70 | <button id="togglesearchformlink" class="btn btn-primary my-1"></button> |
79 | | -</div> |
80 | | -<div id="searchresults"></div> |
81 | | -<div id="togglesearchresultsdiv"><button id="togglesearchresultlink" class="btn btn-primary"></button></div> |
82 | | -<br class="clearfloat"> |
83 | | -{# These two table-image and table-link elements display the table name in browse search results #} |
84 | | -<div id="table-info"> |
| 71 | + </div> |
| 72 | + <div id="searchresults"></div> |
| 73 | + <div id="togglesearchresultsdiv"> |
| 74 | + <button id="togglesearchresultlink" class="btn btn-primary"></button> |
| 75 | + </div> |
| 76 | + <br class="clearfloat"> |
| 77 | + {# These two table-image and table-link elements display the table name in browse search results #} |
| 78 | + <div id="table-info"> |
85 | 79 | <a id="table-link" class="item"></a> |
86 | | -</div> |
87 | | -{# Div for browsing results #} |
88 | | -<div id="browse-results"> |
| 80 | + </div> |
| 81 | + {# Div for browsing results #} |
| 82 | + <div id="browse-results"> |
89 | 83 | {# This browse-results div is used to load the browse and delete results in the db search #} |
90 | | -</div> |
91 | | -<div id="sqlqueryform" class="clearfloat"> |
| 84 | + </div> |
| 85 | + <div id="sqlqueryform" class="clearfloat"> |
92 | 86 | {# This sqlqueryform div is used to load the delete form in the db search #} |
| 87 | + </div> |
| 88 | + {# Toggle query box link #} |
| 89 | + <button class="btn btn-secondary" id="togglequerybox"></button> |
93 | 90 | </div> |
94 | | -{# Toggle query box link #} |
95 | | -<button class="btn btn-secondary" id="togglequerybox"></button> |
0 commit comments