PluginProbe
WP Directory Kit / 1.3.4
WP Directory Kit v1.3.4
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / application / views / wdk_fields / field_edit.php

field_edit.php in WP Directory Kit 1.3.4, at application/views/wdk_fields/field_edit.php

312 lines 19.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Edit Field.
4 *
5 * This is the template that form edit
6 *
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13 <!-- This file should primarily consist of HTML with a little bit of PHP. -->
14
15 <div class="wrap wdk-wrap">
16 <h1 class="wp-heading-inline"><?php echo __('Fields Management','wpdirectorykit'); ?></h1>
17 <br /><br />
18 <div class="wdk-body">
19 <div class="postbox" style="display: block;">
20 <div class="postbox-header">
21 <h3><?php echo __('Add/Edit Field','wpdirectorykit'); ?></h3>
22 </div>
23 <div class="inside">
24
25 <form method="post" action="<?php echo esc_url(wmvc_current_edit_url()); ?>" novalidate="novalidate">
26
27 <?php wp_nonce_field( 'wdk-fields-edit_'.wmvc_show_data('idfield', $db_data, 0), '_wpnonce'); ?>
28
29 <?php
30 $form->messages('class="alert alert-danger"', sprintf(__('Successfully saved, <a href="%1$s">Back to Fields Management </a>','wpdirectorykit'),admin_url('admin.php?page=wdk_fields')));
31 ?>
32
33 <table class="form-table" role="presentation">
34 <tbody>
35 <?php if(wmvc_show_data('field_type', $db_data) != "SECTION"):?>
36 <tr>
37 <th scope="row">
38 <label for="field_type"><?php echo __('Section','wpdirectorykit'); ?></label>
39 </th>
40 <td>
41 <?php
42 echo wmvc_select_option('section', $section_list, (!empty(wmvc_show_data('idfield', $db_data, '')) && isset($fields_categories[wmvc_show_data('idfield', $db_data, '')])) ? $fields_categories[wmvc_show_data('idfield', $db_data)] : '');
43 ?>
44 </td>
45 </tr>
46 <?php endif;?>
47 <tr>
48 <th scope="row">
49 <label for="field_type"><?php echo __('Field Type','wpdirectorykit'); ?></label>
50 </th>
51 <td>
52 <?php
53 echo wmvc_select_option('field_type', $field_types, wmvc_show_data('field_type', $db_data, ''));
54 ?>
55 </td>
56 </tr>
57 <tr>
58 <th scope="row">
59 <label for="date_format"><?php echo __('Date format','wpdirectorykit'); ?></label>
60 </th>
61 <td>
62 <input name="date_format" type="text" id="date_format"
63 value="<?php echo wmvc_show_data('date_format', $db_data, ''); ?>"
64 class="regular-text">
65 <p class="description" id="hint-description">
66 <?php echo __('Date Format for Front - End View','wpdirectorykit'); ?>
67 </p>
68 </td>
69 </tr>
70 <tr>
71 <th scope="row">
72 <label for="field_label"><?php echo __('Field Label','wpdirectorykit'); ?></label>
73 </th>
74 <td>
75 <input name="field_label" type="text" id="field_label"
76 value="<?php echo wmvc_show_data('field_label', $db_data, ''); ?>"
77 class="regular-text">
78
79 </td>
80 </tr>
81 <tr>
82 <th scope="row"><label for="hint"><?php echo __('Hint','wpdirectorykit'); ?></label>
83 </th>
84 <td>
85 <input name="hint" type="text" id="hint"
86 value="<?php echo wmvc_show_data('hint', $db_data, ''); ?>"
87 class="regular-text">
88 <p class="description" id="hint-description">
89 <?php echo __('Hint is showing below fields like this one','wpdirectorykit'); ?>
90 </p>
91 </td>
92 </tr>
93 <tr>
94 <th scope="row"><label for="placeholder"><?php echo __('Placeholder','wpdirectorykit'); ?></label>
95 </th>
96 <td>
97 <input name="placeholder" type="text" id="placeholder"
98 value="<?php echo wmvc_show_data('placeholder', $db_data, ''); ?>"
99 class="regular-text">
100 <p class="description" id="placeholder-description">
101 <?php echo __('Placeholder is showing on placeholder of fields or first value on dropdown','wpdirectorykit'); ?>
102 </p>
103 </td>
104 </tr>
105 <tr>
106 <th scope="row"><label
107 for="columns_number"><?php echo __('Columns number/Width','wpdirectorykit'); ?></label>
108 </th>
109 <td>
110 <input name="columns_number" type="number" id="columns_number"
111 value="<?php echo wmvc_show_data('columns_number', $db_data, ''); ?>"
112 class="regular-text">
113 <p class="description" id="columns_number-description">
114 <?php echo __('Full width is 12 columns, so define wanted columns allocation number for this field','wpdirectorykit'); ?>
115 </p>
116 </td>
117 </tr>
118 <tr>
119 <th scope="row"><?php echo __('Field is required','wpdirectorykit'); ?></th>
120 <td>
121 <fieldset>
122 <legend class="screen-reader-text">
123 <span><?php echo __('Field is required','wpdirectorykit'); ?></span>
124 </legend>
125 <label for="is_required">
126 <input name="is_required" type="checkbox" id="is_required"
127 value="1"
128 <?php echo !empty(wmvc_show_data('is_required', $db_data, ''))?'checked':''; ?>>
129 <?php echo __('Required','wpdirectorykit'); ?>
130 <?php echo __('( Not for section type)','wpdirectorykit'); ?>
131 </label>
132 </fieldset>
133 </td>
134 </tr>
135 <tr>
136 <th scope="row"><?php echo __('Field is visible on Listing Preview','wpdirectorykit'); ?></th>
137 <td>
138 <fieldset>
139 <legend class="screen-reader-text">
140 <span><?php echo __('Field is visible on Listing Preview','wpdirectorykit'); ?></span>
141 </legend>
142 <label for="is_visible_frontend">
143 <input name="is_visible_frontend" type="checkbox" id="is_visible_frontend"
144 value="1"
145 <?php echo !empty(wmvc_show_data('is_visible_frontend', $db_data, ''))?'checked':''; ?>>
146 <?php echo __('( Not for section type)','wpdirectorykit'); ?>
147 </label>
148 </fieldset>
149 </td>
150 </tr>
151 <tr>
152 <th scope="row"><?php echo __('Field is visible on frontend submission','wpdirectorykit'); ?></th>
153 <td>
154 <fieldset>
155 <legend class="screen-reader-text">
156 <span><?php echo __('Field is visible on frontend submission','wpdirectorykit'); ?></span>
157 </legend>
158 <label for="is_visible_dashboard">
159 <input name="is_visible_dashboard" type="checkbox" id="is_visible_dashboard"
160 value="1"
161 <?php echo !empty(wmvc_show_data('is_visible_dashboard', $db_data, ''))?'checked':''; ?>>
162 <?php echo __('( Not for section type)','wpdirectorykit'); ?>
163 </label>
164 </fieldset>
165 </td>
166 </tr>
167 <tr>
168 <th scope="row"><?php echo __('Price format','wpdirectorykit'); ?></th>
169 <td>
170 <fieldset>
171 <legend class="screen-reader-text">
172 <span><?php echo __('Price format','wpdirectorykit'); ?></span>
173 </legend>
174 <label for="is_price_format">
175 <input name="is_price_format" type="checkbox" id="is_price_format"
176 value="1"
177 <?php echo !empty(wmvc_show_data('is_price_format', $db_data, ''))?'checked':''; ?>>
178 <?php echo __('Use wp price format based on language ( Only for number field type)','wpdirectorykit'); ?>
179 </label>
180 </fieldset>
181 </td>
182 </tr>
183 <tr>
184 <th scope="row">
185 <label for="validation"><?php echo __('Validation','wpdirectorykit'); ?></label>
186 </th>
187 <td>
188 <?php
189 echo wmvc_select_option('validation', array_merge(array(''=> __('Not Selected','wpdirectorykit')),$this->field_m->fields_validations), wmvc_show_data('validation', $db_data, ''), 'id="validation"');
190 ?>
191 </td>
192 </tr>
193 <tr>
194 <th scope="row"><label
195 for="min_length"><?php echo __('Min Length','wpdirectorykit'); ?></label>
196 </th>
197 <td>
198 <input name="min_length" type="number" id="min_length"
199 value="<?php echo wmvc_show_data('min_length', $db_data, ''); ?>"
200 class="regular-text">
201 <p class="description" id="columns_number-description">
202 <?php echo __('Min Characters or min number (if number field type)','wpdirectorykit'); ?>
203 </p>
204 </td>
205 </tr>
206 <tr>
207 <th scope="row"><label
208 for="max_length"><?php echo __('Max Length','wpdirectorykit'); ?></label>
209 </th>
210 <td>
211 <input name="max_length" type="number" id="max_length"
212 value="<?php echo wmvc_show_data('max_length', $db_data, ''); ?>"
213 class="regular-text">
214 <p class="description" id="columns_number-description">
215 <?php echo __('Max Characters or max number (if number field type)','wpdirectorykit'); ?>
216 </p>
217 </td>
218 </tr>
219 <?php if(false):?>
220 <tr>
221 <th scope="row"><?php echo __('Visible on','wpdirectorykit'); ?></th>
222 <td>
223 <fieldset>
224 <legend class="screen-reader-text">
225 <span><?php echo __('Visible on','wpdirectorykit'); ?></span>
226 </legend>
227 <label for="is_visible_frontend">
228 <input name="is_visible_frontend" type="checkbox" id="is_visible_frontend"
229 value="1"
230 <?php echo !empty(wmvc_show_data('is_visible_frontend', $db_data, ''))?'checked':''; ?>>
231 <?php echo __('Frontend','wpdirectorykit'); ?>
232 </label>
233 <label for="is_visible_dashboard">
234 <input name="is_visible_dashboard" type="checkbox" id="is_visible_dashboard"
235 value="1"
236 <?php echo !empty(wmvc_show_data('is_visible_dashboard', $db_data, ''))?'checked':''; ?>>
237 <?php echo __('Dashboard','wpdirectorykit'); ?>
238 </label>
239 </fieldset>
240 </td>
241 </tr>
242 <?php endif;?>
243 <tr>
244 <th scope="row"><label for="icon_id"><?php echo __('Icon','wpdirectorykit'); ?></label>
245 </th>
246 <td>
247 <?php
248 echo wmvc_upload_media('icon_id', wmvc_show_data('icon_id', $db_data, ''));
249 ?>
250 <p class="description" id="icon_id-description">
251 <?php echo __('Icon used for amenities or special places on website','wpdirectorykit'); ?>
252 </p>
253 </td>
254 </tr>
255 <tr>
256 <th scope="row"><label for="prefix"><?php echo __('Prefix','wpdirectorykit'); ?></label>
257 </th>
258 <td>
259 <input name="prefix" type="text" id="prefix"
260 value="<?php echo wmvc_show_data('prefix', $db_data, ''); ?>"
261 class="regular-text">
262 <p class="description" id="prefix-description">
263 <?php echo __('Visible before field value usable in currency like $999','wpdirectorykit'); ?>
264 </p>
265 </td>
266 </tr>
267 <tr>
268 <th scope="row"><label for="suffix"><?php echo __('Suffix','wpdirectorykit'); ?></label>
269 </th>
270 <td>
271 <input name="suffix" type="text" id="suffix"
272 value="<?php echo wmvc_show_data('suffix', $db_data, ''); ?>"
273 class="regular-text">
274 <p class="description" id="suffix-description">
275 <?php echo __('Visible after field value usable in metrics like 200ft','wpdirectorykit'); ?>
276 </p>
277 </td>
278 </tr>
279 <tr>
280 <th scope="row"><label
281 for="values_list"><?php echo __('Values','wpdirectorykit'); ?></label></th>
282 <td>
283 <input name="values_list" type="text" id="values_list"
284 value="<?php echo wmvc_show_data('values_list', $db_data, ''); ?>"
285 class="regular-text">
286 <p class="description" id="values_list-description">
287 <?php echo __('Values selectable in dropdown, separate with, like value1,value2,value3','wpdirectorykit'); ?>
288 </p>
289 </td>
290 </tr>
291 <tr>
292 <th scope="row"><label
293 for="empty_value"><?php echo __('Value when empty','wpdirectorykit'); ?></label></th>
294 <td>
295 <input name="empty_value" type="text" id="empty_value"
296 value="<?php echo wmvc_show_data('empty_value', $db_data, ''); ?>"
297 class="regular-text">
298 <p class="description" id="empty_value-description">
299 <?php echo __('This value will be visible if this field is not populated','wpdirectorykit'); ?>
300 </p>
301 </td>
302 </tr>
303 </tbody>
304 </table>
305 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php echo esc_html__('Save Changes','wpdirectorykit'); ?>">
306 </form>
307 </div>
308 </div>
309 </div>
310 </div>
311
312 <?php $this->view('general/footer', $data); ?>