Subversion Repositories wpShopGermany4

Rev

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

<?php
        
        /**
         * Template für die Integration des Anschreiben Moduls in die Bestellverwaltung
         */

?>
        
<?php echo wpsg_drawForm_AdminboxStart(__('Anschreiben', 'wpsg'));?>

        <?php if (sizeof($this->view['mod_anschreiben']['aranschreiben']) == 0 ) { ?>
           
           <p><?php echo __('Bisher kein Anschreiben geschrieben.', 'wpsg'); ?></p>
           
           <?php } else { ?>
                <table>
                <?php foreach ($this->view['mod_anschreiben']['aranschreiben_gesamt'] as $a) { ?>
                    <tr>
                        <td>#<?php echo ($a['anr'] != ''); ?>
                                                
                                                <?php if ($a['anr'] != "") { ?>
                                <?php echo wpsg_translate(__('Anschreiben gespeichert am #1#', 'wpsg'), date("d.m.Y", $a['ts_datum'])); ?>
                            <?php } ?>
        
                        </td>
                        <td style="text-align:right;">
        
                            <?php if ($a['anr'] != "") {

                                $rfile = $this->callMod('wpsg_mod_anschreiben', 'getFilePath', array($this->view['data']['id'], true)).'A'.$r['anr'].'.pdf';
                                
                            } ?>

                        </td>
                        </tr>
                <?php } ?>
                </table>
         <?php } ?>
        
        <br>
        
        <div class="wpsg_clear"></div>
        
        <hr />
        
        <div class="inside">                                            
                <div>
                        
                        <form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_coverletter&edit_id=<?php echo $this->view['data']['id']; ?>&action=ajax&noheader=1" id="wpsg_mod_coverletter_form">      

                                <?php $arShopLocations = $this->getShopLocations(); ?>
                                <?php $arShopLocationLabels = []; foreach ($arShopLocations as $l_id => $l) $arShopLocationLabels[$l_id] = $l['label']; ?>
                                
                                <?php if (sizeof($arShopLocations) > 1) { ?>
                                        
                                        <?php echo wpsg_drawForm_Select('target', __('Shop Adresse', 'wpsg'), $arShopLocationLabels, '1'); ?>
                                        
                                <?php } else { ?>
                                        
                                        <input type="hidden" name="target" value="1" />
                                        
                                <?php } ?>

                                <?php echo wpsg_drawForm_Textarea('text', __('Text', 'wpsg'),'', ['noLabel' => true, 'fullLabel' => __('Text für das Anschreiben', 'wpsg'), 'style' => 'height:200px']); ?>
                                
                                <br />
                                
                                <input type="submit" name="wpsg_mod_coverletter_write" value="<?php echo __("Speichern & Drucken", "wpsg"); ?>" style="float:left;" class="button button-primary" />
                                
                                <div class="wpsg_clear"></div>
                                
                        </form>
                        
                </div>
        </div>

<?php echo wpsg_drawForm_AdminboxEnd(); ?>

<script>
        
        jQuery('#wpsg_mod_coverletter_form').on('submit', function() {
                
                setTimeout(function() {
                        
                        location.reload();
                        
                }, 1000);
                                
        } );
        
</script>