mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 14:13:46 +09:00
- Emails (single email settings) section;
This commit is contained in:
@@ -56,6 +56,12 @@ th.column-email.column-primary {
|
||||
#um-settings-form .subsubsub {
|
||||
float: left;
|
||||
width: 100%; }
|
||||
#um-settings-form h2.title a.um-back-button {
|
||||
font-weight: normal;
|
||||
font-size: 30px;
|
||||
line-height: 1;
|
||||
text-decoration: none;
|
||||
margin-right: 5px; }
|
||||
|
||||
.um-settings-line .multi-checkbox-line {
|
||||
float: left;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.um-settings-section .description{font-style:italic}.um-notification-status{margin-right:18px;font-size:28px;line-height:22px;color:#c74a4a;float:left;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.um-notification-status.um-notification-is-active{color:#7acf58}.um-email-configure span{line-height:24px}.um-long-field{width:100%}.um-medium-field{width:50%}.um-small-field{width:25%}.column-configure{width:10%;text-align:right}th.column-email.column-primary{padding-left:48px}.um-form-table .um-forms-line td{padding-right:0}#um-settings-emails{margin:15px 0}#um-settings-template-versions{margin:15px 0}#um-settings-template-versions .wp-list-table .column-core_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-theme_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-status{width:260px}#um-settings-form{float:left;width:100%;margin:0}#um-settings-form .subsubsub{float:left;width:100%}.um-settings-line .multi-checkbox-line{float:left;width:100%;clear:both;margin:0 0 10px 0;padding:0}.um-settings-line .multi-checkbox-column{float:left;margin:0;padding:0}.um-settings-line .multi-checkbox-column label{float:left;width:100%}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:240px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-expired a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-valid{background-color:#5abc55;color:#fff;border-color:#5abc55}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses~p.submit{clear:both}@media screen and (max-width:980px){.wrap-licenses .form-table tr{width:calc(50% - 15px);max-width:none}}@media screen and (max-width:782px){#um-settings-template-versions .wp-list-table .column-core_version,#um-settings-template-versions .wp-list-table .column-theme_version{width:auto;text-align:left}.wrap-licenses .form-table tr{width:100%;margin-right:0;max-width:none}.um-settings-line .multi-checkbox-column{width:100%!important}.um-settings-line .multi-checkbox-column label{line-height:30px!important}.um-medium-field{width:100%}.um-small-field{width:50%}}.um_setting_ajax_button_response.complete{color:#7acf58;font-style:italic}.wp-core-ui .button.um_license_activate,.wp-core-ui .button.um_license_deactivate,.wp-core-ui .button.um_license_reactivate{margin-top:5px}.um-media-upload .um-media-upload-url{margin-bottom:5px}
|
||||
.um-settings-section .description{font-style:italic}.um-notification-status{margin-right:18px;font-size:28px;line-height:22px;color:#c74a4a;float:left;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.um-notification-status.um-notification-is-active{color:#7acf58}.um-email-configure span{line-height:24px}.um-long-field{width:100%}.um-medium-field{width:50%}.um-small-field{width:25%}.column-configure{width:10%;text-align:right}th.column-email.column-primary{padding-left:48px}.um-form-table .um-forms-line td{padding-right:0}#um-settings-emails{margin:15px 0}#um-settings-template-versions{margin:15px 0}#um-settings-template-versions .wp-list-table .column-core_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-theme_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-status{width:260px}#um-settings-form{float:left;width:100%;margin:0}#um-settings-form .subsubsub{float:left;width:100%}#um-settings-form h2.title a.um-back-button{font-weight:400;font-size:30px;line-height:1;text-decoration:none;margin-right:5px}.um-settings-line .multi-checkbox-line{float:left;width:100%;clear:both;margin:0 0 10px 0;padding:0}.um-settings-line .multi-checkbox-column{float:left;margin:0;padding:0}.um-settings-line .multi-checkbox-column label{float:left;width:100%}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:240px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-expired a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-valid{background-color:#5abc55;color:#fff;border-color:#5abc55}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses~p.submit{clear:both}@media screen and (max-width:980px){.wrap-licenses .form-table tr{width:calc(50% - 15px);max-width:none}}@media screen and (max-width:782px){#um-settings-template-versions .wp-list-table .column-core_version,#um-settings-template-versions .wp-list-table .column-theme_version{width:auto;text-align:left}.wrap-licenses .form-table tr{width:100%;margin-right:0;max-width:none}.um-settings-line .multi-checkbox-column{width:100%!important}.um-settings-line .multi-checkbox-column label{line-height:30px!important}.um-medium-field{width:100%}.um-small-field{width:50%}}.um_setting_ajax_button_response.complete{color:#7acf58;font-style:italic}.wp-core-ui .button.um_license_activate,.wp-core-ui .button.um_license_deactivate,.wp-core-ui .button.um_license_reactivate{margin-top:5px}.um-media-upload .um-media-upload-url{margin-bottom:5px}
|
||||
@@ -72,6 +72,13 @@ th.column-email.column-primary
|
||||
.subsubsub
|
||||
float: left
|
||||
width: 100%
|
||||
h2.title
|
||||
a.um-back-button
|
||||
font-weight: normal
|
||||
font-size: 30px
|
||||
line-height: 1
|
||||
text-decoration: none
|
||||
margin-right: 5px
|
||||
|
||||
|
||||
.#{$prefix}settings-line
|
||||
|
||||
@@ -1410,7 +1410,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
),
|
||||
),
|
||||
'email' => array(
|
||||
'title' => __( 'Email', 'ultimate-member' ),
|
||||
'title' => __( 'Emails', 'ultimate-member' ),
|
||||
'form_sections' => array(
|
||||
'email_sender' => array(
|
||||
'title' => __( 'Email sender options', 'ultimate-member' ),
|
||||
@@ -2049,6 +2049,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
$current_tab = empty( $_GET['tab'] ) ? '' : sanitize_key( $_GET['tab'] );
|
||||
$current_subtab = empty( $_GET['section'] ) ? '' : sanitize_key( $_GET['section'] );
|
||||
|
||||
$temp_structure = $this->settings_structure; // Don't remove this temp variable. Internal workaround for Email Tab integration.
|
||||
|
||||
$custom_content = apply_filters( 'um_settings_section_' . $current_tab . '_' . $current_subtab . '_custom_content', false, $current_tab, $current_subtab );
|
||||
|
||||
if ( false === $custom_content ) {
|
||||
@@ -2058,6 +2060,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
$settings_section = $custom_content;
|
||||
}
|
||||
|
||||
$this->settings_structure = $temp_structure; // Don't remove this temp variable. Internal workaround for Email Tab integration.
|
||||
|
||||
echo '<div id="um-settings-wrap" class="wrap"><h1>' . esc_html__( 'Ultimate Member - Settings', 'ultimate-member' ) . '</h1>';
|
||||
|
||||
echo $this->generate_tabs_menu() . $this->generate_subtabs_menu( $current_tab );
|
||||
@@ -2698,6 +2702,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
|
||||
$in_theme = UM()->mail()->template_in_theme( $email_key );
|
||||
|
||||
$back_link = add_query_arg( array( 'page' => 'um_options', 'tab' => 'email' ), admin_url( 'admin.php' ) );
|
||||
|
||||
$this->settings_structure['email']['title'] = '<a class="um-back-button" href="' . esc_url( $back_link ) . '" title="' . esc_attr__( 'Back', 'ultimate-member' ) . '">←</a>' . $emails[ $email_key ]['title'];
|
||||
$this->settings_structure['email']['description'] = $emails[ $email_key ]['description'];
|
||||
|
||||
$section_fields = array(
|
||||
array(
|
||||
'id' => 'um_email_template',
|
||||
@@ -2705,24 +2714,26 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'value' => $email_key,
|
||||
),
|
||||
array(
|
||||
'id' => $email_key . '_on',
|
||||
'type' => 'checkbox',
|
||||
'label' => $emails[ $email_key ]['title'],
|
||||
'tooltip' => $emails[ $email_key ]['description'],
|
||||
'id' => $email_key . '_on',
|
||||
'type' => 'checkbox',
|
||||
//'label' => $emails[ $email_key ]['title'],
|
||||
'label' => __( 'Enable/Disable', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable this email notification', 'ultimate-member' ),
|
||||
// 'description' => $emails[ $email_key ]['description'],
|
||||
),
|
||||
array(
|
||||
'id' => $email_key . '_sub',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Subject Line', 'ultimate-member' ),
|
||||
'label' => __( 'Subject', 'ultimate-member' ),
|
||||
'conditional' => array( $email_key . '_on', '=', 1 ),
|
||||
'tooltip' => __( 'This is the subject line of the e-mail', 'ultimate-member' ),
|
||||
// 'description' => __( 'This is the subject line of the e-mail', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => $email_key,
|
||||
'type' => 'email_template',
|
||||
'label' => __( 'Message Body', 'ultimate-member' ),
|
||||
'label' => __( 'Email Content', 'ultimate-member' ),
|
||||
'conditional' => array( $email_key . '_on', '=', 1 ),
|
||||
'tooltip' => __( 'This is the content of the e-mail', 'ultimate-member' ),
|
||||
// 'description' => __( 'This is the content of the e-mail', 'ultimate-member' ),
|
||||
'value' => UM()->mail()->get_email_template( $email_key ),
|
||||
'in_theme' => $in_theme,
|
||||
),
|
||||
@@ -3329,7 +3340,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
ob_start();
|
||||
if ( ! empty( $form_section_fields['title'] ) ) {
|
||||
?>
|
||||
<h2 class="title"><?php echo esc_html( $form_section_fields['title'] ); ?></h2>
|
||||
<h2 class="title"><?php echo wp_kses( $form_section_fields['title'], UM()->get_allowed_html( 'admin_notice' ) ); ?></h2>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -3371,7 +3382,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
|
||||
if ( ! empty( $section_title ) ) {
|
||||
?>
|
||||
<h2 class="title"><?php echo esc_html( $section_title ); ?></h2>
|
||||
<h2 class="title"><?php echo wp_kses( $section_title, UM()->get_allowed_html( 'admin_notice' ) ); ?></h2>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user