Subversion Repositories wpShopGermany4

Rev

Rev 8006 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1800 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Einstellungen des Newsletter Moduls
5
	 */
6
 
7
?>
8
<?php if ($this->view['plugin_active'] !== true) { ?>
9
<div class="wpsg_error"><br /><?php echo __('Das Modul ist nur mit aktiviertem wpNewsletterGermany Plugin funktionsfähig.', 'wpsg'); ?><br /></div>
10
<?php } else { ?>
11
 
4933 thomas 12
	<?php echo wpsg_drawForm_Select('wpsg_mod_newsletter_groups[]', __('Gruppenzuordnung nach Registrierung', 'wpsg'), $this->view['arGroup'], (array)explode(',', $this->get_option('wpsg_mod_newsletter_groups')), array('help' => 'wpsg_mod_newsletter_groups','multiple' => ((sizeof($this->view['arGroup']) > 5)?5:sizeof($this->view['arGroup'])))); ?>
4932 thomas 13
	<?php echo wpsg_drawForm_Select('wpsg_mod_newsletter_action', __('Aktion', 'wpsg'), array('0' => __('Opt-In Mail versenden', 'wpsg'), '1' => __('Direkt anmelden', 'wpsg')), $this->get_option('wpsg_mod_newsletter_action'), array('help' => 'wpsg_mod_newsletter_action')); ?>
1800 daniel 14
 
8029 karl 15
	<div class="form-group form-group-sm form-select has-feedback">
16
 
17
		<label class="col-sm-6 control-label" for="wpsg_mod_newsletter_imoprtgroups"><?php echo __('Gruppenimport aus wpShopGermany Kunden', 'wpsg'); ?></label>
18
 
19
		<div class="col-sm-6">
20
			<div class="wpsg_field_wrap">
21
				<select class="form-control input-sm" size="<?php echo ((sizeof($this->view['arGroup']) > 5)?5:sizeof($this->view['arGroup'])); ?>" multiple="multiple" name="wpsg_mod_newsletter_imoprtgroups[]" id="wpsg_mod_newsletter_imoprtgroups">
22
					<?php foreach ($this->view['arGroup'] as $group_id => $group) {?>
23
					<option value="<?php echo $group_id; ?>"><?php echo $group; ?></option>
24
					<?php } ?>
25
				</select>
26
				<a class="glyphicon glyphicon glyphicon-question-sign form-control-feedback activated" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_newsletter_imoprtgroups" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_newsletter_imoprtgroups"></a>
27
			</div>
28
			<input style="margin: 5px 0 0 0;" type="button" onclick="return wpsg_doImport();" value="<?php echo __('Kunden importieren', 'wpsg'); ?>" class="button" style="width:auto;" />
1857 daniel 29
		</div>
30
		<div class="wpsg_clear"></div>
31
	</div>
32
 
5382 daniel 33
	<script type="text/javascript">/* <![CDATA[ */
1857 daniel 34
 
35
	   	/**
36
	   	 * Startet den Import
37
	   	 */
38
		function wpsg_doImport()
39
		{
40
 
41
			nGroups = jQuery('#wpsg_mod_newsletter_imoprtgroups option:selected').length;
42
 
43
			if (nGroups <= 0)
44
			{
45
 
1905 daniel 46
				alert('<?php echo __('Bitte mindestens eine Gruppe wählen.', 'wpsg'); ?>');
1857 daniel 47
				return;
48
 
49
			}
50
 
51
			if (!confirm('<?php echo __('Die Shop Kunden werden in die ausgewählten Gruppen importiert. Bestehende E-Mail Adressen werden überschrieben.', 'wpsg'); ?>')) return;
52
 
53
			var strGroups = '';
54
			jQuery('#wpsg_mod_newsletter_imoprtgroups option:selected').each(function() {
55
				strGroups += jQuery(this).attr('value') + ',';
56
			} );
57
 
58
			strGroups = strGroups.substring(0, strGroups.length - 1);
59
 
60
			location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_newsletter&do=import&noheader=1&groups=' + strGroups;
61
 
62
		} // function wpsg_doImport()
5382 daniel 63
 
1857 daniel 64
	/* ]]> */</script>
65
 
1800 daniel 66
<?php } ?>