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 |
|
1857 |
daniel |
15 |
<div class="wpsg_form_field">
|
|
|
16 |
<div class="wpsg_form_left">
|
1863 |
daniel |
17 |
<label for="wpsg_mod_newsletter_imoprtgroups"><?php echo __('Gruppenimport aus wpShopGermany Kunden', 'wpsg'); ?>:</label>
|
1857 |
daniel |
18 |
</div>
|
|
|
19 |
<div class="wpsg_form_right">
|
|
|
20 |
<select class="select " 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">
|
|
|
21 |
<?php foreach ($this->view['arGroup'] as $group_id => $group) { ?>
|
|
|
22 |
<option value="<?php echo $group_id; ?>"><?php echo $group; ?></option>
|
|
|
23 |
<?php } ?>
|
|
|
24 |
</select>
|
|
|
25 |
<input type="button" onclick="return wpsg_doImport();" value="<?php echo __('Kunden importieren', 'wpsg'); ?>" class="button" style="width:auto;" />
|
|
|
26 |
</div>
|
|
|
27 |
<div class="wpsg_clear"></div>
|
|
|
28 |
</div>
|
|
|
29 |
|
|
|
30 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
31 |
|
|
|
32 |
/**
|
|
|
33 |
* Startet den Import
|
|
|
34 |
*/
|
|
|
35 |
function wpsg_doImport()
|
|
|
36 |
{
|
|
|
37 |
|
|
|
38 |
nGroups = jQuery('#wpsg_mod_newsletter_imoprtgroups option:selected').length;
|
|
|
39 |
|
|
|
40 |
if (nGroups <= 0)
|
|
|
41 |
{
|
|
|
42 |
|
1905 |
daniel |
43 |
alert('<?php echo __('Bitte mindestens eine Gruppe wählen.', 'wpsg'); ?>');
|
1857 |
daniel |
44 |
return;
|
|
|
45 |
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
if (!confirm('<?php echo __('Die Shop Kunden werden in die ausgewählten Gruppen importiert. Bestehende E-Mail Adressen werden überschrieben.', 'wpsg'); ?>')) return;
|
|
|
49 |
|
|
|
50 |
var strGroups = '';
|
|
|
51 |
jQuery('#wpsg_mod_newsletter_imoprtgroups option:selected').each(function() {
|
|
|
52 |
strGroups += jQuery(this).attr('value') + ',';
|
|
|
53 |
} );
|
|
|
54 |
|
|
|
55 |
strGroups = strGroups.substring(0, strGroups.length - 1);
|
|
|
56 |
|
|
|
57 |
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;
|
|
|
58 |
|
|
|
59 |
} // function wpsg_doImport()
|
|
|
60 |
|
|
|
61 |
/* ]]> */</script>
|
|
|
62 |
|
1800 |
daniel |
63 |
<?php } ?>
|