Subversion Repositories wpShopGermany4

Rev

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