Translated using Weblate (Polish)
[phpmyadmin.git] / templates / view_create.twig
blob2dd30bbd5d3170a202df64800fd39bc2b906020f
1 <!-- CREATE VIEW options -->
2 <div id="div_view_options">
3     <form method="post" action="{{ url('/view/create') }}">
4     {{ get_hidden_inputs(url_params) }}
5     <fieldset class="pma-fieldset">
6         <legend>
7             {% if ajax_dialog %}
8                 {% trans 'Details' %}
9             {% else %}
10                 {% if view['operation'] == 'create' %}
11                     {% trans 'Create view' %}
12                 {% else %}
13                     {% trans 'Edit view' %}
14                 {% endif %}
15             {% endif %}
16         </legend>
17         <table class="table align-middle rte_table">
18             {% if view['operation'] == 'create' %}
19                 <tr>
20                     <td class="text-nowrap"><label for="or_replace">OR REPLACE</label></td>
21                     <td>
22                         <input type="checkbox" name="view[or_replace]" id="or_replace"
23                             {% if (view['or_replace']) %} checked="checked" {% endif %}
24                             value="1">
25                     </td>
26                 </tr>
27             {% endif %}
29             <tr>
30                 <td class="text-nowrap"><label for="algorithm">ALGORITHM</label></td>
31                 <td>
32                     <select name="view[algorithm]" id="algorithm">
33                         {% for option in view_algorithm_options %}
34                             <option value="{{ option }}"
35                                 {% if view['algorithm'] == option %}
36                                     selected="selected"
37                                 {% endif %}
38                             >{{ option }}</option>
39                         {% endfor %}
40                     </select>
41                 </td>
42             </tr>
44             <tr>
45                 <td class="text-nowrap">{% trans 'Definer' %}</td>
46                 <td><input type="text" maxlength="100" size="50" name="view[definer]" value="{{ view['definer'] }}"></td>
47             </tr>
49             <tr>
50                 <td class="text-nowrap">SQL SECURITY</td>
51                 <td>
52                     <select name="view[sql_security]">
53                         <option value=""></option>
54                         {% for option in view_security_options %}
55                             <option value="{{ option }}"
56                                 {% if option == view['sql_security'] %} selected="selected" {% endif %}
57                             >{{ option }}</option>
58                         {% endfor %}
59                     </select>
60                 </td>
61             </tr>
63             {% if view['operation'] == 'create' %}
64                 <tr>
65                     <td class="text-nowrap">{% trans 'VIEW name' %}</td>
66                     <td>
67                         <input type="text" size="20" name="view[name]" onfocus="this.select()" maxlength="64" value="{{ view['name'] }}">
68                     </td>
69                 </tr>
70             {% else %}
71                 <tr>
72                     <td>
73                         <input type="hidden" name="view[name]" value="{{ view['name'] }}">
74                     </td>
75                 </tr>
76             {% endif %}
78             <tr>
79                 <td class="text-nowrap">{% trans 'Column names' %}</td>
80                 <td>
81                     <input type="text" maxlength="100" size="50" name="view[column_names]" onfocus="this.select()"  value="{{ view['column_names'] }}">
82                 </td>
83             </tr>
85             <tr>
86                 <td class="text-nowrap">AS</td>
87                 <td>
88                     <textarea name="view[as]" id="view_as" rows="15" cols="40" dir="{{ text_dir }}">{{ view['as'] }}</textarea><br>
89                     <input type="button" value="Format" id="format" class="btn btn-secondary button sqlbutton">
90                     <span id="querymessage"></span>
91                 </td>
92             </tr>
94             <tr>
95                 <td class="text-nowrap">WITH CHECK OPTION</td>
96                 <td>
97                     <select name="view[with]">
98                         <option value=""></option>
99                         {% for option in view_with_options %}
100                             <option value="{{ option }}"
101                                 {% if option == view['with'] %} selected="selected" {% endif %}
102                             >{{ option }}</option>
103                         {% endfor %}
104                     </select>
105                 </td>
106             </tr>
108         </table>
109     </fieldset>
111     <input type="hidden" name="ajax_request" value="1" />
112     <input type="hidden" name="{{ (view['operation'] == 'create') ? 'createview' : 'alterview' }}" value="1" />
114     {% if ajax_dialog == false %}
115         <input type="hidden" name="ajax_dialog" value="1" />
116         <input type="submit" class="btn btn-primary" name="" value="{% trans 'Go' %}" />
117     {% endif %}
119     </form>
120 </div>