summaryrefslogtreecommitdiff
path: root/views/admin/emailconf.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/admin/emailconf.phtml')
-rw-r--r--views/admin/emailconf.phtml165
1 files changed, 127 insertions, 38 deletions
diff --git a/views/admin/emailconf.phtml b/views/admin/emailconf.phtml
index 4e2d9e7..fb2c857 100644
--- a/views/admin/emailconf.phtml
+++ b/views/admin/emailconf.phtml
@@ -8,51 +8,124 @@
<div class="wpsg_admin_submenu">
<div class="list-group">
- <span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
- <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
- <a class="list-group-item <?php echo (($k == $this->view['subAction'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a>
+ <span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <a class="list-group-item <?php echo (($k == $this->view['subAction'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a>
<?php } ?>
- </div>
-
-</div>
+ </div>
+</div>
<div class="wpsg_admin_content form-horizontal">
<form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf&noheader=1'); ?>">
-
+
<?php echo wpsg_drawForm_AdminboxStart('Allgemeine Einstellungen', 'wpsg'); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_htmlmail', __('HTML Mails versenden', 'wpsg'), $this->get_option('wpsg_htmlmail')); ?>
+ <?php $logoPath = WPSG_PATH_CONTENT . 'uploads/wpsg/wpsg_mailconf/wpsg_email_logo.jpg'; ?>
+
+ <?php echo wpsg_drawForm_Checkbox(
+ 'wpsg_htmlmail',
+ __('HTML Mails versenden', 'wpsg'),
+ $this->get_option('wpsg_htmlmail')
+ ); ?>
+
+
+ <div class="col-emaillogo">
+
+ <?php if(file_exists($logoPath)) { ?>
+ <?php echo wpsg_drawForm_Checkbox(
+ 'wpsg_email_logo_activated',
+ __("E-Maillogo anzeigen"),
+ $this->get_option('wpsg_email_logo_activated')
+ ); ?>
+
+ <br>
+
+ <?php echo wpsg_drawForm_Checkbox(
+ 'wpsg_email_logo_watermark',
+ __("E-Maillogo als Wasserzeichen anzeigen"),
+ $this->get_option('wpsg_email_logo_watermark')
+ ); ?>
+ <?php } ?>
+
+ <div class="form-group">
+ <div class="col-sm-6 control-label control-label-email-conf">
+ <label><?php echo __("E-Maillogo (JPG)"); ?></label>
+ </div>
+ <div class="col-sm-6">
+ <?php if(file_exists($logoPath)) { ?>
+ <a href="<?php echo $this->get_option('wpsg_email_logo_url'); ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a><br>
+ <?php } ?>
+ <input type="file" name="wpsg_email_logo">
+ </div>
+
+ <?php if(file_exists($logoPath)) { ?>
+ <?php echo wpsg_drawForm_Checkbox(
+ 'wpsg_email_logo_del',
+ __("Logo Löschen"),
+ 0
+ ); ?>
+ <?php } ?>
+
+ </div> <!-- .form-group -->
+
+ <?php if(file_exists($logoPath)) { ?>
+
+ <div class="form-group col-logo-alignment">
+ <div class="col-sm-6 control-label control-label-email-conf">
+ <label><?php echo __("Ausrichtung des Maillogos"); ?></label>
+ </div>
+ <div class="col-sm-6 email-logo-alignment">
+ <?php $logoAlignment = $this->get_option('wpsg_email_logo_alignment'); ?>
+ <?php $standardAlignment = false; ?>
+ <?php if(!wpsg_isSizedString($logoAlignment)) $standardAlignment = true; ?>
+ <input type="radio" name="wpsg_email_logo_alignment" value="left" <?php if($logoAlignment === "left"):?>checked<?php endif;?>> <span>&#xf036 <?php echo __("Linksbündig"); ?></span> <br>
+ <input type="radio" name="wpsg_email_logo_alignment" value="center" <?php if($logoAlignment === "center"):?>checked<?php endif;?>> <span>&#xf037 <?php echo __("Zentriert"); ?></span> <br>
+ <input type="radio" name="wpsg_email_logo_alignment" value="right" <?php if($logoAlignment === "right" || $standardAlignment):?>checked<?php endif;?>> <span>&#xf038 <?php echo __("Rechtsbündig"); ?></span>
+ </div>
+ </div>
+
+ <?php $logoTransparency = $this->get_option('wpsg_email_logo_transparency'); ?>
+ <?php if(!wpsg_isSized($logoTransparency)) $logoTransparency = "100%"; ?>
+ <?php echo wpsg_drawForm_Input(
+ 'wpsg_email_logo_transparency',
+ __("Deckkraft des Logos"),
+ strpos($logoTransparency, "%") !== false ? $logoTransparency : $logoTransparency."%"
+ ); ?>
+
+ <?php } ?>
+
+ </div>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
-
+
<?php echo wpsg_drawEMailConfig(
- 'global',
- __('Globale Vorgaben', 'wpsg'),
+ 'global',
+ __('Globale Vorgaben', 'wpsg'),
__('Werden keine Angaben für die folgenden E-Mails gemacht, so gelten die globalen Angaben.', 'wpsg')); ?>
-
+
<?php echo wpsg_drawEMailConfig(
- 'adminmail',
- __('Bestellbestätigung (Admin)', 'wpsg'),
- __('Diese Mail bekommt der Admin beim Eingang einer neuen Bestellung.', 'wpsg'),
+ 'adminmail',
+ __('Bestellbestätigung (Admin)', 'wpsg'),
+ __('Diese Mail bekommt der Admin beim Eingang einer neuen Bestellung.', 'wpsg'),
true); ?>
-
+
<?php echo wpsg_drawEMailConfig(
- 'kundenmail',
- __('Bestellbestätigung (Kunde)', 'wpsg'),
+ 'kundenmail',
+ __('Bestellbestätigung (Kunde)', 'wpsg'),
__('Diese Mail bekommt der Kunde nach Durchführung der Bestellung.', 'wpsg'),
false,
true); ?>
-
+
<?php echo wpsg_drawEMailConfig(
- 'status',
- __('Statusänderung (Kunde)', 'wpsg'),
+ 'status',
+ __('Statusänderung (Kunde)', 'wpsg'),
__('Diese Mail bekommt der Kunde bei der Änderung des Bestellstatus.', 'wpsg')); ?>
-
+
<?php $this->callMods('admin_emailconf'); ?>
<div class="wpsg_hinweis"><?php echo __('Klicken Sie auf die jeweilige Mail um die Einstellungen angezeigt zu bekommen bzw. zu ändern.', 'wpsg'); ?></div>
-
+
<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
-
+
</form>
</div>
@@ -65,25 +138,25 @@
{
var wpsg_mail_open = Array();
-
+
jQuery('.wpsg_email_box .panel-body:visible').each(function() {
wpsg_mail_open.push(jQuery(this).prev().attr("id"));
-
+
} );
jQuery.cookie('wpsg_mail', wpsg_mail_open.join(','));
-
+
} // function wpsg_mail_save_cookie()
jQuery(document).ready(function() {
jQuery('.wpsg_email_box .panel-heading').bind('click', function() {
-
- jQuery(this).next().toggle();
-
+
+ jQuery(this).next().toggle();
+
wpsg_mail_save_cookie();
-
+
} ).css( { 'cursor': 'pointer' } ).disableSelection().next().hide();
if (jQuery.cookie('wpsg_mail') != null)
@@ -93,14 +166,30 @@
for (var i = 0; i < arOpen.length; i ++)
{
-
+
jQuery('#' + arOpen[i]).next().show();
- jQuery('#' + arOpen[i]).css('border-bottom', '0px');
-
+ jQuery('#' + arOpen[i]).css('border-bottom', '0px');
+
}
-
- }
-
+
+ }
+
+ jQuery("#wpsg_htmlmail").click(function() {
+
+ if(jQuery("#wpsg_htmlmail")[0].checked == false) jQuery(".col-emaillogo").css("display", "none");
+ else $(".col-emaillogo").css("display", "block");
+
+ });
+ if(jQuery("#wpsg_htmlmail")[0].checked == false) jQuery(".col-emaillogo").css("display", "none");
+
+ jQuery("#wpsg_email_logo_watermark").click(function() {
+
+ if(jQuery("#wpsg_email_logo_watermark")[0].checked == true) jQuery(".col-logo-alignment").hide();
+ else jQuery(".col-logo-alignment").show()
+
+ });
+ if(jQuery("#wpsg_email_logo_watermark")[0].checked == true) jQuery(".col-logo-alignment").hide();
+
} );
-/* ]]> */</script> \ No newline at end of file
+ /* ]]> */</script> \ No newline at end of file