Subversion Repositories wpShopGermany4

Rev

Rev 6007 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

        /**
         * Template für die Einstellungen des Gutscheinprodukt Moduls
         */

?>
<?php if (!$this->hasMod('wpsg_mod_gutschein')) { ?>
<p class="wpsg_error"><?php echo __('Bitte aktivieren Sie das Gutscheinmodul, damit dieses Modul korrekt funktioniert!', 'wpsg'); ?></p>
<?php } ?>

<div class="wpsg_admin_box" id="wpsg_tab">
    <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Einstellungen', 'wpsg'); ?></a></li>
        <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Textfelder', 'wpsg'); ?></a></li>
    </ul>
        
        <div class="tab-content">
                
                <div role="tabpanel" class="tab-pane active" id="tab1" >        

            <?php echo wpsg_drawForm_TextStart(); ?>
                <div style="position:relative;">
                <?php if ($this->view['bp'] === false) { ?>
                <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
                <?php } else { ?>
                <a href="<?php echo $this->view['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
                <?php } ?>
                <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="mod_voucherproduct_paper" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_paper" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_paper"></a>
                <input type="file" name="wpsg_mod_voucherproduct_bp">
                <?php $strSuffix = ''; if ($this->view['bp'] !== false) { $strSuffix = '
                    <label>
                                                <input type="checkbox" name="wpsg_mod_voucherproduct_bp_del" value="1" />&nbsp;'.__('Löschen', 'wpsg').'
                                        </label>';
                                        echo __($strSuffix);
                } ?>
                </div>
            <?php echo wpsg_drawForm_TextEnd(__('Briefpapier (PDF/JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_voucherproduct_bp')); ?>

                        <?php echo wpsg_drawForm_Input('wpsg_voucherproduct_width', __('Breite des PDFs in mm', 'wpsg'), $this->get_option('wpsg_voucherproduct_width'), array ('rAlign' => true, 'help' => 'wpsg_voucherproduct_width')); ?>
                        <?php echo wpsg_drawForm_Input('wpsg_voucherproduct_height', __('Höhe des PDFs in mm', 'wpsg'), $this->get_option('wpsg_voucherproduct_height'), array ('rAlign' => true, 'help' => 'wpsg_voucherproduct_height')); ?>

            <?php echo wpsg_drawForm_TextStart(); ?>
                                <?php echo wpsg_translate(__('Kann <a href="#1#">hier</a> konfiguriert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#gutscheinproductmail'); ?>
                                <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" data-wpsg-tip="mod_voucherproduct_mail" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_mail" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_mail"></a>
                                
                <?php echo wpsg_drawForm_TextEnd(__('Gutscheinmail an Kunden', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_voucherproduct_bp')); ?>

                </div>
                
                <div role="tabpanel" class="tab-pane" id="tab2" >
                        <table class="table table-body-striped wpsg_mod_voucher_fieldtable">
                                <thead>
                                <tr>
                                        <th class="col_bezeichnung"></th>               
                                        <th class="col_freitext_label"><?php echo __('Freitext', 'wpsg'); ?></th>                       
                                        <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
                                        <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
                                        <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
                                        <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
                                        <th class="col_align"><?php echo __('Zentriert', 'wpsg'); ?></th>
                                        <th class="col_bg"><?php echo __('Hintergrund', 'wpsg'); ?></th>                                        
                                        <th class="col_alpha"><?php echo __('Deckkraft', 'wpsg'); ?></th>
                                        <th class="col_angle"><?php echo __('Winkel', 'wpsg'); ?></th>
                                        <th class="col_action"><?php echo __('Aktiv', 'wpsg'); ?></th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php for ($i = 0; $i < 10; $i ++) { ?>
                                <tr>
                                        <td><?php echo '#'.($i + 1); ?></td>                    
                                        <td>
                                                <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][text]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['text'])); ?>" />
                                        </td>           
                                        <td>
                                                <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][x]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['x'])); ?>" />
                                        </td>
                                        <td>
                                                <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][y]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['y'])); ?>" />
                                        </td>
                                        <td>
                                                <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][color]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['color'])); ?>" />
                                        </td>
                                        <td>
                                                <select name="text[<?php echo $i; ?>][fontsize]" style="width:100%;">
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 4))?'selected="selected"':''); ?> value="4">4</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 5))?'selected="selected"':''); ?> value="5">5</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 6))?'selected="selected"':''); ?> value="6">6</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 7))?'selected="selected"':''); ?> value="7">7</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 8))?'selected="selected"':''); ?> value="8">8</option>                             
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 9))?'selected="selected"':''); ?> value="9">9</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 10))?'selected="selected"':''); ?> value="10">10</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 11))?'selected="selected"':''); ?> value="11">11</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 12))?'selected="selected"':''); ?> value="12">12</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 13))?'selected="selected"':''); ?> value="13">13</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 14))?'selected="selected"':''); ?> value="14">14</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 16))?'selected="selected"':''); ?> value="16">16</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 18))?'selected="selected"':''); ?> value="18">18</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 20))?'selected="selected"':''); ?> value="20">20</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 22))?'selected="selected"':''); ?> value="22">22</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 24))?'selected="selected"':''); ?> value="24">24</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 26))?'selected="selected"':''); ?> value="26">26</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 28))?'selected="selected"':''); ?> value="28">28</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 30))?'selected="selected"':''); ?> value="30">30</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 32))?'selected="selected"':''); ?> value="32">32</option>
                                                        <option <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['fontsize'], 34))?'selected="selected"':''); ?> value="34">34</option>
                                                </select>
                                        </td>
                                        <td class="col_align">
                                                <input type="hidden" name="text[<?php echo $i; ?>][align]" value="0" />
                                                <input type="checkbox" name="text[<?php echo $i; ?>][align]" value="1" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['align']))?'checked="checked"':''); ?> />
                                        </td>
                                        <td class="col_bg">
                                                <input type="hidden" name="text[<?php echo $i; ?>][bg]" value="0" />
                                                <input type="checkbox" name="text[<?php echo $i; ?>][bg]" value="1" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['bg']))?'checked="checked"':''); ?> />
                                        </td>

                                        <td>
                                                <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][alpha]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['alpha'])); ?>" />
                                        </td>                                   
                                        <td>
                                                <input type="text" style="width:100%;" name="text[<?php echo $i; ?>][angle]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['arTexte'][$i]['angle'])); ?>" />
                                        </td>
                                        
                                        <td>                    
                                                <input type="checkbox" value="1" name="text[<?php echo $i; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['arTexte'][$i]['aktiv']))?'checked="checked"':''); ?> />
                                                <a style="float:right; position:relative;" class="glyphicon glyphicon-question-sign" data-wpsg-tip="mod_voucherproduct_fieldconfig" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_voucherproduct_fieldconfig"></a>
                                        </td>
                                </tr>
                                <?php } ?>
                                </tbody>
                        </table>
                        
                        <input type="hidden" name="" id="wpsg-PreviewSubmit" />
                        
                        <br />
                        <input type="submit" name="submit" onclick="wpsg_showPreview(); return false;" class="button" value="<?php echo __('Speichern und Vorschau anzeigen', 'wpsg'); ?>" />
                        <br /><br />
                        
                </div>
        </div>
</div>

<script type="text/javascript">

        function wpsg_showPreview()
        {

                jQuery('form[name="form1"]').attr('target', 'voucherprview');
                jQuery('#wpsg-PreviewSubmit').attr('name', 'submit-preview');
                
                jQuery('input[name="submit"]:last').click();
                
                jQuery('#wpsg-PreviewSubmit').attr('name', '');
                jQuery('form[name="form1"]').attr('target', '');
                
        } // function wpsg_showPreview()

        jQuery(document).ready(function() {

                jQuery('#wpsg_tab').wpsg_tab( { 
                        'cookiename': 'wpsg_pdfdownload_tab',
                        'tab2': function() {
                                jQuery('.tablink').show();
                        }
                } );
                
        } );

</script>