5720 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* User: Daschmi (daschmi@daschmi.de)
|
|
|
5 |
* Date: 07.08.2016
|
|
|
6 |
* Time: 10:40
|
|
|
7 |
*/
|
|
|
8 |
|
|
|
9 |
?>
|
|
|
10 |
|
|
|
11 |
<div class="modal fade" tabindex="-1" role="dialog" id="wpsg_customer_edit">
|
|
|
12 |
<div class="modal-dialog" role="document">
|
|
|
13 |
<div class="modal-content">
|
|
|
14 |
<div class="modal-header">
|
|
|
15 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
6081 |
hartmut |
16 |
<h4 class="modal-title"><?php echo __('Kundendaten bearbeiten', 'wpsg'); ?></h4>
|
5720 |
daniel |
17 |
</div>
|
|
|
18 |
<div class="modal-body">
|
7087 |
thomas |
19 |
<?php if ($this->view['pflicht']['firma'] != '2') { ?>
|
|
|
20 |
<?php echo wpsg_drawForm_Input('dialog_firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
|
|
|
21 |
<?php } ?>
|
|
|
22 |
<?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
|
|
|
23 |
<?php echo wpsg_drawForm_Input('dialog_ustidnr', __('UStIdNr', 'wpsg'), $this->view['data']['ustidnr']); ?>
|
|
|
24 |
<?php } ?>
|
6204 |
thomas |
25 |
<br />
|
7087 |
thomas |
26 |
<?php if ($this->view['pflicht']['anrede'] != '2') { ?>
|
|
|
27 |
<?php echo wpsg_drawForm_Select('dialog_title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
|
|
|
28 |
<?php } ?>
|
|
|
29 |
<?php if ($this->view['pflicht']['vname'] != '2') { ?>
|
|
|
30 |
<?php echo wpsg_drawForm_Input('dialog_vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
|
|
|
31 |
<?php } ?>
|
|
|
32 |
<?php if ($this->view['pflicht']['name'] != '2') { ?>
|
|
|
33 |
<?php echo wpsg_drawForm_Input('dialog_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
|
|
|
34 |
<?php } ?>
|
6204 |
thomas |
35 |
<br />
|
7087 |
thomas |
36 |
<?php if ($this->view['pflicht']['geb'] != '2') { ?>
|
|
|
37 |
<?php echo wpsg_drawForm_Input('dialog_geb', __('Geburtsdatum', 'wpsg'), $this->view['data']['geb']); ?>
|
|
|
38 |
<?php } ?>
|
6204 |
thomas |
39 |
<br />
|
7087 |
thomas |
40 |
<?php if ($this->view['pflicht']['tel'] != '2') { ?>
|
|
|
41 |
<?php echo wpsg_drawForm_Input('dialog_tel', __('Telefon', 'wpsg'), $this->view['data']['tel']); ?>
|
|
|
42 |
<?php } ?>
|
|
|
43 |
<?php if ($this->view['pflicht']['fax'] != '2') { ?>
|
|
|
44 |
<?php echo wpsg_drawForm_Input('dialog_fax', __('Fax', 'wpsg'), $this->view['data']['fax']); ?>
|
|
|
45 |
<?php } ?>
|
|
|
46 |
<?php if ($this->view['pflicht']['email'] != '2') { ?>
|
|
|
47 |
<?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
|
|
|
48 |
<?php echo wpsg_drawForm_Text(__('E-Mail', 'wpsg'),'<a href="'.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id='.$this->view['data']['k_id'].'">'.$this->view['data']['email'].'</a>'); ?>
|
|
|
49 |
<?php } ?>
|
6204 |
thomas |
50 |
<?php } ?>
|
|
|
51 |
<br />
|
7087 |
thomas |
52 |
<?php if ($this->view['pflicht']['strasse'] != '2') { ?>
|
7247 |
daniel |
53 |
|
|
|
54 |
<?php echo wpsg_drawForm_Input('dialog_strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
|
|
|
55 |
|
|
|
56 |
<?php if (($this->view['pflicht']['wpsg_showNr']??'') === '1') { ?>
|
|
|
57 |
|
|
|
58 |
<?php echo wpsg_drawForm_Input('dialog_nr', __('Hausnummer', 'wpsg'), $this->view['data']['nr']); ?>
|
|
|
59 |
|
|
|
60 |
<?php } ?>
|
|
|
61 |
|
7087 |
thomas |
62 |
<?php } ?>
|
|
|
63 |
<?php if ($this->view['pflicht']['plz'] != '2') { ?>
|
|
|
64 |
<?php echo wpsg_drawForm_Input('dialog_plz', __('Postleitzahl', 'wpsg'), $this->view['data']['plz']); ?>
|
|
|
65 |
<?php } ?>
|
|
|
66 |
<?php if ($this->view['pflicht']['ort'] != '2') { ?>
|
|
|
67 |
<?php echo wpsg_drawForm_Input('dialog_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
|
|
|
68 |
<?php } ?>
|
|
|
69 |
<?php if ($this->view['pflicht']['land'] != '2') { ?>
|
|
|
70 |
<?php echo wpsg_drawForm_Select('dialog_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['data']['land']); ?>
|
|
|
71 |
<?php } ?>
|
5720 |
daniel |
72 |
<br />
|
|
|
73 |
|
5846 |
thomas |
74 |
<?php echo wpsg_drawForm_Checkbox('dialog_customer', __('Auch Kundendaten anpassen', 'wpsg'), false, array('help' => 'dialog_customer')); ?>
|
|
|
75 |
<?php echo wpsg_drawForm_Checkbox('dialog_all', __('Alle Bestellungen des Kunden ändern', 'wpsg'), false, array('help' => 'dialog_all')); ?>
|
|
|
76 |
|
|
|
77 |
<?php if ($this->hasMod('wpsg_mod_shippingadress')) {?>
|
|
|
78 |
<?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false, array('help' => 'dialog_shipping')); ?>
|
|
|
79 |
<?php } ?>
|
6846 |
hartmut |
80 |
<input type="hidden" id="dialog_change_land" name="dialog_change_land" />
|
|
|
81 |
|
5720 |
daniel |
82 |
</div>
|
|
|
83 |
<div class="modal-footer">
|
|
|
84 |
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Schließen', 'wpsg'); ?></button>
|
|
|
85 |
<button type="button" class="btn btn-primary" onclick="return wpsg_saveInvoiceAdress();"><?php echo __('Speichern', 'wpsg'); ?></button>
|
|
|
86 |
</div>
|
|
|
87 |
</div>
|
|
|
88 |
</div>
|
|
|
89 |
</div>
|
|
|
90 |
|
|
|
91 |
<?php echo wpsg_drawForm_AdminboxStart(__('Kundendaten', 'wpsg')); ?>
|
|
|
92 |
|
|
|
93 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
94 |
<?php echo $this->view['oOrder']->getCustomer()->getNr(); ?>
|
|
|
95 |
<?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
|
6204 |
thomas |
96 |
[ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $this->view['data']['k_id']; ?>"><?php echo __('Zum Kunden', 'wpsg'); ?></a> ]
|
5720 |
daniel |
97 |
<?php } ?>
|
6081 |
hartmut |
98 |
<?php echo wpsg_drawForm_TextEnd(__('Kundennummer', 'wpsg')); ?>
|
5720 |
daniel |
99 |
|
|
|
100 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
7087 |
thomas |
101 |
<?php if ($this->view['pflicht']['firma'] != '2') { ?>
|
|
|
102 |
<?php if (trim($this->view['data']['firma']) != '') { ?>
|
|
|
103 |
<?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
|
|
|
104 |
<?php } ?>
|
|
|
105 |
<?php } ?>
|
|
|
106 |
<?php if ($this->view['pflicht']['anrede'] != '2') { ?>
|
|
|
107 |
<?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['arTitles'][$this->view['data']['title']]).' ':''); ?>
|
|
|
108 |
<?php } ?>
|
|
|
109 |
<?php if ($this->view['pflicht']['vname'] != '2') { ?>
|
|
|
110 |
<?php echo wpsg_hspc($this->view['data']['vname']); ?>
|
|
|
111 |
<?php } ?>
|
|
|
112 |
<?php if ($this->view['pflicht']['name'] != '2') { ?>
|
|
|
113 |
<?php echo wpsg_hspc($this->view['data']['name']); ?><br />
|
|
|
114 |
<?php } ?>
|
|
|
115 |
<?php if ($this->view['pflicht']['strasse'] != '2') { ?>
|
7247 |
daniel |
116 |
|
|
|
117 |
<?php echo wpsg_hspc($this->view['data']['strasse']); ?> <?php echo wpsg_hspc(($this->view['data']['nr']??'')); ?><br />
|
|
|
118 |
|
7087 |
thomas |
119 |
<?php } ?>
|
|
|
120 |
<?php if ($this->view['pflicht']['plz'] != '2') { ?>
|
|
|
121 |
<?php echo wpsg_hspc($this->view['data']['plz']); ?>
|
|
|
122 |
<?php } ?>
|
|
|
123 |
<?php if ($this->view['pflicht']['ort'] != '2') { ?>
|
|
|
124 |
<?php echo wpsg_hspc($this->view['data']['ort']); ?>
|
|
|
125 |
<?php } ?>
|
|
|
126 |
<?php if ($this->view['pflicht']['land'] != '2') { ?>
|
|
|
127 |
<?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
|
|
|
128 |
<?php } ?>
|
6081 |
hartmut |
129 |
<a style="position: absolute; right:25px; top:10px; display:inline-block;" data-toggle="modal" data-target="#wpsg_customer_edit" href="#" title="<?php echo __('Anschrift ändern', 'wpsg'); ?>">
|
5720 |
daniel |
130 |
<span class="glyphicon glyphicon-pencil"></span>
|
|
|
131 |
</a>
|
|
|
132 |
|
6081 |
hartmut |
133 |
<?php echo wpsg_drawForm_TextEnd(__('Anschrift', 'wpsg')); ?>
|
7087 |
thomas |
134 |
|
|
|
135 |
<?php if ($this->view['pflicht']['geb'] != '2') { ?>
|
|
|
136 |
<?php if (strtotime($this->view['data']['geb']) > 0) { ?>
|
|
|
137 |
<?php echo wpsg_drawForm_Text(__('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
|
|
|
138 |
<?php } ?>
|
|
|
139 |
<?php } ?>
|
|
|
140 |
<?php if ($this->view['pflicht']['fax'] != '2') { ?>
|
|
|
141 |
<?php if (strlen($this->view['data']['fax']) > 0) { ?>
|
|
|
142 |
<?php echo wpsg_drawForm_Text(__('Fax', 'wpsg'), $this->view['data']['fax'], array('text' => true)); ?>
|
|
|
143 |
<?php } ?>
|
|
|
144 |
<?php } ?>
|
|
|
145 |
<?php if ($this->view['pflicht']['tel'] != '2') { ?>
|
|
|
146 |
<?php if (strlen($this->view['data']['tel']) > 0) { ?>
|
|
|
147 |
<?php echo wpsg_drawForm_Text(__('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
|
|
|
148 |
<?php } ?>
|
|
|
149 |
<?php } ?>
|
7210 |
daniel |
150 |
|
|
|
151 |
|
|
|
152 |
<?php echo wpsg_drawForm_Text(__('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
|
|
|
153 |
<br />
|
|
|
154 |
|
5720 |
daniel |
155 |
<?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>
|
|
|
156 |
|
|
|
157 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
7087 |
thomas |
158 |
<?php if ($this->view['pflicht']['email'] != '2') { ?>
|
|
|
159 |
<a href="mailto:<?php echo $this->view['data']['email']; ?>"><?php echo $this->view['data']['email']; ?></a>
|
|
|
160 |
<?php } ?>
|
6081 |
hartmut |
161 |
<?php echo wpsg_drawForm_TextEnd(__('E-Mail', 'wpsg')); ?>
|
7087 |
thomas |
162 |
|
5720 |
daniel |
163 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
164 |
|
|
|
165 |
function wpsg_saveInvoiceAdress()
|
|
|
166 |
{
|
|
|
167 |
|
|
|
168 |
jQuery('#wpsg_backend_loading').show();
|
|
|
169 |
|
|
|
170 |
jQuery.ajax( {
|
|
|
171 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=saveInvoiceAdress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
|
|
|
172 |
data: {
|
|
|
173 |
form_data: jQuery('#wpsg_customer_edit input, #wpsg_customer_edit select').serialize()
|
|
|
174 |
},
|
|
|
175 |
success: function(data) {
|
|
|
176 |
|
6846 |
hartmut |
177 |
//location.href = location.href;
|
|
|
178 |
location.reload();
|
5720 |
daniel |
179 |
|
|
|
180 |
}
|
|
|
181 |
} );
|
|
|
182 |
|
|
|
183 |
return false;
|
|
|
184 |
|
|
|
185 |
}
|
|
|
186 |
|
6846 |
hartmut |
187 |
jQuery(document).ready(function() {
|
|
|
188 |
|
|
|
189 |
jQuery('#dialog_land').bind('change', function() {
|
|
|
190 |
|
|
|
191 |
jQuery('#dialog_change_land').val('1');
|
|
|
192 |
|
|
|
193 |
} );
|
|
|
194 |
|
|
|
195 |
} );
|
|
|
196 |
|
|
|
197 |
|
5720 |
daniel |
198 |
/* ]]> */</script>
|
|
|
199 |
|
|
|
200 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|