Subversion Repositories wpShopGermany4

Rev

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