aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/templates/table/search/selection_form.twig
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-09 10:55:03 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-09 13:09:38 +0100
commit04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa (patch)
tree5c691241355c943a3c68ddb06b8cf8c60aa11319 /srcs/phpmyadmin/templates/table/search/selection_form.twig
parent7e0d85db834d6351ed85d01e5126ac31dc510b86 (diff)
downloadft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.tar.gz
ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.tar.bz2
ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.zip
phpmyadmin working
Diffstat (limited to 'srcs/phpmyadmin/templates/table/search/selection_form.twig')
-rw-r--r--srcs/phpmyadmin/templates/table/search/selection_form.twig226
1 files changed, 226 insertions, 0 deletions
diff --git a/srcs/phpmyadmin/templates/table/search/selection_form.twig b/srcs/phpmyadmin/templates/table/search/selection_form.twig
new file mode 100644
index 0000000..2ba4d60
--- /dev/null
+++ b/srcs/phpmyadmin/templates/table/search/selection_form.twig
@@ -0,0 +1,226 @@
+{% if search_type == 'zoom' %}
+ {% include 'table/search/form_tag.twig' with {
+ 'script_name': 'tbl_zoom_select.php',
+ 'form_id': 'zoom_search_form',
+ 'db': db,
+ 'table': table,
+ 'goto': goto
+ } only %}
+ <fieldset id="fieldset_zoom_search">
+ <fieldset id="inputSection">
+ <legend>
+ {% trans 'Do a "query by example" (wildcard: "%") for two different columns' %}
+ </legend>
+ {% include 'table/search/fields_table.twig' with {
+ 'self': self,
+ 'search_type': search_type,
+ 'geom_column_flag': geom_column_flag,
+ 'column_names': column_names,
+ 'column_types': column_types,
+ 'column_collations': column_collations,
+ 'keys' : keys,
+ 'criteria_column_names': criteria_column_names,
+ 'criteria_column_types': criteria_column_types
+ } only %}<table class="data">
+ {# Select options for data label #}
+ <tr>
+ <td>
+ <label for="dataLabel">
+ {% trans 'Use this column to label each point' %}
+ </label>
+ </td>
+ <td>
+ <select name="dataLabel" id="dataLabel" >
+ <option value = "">
+ {% trans 'None' %}
+ </option>
+ {% for i in 0..column_names|length - 1 %}
+ {% if data_label is defined and data_label == column_names[i]|e %}
+ <option value="{{ column_names[i] }}" selected="selected">
+ {{ column_names[i] }}
+ </option>
+ {% else %}
+ <option value="{{ column_names[i] }}" >
+ {{ column_names[i] }}
+ </option>
+ {% endif %}
+ {% endfor %}
+ </select>
+ </td>
+ </tr>
+ {# Inputbox for changing default maximum rows to plot #}
+ <tr>
+ <td>
+ <label for="maxRowPlotLimit">
+ {% trans 'Maximum rows to plot' %}
+ </label>
+ </td>
+ <td>
+ <input type="number"
+ name="maxPlotLimit"
+ id="maxRowPlotLimit"
+ required="required"
+ value="{{ max_plot_limit }}">
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </fieldset>
+{% elseif search_type == 'normal' %}
+ {% include 'table/search/form_tag.twig' with {
+ 'script_name': 'tbl_select.php',
+ 'form_id': 'tbl_search_form',
+ 'db': db,
+ 'table': table,
+ 'goto': goto
+ } only %}
+ <fieldset id="fieldset_table_search">
+ <fieldset id="fieldset_table_qbe">
+ <legend>
+ {% trans 'Do a "query by example" (wildcard: "%")' %}
+ </legend>
+ <div class="responsivetable jsresponsive">
+ {% include 'table/search/fields_table.twig' with {
+ 'self': self,
+ 'search_type': search_type,
+ 'geom_column_flag': geom_column_flag,
+ 'column_names': column_names,
+ 'column_types': column_types,
+ 'column_collations': column_collations,
+ 'criteria_column_names': criteria_column_names,
+ 'criteria_column_types': criteria_column_types
+ } only %}
+ </div>
+ <div id="gis_editor"></div>
+ <div id="popup_background"></div>
+ </fieldset>
+ {% include 'div_for_slider_effect.twig' with {
+ 'id': 'searchoptions',
+ 'message': 'Options'|trans,
+ 'initial_sliders_state': default_sliders_state
+ } only %}
+
+ {# Displays columns select list for selecting distinct columns in the search #}
+ <fieldset id="fieldset_select_fields">
+ <legend>
+ {% trans 'Select columns (at least one):' %}
+ </legend>
+ <select name="columnsToDisplay[]"
+ size="{{ min(column_names|length, 10) }}"
+ multiple="multiple">
+ {% for each_field in column_names %}
+ <option value="{{ each_field }}"
+ selected="selected">
+ {{ each_field }}
+ </option>
+ {% endfor %}
+ </select>
+ <input type="checkbox" name="distinct" value="DISTINCT" id="oDistinct">
+ <label for="oDistinct">DISTINCT</label>
+ </fieldset>
+
+ {# Displays input box for custom 'Where' clause to be used in the search #}
+ <fieldset id="fieldset_search_conditions">
+ <legend>
+ <em>{% trans 'Or' %}</em>
+ {% trans 'Add search conditions (body of the "where" clause):' %}
+ </legend>
+ {{ show_mysql_docu('Functions') }}
+ <input type="text" name="customWhereClause" class="textfield" size="64">
+ </fieldset>
+
+ {# Displays option of changing default number of rows displayed per page #}
+ <fieldset id="fieldset_limit_rows">
+ <legend>{% trans 'Number of rows per page' %}</legend>
+ <input type="number"
+ name="session_max_rows"
+ required="required"
+ min="1"
+ value="{{ max_rows }}"
+ class="textfield">
+ </fieldset>
+
+ {# Displays option for ordering search results by a column value (Asc or Desc) #}
+ <fieldset id="fieldset_display_order">
+ <legend>{% trans 'Display order:' %}</legend>
+ <select name="orderByColumn"><option value="--nil--"></option>
+ {% for each_field in column_names %}
+ <option value="{{ each_field }}">
+ {{ each_field }}
+ </option>
+ {% endfor %}
+ </select>
+
+ {{ get_radio_fields(
+ 'order',
+ {
+ 'ASC': 'Ascending'|trans,
+ 'DESC': 'Descending'|trans
+ },
+ 'ASC',
+ false,
+ true,
+ 'formelement'
+ ) }}
+
+ </fieldset>
+ <div class="clearfloat"></div>
+ </fieldset>
+{% elseif search_type == 'replace' %}
+ {% include 'table/search/form_tag.twig' with {
+ 'script_name': 'tbl_find_replace.php',
+ 'form_id': 'find_replace_form',
+ 'db': db,
+ 'table': table,
+ 'goto': goto
+ } only %}
+ <fieldset id="fieldset_find_replace">
+ <fieldset id="fieldset_find">
+ <legend>
+ {% trans 'Find and replace' %}
+ </legend>{% trans 'Find:' %}
+ <input type="text" value="" name="find" required>
+ {% trans 'Replace with:' %}
+ <input type="text" value="" name="replaceWith">
+
+ {% trans 'Column:' %}
+ <select name="columnIndex">
+ {% for i in 0..column_names|length - 1 %}
+ {% set type = types[column_names[i]] %}
+
+ {% if sql_types.getTypeClass(type) == 'CHAR' %}
+ <option value="{{ i }}">
+ {{- column_names[i] -}}
+ </option>
+ {% endif %}
+ {% endfor %}
+ </select>
+
+ {% include 'checkbox.twig' with {
+ 'html_field_id': 'useRegex',
+ 'html_field_name': 'useRegex',
+ 'label': 'Use regular expression'|trans,
+ 'checked': false,
+ 'onclick': false
+ } only %}
+ </fieldset>
+ </fieldset>
+{% else %}
+ {% include 'table/search/form_tag.twig' with {
+ 'script_name': '',
+ 'form_id': '',
+ 'db': db,
+ 'table': table,
+ 'goto': goto
+ } only %}
+{% endif %}
+
+{# Displays selection form's footer elements #}
+ <fieldset class="tblFooters">
+ <input class="btn btn-primary" type="submit"
+ name="{{ search_type == 'zoom' ? 'zoom_submit' : 'submit' }}"
+ {{ search_type == 'zoom' ? 'id="inputFormSubmitId"' }}
+ value="{% trans 'Go' %}">
+ </fieldset>
+</form>
+<div id="sqlqueryresultsouter"></div>