PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 3.9.6
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v3.9.6
4.0.3 4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 341 releases
profile-builder / admin / advanced-settings / includes / views / view-fields.php

view-fields.php in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 3.9.6, at admin/advanced-settings/includes/views/view-fields.php

312 lines 16.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
2
3 <?php
4 $settings = get_option( 'wppb_toolbox_fields_settings' );
5 ?>
6
7 <form method="post" action="options.php">
8
9 <?php settings_fields( 'wppb_toolbox_fields_settings' ); ?>
10
11 <table class="form-table">
12
13 <tr>
14 <th><?php esc_html_e( 'Automatically generate password for users', 'profile-builder' ); ?></th>
15
16 <td>
17 <label><input type="checkbox" name="wppb_toolbox_fields_settings[automatically-generate-password]"<?php echo ( ( isset( $settings['automatically-generate-password'] ) && ( $settings['automatically-generate-password'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
18 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
19 </label>
20
21 <ul>
22 <li class="description">
23 <?php esc_html_e( 'By checking this option, the password will be automatically generated and emailed to the user.', 'profile-builder' ); ?>
24 </li>
25 </ul>
26 </td>
27 </tr>
28
29 <tr>
30 <th><?php esc_html_e( 'Modify \'Send Credentials\' checkbox', 'profile-builder' ); ?></th>
31
32 <td>
33 <label><input type="checkbox" id="wppb-toolbox-send-credentials-hide" name="wppb_toolbox_fields_settings[send-credentials-hide]"<?php echo ( ( isset( $settings['send-credentials-hide'] ) && ( $settings['send-credentials-hide'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
34 <?php esc_html_e( 'Hidden and checked', 'profile-builder' ); ?>
35 </label>
36
37 <ul class="wppb-toolbox-list wppb-toolbox-list--margin">
38 <li>
39 <strong><?php esc_html_e( 'Field text:', 'profile-builder' ); ?></strong>
40 </li>
41
42 <li id="toolbox-send-credentials-text">
43 <input type="text" name="wppb_toolbox_fields_settings[send-credentials-text]" value="<?php echo ( !empty( $settings['send-credentials-text']) ? esc_attr( $settings['send-credentials-text'] ) : '' ); ?>">
44 </li>
45 </ul>
46
47 <ul>
48 <li class="description">
49 <?php esc_html_e( 'By default, the user needs to choose if he wants to receive a registration email.', 'profile-builder' ); ?>
50 </li>
51 <li class="description">
52 <?php echo wp_kses_post( __( 'By checking the <strong>Hidden and checked</strong> option, the field won\'t be shown and the message will always be sent to the user.', 'profile-builder' ) ); ?>
53 </li>
54 <li class="description">
55 <?php esc_html_e( 'If you choose to show the field, you can modify the default text by entering something in the field from above.', 'profile-builder' ); ?>
56 </li>
57 </ul>
58 </td>
59 </tr>
60
61 <tr>
62 <th><?php esc_html_e( 'Redirect users to a page if they have empty required fields', 'profile-builder' ); ?></th>
63
64 <td>
65 <label><input type="checkbox" id="wppb-toolbox-redirect-users-hide" name="wppb_toolbox_fields_settings[redirect-if-empty-required]"<?php echo ( ( isset( $settings['redirect-if-empty-required'] ) && ( $settings['redirect-if-empty-required'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
66 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
67 </label>
68
69 <ul class="wppb-toolbox-list wppb-toolbox-list--margin" style="display:none">
70 <li>
71 <strong><?php esc_html_e( 'Redirect Page:', 'profile-builder' ); ?></strong>
72 </li>
73
74
75 <li id="toolbox-redirect-users-url">
76
77 <select name="wppb_toolbox_fields_settings[redirect-if-empty-required-url]">
78 <option value="-1"><?php esc_html_e( 'Choose...', 'profile-builder' ) ?></option>
79
80 <?php
81 foreach( get_pages() as $page )
82 echo '<option value="' . esc_attr( $page->ID ) . '"' . ( isset( $settings['redirect-if-empty-required-url'] ) ? selected( $settings['redirect-if-empty-required-url'], $page->ID, false ) : '') . '>' . esc_html( $page->post_title ) . ' ( ID: ' . esc_attr( $page->ID ) . ')' . '</option>';
83 ?>
84 </select>
85
86 </li>
87 </ul>
88
89 <ul>
90 <li class="description">
91 <?php esc_html_e( 'By activating this option, logged in users which have empty required fields on their profile will be redirected to the page you added above.', 'profile-builder' ); ?>
92 </li>
93 <li class="description">
94 <?php esc_html_e( 'For example, you can redirect these users to the Edit Profile form so they can add the missing info.', 'profile-builder' ); ?>
95 </li>
96 <li class="description">
97 <?php esc_html_e( 'This option will not work if you have conditional logic implemented in the form.', 'profile-builder' ); ?>
98 </li>
99 </ul>
100 </td>
101 </tr>
102
103 <tr>
104 <th><?php esc_html_e( 'Ban certain words from being used in fields', 'profile-builder' ); ?></th>
105
106 <td>
107 <ul class="wppb-toolbox-list">
108 <li>
109 <label>
110 <input type="checkbox" name="wppb_toolbox_fields_settings[restricted-words]"<?php echo ( ( isset( $settings['restricted-words'] ) && ( $settings['restricted-words'] == 'on' ) ) ? ' checked' : '' ); ?> value="on" class="wppb-toolbox-switch">
111 <?php esc_html_e( 'On', 'profile-builder' ); ?>
112 </label>
113 </li>
114 </ul>
115
116 <div class="wppb-toolbox-accordion">
117 <ul class="wppb-toolbox-list">
118 <li class="toolbox-label">
119 <strong><?php esc_html_e( 'Affected fields:', 'profile-builder' ); ?></strong>
120 </li>
121 <li>
122 <label>
123 <input type="checkbox" name="wppb_toolbox_fields_settings[restricted-words-fields][]"<?php echo ( ( isset( $settings['restricted-words-fields'] ) && in_array( 'username', $settings['restricted-words-fields'] ) ) ? ' checked' : '' ); ?> value="username">
124 <?php esc_html_e( 'Username', 'profile-builder' ); ?>
125 </label>
126 </li>
127 <li>
128 <label>
129 <input type="checkbox" name="wppb_toolbox_fields_settings[restricted-words-fields][]"<?php echo ( ( isset( $settings['restricted-words-fields'] ) && in_array( 'first-name', $settings['restricted-words-fields'] ) ) ? ' checked' : '' ); ?> value="first-name">
130 <?php esc_html_e( 'First Name', 'profile-builder' ); ?>
131 </label>
132 </li>
133 <li>
134 <label>
135 <input type="checkbox" name="wppb_toolbox_fields_settings[restricted-words-fields][]"<?php echo ( ( isset( $settings['restricted-words-fields'] ) && in_array( 'last-name', $settings['restricted-words-fields'] ) ) ? ' checked' : '' ); ?> value="last-name">
136 <?php esc_html_e( 'Last Name', 'profile-builder' ); ?>
137 </label>
138 </li>
139 </ul>
140
141 <ul class="wppb-toolbox-list">
142 <li class="toolbox-label">
143 <strong><?php esc_html_e( 'Banned words:', 'profile-builder' ); ?></strong>
144 </li>
145 <li class="toolbox-select2-container">
146 <select id="toolbox-restricted-emails" class="wppb-select" name="wppb_toolbox_fields_settings[restricted-words-data][]" multiple="multiple">
147
148 <?php
149 if ( !empty( $settings['restricted-words-data'] ) ) {
150 foreach( $settings['restricted-words-data'] as $domain ) {
151 echo '<option value="'.esc_attr( $domain ).'" selected>'.esc_html( $domain ).'</option>';
152 }
153 }
154 ?>
155
156 </select>
157 </li>
158 </ul>
159
160 <ul class="wppb-toolbox-list">
161 <li class="toolbox-label">
162 <strong><?php esc_html_e( 'Error message:', 'profile-builder' ); ?></strong>
163 </li>
164 <li id="toolbox-restricted-email-domains-message">
165 <input type="text" name="wppb_toolbox_fields_settings[restricted-words-message]" value="<?php echo ( !empty( $settings['restricted-words-message']) ? esc_attr( $settings['restricted-words-message'] ) : '' ); ?>">
166 </li>
167 </ul>
168
169 </div>
170
171 <ul>
172 <li class="description">
173 <?php esc_html_e( 'Allows you to define some words which users cannot use in their Username, First Name or Last Name when registering.', 'profile-builder' ); ?>
174 </li>
175 </ul>
176 </td>
177 </tr>
178
179 <tr>
180 <th><?php esc_html_e( 'Unique \'Display Name\' for users', 'profile-builder' ); ?></th>
181
182 <td>
183 <label><input type="checkbox" name="wppb_toolbox_fields_settings[unique-display-name]"<?php echo ( ( isset( $settings['unique-display-name'] ) && ( $settings['unique-display-name'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
184 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
185 </label>
186
187 <ul>
188 <li class="description">
189 <?php echo wp_kses_post( __( 'By checking this option, users will not be able to choose a <strong>Display Name</strong> that is already used by another account.', 'profile-builder' ) ); ?>
190 </li>
191 </ul>
192 </td>
193 </tr>
194
195 <tr>
196 <th><?php esc_html_e( 'Always capitalize \'First Name\' and \'Last Name\' default fields', 'profile-builder' ); ?></th>
197
198 <td>
199 <label><input type="checkbox" name="wppb_toolbox_fields_settings[capitalize-first-last]"<?php echo ( ( isset( $settings['capitalize-first-last'] ) && ( $settings['capitalize-first-last'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
200 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
201 </label>
202
203 <ul>
204 <li class="description">
205 <?php esc_html_e( 'If you have these fields in your forms, they will be always saved with the first letter as uppercase.', 'profile-builder' ); ?>
206 </li>
207 <li class="description">
208 <?php echo wp_kses_post( __( 'eg.: <strong>John Doe</strong> instead of <strong>john doe</strong>', 'profile-builder' ) ); ?>
209 </li>
210 </ul>
211 </td>
212 </tr>
213
214 <?php if ( defined( 'WPPB_PAID_PLUGIN_DIR' ) && file_exists( WPPB_PAID_PLUGIN_DIR . '/front-end/extra-fields/extra-fields.php' ) ) : ?>
215 <tr>
216 <th><?php esc_html_e( 'Datepicker starts on Monday', 'profile-builder' ); ?></th>
217
218 <td>
219 <label><input type="checkbox" name="wppb_toolbox_fields_settings[datepicker-starts-monday]"<?php echo ( ( isset( $settings['datepicker-starts-monday'] ) && ( $settings['datepicker-starts-monday'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
220 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
221 </label>
222
223 <ul>
224 <li class="description">
225 <?php esc_html_e( 'Will make all Datepickers use Monday as the first day of the week.', 'profile-builder' ); ?>
226 </li>
227 </ul>
228 </td>
229 </tr>
230 <?php endif; ?>
231
232
233 <?php
234 $wppb_module_settings = get_option( 'wppb_module_settings' );
235
236 if ( $wppb_module_settings != false && isset( $wppb_module_settings['wppb_repeaterFields']) && $wppb_module_settings['wppb_repeaterFields'] == 'show' ) :
237 ?>
238 <tr>
239 <th><?php esc_html_e( 'Hide Repeater Fields from the back-end profile page', 'profile-builder' ); ?></th>
240
241 <td>
242 <label><input type="checkbox" name="wppb_toolbox_fields_settings[remove-repeater-fields]"<?php echo ( ( isset( $settings['remove-repeater-fields'] ) && ( $settings['remove-repeater-fields'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
243 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
244 </label>
245
246 <ul>
247 <li class="description">
248 <?php esc_html_e( 'Repeater Fields from Profile Builder do not work on the back-end user profile page, they are just displayed. If you want to remove them completely, you can use this option.', 'profile-builder' ); ?>
249 </li>
250 <li class="description">
251 <?php esc_html_e( 'You will still be able to use them from a front-end edit profile form.', 'profile-builder' ); ?>
252 </li>
253 </ul>
254 </td>
255 </tr>
256 <?php endif; ?>
257
258 <tr>
259 <th><?php esc_html_e( 'Show the Password field visibility toggle', 'profile-builder' ); ?></th>
260
261 <td>
262 <label><input type="checkbox" name="wppb_toolbox_fields_settings[password-visibility-hide]"<?php echo ( ( isset( $settings['password-visibility-hide'] ) && ( $settings['password-visibility-hide'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
263 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
264 </label>
265
266 <ul>
267 <li class="description">
268 <?php esc_html_e( 'Activating this option will show a visibility toggle button for all Password fields.', 'profile-builder' ); ?>
269 </li>
270 </ul>
271 </td>
272 </tr>
273
274
275 <tr>
276 <th><?php esc_html_e( 'Remove All Extra Fields from Backend edit profile page.', 'profile-builder' ); ?></th>
277
278 <td>
279 <label><input type="checkbox" name="wppb_toolbox_fields_settings[remove-all-fields-from-backend]"<?php echo ( ( isset( $settings['remove-all-fields-from-backend'] ) && ( $settings['remove-all-fields-from-backend'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
280 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
281 </label>
282
283 <ul>
284 <li class="description">
285 <?php esc_html_e( 'If you activate this option, it will remove all custom fields from the backend profile page created with Profile Builder.', 'profile-builder' ); ?>
286 </li>
287 </ul>
288 </td>
289 </tr>
290
291 <tr>
292 <th><?php esc_html_e( 'Update database entries when changing meta key', 'profile-builder' ); ?></th>
293
294 <td>
295 <label><input type="checkbox" name="wppb_toolbox_fields_settings[update-db-meta-keys]"<?php echo ( ( isset( $settings['update-db-meta-keys'] ) && ( $settings['update-db-meta-keys'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
296 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
297 </label>
298
299 <ul>
300 <li class="description">
301 <?php esc_html_e( 'If you activate this option, when changing the meta key of a field, existing entries from the database will be updated as well.', 'profile-builder' ); ?>
302 </li>
303 </ul>
304 </td>
305 </tr>
306
307 </table>
308
309 <?php submit_button( __( 'Save Changes', 'profile-builder' ) ); ?>
310
311 </form>
312