Subversion Repositories wpShopGermany4

Rev

Rev 4943 | Rev 7065 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

        /**
         * Integration in das Formular für die Statusänderung einer Bestellung
         */

?>
<div class="wpsg_form_field wpsg_mod_packagetracking">
        <div class="wpsg_form_left">
                <?php echo __('Paketverfolgung', 'wpsg'); ?>:
        </div>
        <div class="wpsg_form_right">
                <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" />
                <select name="wpsg_mod_packagetracking_provider" id="wpsg_mod_packagetracking_provider">
                        <option value="0"><?php echo __('Keine Paketverfolgung', 'wpsg'); ?></option>
                        <?php if (wpsg_isSizedArray($this->view['wpsg_mod_packagetracking']['provider'])) { ?>
                        <?php foreach ($this->view['wpsg_mod_packagetracking']['provider'] as $p) { ?>
                        <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>
                        <?php } ?>
                        <?php } ?>
                </select>
                <div class="wpsg_clear"></div>
                <?php if (wpsg_isSizedString($this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code)) { ?>
                <a href="<?php echo $this->callMod('wpsg_mod_packagetracking', 'getTrackingURL', array(&$_REQUEST['edit_id'])); ?>"><?php echo __('Paketverfolgung', 'wpsg'); ?></a>
                <?php } ?>
        </div>
        <div class="wpsg_clear"></div> 
</div>          

<script type="text/javascript">/* <![CDATA[ */

        jQuery('#wpsg_order_view_status_submit').bind('click', function() {
 
                if (new Number(jQuery('#wpsg_order_view_status').val()) == 250)
                {

                        /* Wechsel auf "Ware versendet" */

                        if (new Number(jQuery('#wpsg_mod_packagetracking_provider').val()) > 0 && jQuery('#wpsg_mod_packagetracking_code').val().trim() == '')
                        {

                                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'); ?>');
                        
                                return false;

                        }
                        
                }
                
        } );

/* ]]> */</script>