Subversion Repositories wpShopGermany4

Rev

Rev 5562 | Rev 7103 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1067 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die E-Mail Konfiguration
5
	 */
6
 
7
?>
8
<div class="wpsg_admin_submenu">
9
 
5455 thomas 10
	<div class="list-group">
7094 florian 11
		<span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
12
		<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
13
			<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>
1067 daniel 14
		<?php } ?>
7094 florian 15
	</div>
16
 
1067 daniel 17
</div>
18
 
5532 daniel 19
<div class="wpsg_admin_content form-horizontal">
5562 daniel 20
	<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'); ?>">
7094 florian 21
 
5532 daniel 22
		<?php echo wpsg_drawForm_AdminboxStart('Allgemeine Einstellungen', 'wpsg'); ?>
7094 florian 23
		<?php $logoPath = WPSG_PATH_CONTENT . 'uploads/wpsg/wpsg_mailconf/wpsg_email_logo.jpg'; ?>
24
 
25
		<?php echo wpsg_drawForm_Checkbox(
26
			'wpsg_htmlmail',
27
			__('HTML Mails versenden', 'wpsg'),
28
			$this->get_option('wpsg_htmlmail')
29
		); ?>
30
 
31
 
32
		<div class="col-emaillogo">
33
 
34
			<?php if(file_exists($logoPath)) { ?>
35
				<?php echo wpsg_drawForm_Checkbox(
36
					'wpsg_email_logo_activated',
37
					__("E-Maillogo anzeigen"),
38
					$this->get_option('wpsg_email_logo_activated')
39
				); ?>
40
 
41
				<br>
42
 
43
				<?php echo wpsg_drawForm_Checkbox(
44
					'wpsg_email_logo_watermark',
45
					__("E-Maillogo als Wasserzeichen anzeigen"),
46
					$this->get_option('wpsg_email_logo_watermark')
47
				); ?>
48
			<?php } ?>
49
 
50
			<div class="form-group">
51
				<div class="col-sm-6 control-label control-label-email-conf">
52
					<label><?php echo __("E-Maillogo (JPG)"); ?></label>
53
				</div>
54
				<div class="col-sm-6">
55
					<?php if(file_exists($logoPath)) { ?>
56
						<a href="<?php echo $this->get_option('wpsg_email_logo_url'); ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a><br>
57
					<?php } ?>
58
					<input type="file" name="wpsg_email_logo">
59
				</div>
60
 
61
				<?php if(file_exists($logoPath)) { ?>
62
					<?php echo wpsg_drawForm_Checkbox(
63
						'wpsg_email_logo_del',
64
						__("Logo Löschen"),
65
 
66
					); ?>
67
				<?php } ?>
68
 
69
			</div> <!-- .form-group -->
70
 
71
			<?php if(file_exists($logoPath)) { ?>
72
 
73
				<div class="form-group col-logo-alignment">
74
					<div class="col-sm-6 control-label control-label-email-conf">
75
						<label><?php echo __("Ausrichtung des Maillogos"); ?></label>
76
					</div>
77
					<div class="col-sm-6 email-logo-alignment">
78
						<?php $logoAlignment = $this->get_option('wpsg_email_logo_alignment'); ?>
79
						<?php $standardAlignment = false; ?>
80
						<?php if(!wpsg_isSizedString($logoAlignment)) $standardAlignment = true; ?>
81
						<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>
82
						<input type="radio" name="wpsg_email_logo_alignment" value="center" <?php if($logoAlignment === "center"):?>checked<?php endif;?>> <span>&#xf037 <?php echo __("Zentriert"); ?></span> <br>
83
						<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>
84
					</div>
85
				</div>
86
 
87
				<?php $logoTransparency = $this->get_option('wpsg_email_logo_transparency'); ?>
88
				<?php if(!wpsg_isSized($logoTransparency)) $logoTransparency = "100%"; ?>
89
				<?php echo wpsg_drawForm_Input(
90
					'wpsg_email_logo_transparency',
91
					__("Deckkraft des Logos"),
92
					strpos($logoTransparency, "%") !== false ? $logoTransparency : $logoTransparency."%"
93
				); ?>
94
 
95
			<?php } ?>
96
 
97
		</div>
5532 daniel 98
		<?php echo wpsg_drawForm_AdminboxEnd(); ?>
7094 florian 99
 
5532 daniel 100
		<?php echo wpsg_drawEMailConfig(
7094 florian 101
			'global',
102
			__('Globale Vorgaben', 'wpsg'),
5532 daniel 103
			__('Werden keine Angaben für die folgenden E-Mails gemacht, so gelten die globalen Angaben.', 'wpsg')); ?>
7094 florian 104
 
5532 daniel 105
		<?php echo wpsg_drawEMailConfig(
7094 florian 106
			'adminmail',
107
			__('Bestellbestätigung (Admin)', 'wpsg'),
108
			__('Diese Mail bekommt der Admin beim Eingang einer neuen Bestellung.', 'wpsg'),
5532 daniel 109
			true); ?>
7094 florian 110
 
5532 daniel 111
		<?php echo wpsg_drawEMailConfig(
7094 florian 112
			'kundenmail',
113
			__('Bestellbestätigung (Kunde)', 'wpsg'),
5532 daniel 114
			__('Diese Mail bekommt der Kunde nach Durchführung der Bestellung.', 'wpsg'),
115
			false,
116
			true); ?>
7094 florian 117
 
5532 daniel 118
		<?php echo wpsg_drawEMailConfig(
7094 florian 119
			'status',
120
			__('Statusänderung (Kunde)', 'wpsg'),
5532 daniel 121
			__('Diese Mail bekommt der Kunde bei der Änderung des Bestellstatus.', 'wpsg')); ?>
7094 florian 122
 
5532 daniel 123
		<?php $this->callMods('admin_emailconf'); ?>
124
 
3433 daniel 125
		<div class="wpsg_hinweis"><?php echo __('Klicken Sie auf die jeweilige Mail um die Einstellungen angezeigt zu bekommen bzw. zu ändern.', 'wpsg'); ?></div>
7094 florian 126
 
5532 daniel 127
		<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
7094 florian 128
 
5532 daniel 129
	</form>
1414 daniel 130
</div>
131
 
132
<script type="text/javascript">/* <![CDATA[ */
133
 
134
	/**
135
	 * Speichert die Informationen ob die Mailboxen auf oder zugeklappt sind in dem Cookie
136
	 */
137
	function wpsg_mail_save_cookie()
138
	{
139
 
140
		var wpsg_mail_open = Array();
7094 florian 141
 
5532 daniel 142
		jQuery('.wpsg_email_box .panel-body:visible').each(function() {
1414 daniel 143
 
144
			wpsg_mail_open.push(jQuery(this).prev().attr("id"));
7094 florian 145
 
1414 daniel 146
		} );
147
 
148
		jQuery.cookie('wpsg_mail', wpsg_mail_open.join(','));
7094 florian 149
 
1414 daniel 150
	} // function wpsg_mail_save_cookie()
151
 
152
	jQuery(document).ready(function() {
153
 
5532 daniel 154
		jQuery('.wpsg_email_box .panel-heading').bind('click', function() {
7094 florian 155
 
156
			jQuery(this).next().toggle();
157
 
1414 daniel 158
			wpsg_mail_save_cookie();
7094 florian 159
 
5562 daniel 160
		} ).css( { 'cursor': 'pointer' } ).disableSelection().next().hide();
1414 daniel 161
 
162
		if (jQuery.cookie('wpsg_mail') != null)
163
		{
164
 
165
			var arOpen = jQuery.cookie('wpsg_mail').split(',');
166
 
167
			for (var i = 0; i < arOpen.length; i ++)
168
			{
7094 florian 169
 
1414 daniel 170
				jQuery('#' + arOpen[i]).next().show();
7094 florian 171
				jQuery('#' + arOpen[i]).css('border-bottom', '0px');
172
 
1414 daniel 173
			}
7094 florian 174
 
175
		}
176
 
177
		jQuery("#wpsg_htmlmail").click(function() {
178
 
179
			if(jQuery("#wpsg_htmlmail")[0].checked == false) jQuery(".col-emaillogo").css("display", "none");
180
			else $(".col-emaillogo").css("display", "block");
181
 
182
		});
183
		if(jQuery("#wpsg_htmlmail")[0].checked == false) jQuery(".col-emaillogo").css("display", "none");
184
 
185
		jQuery("#wpsg_email_logo_watermark").click(function() {
186
 
187
			if(jQuery("#wpsg_email_logo_watermark")[0].checked == true) jQuery(".col-logo-alignment").hide();
188
			else jQuery(".col-logo-alignment").show()
189
 
190
		});
191
		if(jQuery("#wpsg_email_logo_watermark")[0].checked == true) jQuery(".col-logo-alignment").hide();
192
 
1414 daniel 193
	} );
194
 
7094 florian 195
	/* ]]> */</script>