wp-user-avatar
/
src
/
Admin
/
SettingsPages
/
ShortcodeBuilder
/
EditShortcodeEditProfile
/
edit_screen.php
wp-user-avatar
/
src
/
Admin
/
SettingsPages
/
ShortcodeBuilder
/
EditShortcodeEditProfile
Last commit date
EditShortcodeEditProfile.php
5 years ago
edit_screen.php
5 years ago
edit_screen.php
78 lines
| 1 | <?php |
| 2 | |
| 3 | use ProfilePress\Core\Classes\FormRepository; |
| 4 | |
| 5 | $form_id = absint($_GET['id']); |
| 6 | |
| 7 | $title = FormRepository::get_name($form_id, FormRepository::EDIT_PROFILE_TYPE); |
| 8 | $structure = FormRepository::get_form_meta($form_id, FormRepository::EDIT_PROFILE_TYPE, FormRepository::FORM_STRUCTURE); |
| 9 | $css = FormRepository::get_form_meta($form_id, FormRepository::EDIT_PROFILE_TYPE, FormRepository::FORM_CSS); |
| 10 | |
| 11 | $success_message = FormRepository::get_form_meta($form_id, FormRepository::EDIT_PROFILE_TYPE, FormRepository::SUCCESS_MESSAGE); |
| 12 | |
| 13 | $title = isset($_POST['eup_title']) ? esc_attr($_POST['eup_title']) : $title; |
| 14 | $content = isset($_POST['eup_structure']) ? stripslashes($_POST['eup_structure']) : $structure; |
| 15 | ?> |
| 16 | |
| 17 | <form method="post"> |
| 18 | <div class="ppSCB-margin-r"> |
| 19 | <div class="ppSCB-tab-box"> |
| 20 | <div id="titlediv"> |
| 21 | <div id="titlewrap"> |
| 22 | <label class="screen-reader-text" id="title-prompt-text" for="title"><?= esc_html__('Enter title here', 'wp-user-avatar') ?></label> |
| 23 | <input name="eup_title" type="text" value="<?= $title ?>" id="title"> |
| 24 | <input class="ppSCB-save-btn button-primary" type="submit" name="edit_user_profile" value="<?= esc_html__('Save Changes', 'wp-user-avatar') ?>"> |
| 25 | </div> |
| 26 | </div> |
| 27 | <h2 class="nav-tab-wrapper"> |
| 28 | <a class="nav-tab" href="#ppStructure"><?= esc_html__('Structure', 'wp-user-avatar') ?></a> |
| 29 | <a class="nav-tab" href="#ppCSS"><?= esc_html__('CSS', 'wp-user-avatar') ?></a> |
| 30 | <a class="nav-tab" href="#ppSettings"><?= esc_html__('Settings', 'wp-user-avatar') ?></a> |
| 31 | |
| 32 | <span class="pp-form-builder-shortcodes-btn"> |
| 33 | <a href="#" id="ppress-available-shortcodes-btn" class="button button-secondary"><?= esc_html__('Available Shortcodes', 'wp-user-avatar') ?></a> |
| 34 | </span> |
| 35 | |
| 36 | </h2> |
| 37 | <div class="ppSCB-tab-box-div"> |
| 38 | <div id="ppStructure" class="ppSCB-tab-content"> |
| 39 | <textarea rows="30" name="eup_structure" id="pp_edit_profile_structure"><?php echo $content ?></textarea> |
| 40 | <div class="ppSCB-clear-both"></div> |
| 41 | </div> |
| 42 | <div id="ppCSS" class="ppSCB-tab-content"> |
| 43 | <textarea rows="30" name="eup_css" id="pp_edit_profile_css"><?php echo isset($_POST['eup_css']) ? stripslashes($_POST['eup_css']) : $css; ?></textarea> |
| 44 | <div class="ppSCB-clear-both"></div> |
| 45 | </div> |
| 46 | <div id="ppSettings" class="ppSCB-tab-content"> |
| 47 | <h4 class="ppSCB-tab-content-header"><?=esc_html__('General Settings', 'wp-user-avatar')?></h4> |
| 48 | <table class="form-table"> |
| 49 | <?php do_action('ppress_shortcode_builder_edit_profile_screen_before', $form_id); ?> |
| 50 | <tr> |
| 51 | <th scope="row"> |
| 52 | <label for="processing_label"><?php _e('Processing Label', 'wp-user-avatar'); ?></label> |
| 53 | </th> |
| 54 | <td> |
| 55 | <input type="text" name="processing_label" id="processing_label" value="<?= FormRepository::get_processing_label($form_id, FormRepository::EDIT_PROFILE_TYPE); ?>"/> |
| 56 | <p class="description"><?php _e('This is the text shown on the submit button when the form is submitted.', 'wp-user-avatar'); ?></p> |
| 57 | </td> |
| 58 | </tr> |
| 59 | <tr> |
| 60 | <th scope="row"><label for="message_success"><?=__('Success Message', 'wp-user-avatar')?></label> |
| 61 | </th> |
| 62 | <td> |
| 63 | <textarea name="eup_success_edit_profile" id="message_success"><?php echo isset($_POST['eup_success_edit_profile']) ? $_POST['eup_success_edit_profile'] : stripslashes(esc_textarea($success_message)); ?></textarea> |
| 64 | <p class="description"><?=__('Message to display when a user profile is edited.', 'wp-user-avatar')?></p> |
| 65 | </td> |
| 66 | </tr> |
| 67 | <?php do_action('ppress_shortcode_builder_edit_profile_screen_after', $form_id); ?> |
| 68 | </table> |
| 69 | <div class="ppSCB-clear-both"></div> |
| 70 | </div> |
| 71 | </div> |
| 72 | </div> |
| 73 | <div class="ppSCB-sidebar"> |
| 74 | <h3><?= esc_html__('Preview', 'wp-user-avatar') ?></h3> |
| 75 | <iframe id="indexIframe"></iframe> |
| 76 | </div> |
| 77 | </div> |
| 78 | </form> |