Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
5532 daniel 1
 
2
<?php echo wpsg_drawForm_AdminboxStart($this->view['field_title'], 'wpsg_email_box'); ?>
3
 
4
	<?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_betreff', __('Betreff', 'wpsg'), $this->get_option('wpsg_'.$this->view['field_key'].'_betreff')); ?>
5
	<?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_absender', __('Absender', 'wpsg'), $this->get_option('wpsg_'.$this->view['field_key'].'_absender')); ?>
6
 
7
	<?php if ($this->view['field_to'] === true) { ?>
5562 daniel 8
	<?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_empfaenger', __('Empfänger', 'wpsg'), $GLOBALS['wpsg_sc']->get_option('wpsg_'.$this->view['field_key'].'_empfaenger')); ?>
5532 daniel 9
	<?php } ?>
10
 
11
	<?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_cc', __('CC', 'wpsg'), $this->get_option('wpsg_'.$this->view['field_key'].'_cc')); ?>
12
	<?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_bcc', __('BCC', 'wpsg'), $this->get_option('wpsg_'.$this->view['field_key'].'_bcc')); ?>
7787 daniel 13
 
14
	<?php if ($this->view['field_key'] === 'reminder') { ?>
15
 
16
		<?php echo wpsg_drawForm_Input('wpsg_reminder_hours', __('Automatischer Versand nach Bestellerstellung in Stunden', 'wpsg'), $this->get_option('wpsg_reminder_hours')); ?>
17
		<?php echo wpsg_drawForm_Input(false, __('CRON URL', 'wpsg'), site_url().'/?wpsg_cron=1', ['readonly' => true]); ?>
18
 
19
	<?php } ?>
20
 
7156 daniel 21
    <div class="form-group form-group-sm">
22
 
23
        <label class="col-sm-6 control-label">
5532 daniel 24
 
7156 daniel 25
            <input value="<?php echo __('Neuer Anhang', 'wpsg'); ?>" data-key="<?php echo $this->view['field_key']; ?>" class="btnAddAttachment button" type="text" style="text-align:center;" size="10" id="media_<?php echo $this->view['field_key']; ?>" />
26
 
27
        </label>
28
 
29
        <div class="col-sm-6">
30
 
31
            <div class="wpsg_mailattachment" id="wpsg_mailattachment_<?php echo $this->view['field_key']; ?>">
32
                <div v-for="a in arAttachment">
33
 
34
                    <div class="wpsg_flex wpsg_flex_justify_content_space_between wpsg_flex_align_items_center">
35
                        <a target="_blank" v-bind:href="a.url">{{a.filename}}</a>
36
                        <a href="" v-bind:data-id="a.id" data-key="<?php echo $this->view['field_key']; ?>" onclick="return wpsg_removeAttachemnt(this);">
37
                            <span class="fa fa-trash"></span>
38
                        </a>
39
                    </div>
40
 
41
                </div>
42
                <input type="hidden" v-bind:value="getIds" name="wpsg_<?php echo $this->view['field_key']; ?>_mediaattachment" />
43
            </div>
44
 
45
        </div>
46
 
47
        <div class="clearfix wpsg_clear"></div>
48
 
49
    </div>
5532 daniel 50
 
7156 daniel 51
    <hr />
52
 
53
    <p style="font-weight:700;"><?php echo (__('Text unter der E-Mail', 'wpsg')); ?></p>
54
 
7133 daniel 55
    <?php
56
 
57
    // RTE
58
    ob_start();
59
    wp_editor($this->get_option('wpsg_'.$this->view['field_key'].'_text'), 'wpsg_'.$this->view['field_key'].'_text');
60
    $rte_content = ob_get_contents();
61
    ob_end_clean();
62
 
63
    echo $rte_content;
64
 
65
    ?>
5532 daniel 66
 
6567 thomas 67
	<br />
7787 daniel 68
	<?php echo __('* Der restliche E-Mailtext kann nur im Mailtemplate verändert werden', 'wpsg'); ?>
69
	<br />
70
 
71
	<?php if (wpsg_isSizedString($this->view['strTemplate'])) { ?>
72
 
73
		<br />
74
 
75
		<strong><?php echo __('Template', 'wpsg'); ?>: </strong><?php echo $this->view['strTemplate']; ?>
76
 
77
	<?php } ?>
78
 
5532 daniel 79
	<?php if (wpsg_isSizedString($notice)) { ?>
80
 
81
	<br />
82
	<div class="wpsg_hinweis"><?php echo $notice; ?></div>
83
 
84
	<?php } ?>
85
 
86
	<br />
7156 daniel 87
 
88
    <script>
89
 
90
        uploadData['<?php echo $this->view['field_key']; ?>'] = <?php
91
 
92
            $arAttachment = [];
93
            $arAttachmentSet = $this->get_option('wpsg_'.$this->view['field_key'].'_mediaattachment');
94
 
95
            if (wpsg_isSizedString($arAttachmentSet)) {
96
 
97
                $arAttachmentSet = explode(',', $arAttachmentSet);
98
 
99
                foreach ($arAttachmentSet as $a_id) {
100
 
101
                    $a_file = get_attached_file($a_id);
102
                    $a_url = wp_get_attachment_url($a_id);
103
 
104
                    $arAttachment[] = [
105
                        'id' => $a_id,
106
                        'filename' => basename($a_file),
107
                        'url' => $a_url
108
                    ];
109
 
110
                }
111
 
112
            }
113
 
114
            echo json_encode($arAttachment);
115
 
116
        ?>;
117
 
118
        var wpsg_mailattachment_<?php echo $this->view['field_key']; ?> = new Vue( {
119
            el: '#wpsg_mailattachment_<?php echo $this->view['field_key']; ?>',
120
            data: {
121
                arAttachment: uploadData.<?php echo $this->view['field_key']; ?>
122
            },
123
            computed: {
124
                getIds: function() {
125
 
126
                    var arReturn = [];
127
 
128
                    for (var i in this.arAttachment) {
129
 
130
                        arReturn.push(this.arAttachment[i].id);
131
 
132
                    }
133
 
134
                    return arReturn;
135
 
136
                }
137
            }
138
        } );
139
 
140
    </script>
5532 daniel 141
 
142
<?php echo wpsg_drawForm_AdminboxEnd(); ?>