Rev 6202 | Rev 7087 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
/**
* User: Daschmi (daschmi@daschmi.de)
* Date: 07.08.2016
* Time: 10:40
*/
?>
<div class="modal fade" tabindex="-1" role="dialog" id="wpsg_customer_edit">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><?php echo __('Kundendaten bearbeiten', 'wpsg'); ?></h4>
</div>
<div class="modal-body">
<?php echo wpsg_drawForm_Input('dialog_firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
<?php echo wpsg_drawForm_Input('dialog_ustidnr', __('UStIdNr', 'wpsg'), $this->view['data']['ustidnr']); ?>
<br />
<?php echo wpsg_drawForm_Select('dialog_title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
<?php echo wpsg_drawForm_Input('dialog_vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
<?php echo wpsg_drawForm_Input('dialog_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
<br />
<?php echo wpsg_drawForm_Input('dialog_geb', __('Geburtsdatum', 'wpsg'), $this->view['data']['geb']); ?>
<br />
<?php echo wpsg_drawForm_Input('dialog_tel', __('Telefon', 'wpsg'), $this->view['data']['tel']); ?>
<?php echo wpsg_drawForm_Input('dialog_fax', __('Fax', 'wpsg'), $this->view['data']['fax']); ?>
<?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
<?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>'); ?>
<?php } ?>
<br />
<?php echo wpsg_drawForm_Input('dialog_strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
<?php echo wpsg_drawForm_Input('dialog_plz', __('Postleitzahl', 'wpsg'), $this->view['data']['plz']); ?>
<?php echo wpsg_drawForm_Input('dialog_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
<?php echo wpsg_drawForm_Select('dialog_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['data']['land']); ?>
<br />
<?php echo wpsg_drawForm_Checkbox('dialog_customer', __('Auch Kundendaten anpassen', 'wpsg'), false, array('help' => 'dialog_customer')); ?>
<?php echo wpsg_drawForm_Checkbox('dialog_all', __('Alle Bestellungen des Kunden ändern', 'wpsg'), false, array('help' => 'dialog_all')); ?>
<?php if ($this->hasMod('wpsg_mod_shippingadress')) {?>
<?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false, array('help' => 'dialog_shipping')); ?>
<?php } ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Schließen', 'wpsg'); ?></button>
<button type="button" class="btn btn-primary" onclick="return wpsg_saveInvoiceAdress();"><?php echo __('Speichern', 'wpsg'); ?></button>
</div>
</div>
</div>
</div>
<?php echo wpsg_drawForm_AdminboxStart(__('Kundendaten', 'wpsg')); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
<?php echo $this->view['oOrder']->getCustomer()->getNr(); ?>
<?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
[ <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> ]
<?php } ?>
<?php echo wpsg_drawForm_TextEnd(__('Kundennummer', 'wpsg')); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
<?php if (trim($this->view['data']['firma']) != '') { ?>
<?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
<?php } ?>
<?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['arTitles'][$this->view['data']['title']]).' ':''); ?><?php echo wpsg_hspc($this->view['data']['vname']); ?> <?php echo wpsg_hspc($this->view['data']['name']); ?><br />
<?php echo wpsg_hspc($this->view['data']['strasse']); ?> <?php echo wpsg_hspc($this->view['data']['nr']); ?><br />
<?php echo wpsg_hspc($this->view['data']['plz']); ?> <?php echo wpsg_hspc($this->view['data']['ort']); ?> <?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
<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'); ?>">
<span class="glyphicon glyphicon-pencil"></span>
</a>
<?php echo wpsg_drawForm_TextEnd(__('Anschrift', 'wpsg')); ?>
<?php if (strtotime($this->view['data']['geb']) > 0) { ?>
<?php echo wpsg_drawForm_Text(__('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
<?php } ?>
<?php if (strlen($this->view['data']['fax']) > 0) { ?>
<?php echo wpsg_drawForm_Text(__('Fax', 'wpsg'), $this->view['data']['fax'], array('text' => true)); ?>
<?php } ?>
<?php if (strlen($this->view['data']['tel']) > 0) { ?>
<?php echo wpsg_drawForm_Text(__('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
<?php } ?>
<?php if (strlen($this->view['data']['ustidnr']) > 0) { ?>
<?php echo wpsg_drawForm_Text(__('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
<?php } ?>
<?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
<a href="mailto:<?php echo $this->view['data']['email']; ?>"><?php echo $this->view['data']['email']; ?></a>
<?php echo wpsg_drawForm_TextEnd(__('E-Mail', 'wpsg')); ?>
<script type="text/javascript">/* <![CDATA[ */
function wpsg_saveInvoiceAdress()
{
jQuery('#wpsg_backend_loading').show();
jQuery.ajax( {
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',
data: {
form_data: jQuery('#wpsg_customer_edit input, #wpsg_customer_edit select').serialize()
},
success: function(data) {
location.href = location.href;
}
} );
return false;
}
/* ]]> */</script>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>