summaryrefslogtreecommitdiff
path: root/views/admin/emailconf.phtml
blob: 4e2d9e7fc271c3453bf9d341a645f42877dc4657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php

	/**
	 * Template für die E-Mail Konfiguration
	 */

?>
<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>		
		<?php } ?>
	</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 echo wpsg_drawForm_AdminboxEnd(); ?>
		
		<?php echo wpsg_drawEMailConfig(
			'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'), 
			true); ?>
			  		
		<?php echo wpsg_drawEMailConfig(
			'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'), 
			__('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>

<script type="text/javascript">/* <![CDATA[ */

	/**
	 * Speichert die Informationen ob die Mailboxen auf oder zugeklappt sind in dem Cookie
	 */
	function wpsg_mail_save_cookie()
	{

		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(); 
			
			wpsg_mail_save_cookie();
			
		} ).css( { 'cursor': 'pointer' } ).disableSelection().next().hide();

		if (jQuery.cookie('wpsg_mail') != null)
		{

			var arOpen = jQuery.cookie('wpsg_mail').split(',');

			for (var i = 0; i < arOpen.length; i ++)
			{
 
				jQuery('#' + arOpen[i]).next().show();
				jQuery('#' + arOpen[i]).css('border-bottom', '0px');	
				
			}
			
		}				
		
	} );

/* ]]> */</script>