Subversion Repositories wpShopGermany4

Rev

Rev 7133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7133 Rev 7156
Line 9... Line 9...
9
	<?php } ?>
9
	<?php } ?>
10
	
10
	
11
	<?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_cc', __('CC', 'wpsg'), $this->get_option('wpsg_'.$this->view['field_key'].'_cc')); ?>
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')); ?>	
12
	<?php echo wpsg_drawForm_Input('wpsg_'.$this->view['field_key'].'_bcc', __('BCC', 'wpsg'), $this->get_option('wpsg_'.$this->view['field_key'].'_bcc')); ?>	
13
	
13
	
-
 
14
    <div class="form-group form-group-sm">
-
 
15
    
14
	<?php if ($this->view['field_attachment'] === true) { ?>
16
        <label class="col-sm-6 control-label">
15
		
17
 
16
		<?php echo wpsg_drawForm_Upload('wpsg_'.$this->view['field_key'].'_attachfile', __('Mailanhang', 'wpsg'), '', '43', '100000'); ?>
18
            <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']; ?>" />
-
 
19
            
17
		<br />
20
        </label>
-
 
21
    
18
		<div class="wpsg_hinweis">
22
        <div class="col-sm-6">
-
 
23
    
-
 
24
            <div class="wpsg_mailattachment" id="wpsg_mailattachment_<?php echo $this->view['field_key']; ?>">
-
 
25
                <div v-for="a in arAttachment">
-
 
26
                    
-
 
27
                    <div class="wpsg_flex wpsg_flex_justify_content_space_between wpsg_flex_align_items_center">
-
 
28
                        <a target="_blank" v-bind:href="a.url">{{a.filename}}</a>
19
			<strong><?php echo __('Aktueller Anhang', 'wpsg') ?>: </strong><?php echo ((wpsg_isSizedString($this->get_option('wpsg_'.$this->view['field_key'].'_attachfile')))?$this->get_option('wpsg_'.$this->view['field_key'].'_attachfile'):__('keiner', 'wpsg')); ?>
29
                        <a href="" v-bind:data-id="a.id" data-key="<?php echo $this->view['field_key']; ?>" onclick="return wpsg_removeAttachemnt(this);">
-
 
30
                            <span class="fa fa-trash"></span>
-
 
31
                        </a>                        
-
 
32
                    </div>
-
 
33
                                         
-
 
34
                </div>
20
			<?php echo ((wpsg_isSizedString($this->get_option('wpsg_kundenmail_attachfile')))?'<a class="wpsg_glyphicon_right glyphicon glyphicon-minus-sign" titel="'.__('Datei entfernen', 'wpsg').'" href="'.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&amp;subaction='.$_REQUEST['subaction'].'&amp;cmd=del_attach_file"></a>':''); ?>
35
                <input type="hidden" v-bind:value="getIds" name="wpsg_<?php echo $this->view['field_key']; ?>_mediaattachment" />
-
 
36
            </div>
-
 
37
    
21
		</div>
38
        </div>
-
 
39
    
-
 
40
        <div class="clearfix wpsg_clear"></div>
-
 
41
    
22
		<br />
42
    </div>
23
		
43
 
24
	<?php } ?>
44
    <hr />
25
 
45
 
26
    <br /><p style="font-weight:700;"><?php echo (__('Text unter der E-Mail', 'wpsg')); ?></p>
46
    <p style="font-weight:700;"><?php echo (__('Text unter der E-Mail', 'wpsg')); ?></p>
27
 
47
 
28
    <?php
48
    <?php
29
    
49
    
30
    // RTE
50
    // RTE
31
    ob_start();
51
    ob_start();
Line 45... Line 65...
45
	<div class="wpsg_hinweis"><?php echo $notice; ?></div>
65
	<div class="wpsg_hinweis"><?php echo $notice; ?></div>
46
 
66
 
47
	<?php } ?>
67
	<?php } ?>
48
	
68
	
49
	<br />
69
	<br />
-
 
70
 
-
 
71
    <script>
-
 
72
 
-
 
73
        uploadData['<?php echo $this->view['field_key']; ?>'] = <?php
-
 
74
                
-
 
75
            $arAttachment = [];
-
 
76
            $arAttachmentSet = $this->get_option('wpsg_'.$this->view['field_key'].'_mediaattachment');
-
 
77
            
-
 
78
            if (wpsg_isSizedString($arAttachmentSet)) {
-
 
79
                
-
 
80
                $arAttachmentSet = explode(',', $arAttachmentSet);
-
 
81
                
-
 
82
                foreach ($arAttachmentSet as $a_id) {
-
 
83
                
-
 
84
                    $a_file = get_attached_file($a_id);
-
 
85
                    $a_url = wp_get_attachment_url($a_id);
-
 
86
                        
-
 
87
                    $arAttachment[] = [
-
 
88
                        'id' => $a_id,
-
 
89
                        'filename' => basename($a_file),
-
 
90
                        'url' => $a_url
-
 
91
                    ];
-
 
92
                    
-
 
93
                }
-
 
94
                
-
 
95
            }
-
 
96
                
-
 
97
            echo json_encode($arAttachment);
-
 
98
                
-
 
99
        ?>;
-
 
100
 
-
 
101
        var wpsg_mailattachment_<?php echo $this->view['field_key']; ?> = new Vue( {
-
 
102
            el: '#wpsg_mailattachment_<?php echo $this->view['field_key']; ?>',
-
 
103
            data: {
-
 
104
                arAttachment: uploadData.<?php echo $this->view['field_key']; ?>        
-
 
105
            },
-
 
106
            computed: {
-
 
107
                getIds: function() {
-
 
108
                    
-
 
109
                    var arReturn = [];
-
 
110
                    
-
 
111
                    for (var i in this.arAttachment) {
-
 
112
                     
-
 
113
                        arReturn.push(this.arAttachment[i].id); 
-
 
114
                        
-
 
115
                    }
-
 
116
                    
-
 
117
                    return arReturn;
-
 
118
                    
-
 
119
                }
-
 
120
            }
-
 
121
        } );
-
 
122
        
-
 
123
    </script>
50
		
124
		
51
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
125
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
52
126