Subversion Repositories wpShopGermany4

Rev

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

Rev 7932 Rev 7934
Line 20... Line 20...
20
    <legend><?php echo __('Kundenkontakt', 'wpsg'); ?></legend>
20
    <legend><?php echo __('Kundenkontakt', 'wpsg'); ?></legend>
21
    <div>
21
    <div>
22
        
22
        
23
        <?php echo wpsg_drawForm_Select('wpsg_mod_kundenkontakt_template', __('Template', 'wpsg'), $arTemplateSelect, '0'); ?>
23
        <?php echo wpsg_drawForm_Select('wpsg_mod_kundenkontakt_template', __('Template', 'wpsg'), $arTemplateSelect, '0'); ?>
24
        <?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt_subject', __('Betreff', 'wpsg'), '', ['wrap_id' => 'wpsg_mod_kundenkontakt_subject_wrap']); ?>
24
        <?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt_subject', __('Betreff', 'wpsg'), '', ['wrap_id' => 'wpsg_mod_kundenkontakt_subject_wrap']); ?>
-
 
25
        
25
        <?php echo wpsg_drawForm_Textarea('wpsg_mod_kundenkontakt_text', __('Text', 'wpsg'), '', ['wrap_id' => 'wpsg_mod_kundenkontakt_text_wrap']); ?>
26
        <?php /* echo wpsg_drawForm_Textarea('wpsg_mod_kundenkontakt_text', __('Text', 'wpsg'), '', ['wrap_id' => 'wpsg_mod_kundenkontakt_text_wrap']); */ ?>
-
 
27
        			
-
 
28
        <div class="form-group form-group-sm form-textarea" id="wpsg_mod_kundenkontakt_text_wrap">	
-
 
29
                <label class="col-sm-6 control-label" for="wpsg_mod_kundenkontakt_text">Text</label>                
-
 
30
                <div class="col-sm-6">                    
-
 
31
                    <div class="wpsg_field_wrap">
-
 
32
            
-
 
33
                        <?php if ($this->get_option('wpsg_htmlmail') === '1') { ?>
-
 
34
                            
-
 
35
                            <?php wp_editor('', 'wpsg_mod_kundenkontakt_text'); ?>
-
 
36
                            
-
 
37
                        <?php } else { ?>
-
 
38
                        
-
 
39
                            <textarea class="form-control" id="wpsg_mod_kundenkontakt_text" name="wpsg_mod_kundenkontakt_text"></textarea>
-
 
40
                    
-
 
41
                        <?php } ?>
-
 
42
                        
-
 
43
                    </div>
-
 
44
                        
-
 
45
            </div>
-
 
46
            
-
 
47
            <div class="clearfix wpsg_clear"></div>
-
 
48
            
-
 
49
        </div> 
26
              
50
            
27
        <?php echo wpsg_drawForm_Button(__('Kunden informieren', 'wpsg'), '', ['wrap_id' => 'wpsg_mod_kundenkontakt_submit_wrap', 'field_id' => 'wpsg_mod_kundenkontakt_submit']); ?>
51
        <?php echo wpsg_drawForm_Button(__('Kunden informieren', 'wpsg'), '', ['wrap_id' => 'wpsg_mod_kundenkontakt_submit_wrap', 'field_id' => 'wpsg_mod_kundenkontakt_submit']); ?>
28
        
52
        
-
 
53
        <?php echo wpsg_drawForm_Text('', __('Bitte warten ...', 'wpsg'), 'wpsg_mod_kundenverwaltung_loading', ['wrap_id' => 'wpsg_mod_kundenkontakt_loading_wrap']); ?>
-
 
54
        
29
    </div>
55
    </div>
30
</fieldset>
56
</fieldset>
31
 
57
 
32
<script>
58
<script>
33
            
59
            
Line 40... Line 66...
40
    let el_wpsg_mod_kundenkontakt_text_wrap = document.getElementById('wpsg_mod_kundenkontakt_text_wrap');
66
    let el_wpsg_mod_kundenkontakt_text_wrap = document.getElementById('wpsg_mod_kundenkontakt_text_wrap');
41
    
67
    
42
    let el_wpsg_mod_kundenkontakt_submit = document.getElementById('wpsg_mod_kundenkontakt_submit');
68
    let el_wpsg_mod_kundenkontakt_submit = document.getElementById('wpsg_mod_kundenkontakt_submit');
43
    let el_wpsg_mod_kundenkontakt_submit_wrap = document.getElementById('wpsg_mod_kundenkontakt_submit_wrap');
69
    let el_wpsg_mod_kundenkontakt_submit_wrap = document.getElementById('wpsg_mod_kundenkontakt_submit_wrap');
44
    
70
    
-
 
71
    let el_wpsg_mod_kundenkontakt_loading_wrap = document.getElementById('wpsg_mod_kundenkontakt_loading_wrap');
-
 
72
    
45
    let el_doaction = document.getElementById('doaction');
73
    let el_doaction = document.getElementById('doaction');
46
    
74
    
47
    document.getElementById('wpsg_mod_kundenkontakt_template').addEventListener('change', (event) => {
75
    document.getElementById('wpsg_mod_kundenkontakt_template').addEventListener('change', (event) => {
48
            
76
            
49
    	if (event.target.value !== '0') {
77
    	if (event.target.value !== '0') {
50
                		
78
            
-
 
79
    		el_wpsg_mod_kundenkontakt_loading_wrap.style.display = 'block';
-
 
80
    		
51
            jQuery.ajax({ 
81
            jQuery.ajax({ 
52
                url: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&noheader=1&do=kk_switchTemplate",
82
                url: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&noheader=1&do=kk_switchTemplate",
53
                dataType: 'json',
83
                dataType: 'json',
54
                data: {					
84
                data: {					
55
                    template_file: event.target.value
85
                    template_file: event.target.value
56
                },
86
                },
57
                success: function(data) {
87
                success: function(data) {
58
            
88
            
-
 
89
                	el_wpsg_mod_kundenkontakt_loading_wrap.style.display = 'none';
-
 
90
                	
59
                	el_wpsg_mod_kundenkontakt_subject_wrap.style.display = 'block';
91
                	el_wpsg_mod_kundenkontakt_subject_wrap.style.display = 'block';
60
    		        el_wpsg_mod_kundenkontakt_text_wrap.style.display = 'block';  
92
    		        el_wpsg_mod_kundenkontakt_text_wrap.style.display = 'block';  
61
    		        el_wpsg_mod_kundenkontakt_submit_wrap.style.display = 'block';  
93
    		        el_wpsg_mod_kundenkontakt_submit_wrap.style.display = 'block';  
62
                	
94
                	
63
                    el_wpsg_mod_kundenkontakt_subject.value = data.subject;
95
                    el_wpsg_mod_kundenkontakt_subject.value = data.subject;
-
 
96
                    
-
 
97
                    <?php if ($this->get_option('wpsg_htmlmail') === '1') { ?>
-
 
98
                    tinyMCE.get('wpsg_mod_kundenkontakt_text').setContent(data.content);
-
 
99
                    <?php } else { ?>
64
                    el_wpsg_mod_kundenkontakt_text.value = data.content;
100
                    el_wpsg_mod_kundenkontakt_text.value = data.content;
-
 
101
                    <?php } ?>
65
                    
102
                    
66
                }
103
                }
67
            });
104
            });
68
 
105
 
69
	    } else {
106
	    } else {
70
    		    		
107
    		    		
71
    		el_wpsg_mod_kundenkontakt_subject_wrap.style.display = 'none';
108
    		el_wpsg_mod_kundenkontakt_subject_wrap.style.display = 'none';
72
    		el_wpsg_mod_kundenkontakt_text_wrap.style.display = 'none';
109
    		el_wpsg_mod_kundenkontakt_text_wrap.style.display = 'none';
73
    		el_wpsg_mod_kundenkontakt_submit_wrap.style.display = 'none';
110
    		el_wpsg_mod_kundenkontakt_submit_wrap.style.display = 'none';
-
 
111
    		el_wpsg_mod_kundenkontakt_loading_wrap.style.display = 'none';
74
    		    		
112
    		    		
75
        }
113
        }
76
        
114
        
77
    });
115
    });
78
    
116
    
Line 93... Line 131...
93
    		alert('<?php echo __('Bitte mindestens eine Bestellung auswählen.', 'wpsg'); ?>');
131
    		alert('<?php echo __('Bitte mindestens eine Bestellung auswählen.', 'wpsg'); ?>');
94
    		return;
132
    		return;
95
        }    	
133
        }    	
96
    	
134
    	
97
    	el_wpsg_mod_kundenkontakt_submit.setAttribute("disabled", "disabled");
135
    	el_wpsg_mod_kundenkontakt_submit.setAttribute("disabled", "disabled");
-
 
136
    	el_wpsg_mod_kundenkontakt_subject.setAttribute("disabled", "disabled");
-
 
137
        el_wpsg_mod_kundenkontakt_text.setAttribute("disabled", "disabled");
-
 
138
    	  
-
 
139
    	el_wpsg_mod_kundenkontakt_loading_wrap.style.display = 'block';
98
    	
140
    	
99
    	jQuery.ajax({ 
141
    	jQuery.ajax({ 
100
            url: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&noheader=1&do=kk_sendMail",
142
            url: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&noheader=1&do=kk_sendMail",
101
            data: {					
143
            data: {					
102
                arOrderID: arOrderID,
144
                arOrderID: arOrderID,
103
                text: el_wpsg_mod_kundenkontakt_text.value,
145
                text: el_wpsg_mod_kundenkontakt_text.value,
104
                el_wpsg_mod_kundenkontakt_subject: el_wpsg_mod_kundenkontakt_subject.value
146
                el_wpsg_mod_kundenkontakt_subject: el_wpsg_mod_kundenkontakt_subject.value
105
            },
147
            },
106
            success: function(data) {
148
            success: function(data) {
107
        
149
                    	            	
-
 
150
            	document.getElementById('wpsg_mod_kundenkontakt_template').selectedIndex = 0;
-
 
151
            	
-
 
152
            	for (let el of document.querySelectorAll('.col_set_checkbox')) {
-
 
153
            		
-
 
154
            		el.checked = false;
-
 
155
            		
-
 
156
	            }
-
 
157
            	
-
 
158
            	el_wpsg_mod_kundenkontakt_loading_wrap.style.display = 'none';
-
 
159
            	
-
 
160
            	el_wpsg_mod_kundenkontakt_subject_wrap.style.display = 'none';
-
 
161
            	el_wpsg_mod_kundenkontakt_subject.value = '';
-
 
162
            	
-
 
163
            	el_wpsg_mod_kundenkontakt_text_wrap.style.display = 'none';
-
 
164
            	el_wpsg_mod_kundenkontakt_text.value = '';
-
 
165
            	        
108
            	el_wpsg_mod_kundenkontakt_submit.removeAttribute("disabled");
166
            	el_wpsg_mod_kundenkontakt_submit.removeAttribute("disabled");
-
 
167
            	el_wpsg_mod_kundenkontakt_subject.removeAttribute("disabled");
-
 
168
                el_wpsg_mod_kundenkontakt_text.removeAttribute("disabled");
-
 
169
            	
-
 
170
            	el_wpsg_mod_kundenkontakt_submit_wrap.style.display = 'none';
109
            	
171
            	
110
            	alert(data);
172
            	alert(data);
111
            	
173
            	
112
            }
174
            }
113
        });
175
        });
Line 136... Line 198...
136
    
198
    
137
    #wpsg_mod_kundenkontakt_text { height:300px; }
199
    #wpsg_mod_kundenkontakt_text { height:300px; }
138
    #wpsg_mod_kundenkontakt_subject_wrap { display:none; }
200
    #wpsg_mod_kundenkontakt_subject_wrap { display:none; }
139
    #wpsg_mod_kundenkontakt_text_wrap { display:none; }
201
    #wpsg_mod_kundenkontakt_text_wrap { display:none; }
140
    #wpsg_mod_kundenkontakt_submit_wrap { display:none; }
202
    #wpsg_mod_kundenkontakt_submit_wrap { display:none; }
-
 
203
    #wpsg_mod_kundenkontakt_loading_wrap { display:none; }
-
 
204
    #wpsg_mod_kundenkontakt_layer .form-group > label { width:15% !important; }
-
 
205
    #wpsg_mod_kundenkontakt_layer .wpsg_form_field > .wpsg_form_left { width:15% !important; }
-
 
206
    #wpsg_mod_kundenkontakt_layer .form-group > div:nth-child(2),
-
 
207
    #wpsg_mod_kundenkontakt_layer .wpsg_form_field > .wpsg_form_right { width:85% !important; }
141
    
208
    
142
</style>
209
</style>
143
210