Subversion Repositories wpShopGermany4

Rev

Rev 5261 | 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">

        <?php 
        $tcode = $this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code;
        $prov = array();
        foreach ($this->view['wpsg_mod_packagetracking']['provider'] as $p) $prov[] = $p['name'];

        echo wpsg_drawForm_Input('wpsg_mod_packagetracking_code', __('Tracking-ID', 'wpsg'), $tcode);
        echo wpsg_drawForm_Select('wpsg_mod_packagetracking_provider', __('Provider', 'wpsg'), $prov, $this->view['wpsg_mod_packagetracking']['preset'], array());
        ?>

        <?php 

        $temp = $this->view['wpsg_mod_packagetracking']['oOrder']->wpsg_mod_packagetracking_code;
                if (wpsg_isSizedString($temp)) {
                        
                        $link = '<a href="';
                        $link .= $this->callMod('wpsg_mod_packagetracking', 'getTrackingURL', array(&$_REQUEST['edit_id']));
                        $link .= '">';
                        $link .= __('Paketverfolgung', 'wpsg');
                        $link .= '</a>';
                
            echo wpsg_drawForm_Text('', $link, 'wpsg_trackingurl', array());
                }
        ?>
</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>