Subversion Repositories wpShopGermany4

Rev

Rev 7613 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1414 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Integration der Versandadresse in die Bestellansicht
5
	 */
7613 daniel 6
 
1414 daniel 7
?>
5049 daniel 8
 
7613 daniel 9
<script>
5049 daniel 10
 
7613 daniel 11
	function wpsg_saveShippingAdress() {
5049 daniel 12
 
5720 daniel 13
        jQuery('#wpsg_backend_loading').show();
5049 daniel 14
 
5720 daniel 15
        jQuery.ajax( {
7613 daniel 16
            url: '<?php
17
 
18
				echo wpsg_admin_url('Order', 'ajax', ['mod' => 'wpsg_mod_shippingadress', 'edit_id' => $this->view['data']['id']], ['noheader' => '1'], true);
19
 
20
			?>',
5720 daniel 21
            data: {
22
                form_data: jQuery('#shipping_dialog_content input, #shipping_dialog_content select').serialize()
23
            },
7613 daniel 24
            success: function() {
5049 daniel 25
 
7613 daniel 26
				location.reload();
5720 daniel 27
 
28
            }
29
        } );
30
 
5049 daniel 31
		return false;
32
 
7613 daniel 33
	}
5049 daniel 34
 
7613 daniel 35
</script>
5049 daniel 36
 
5720 daniel 37
<div class="modal fade" tabindex="-1" role="dialog" id="wpsg_customer_shipping_edit">
38
    <div class="modal-dialog" role="document">
39
        <div class="modal-content">
40
            <div class="modal-header">
41
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
6081 hartmut 42
                <h4 class="modal-title"><?php echo __('Lieferanschrift bearbeiten', 'wpsg'); ?></h4>
5720 daniel 43
            </div>
44
            <div class="modal-body">
45
 
46
                <div id="shipping_dialog_content">
8264 karl 47
                    <?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']??''); ?>
48
                    <?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title']??'', array('noIndex' => true)); ?>
49
                    <?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']??''); ?>
50
                    <?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']??''); ?>
51
                    <?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('Straße', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']??''); ?>
7247 daniel 52
 
7305 daniel 53
					<?php if (wpsg_getStr($this->view['pflicht']['wpsg_showNr']) === '1') { ?>
7247 daniel 54
 
8264 karl 55
						<?php echo wpsg_drawForm_Input('dialog_shipping_nr', __('Hausnummer', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_nr']??''); ?>
7247 daniel 56
 
57
					<?php } ?>
58
 
8264 karl 59
                    <?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']??''); ?>
60
                    <?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']??''); ?>
61
                    <?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']??''); ?>
7613 daniel 62
 
63
					<br />
64
 
65
					<?php echo wpsg_drawForm_Checkbox('dialog_delete', __('Lieferadresse löschen', 'wpsg'), false); ?>
66
 
5720 daniel 67
                </div>
68
 
69
            </div>
6793 hartmut 70
 
5720 daniel 71
            <div class="modal-footer">
72
                <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Schließen', 'wpsg'); ?></button>
73
                <button type="button" class="btn btn-primary" onclick="return wpsg_saveShippingAdress();"><?php echo __('Speichern', 'wpsg'); ?></button>
74
            </div>
75
        </div>
76
    </div>
1414 daniel 77
</div>
5720 daniel 78
 
79
<?php echo wpsg_drawForm_TextStart(); ?>
80
 
7613 daniel 81
	<?php if (wpsg_isSizedArray($this->view['wpsg_mod_shippingadress'])) { ?>
82
 
83
		<?php if (trim($this->view['wpsg_mod_shippingadress']['shipping_firma']) != '') { ?>
84
		<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_firma']); ?><br />
85
		<?php } ?>
86
		<?php
87
 
88
			if (wpsg_isSizedString($this->view['wpsg_mod_shippingadress']['shipping_title']) && $this->view['wpsg_mod_shippingadress']['shipping_title'] != '-1')
89
				echo $this->view['arTitles'][$this->view['wpsg_mod_shippingadress']['shipping_title']];
90
 
91
		?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_name']); ?><br />
92
		<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_strasse'].rtrim(' '.wpsg_getStr($this->view['wpsg_mod_shippingadress']['shipping_nr']))); ?><br />
93
		<?php $lk = $this->view['wpsg_mod_shippingadress']['oCountry']->getShorttext(); ?>
94
		<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_plz']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_ort']); ?> <?php echo wpsg_hspc($lk); ?><br />
95
		<a style="position: absolute; right:25px; top:10px; display:inline-block;" data-toggle="modal" data-target="#wpsg_customer_shipping_edit" href="#" title="<?php echo __('Lieferanschrift ändern', 'wpsg'); ?>">
96
			<span class="glyphicon glyphicon-pencil"></span>
97
		</a>
5720 daniel 98
 
7613 daniel 99
	<?php } else { ?>
100
 
101
		<?php echo __('Keine abweichende Lieferadresse angegeben.', 'wpsg'); ?>
102
 
103
		<a style="position: absolute; right:25px; top:10px; display:inline-block;" data-toggle="modal" data-target="#wpsg_customer_shipping_edit" href="#" title="<?php echo __('Lieferanschrift ändern', 'wpsg'); ?>">
104
			<span class="glyphicon glyphicon-pencil"></span>
105
		</a>
106
 
107
	<?php } ?>
5720 daniel 108
 
109
<?php echo wpsg_drawForm_TextEnd(__('Lieferadresse', 'wpsg')); ?>
110