Subversion Repositories wpShopGermany4

Rev

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