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

289 lines 23.1 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 <div class="cozmoslabs-settings-container">
12
13 <div class="cozmoslabs-form-subsection-wrapper cozmoslabs-settings cozmoslabs-no-title-section">
14 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
15 <label class="cozmoslabs-form-field-label" for="toolbox-automatically-generate-password"><?php esc_html_e('Auto Generate Password', 'profile-builder'); ?></label>
16
17 <div class="cozmoslabs-toggle-container">
18 <input type="checkbox" id="toolbox-automatically-generate-password" name="wppb_toolbox_fields_settings[automatically-generate-password]"<?php echo ( ( isset( $settings['automatically-generate-password'] ) && ( $settings['automatically-generate-password'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
19 <label class="cozmoslabs-toggle-track" for="toolbox-automatically-generate-password"></label>
20 </div>
21
22 <div class="cozmoslabs-toggle-description">
23 <label for="toolbox-automatically-generate-password" class="cozmoslabs-description"><?php esc_html_e( 'Automatically generate password for users.', 'profile-builder' ); ?></label>
24 </div>
25
26 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'By enabling this option, the password will be automatically generated and emailed to the user.', 'profile-builder' ); ?></p>
27 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'In order for this functionality to work you need to add the {{password}} merge tag to the default user registration email.', 'profile-builder' ); ?></p>
28 </div>
29
30 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
31 <label class="cozmoslabs-form-field-label" for="toolbox-send-credentials-hide"><?php esc_html_e('Send Credentials Checkbox', 'profile-builder'); ?></label>
32
33 <div class="cozmoslabs-toggle-container">
34 <input type="checkbox" id="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">
35 <label class="cozmoslabs-toggle-track" for="toolbox-send-credentials-hide"></label>
36 </div>
37
38 <div class="cozmoslabs-toggle-description">
39 <label for="toolbox-send-credentials-hide" class="cozmoslabs-description"><?php esc_html_e( 'Hidden and checked "Send Credentials" checkbox.', 'profile-builder' ); ?></label>
40 </div>
41
42 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'By default, the user needs to choose if he wants to receive a registration email.', 'profile-builder' ); ?></p>
43 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'By enabling this option, the field won\'t be shown and the message will always be sent to the user.', 'profile-builder' ); ?></p>
44 </div>
45
46 <div class="cozmoslabs-form-field-wrapper" id="wppb-toolbox-send-credentials-text">
47 <label class="cozmoslabs-form-field-label" for="toolbox-send-credentials-text"><?php esc_html_e('Send Credentials Text', 'profile-builder'); ?></label>
48 <input type="text" id="toolbox-send-credentials-text" name="wppb_toolbox_fields_settings[send-credentials-text]" value="<?php echo ( !empty( $settings['send-credentials-text']) ? esc_attr( $settings['send-credentials-text'] ) : '' ); ?>">
49
50 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'You can modify the default "Send Credentials" field text by entering something in the field above.', 'profile-builder' ); ?></p>
51 </div>
52
53 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
54 <label class="cozmoslabs-form-field-label" for="toolbox-redirect-if-empty-required"><?php esc_html_e('Empty Required Fields Redirect', 'profile-builder'); ?></label>
55
56 <div class="cozmoslabs-toggle-container">
57 <input type="checkbox" id="toolbox-redirect-if-empty-required" 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">
58 <label class="cozmoslabs-toggle-track" for="toolbox-redirect-if-empty-required"></label>
59 </div>
60
61 <div class="cozmoslabs-toggle-description">
62 <label for="toolbox-redirect-if-empty-required" class="cozmoslabs-description"><?php esc_html_e( 'Redirect users to a page if they have empty required fields.', 'profile-builder' ); ?></label>
63 </div>
64
65 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'By enabling this option, logged in users which have empty required fields on their profile will be redirected to a selected page.', 'profile-builder' ); ?></p>
66 </div>
67
68 <div class="cozmoslabs-form-field-wrapper" id="wppb-toolbox-redirect-if-empty-required-url">
69 <label class="cozmoslabs-form-field-label" for="toolbox-redirect-if-empty-required-url"><?php esc_html_e('Redirect Page', 'profile-builder'); ?></label>
70
71 <select id="toolbox-redirect-if-empty-required-url" name="wppb_toolbox_fields_settings[redirect-if-empty-required-url]">
72 <option value="-1"><?php esc_html_e( 'Choose...', 'profile-builder' ) ?></option>
73
74 <?php
75 foreach( get_pages() as $page )
76 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>';
77 ?>
78 </select>
79
80 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'Select the page where you want to redirect the users which have empty required fields on their profile.', 'profile-builder' ); ?></p>
81 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?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' ); ?></p>
82 <p class="cozmoslabs-description cozmoslabs-description-space-left"><strong><?php esc_html_e( 'NOTE:', 'profile-builder' ); ?></strong> <?php esc_html_e( 'This option will not work if you have conditional logic implemented in the form.', 'profile-builder' ); ?></p>
83 </div>
84
85 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
86 <label class="cozmoslabs-form-field-label" for="toolbox-restricted-words"><?php esc_html_e('Restrict Words', 'profile-builder'); ?></label>
87
88 <div class="cozmoslabs-toggle-container">
89 <input type="checkbox" id="toolbox-restricted-words" name="wppb_toolbox_fields_settings[restricted-words]"<?php echo ( ( isset( $settings['restricted-words'] ) && ( $settings['restricted-words'] == 'on' ) ) ? ' checked' : '' ); ?> value="on" class="wppb-toolbox-switch">
90 <label class="cozmoslabs-toggle-track" for="toolbox-restricted-words"></label>
91 </div>
92
93 <div class="cozmoslabs-toggle-description">
94 <label for="toolbox-restricted-words" class="cozmoslabs-description"><?php esc_html_e( 'Restrict certain words from being used in fields.', 'profile-builder' ); ?></label>
95 </div>
96
97 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?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' ); ?></p>
98 </div>
99
100 <div class="cozmoslabs-form-field-wrapper cozmoslabs-checkbox-list-wrapper wppb-toolbox-accordion">
101 <label class="cozmoslabs-form-field-label"><?php esc_html_e( 'Affected fields', 'profile-builder' ); ?></label>
102
103 <div class="cozmoslabs-checkbox-list cozmoslabs-checkbox-4-col-list">
104 <div class="cozmoslabs-chckbox-container">
105 <input type="checkbox" id="toolbox-ban-username-words" 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">
106 <label class="pms-meta-box-checkbox-label" for="toolbox-ban-username-words"><?php esc_html_e( 'Username', 'profile-builder' ); ?></label>
107 </div>
108
109 <div class="cozmoslabs-chckbox-container">
110 <input type="checkbox" id="toolbox-ban-first-name-words" 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">
111 <label class="pms-meta-box-checkbox-label" for="toolbox-ban-first-name-words"><?php esc_html_e( 'First Name', 'profile-builder' ); ?></label>
112 </div>
113
114 <div class="cozmoslabs-chckbox-container">
115 <input type="checkbox" id="toolbox-ban-last-name-words" 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">
116 <label class="pms-meta-box-checkbox-label" for="toolbox-ban-last-name-words"><?php esc_html_e( 'Last Name', 'profile-builder' ); ?></label>
117 </div>
118 </div>
119
120 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'Chose which fields will be affected by the "Restrict Words" option.', 'profile-builder' ); ?></p>
121 </div>
122
123 <div class="cozmoslabs-form-field-wrapper wppb-toolbox-accordion">
124 <label class="cozmoslabs-form-field-label" for="toolbox-restricted-words-data"><?php esc_html_e( 'Restricted Words', 'profile-builder' ); ?></label>
125
126 <select id="toolbox-restricted-words-data" class="wppb-select wppb-select2" name="wppb_toolbox_fields_settings[restricted-words-data][]" multiple="multiple">
127 <?php
128 if ( !empty( $settings['restricted-words-data'] ) ) {
129 foreach( $settings['restricted-words-data'] as $domain ) {
130 echo '<option value="'.esc_attr( $domain ).'" selected>'.esc_html( $domain ).'</option>';
131
132 }
133 }
134 ?>
135 </select>
136
137 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'Select the words which you want to ban with the "Restrict Words" option.', 'profile-builder' ); ?></p>
138 </div>
139
140 <div class="cozmoslabs-form-field-wrapper wppb-toolbox-accordion">
141 <label class="cozmoslabs-form-field-label" for="toolbox-restricted-words-message"><?php esc_html_e( 'Word Restriction Message', 'profile-builder' ); ?></label>
142 <input type="text" id="toolbox-restricted-words-message" name="wppb_toolbox_fields_settings[restricted-words-message]" value="<?php echo ( !empty( $settings['restricted-words-message']) ? esc_attr( $settings['restricted-words-message'] ) : '' ); ?>">
143 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'Add a message to notify the user when a restricted word is used.', 'profile-builder' ); ?></p>
144 </div>
145
146 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
147 <label class="cozmoslabs-form-field-label" for="toolbox-unique-display-name"><?php esc_html_e('Unique Display Name', 'profile-builder'); ?></label>
148
149 <div class="cozmoslabs-toggle-container">
150 <input type="checkbox" id="toolbox-unique-display-name" name="wppb_toolbox_fields_settings[unique-display-name]"<?php echo ( ( isset( $settings['unique-display-name'] ) && ( $settings['unique-display-name'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
151 <label class="cozmoslabs-toggle-track" for="toolbox-unique-display-name"></label>
152 </div>
153
154 <div class="cozmoslabs-toggle-description">
155 <label for="toolbox-unique-display-name" class="cozmoslabs-description"><?php esc_html_e( 'Unique "Display Name" for users.', 'profile-builder' ); ?></label>
156 </div>
157
158 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'By enabling this option, users will not be able to choose a "Display Name" that is already used by another account.', 'profile-builder' ); ?></p>
159 </div>
160
161 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
162 <label class="cozmoslabs-form-field-label" for="toolbox-capitalize-first-last"><?php esc_html_e('Capitalize Name Fields', 'profile-builder'); ?></label>
163
164 <div class="cozmoslabs-toggle-container">
165 <input type="checkbox" id="toolbox-capitalize-first-last" name="wppb_toolbox_fields_settings[capitalize-first-last]"<?php echo ( ( isset( $settings['capitalize-first-last'] ) && ( $settings['capitalize-first-last'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
166 <label class="cozmoslabs-toggle-track" for="toolbox-capitalize-first-last"></label>
167 </div>
168
169 <div class="cozmoslabs-toggle-description">
170 <label for="toolbox-capitalize-first-last" class="cozmoslabs-description"><?php esc_html_e( 'Always capitalize "First Name" and "Last Name" default fields.', 'profile-builder' ); ?></label>
171 </div>
172
173 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?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' ); ?></p>
174 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'eg.: "John Doe" instead of "john doe"', 'profile-builder' ); ?></p>
175 </div>
176
177 <?php if ( defined( 'WPPB_PAID_PLUGIN_DIR' ) && file_exists( WPPB_PAID_PLUGIN_DIR . '/front-end/extra-fields/extra-fields.php' ) ) : ?>
178 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
179 <label class="cozmoslabs-form-field-label" for="toolbox-datepicker-starts-monday"><?php esc_html_e('Datepicker Starts Monday', 'profile-builder'); ?></label>
180
181 <div class="cozmoslabs-toggle-container">
182 <input type="checkbox" id="toolbox-datepicker-starts-monday" name="wppb_toolbox_fields_settings[datepicker-starts-monday]"<?php echo ( ( isset( $settings['datepicker-starts-monday'] ) && ( $settings['datepicker-starts-monday'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
183 <label class="cozmoslabs-toggle-track" for="toolbox-datepicker-starts-monday"></label>
184 </div>
185
186 <div class="cozmoslabs-toggle-description">
187 <label for="toolbox-datepicker-starts-monday" class="cozmoslabs-description"><?php esc_html_e( 'Make all Datepickers use Monday as the first day of the week.', 'profile-builder' ); ?></label>
188 </div>
189 </div>
190 <?php endif; ?>
191
192 <?php
193 $wppb_module_settings = get_option( 'wppb_module_settings' );
194
195 if ( $wppb_module_settings != false && isset( $wppb_module_settings['wppb_repeaterFields']) && $wppb_module_settings['wppb_repeaterFields'] == 'show' ) :
196 ?>
197 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
198 <label class="cozmoslabs-form-field-label" for="toolbox-remove-repeater-fields"><?php esc_html_e('Hide Repeater Fields', 'profile-builder'); ?></label>
199
200 <div class="cozmoslabs-toggle-container">
201 <input type="checkbox" id="toolbox-remove-repeater-fields" name="wppb_toolbox_fields_settings[remove-repeater-fields]"<?php echo ( ( isset( $settings['remove-repeater-fields'] ) && ( $settings['remove-repeater-fields'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
202 <label class="cozmoslabs-toggle-track" for="toolbox-remove-repeater-fields"></label>
203 </div>
204
205 <div class="cozmoslabs-toggle-description">
206 <label for="toolbox-remove-repeater-fields" class="cozmoslabs-description"><?php esc_html_e( 'Hide Repeater Fields from the back-end Profile page.', 'profile-builder' ); ?></label>
207 </div>
208
209 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?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' ); ?></p>
210 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'You will still be able to use them from a front-end Edit Profile Form.', 'profile-builder' ); ?></p>
211 </div>
212 <?php endif; ?>
213
214 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
215 <label class="cozmoslabs-form-field-label" for="toolbox-password-visibility-hide"><?php esc_html_e('Password Visibility Toggle', 'profile-builder'); ?></label>
216
217 <div class="cozmoslabs-toggle-container">
218 <input type="checkbox" id="toolbox-password-visibility-hide" name="wppb_toolbox_fields_settings[password-visibility-hide]"<?php echo ( ( isset( $settings['password-visibility-hide'] ) && ( $settings['password-visibility-hide'] == 'yes' ) ) ? ' checked' : '' ); ?> value="yes">
219 <label class="cozmoslabs-toggle-track" for="toolbox-password-visibility-hide"></label>
220 </div>
221
222 <div class="cozmoslabs-toggle-description">
223 <label for="toolbox-password-visibility-hide" class="cozmoslabs-description"><?php esc_html_e( 'Show the Password field visibility toggle.', 'profile-builder' ); ?></label>
224 </div>
225
226 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'Enabling this option will show a visibility toggle button for all Password fields..', 'profile-builder' ); ?></p>
227 </div>
228
229 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
230 <label class="cozmoslabs-form-field-label" for="toolbox-remove-all-fields-from-backend"><?php esc_html_e('Remove Extra Fields', 'profile-builder'); ?></label>
231
232 <div class="cozmoslabs-toggle-container">
233 <input type="checkbox" id="toolbox-remove-all-fields-from-backend" 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">
234 <label class="cozmoslabs-toggle-track" for="toolbox-remove-all-fields-from-backend"></label>
235 </div>
236
237 <div class="cozmoslabs-toggle-description">
238 <label for="toolbox-remove-all-fields-from-backend" class="cozmoslabs-description"><?php esc_html_e( 'Remove all Extra Fields from back-end Edit Profile page.', 'profile-builder' ); ?></label>
239 </div>
240
241 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'Enabling this option will remove all Custom Fields from the backend Profile page created with Profile Builder.', 'profile-builder' ); ?></p>
242 </div>
243
244 <div class="cozmoslabs-form-field-wrapper cozmoslabs-toggle-switch">
245 <label class="cozmoslabs-form-field-label" for="toolbox-update-db-meta-keys"><?php esc_html_e('Update Database Entries', 'profile-builder'); ?></label>
246
247 <div class="cozmoslabs-toggle-container">
248 <input type="checkbox" id="toolbox-update-db-meta-keys" 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">
249 <label class="cozmoslabs-toggle-track" for="toolbox-update-db-meta-keys"></label>
250 </div>
251
252 <div class="cozmoslabs-toggle-description">
253 <label for="toolbox-update-db-meta-keys" class="cozmoslabs-description"><?php esc_html_e( 'Update database entries when changing meta key.', 'profile-builder' ); ?></label>
254 </div>
255
256 <p class="cozmoslabs-description cozmoslabs-description-space-left"><?php esc_html_e( 'Enabling this option, when changing the meta key of a field, existing entries from the database will be updated as well.', 'profile-builder' ); ?></p>
257 </div>
258
259 <?php do_action( 'wppb_extra_toolbox_fields_settings', $settings ); ?>
260
261 </div>
262
263 <div class="submit cozmoslabs-submit">
264 <h3 class="cozmoslabs-subsection-title"><?php esc_html_e( 'Update Settings', 'profile-builder' ) ?></h3>
265 <div class="cozmoslabs-publish-button-group">
266 <?php submit_button( __( 'Save Changes', 'profile-builder' ) ); ?>
267 </div>
268 </div>
269
270 </div>
271
272 </form>
273
274 <div class="cozmoslabs-settings-container wppb-toolbox-fields-extra-links">
275 <div class="cozmoslabs-form-subsection-wrapper cozmoslabs-settings">
276 <h3 class="cozmoslabs-subsection-title"><?php esc_html_e( 'Manage Form Fields', 'profile-builder' ); ?></h3>
277 <div class="cozmoslabs-form-field-wrapper">
278 <p class="cozmoslabs-description">
279 <?php esc_html_e( 'Field management is now built into the form editor via the Existing Fields panel. The legacy Form Fields page remains available for reviewing the global field list and for debugging.', 'profile-builder' ); ?>
280 </p>
281 <p>
282 <a class="button button-secondary" href="<?php echo esc_url( admin_url( 'admin.php?page=manage-fields' ) ); ?>">
283 <?php esc_html_e( 'Open Form Fields', 'profile-builder' ); ?>
284 </a>
285 </p>
286 </div>
287 </div>
288 </div>
289