3915 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Integration in das Formular für die Statusänderung einer Bestellung
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
<div class="wpsg_form_field wpsg_mod_packagetracking">
|
4785 |
daniel |
9 |
<div class="wpsg_form_left">
|
3915 |
daniel |
10 |
<?php echo __('Paketverfolgung', 'wpsg'); ?>:
|
|
|
11 |
</div>
|
|
|
12 |
<div class="wpsg_form_right">
|
|
|
13 |
<input placeholder="<?php echo __('Tracking ID', 'wpsg'); ?>" type="text" id="wpsg_mod_packagetracking_code" value="<?php echo wpsg_hspc($this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code); ?>" name="wpsg_mod_packagetracking_code" />
|
|
|
14 |
<select name="wpsg_mod_packagetracking_provider" id="wpsg_mod_packagetracking_provider">
|
|
|
15 |
<option value="0"><?php echo __('Keine Paketverfolgung', 'wpsg'); ?></option>
|
|
|
16 |
<?php if (wpsg_isSizedArray($this->view['wpsg_mod_packagetracking']['provider'])) { ?>
|
|
|
17 |
<?php foreach ($this->view['wpsg_mod_packagetracking']['provider'] as $p) { ?>
|
|
|
18 |
<option value="<?php echo wpsg_hspc($p['id']); ?>" <?php echo (($this->view['wpsg_mod_packagetracking']['preset'] == $p['id'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($p['name']); ?></option>
|
|
|
19 |
<?php } ?>
|
|
|
20 |
<?php } ?>
|
|
|
21 |
</select>
|
|
|
22 |
<div class="wpsg_clear"></div>
|
4222 |
daniel |
23 |
<?php if (wpsg_isSizedString($this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code)) { ?>
|
3915 |
daniel |
24 |
<a href="<?php echo $this->callMod('wpsg_mod_packagetracking', 'getTrackingURL', array(&$_REQUEST['edit_id'])); ?>"><?php echo __('Paketverfolgung', 'wpsg'); ?></a>
|
4222 |
daniel |
25 |
<?php } ?>
|
3915 |
daniel |
26 |
</div>
|
|
|
27 |
<div class="wpsg_clear"></div>
|
|
|
28 |
</div>
|
|
|
29 |
|
|
|
30 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
31 |
|
|
|
32 |
jQuery('#wpsg_order_view_status_submit').bind('click', function() {
|
|
|
33 |
|
|
|
34 |
if (new Number(jQuery('#wpsg_order_view_status').val()) == 250)
|
|
|
35 |
{
|
|
|
36 |
|
|
|
37 |
/* Wechsel auf "Ware versendet" */
|
|
|
38 |
|
|
|
39 |
if (new Number(jQuery('#wpsg_mod_packagetracking_provider').val()) > 0 && jQuery('#wpsg_mod_packagetracking_code').val().trim() == '')
|
|
|
40 |
{
|
|
|
41 |
|
|
|
42 |
alert('<?php echo __('Wenn sie auf den Status "Ware versendet" wechseln möchten und einen Anbieter für Paketverfolgung ausgewählt haben so muss auch eine Tracking ID hinterlegt werden.', 'wpsg'); ?>');
|
|
|
43 |
|
|
|
44 |
return false;
|
|
|
45 |
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
} );
|
|
|
51 |
|
|
|
52 |
/* ]]> */</script>
|
|
|
53 |
|