PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 3.7.0
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v3.7.0
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.7.0, at admin/advanced-settings/includes/views/view-fields.php

312 lines 16.6 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 </ul>
97 </td>
98 </tr>
99
100 <tr>
101 <th><?php esc_html_e( 'Ban certain words from being used in fields', 'profile-builder' ); ?></th>
102
103 <td>
104 <ul class="wppb-toolbox-list">
105 <li>
106 <label>
107 <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">
108 <?php esc_html_e( 'On', 'profile-builder' ); ?>
109 </label>
110 </li>
111 </ul>
112
113 <div class="wppb-toolbox-accordion">
114 <ul class="wppb-toolbox-list">
115 <li class="toolbox-label">
116 <strong><?php esc_html_e( 'Affected fields:', 'profile-builder' ); ?></strong>
117 </li>
118 <li>
119 <label>
120 <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">
121 <?php esc_html_e( 'Username', 'profile-builder' ); ?>
122 </label>
123 </li>
124 <li>
125 <label>
126 <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">
127 <?php esc_html_e( 'First Name', 'profile-builder' ); ?>
128 </label>
129 </li>
130 <li>
131 <label>
132 <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">
133 <?php esc_html_e( 'Last Name', 'profile-builder' ); ?>
134 </label>
135 </li>
136 </ul>
137
138 <ul class="wppb-toolbox-list">
139 <li class="toolbox-label">
140 <strong><?php esc_html_e( 'Banned words:', 'profile-builder' ); ?></strong>
141 </li>
142 <li class="toolbox-select2-container">
143 <select id="toolbox-restricted-emails" class="wppb-select" name="wppb_toolbox_fields_settings[restricted-words-data][]" multiple="multiple">
144
145 <?php
146 if ( !empty( $settings['restricted-words-data'] ) ) {
147 foreach( $settings['restricted-words-data'] as $domain ) {
148 echo '<option value="'.esc_attr( $domain ).'" selected>'.esc_html( $domain ).'</option>';
149 }
150 }
151 ?>
152
153 </select>
154 </li>
155 </ul>
156
157 <ul class="wppb-toolbox-list">
158 <li class="toolbox-label">
159 <strong><?php esc_html_e( 'Error message:', 'profile-builder' ); ?></strong>
160 </li>
161 <li id="toolbox-restricted-email-domains-message">
162 <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'] ) : '' ); ?>">
163 </li>
164 </ul>
165
166 </div>
167
168 <ul>
169 <li class="description">
170 <?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' ); ?>
171 </li>
172 </ul>
173 </td>
174 </tr>
175
176 <tr>
177 <th><?php esc_html_e( 'Unique \'Display Name\' for users', 'profile-builder' ); ?></th>
178
179 <td>
180 <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">
181 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
182 </label>
183
184 <ul>
185 <li class="description">
186 <?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' ) ); ?>
187 </li>
188 </ul>
189 </td>
190 </tr>
191
192 <tr>
193 <th><?php esc_html_e( 'Always capitalize \'First Name\' and \'Last Name\' default fields', 'profile-builder' ); ?></th>
194
195 <td>
196 <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">
197 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
198 </label>
199
200 <ul>
201 <li class="description">
202 <?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' ); ?>
203 </li>
204 <li class="description">
205 <?php echo wp_kses_post( __( 'eg.: <strong>John Doe</strong> instead of <strong>john doe</strong>', 'profile-builder' ) ); ?>
206 </li>
207 </ul>
208 </td>
209 </tr>
210
211 <?php if ( file_exists(WPPB_PLUGIN_DIR . '/front-end/extra-fields/extra-fields.php') ) : ?>
212 <tr>
213 <th><?php esc_html_e( 'Datepicker starts on Monday', 'profile-builder' ); ?></th>
214
215 <td>
216 <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">
217 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
218 </label>
219
220 <ul>
221 <li class="description">
222 <?php esc_html_e( 'Will make all Datepickers use Monday as the first day of the week.', 'profile-builder' ); ?>
223 </li>
224 </ul>
225 </td>
226 </tr>
227 <?php endif; ?>
228
229
230 <?php
231 $wppb_module_settings = get_option( 'wppb_module_settings' );
232
233 if ( $wppb_module_settings != false && isset( $wppb_module_settings['wppb_repeaterFields']) && $wppb_module_settings['wppb_repeaterFields'] == 'show' ) :
234 ?>
235 <tr>
236 <th><?php esc_html_e( 'Hide Repeater Fields from the back-end profile page', 'profile-builder' ); ?></th>
237
238 <td>
239 <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">
240 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
241 </label>
242
243 <ul>
244 <li class="description">
245 <?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' ); ?>
246 </li>
247 <li class="description">
248 <?php esc_html_e( 'You will still be able to use them from a front-end edit profile form.', 'profile-builder' ); ?>
249 </li>
250 </ul>
251 </td>
252 </tr>
253 <?php endif; ?>
254
255 <tr>
256 <th><?php esc_html_e( 'Show the Password field visibility toggle', 'profile-builder' ); ?></th>
257
258 <td>
259 <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">
260 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
261 </label>
262
263 <ul>
264 <li class="description">
265 <?php esc_html_e( 'Activating this option will show a visibility toggle button for all Password fields.', 'profile-builder' ); ?>
266 </li>
267 </ul>
268 </td>
269 </tr>
270
271 <?php if ( file_exists( WPPB_PLUGIN_DIR . '/front-end/extra-fields/extra-fields.php' ) ) : ?>
272 <tr>
273 <th><?php esc_html_e( 'Remove All Extra Fields from Backend edit profile page.', 'profile-builder' ); ?></th>
274
275 <td>
276 <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">
277 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
278 </label>
279
280 <ul>
281 <li class="description">
282 <?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' ); ?>
283 </li>
284 </ul>
285 </td>
286 </tr>
287 <?php endif; ?>
288
289 <?php if ( file_exists( WPPB_PLUGIN_DIR . '/front-end/extra-fields/extra-fields.php' ) ) : ?>
290 <tr>
291 <th><?php esc_html_e( 'Update database entries when changing meta key', 'profile-builder' ); ?></th>
292
293 <td>
294 <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">
295 <?php esc_html_e( 'Yes', 'profile-builder' ); ?>
296 </label>
297
298 <ul>
299 <li class="description">
300 <?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' ); ?>
301 </li>
302 </ul>
303 </td>
304 </tr>
305 <?php endif; ?>
306
307 </table>
308
309 <?php submit_button( __( 'Save Changes', 'profile-builder' ) ); ?>
310
311 </form>
312