Subversion Repositories wpShopGermany4

Rev

Rev 7305 | Rev 7787 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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">&times;</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')) { ?>
7612 daniel 48
		            	<?php echo wpsg_drawForm_Text(__('E-Mail', 'wpsg'),'<a href="'.
49
 
50
							wpsg_admin_url('Customer', 'edit', ['edit_id' => $this->view['data']['k_id']]).
51
 
52
		            	'">'.$this->view['data']['email'].'</a>'); ?>
7087 thomas 53
					<?php } ?>
6204 thomas 54
				<?php } ?>
55
                <br />
7087 thomas 56
                <?php if ($this->view['pflicht']['strasse'] != '2') { ?>
7247 daniel 57
 
58
					<?php echo wpsg_drawForm_Input('dialog_strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
59
 
7305 daniel 60
					<?php if (wpsg_getStr($this->view['pflicht']['wpsg_showNr']) === '1') { ?>
7247 daniel 61
 
62
						<?php echo wpsg_drawForm_Input('dialog_nr', __('Hausnummer', 'wpsg'), $this->view['data']['nr']); ?>
63
 
64
					<?php } ?>
65
 
7087 thomas 66
                <?php } ?>
67
                <?php if ($this->view['pflicht']['plz'] != '2') { ?>
68
                	<?php echo wpsg_drawForm_Input('dialog_plz', __('Postleitzahl', 'wpsg'), $this->view['data']['plz']); ?>
69
                <?php } ?>
70
                <?php if ($this->view['pflicht']['ort'] != '2') { ?>
71
                	<?php echo wpsg_drawForm_Input('dialog_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
72
                <?php } ?>
73
                <?php if ($this->view['pflicht']['land'] != '2') { ?>
74
                	<?php echo wpsg_drawForm_Select('dialog_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['data']['land']); ?>
75
				<?php } ?>
5720 daniel 76
                <br />
77
 
5846 thomas 78
                <?php echo wpsg_drawForm_Checkbox('dialog_customer', __('Auch Kundendaten anpassen', 'wpsg'), false, array('help' => 'dialog_customer')); ?>
79
                <?php echo wpsg_drawForm_Checkbox('dialog_all', __('Alle Bestellungen des Kunden ändern', 'wpsg'), false, array('help' => 'dialog_all')); ?>
80
 
81
                <?php if ($this->hasMod('wpsg_mod_shippingadress')) {?>
82
                <?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false, array('help' => 'dialog_shipping')); ?>
83
                <?php } ?>
6846 hartmut 84
				<input type="hidden" id="dialog_change_land" name="dialog_change_land" />
85
 
5720 daniel 86
            </div>
87
            <div class="modal-footer">
88
                <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Schließen', 'wpsg'); ?></button>
89
                <button type="button" class="btn btn-primary" onclick="return wpsg_saveInvoiceAdress();"><?php echo __('Speichern', 'wpsg'); ?></button>
90
            </div>
91
        </div>
92
    </div>
93
</div>
94
 
95
<?php echo wpsg_drawForm_AdminboxStart(__('Kundendaten', 'wpsg')); ?>
96
 
97
    <?php echo wpsg_drawForm_TextStart(); ?>
98
    <?php echo $this->view['oOrder']->getCustomer()->getNr(); ?>
99
    <?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
7612 daniel 100
	[&nbsp; <a href="<?php
101
 
102
		echo wpsg_admin_url('Customer', 'edit', ['edit_id' => $this->view['data']['k_id']]);
103
		//echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id='.$this->view['data']['k_id'];
104
 
105
	?>"><?php echo __('Zum Kunden', 'wpsg'); ?></a>&nbsp;]
5720 daniel 106
	<?php } ?>
6081 hartmut 107
    <?php echo wpsg_drawForm_TextEnd(__('Kundennummer', 'wpsg')); ?>
5720 daniel 108
 
109
    <?php echo wpsg_drawForm_TextStart(); ?>
7087 thomas 110
	<?php if ($this->view['pflicht']['firma'] != '2') { ?>
111
    	<?php if (trim($this->view['data']['firma']) != '') { ?>
112
    		<?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
113
    	<?php } ?>
114
    <?php } ?>
115
 	<?php if ($this->view['pflicht']['anrede'] != '2') { ?>
116
    	<?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['arTitles'][$this->view['data']['title']]).' ':''); ?>
117
    <?php } ?>
118
    <?php if ($this->view['pflicht']['vname'] != '2') { ?>
119
    	<?php echo wpsg_hspc($this->view['data']['vname']); ?>
120
    <?php } ?>
121
    <?php if ($this->view['pflicht']['name'] != '2') { ?>
122
    	<?php echo wpsg_hspc($this->view['data']['name']); ?><br />
123
    <?php } ?>
124
    <?php if ($this->view['pflicht']['strasse'] != '2') { ?>
7247 daniel 125
 
7305 daniel 126
		<?php echo wpsg_hspc($this->view['data']['strasse']); ?> <?php echo wpsg_hspc(wpsg_getStr($this->view['data']['nr'])); ?><br />
7247 daniel 127
 
7087 thomas 128
    <?php } ?>
129
   	<?php if ($this->view['pflicht']['plz'] != '2') { ?>
130
    	<?php echo wpsg_hspc($this->view['data']['plz']); ?>
131
    <?php } ?>
132
   	<?php if ($this->view['pflicht']['ort'] != '2') { ?>
133
    	<?php echo wpsg_hspc($this->view['data']['ort']); ?>
134
    <?php } ?>
135
    <?php if ($this->view['pflicht']['land'] != '2') { ?>
136
    	<?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
137
	<?php } ?>
6081 hartmut 138
    <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 139
        <span class="glyphicon glyphicon-pencil"></span>
140
    </a>
141
 
6081 hartmut 142
    <?php echo wpsg_drawForm_TextEnd(__('Anschrift', 'wpsg')); ?>
7087 thomas 143
 
144
    <?php if ($this->view['pflicht']['geb'] != '2') { ?>
145
    	<?php if (strtotime($this->view['data']['geb']) > 0) { ?>
146
    		<?php echo wpsg_drawForm_Text(__('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
147
    	<?php } ?>
148
	<?php } ?>
149
    <?php if ($this->view['pflicht']['fax'] != '2') { ?>
150
	    <?php if (strlen($this->view['data']['fax']) > 0) { ?>
151
	    	<?php echo wpsg_drawForm_Text(__('Fax', 'wpsg'), $this->view['data']['fax'], array('text' => true)); ?>
152
	    <?php } ?>
153
	<?php } ?>
154
    <?php if ($this->view['pflicht']['tel'] != '2') { ?>
155
	    <?php if (strlen($this->view['data']['tel']) > 0) { ?>
156
	    	<?php echo wpsg_drawForm_Text(__('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
157
	    <?php } ?>
158
	<?php } ?>
7210 daniel 159
 
160
 
161
	<?php echo wpsg_drawForm_Text(__('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
162
	<br />
163
 
5720 daniel 164
    <?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>
165
 
166
    <?php echo wpsg_drawForm_TextStart(); ?>
7087 thomas 167
     <?php if ($this->view['pflicht']['email'] != '2') { ?>
168
    	<a href="mailto:<?php echo $this->view['data']['email']; ?>"><?php echo $this->view['data']['email']; ?></a>
169
    <?php } ?>
6081 hartmut 170
    <?php echo wpsg_drawForm_TextEnd(__('E-Mail', 'wpsg')); ?>
7087 thomas 171
 
5720 daniel 172
    <script type="text/javascript">/* <![CDATA[ */
173
 
174
        function wpsg_saveInvoiceAdress()
175
        {
176
 
177
            jQuery('#wpsg_backend_loading').show();
178
 
179
            jQuery.ajax( {
180
                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',
181
                data: {
182
                    form_data: jQuery('#wpsg_customer_edit input, #wpsg_customer_edit select').serialize()
183
                },
184
                success: function(data) {
185
 
6846 hartmut 186
                    //location.href = location.href;
187
                    location.reload();
5720 daniel 188
 
189
                }
190
            } );
191
 
192
            return false;
193
 
194
        }
195
 
6846 hartmut 196
        jQuery(document).ready(function() {
197
 
198
            jQuery('#dialog_land').bind('change', function() {
199
 
200
				jQuery('#dialog_change_land').val('1');
201
 
202
            } );
203
 
204
        } );
205
 
206
 
5720 daniel 207
    /* ]]> */</script>
208
 
209
<?php echo wpsg_drawForm_AdminboxEnd(); ?>