summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/css/admin.css5
-rw-r--r--views/mods/mod_anschreiben/anschreiben_pdf.phtml199
-rw-r--r--views/mods/mod_anschreiben/order_view.phtml113
-rw-r--r--views/mods/mod_anschreiben/settings_edit.phtml212
4 files changed, 529 insertions, 0 deletions
diff --git a/views/css/admin.css b/views/css/admin.css
index 9ffc90d..53c536e 100644
--- a/views/css/admin.css
+++ b/views/css/admin.css
@@ -116,6 +116,11 @@ table.wpsgitrecht_table { width:100%; }
.wpsg_kundenkontakt_betreff { width:80%; float:right; margin-bottom:20px; }
.wpsg_kundenkontakt_textarea { width:100%; float:right; height:150px; }
+/* SMS-Versand */
+.wpsg_sms_template,
+.wpsg_sms_newnumber { width:70%; float:right; margin-bottom:20px; }
+.wpsg_sms_textarea { width:100%; float:right; height:150px; }
+
/* Länderverwaltung */
.wpsg_table_country { margin-bottom:0px; }
.wpsg_table_country .col_mwst { width:25px; }
diff --git a/views/mods/mod_anschreiben/anschreiben_pdf.phtml b/views/mods/mod_anschreiben/anschreiben_pdf.phtml
new file mode 100644
index 0000000..714b53c
--- /dev/null
+++ b/views/mods/mod_anschreiben/anschreiben_pdf.phtml
@@ -0,0 +1,199 @@
+<?php
+
+ /**
+ * FPDF Template für die Generierung des Lieferscheins
+ */
+
+ require_once WPSG_PATH_LIB.'fpdf/fpdf.php';
+ require_once WPSG_PATH_LIB.'fpdf/fpdi.php';
+ require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
+
+ global $absender_left, $absender_top, $adress_left, $adress_top, $dndata_left, $dndata_top;
+
+ if (!function_exists('AddanschreibenPage'))
+ {
+
+ function AddanschreibenPage($shop, $pdf)
+ {
+
+ global $absender_left, $absender_top, $adress_left, $adress_top, $dndata_left, $dndata_top;
+
+ $rdata_left = 0;
+ $pdf->AddPage();
+
+ if (file_exists($shop->callMod('wpsg_mod_anschreiben', 'getFilePath', array(''))."wpsg_anschreiben_bp.pdf"))
+ {
+
+ $pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_anschreiben', 'getFilePath', array(''))."wpsg_anschreiben_bp.pdf");
+ $tplidx = $pdf->importPage(1, '/MediaBox');
+ $pdf->useTemplate($tplidx, 0, 0, 210);
+
+ }
+ else if (file_exists($shop->callMod('wpsg_mod_anschreiben', 'getFilePath', array(''))."wpsg_anschreiben_bp.jpg"))
+ {
+
+ $pdf->image($shop->callMod('wpsg_mod_anschreiben', 'getFilePath', array(''))."wpsg_anschreiben_bp.jpg", 0, 0, 210, 297, 'jpg');
+
+ }
+
+
+ if (file_exists($shop->callMod('wpsg_mod_anschreiben', 'getFilePath', array(''))."wpsg_anschreiben_logo.jpg"))
+ {
+
+ list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_anschreiben', 'getFilePath', array(''))."wpsg_anschreiben_logo.jpg");
+
+ // Umrechnung von Inch zu Pixel
+ $wPix = (25.4 * $width) / 96;
+ $hPix = (25.4 * $height) / 96;
+
+ $leftPos = 110 - $wPix;
+ $midPos = $wPix * 2.6 - $width / 2;
+ $rightPos = 210 - $wPix;
+
+ $abscissa = $rightPos;
+ $ordinate = 0;
+
+ $transparency = str_replace("%", "", $shop->get_option('wpsg_mod_anschreiben_logo_transparency'));
+ if($transparency !== "100") $transparency = str_replace(array("0", "00"), "", $transparency);
+
+ $alpha = 1;
+ if(!is_null($transparency) && $transparency !== "100") $alpha = "0.$transparency";
+ if(!is_null($transparency) && $transparency === "100") $alpha = $transparency;
+
+ $logo_pos = $shop->get_option('wpsg_mod_anschreiben_logo_position');
+
+ if(isset($logo_pos) && $logo_pos === "left") { $abscissa = $leftPos; $ordinate = 20; }
+ if(isset($logo_pos) && $logo_pos === "center") { $abscissa = $midPos; $ordinate = 20; }
+ if(isset($logo_pos) && $logo_pos === "right") { $abscissa = $rightPos; }
+
+ $pdf->SetAlpha($alpha);
+ $pdf->image($shop->callMod('wpsg_mod_anschreiben', 'getFilePath', array(''))."wpsg_anschreiben_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
+ $pdf->SetAlpha(1);
+
+ }
+
+ // Absenderadresszeile (Wird in der Konfiguration hinterlegt)
+ $pdf->SetFont('Arial', '', 6);
+ $pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter($shop->get_option("wpsg_mod_anschreiben_adressrow"), $shop->view['order']['id']));
+
+ if (wpsg_getStr($shop->view['kunde']['kuerzel']) != "") $shop->view['kunde']['kuerzel'] = $shop->view['kunde']['kuerzel'].'-';
+
+ // Adresse des Kunden
+ $pdf->SetFont('Arial', '', 12);
+ $pdf->Text($adress_left, $adress_top, $shop->view['data']['firma']);
+ $pdf->Text($adress_left, $adress_top + 5, $shop->view['data']['vname'].' '.$shop->view['data']['name']);
+ $pdf->Text($adress_left, $adress_top + 10, $shop->view['data']['strasse'].' '.$shop->view['data']['hausnr']);
+ $pdf->Text($adress_left, $adress_top + 15, $shop->view['data']['plz'].' '.$shop->view['data']['ort']);
+ //if ($shop->get_option('wpsg_mod_anschreiben_hideCountry') != '1') $pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getShippingCountryName()));
+ if ($shop->get_option('wpsg_mod_anschreiben_hideCountry') != '1') $pdf->Text($adress_left, $adress_top + 20, $shop->view['data']['land']);
+
+ // Daten
+ $pdf->SetFont('Arial', 'B', 16);
+ $pdf->Text($dndata_left, $dndata_top, $shop->view['title']);
+ $pdf->SetFont('Arial', 'B', 9);
+ $pdf->Text($dndata_left, $dndata_top + 6, $shop->view['lnr']);
+ $pdf->SetFont('Arial', '', 9);
+
+ $pdf->Text($rdata_left + 100, $dndata_top, __("Kunden-Nr", "wpsg"));
+ $pdf->Text($rdata_left + 100, $dndata_top + 6, (($shop->view['customer']['knr'] != '')?$shop->view['customer']['knr']:$shop->view['customer']['id']));
+
+ $pdf->Text($rdata_left + 125, $dndata_top, __("Best. Nr.", "wpsg"));
+ $pdf->Text($rdata_left + 125, $dndata_top + 6, ((trim($shop->view['order']['onr']) != '')?$shop->view['order']['onr']:$shop->view['order']['id']));
+
+ $pdf->Text($rdata_left + 145, $dndata_top, __("Bestelldatum", "wpsg"));
+ $pdf->Text($rdata_left + 145, $dndata_top + 6, wpsg_formatTimestamp(strtotime($shop->view['order']['cdate']), true));
+
+ $pdf->Text($rdata_left + 170, $dndata_top, __("Lieferdatum", "wpsg"));
+ $pdf->Text($rdata_left + 170, $dndata_top + 6, wpsg_formatTimestamp($shop->view['lDatum'], true));
+
+ if ($shop->view['oOrder']->isInnerEu())
+ {
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->Text($adress_left, $rdata_top + 11.5, __("Innergemeinschaftliche Lieferung.", "wpsg"));
+
+ } else if (!$shop->view['oOrder']->isInnerEu() && $shop->view['oOrder']->getShippingCountryID() != $shop->getDefaultCountry(true)) {
+
+ // Nicht InnerEU und Nicht Inland
+
+ $pdf->SetFont('Arial', '', 9);
+ $pdf->Text($adress_left, $rdata_top + 11.5, __("Steuerfreie Ausfuhrlieferung.", "wpsg"));
+
+ }
+
+
+ // Benutzerdefinierte Felder
+ $arTexte = $shop->callMod('wpsg_mod_anschreiben', 'getTexte', array($shop->view['data']['id']));
+
+ foreach ((array)$arTexte as $text)
+ {
+
+ if (isset($text['aktiv']) && $text['aktiv'] == 1)
+ {
+
+ $pdf->SetFont('Arial', 'B', ((intval($text['fontsize']) > 0)?intval($text['fontsize']):10));
+ $pdf->wpsg_SetTextColor($text['color']);
+ $pdf->wpsg_MultiCell($text['x'], $text['y'], 5, $text['text']);
+ $pdf->wpsg_SetTextColor("#000000");
+
+ }
+
+ }
+
+ }
+
+ }
+
+ // Positionierung der Absenderadresszeile
+ $absender_left = 25;
+ $absender_top = 50;
+
+ // Positionierung der Zieladress
+ $adress_left = 25;
+ $adress_top = 55;
+
+ // Positionierund des Lieferscheinkopfes
+ $dndata_left = 25;
+ $dndata_top = 90;
+
+ // Positionierung der Produktdaten
+ $prod_left = 25;
+ $prod_top = 105;
+
+ // Anzahl an Produkten pro Seite
+ $prod_break = 10;
+
+ $pdf = new wpsg_fpdf();
+ $pdf->SetAutoPageBreak(true, 5);
+ AddanschreibenPage($this, $pdf);
+
+ $filename = $this->view['filename'].".pdf";
+
+
+ $offset += 5;
+
+ if ($this->view['fussText'] != "")
+ {
+
+ $pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $this->view['fussText']);
+ $pdf->SetFont('Arial', 'B', 9);
+ $offset += 10;
+
+ }
+
+ ob_end_clean();
+
+ if ($this->view['preview'])
+ {
+ $pdf->Output($this->view['filename'], 'I');
+ }
+ else
+ {
+
+ $pdf->Output($this->callMod('wpsg_mod_anschreiben', 'getFilePath', array($this->view['order']['id'])).$this->view['filename'], 'F');
+
+ if ($this->view['output'] === true) $pdf->Output($filename, 'I');
+
+ }
+
+?> \ No newline at end of file
diff --git a/views/mods/mod_anschreiben/order_view.phtml b/views/mods/mod_anschreiben/order_view.phtml
new file mode 100644
index 0000000..ddf4afc
--- /dev/null
+++ b/views/mods/mod_anschreiben/order_view.phtml
@@ -0,0 +1,113 @@
+<script type="text/javascript">
+
+ /**
+ *
+ */
+ function anschreiben_sendMail()
+ {
+
+ if (jQuery('#anschreiben_text').val() == '')
+ {
+
+ alert("<?php echo __('Bitte einen Text angeben!', 'wpsg'); ?>");
+ return;
+
+ }
+
+ var text = "";
+
+ text = tinyMCE.get('anschreiben_html').getContent();
+
+ jQuery.ajax( {
+ url: "<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_anschreiben&edit_id='.$this->view['data']['id'].'&noheader=1&do=anschreiben_sendMail' ?>",
+ method: 'post',
+ success: function(data) {
+
+ if (data != '1')
+ {
+
+ alert("<?php echo __("Anschreiben konnte nicht gespeichert/gedruckt werden es, weil ein Fehler aufgetreten ist!", "wpsg"); ?>");
+
+ }
+ else
+ {
+
+ tinyMCE.get('_html').setContent('');
+ alert("<?php echo __('Mail wurde erfolgreich an den Kunden gesendet.', 'wpsg'); ?>");
+
+ location.reload();
+
+ }
+
+ }
+
+ } );
+
+ }
+
+
+</script>
+<?php //wpsg_debug($this->view) ?>
+<?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 style="padding:5px;">
+
+ <form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_anschreiben&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1">
+
+ <?php /* Auswahl Adresse (Zweitstelle/Hauptstelle */ ?>
+
+ <?php /* Anredeauswahl */ ?>
+
+ <?php echo __('Text für das Anschreiben', 'wpsg'); ?>:<br /><br />
+ <?php wp_editor('', 'anschreiben_html'); ?>
+
+ <div class="wpsg_clear"></div>
+
+ <br />
+
+ <input type="button" class="button" onclick="anschreiben_sendMail(); return false;" value="<?php echo __("Speichern & Drucken", "wpsg"); ?>" style="float:right;" />
+
+ <div class="wpsg_clear"></div>
+
+ </form>
+
+ </div>
+ </div>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?> \ No newline at end of file
diff --git a/views/mods/mod_anschreiben/settings_edit.phtml b/views/mods/mod_anschreiben/settings_edit.phtml
new file mode 100644
index 0000000..b87e52e
--- /dev/null
+++ b/views/mods/mod_anschreiben/settings_edit.phtml
@@ -0,0 +1,212 @@
+<?php
+
+/**
+ * Template für die Einstellungen des "Anschreiben" Moduls
+ */
+
+?>
+
+<div>
+ <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 __('Vordefinierte 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['wpsg_mod_anschreiben']['bp'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo $this->view['wpsg_mod_anschreiben']['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
+ <?php } ?>
+ <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_anschreiben_bp" data-wpsg-tip="mod_anschreiben_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_anschreiben_bp"></a>
+ <input type="file" name="wpsg_mod_anschreiben_bp">
+ <?php $strSuffix = ''; if ($this->view['wpsg_mod_anschreiben']['bp'] !== false) { $strSuffix = '
+ <label>
+ <input type="checkbox" name="wpsg_mod_anschreiben_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_anschreiben_bp')); ?>
+
+ <hr>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <div style="position:relative;">
+ <?php if ($this->view['wpsg_mod_anschreiben']['logo'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a href="<?php echo stripslashes($this->view['wpsg_mod_anschreiben']['logo']); ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
+ <?php } ?>
+ <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_anschreiben_logo" data-wpsg-tip="mod_anschreiben_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_anschreiben_logo"></a>
+ <input type="file" name="wpsg_mod_anschreiben_logo">
+ <?php $logo_pos = $this->get_option("wpsg_mod_anschreiben_logo_position"); ?>
+ <?php $defaultAlign = !isset($logo_pos) || empty($logo_pos) ? "align-buttons-active" : ""; ?>
+
+ <?php $alignLeft = $logo_pos === 'left' ? "align-buttons-active" : ""; ?>
+ <?php $alignCenter = $logo_pos === 'center' ? "align-buttons-active" : ""; ?>
+ <?php $alignRight = $logo_pos === 'right' ? "align-buttons-active" : ""; ?>
+
+ <?php $logo_transparency = $this->get_option("wpsg_mod_anschreiben_logo_transparency") ?: "0%"; ?>
+
+ <?php $strSuffix = ''; if ($this->view['logo'] !== false) { $strSuffix = '
+ <div class="row">
+ <div class="col-md-4">
+ <div class="align-buttons">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-left '.$alignLeft.'" name="wpsg_mod_anschreiben_logo_position_left" value="&#xf036" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo linksbündig ausrichten").'">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-center '.$alignCenter.'" name="wpsg_mod_anschreiben_logo_position_center" value="&#xf037" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo zentrieren").'">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-right '.$alignRight.' '.$defaultAlign.'" name="wpsg_mod_anschreiben_logo_position_right" value="&#xf038" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo rechtsbündig ausrichten").'">
+ </div>
+ </div>
+ <div class="col-md-8 logo-transparency">
+ <label>
+ <input type="text" name="wpsg_mod_anschreiben_logo_transparency" value="'.$logo_transparency.'" />&nbsp;'.__('Logodeckkraft', 'wpsg').'
+ </label>
+ </div>
+ <div class="col-md-12">
+ <label>
+ <input type="checkbox" name="wpsg_mod_anschreiben_logo_del" value="1" />&nbsp;'.__('Löschen', 'wpsg').'
+ </label>
+ </div>
+ </div>';
+ echo __($strSuffix);
+ } ?>
+
+
+ <button class="button wpsg_anschreiben_preview" style="float:right; margin-right:10px;" name="wpsg_anschreiben_preview" type="button">
+ <?php echo __("Vorschau", "wpsg"); ?>
+ </button>
+
+ </div>
+ <?php echo wpsg_drawForm_TextEnd(__('Logo (JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_anschreiben_logo')); ?>
+
+ <hr> <br />
+
+ <table class="table table-body-striped wpsg_mod_anschreiben_fieldtable">
+ <thead>
+ <tr>
+ <th class="col_bezeichnung"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
+ <th class="col_freitext"><?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_action"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['wpsg_mod_anschreiben']['fields'] as $f => $field_name) { ?>
+ <tr>
+ <td><?php echo wpsg_hspc($field_name); ?></td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['text']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['x']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['y']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['color']); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['fontsize']) == "8")?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['fontsize']) == "9")?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['fontsize']) == "10")?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['fontsize']) == "11")?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['fontsize']) == "12")?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['fontsize']) == "13")?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['fontsize']) == "14")?'selected="selected"':''); ?> value="14">14</option>
+ </select>
+ </td>
+ <td>
+ <input type="checkbox" title="<?php echo __('Diese Checkbox aktivieren, damit die Textzeile verwendet wird.', 'wpsg'); ?>" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['wpsg_mod_anschreiben']['arTexte'][$f]['aktiv']))?'checked="checked"':''); ?> />
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+
+ <input class="button" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher? Ihre bisherigen Einstellungen gehen verloren!', 'wpsg'); ?>')) return false; else location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;do=reset&amp;noheader=1';" type="button" value="<?php echo __('Standardeinstellungen laden', 'wpsg'); ?>" />
+
+ <br /><br />
+
+ <div class="info">
+ <p>
+ <?php echo __('Die Angaben für X (Abstand von Links) und Y (Abstand von Oben) werden in mm eingetragen.', 'wpsg'); ?><br />
+ <?php echo __('Die Farbe wird im Hexadezimalformat angegeben (#FFFFFF für weiß, #000000 für schwarz).', 'wpsg'); ?>
+ </p>
+ </div>
+
+ <br />
+
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Stellt sicher, dass immer nur ein Button der align-buttons die highlight Klasse hat
+ */
+ function handleLogoAlignClick(pressedEl)
+ {
+
+ if(pressedEl.hasClass("align-buttons-active")) return;
+ else
+ {
+
+ pressedEl.addClass("align-buttons-active");
+ pressedEl[0].value = pressedEl[0].value + " selected";
+
+ jQuery.each($(".logo-align-button"), function(index, element) {
+ if(element.classList.contains("align-buttons-active") && element !== pressedEl[0]){
+
+ var values = element.value.split(" ");
+ element.value = values[0];
+
+ element.classList.remove("align-buttons-active");
+
+ return false;
+
+ }
+ });
+
+ }
+
+ } // function handleLogoAlignClick()
+
+ /**
+ * Wird beim Klicken auf den Vorschau Button ausgelöst
+ */
+ function wpsg_anschreiben_preview()
+ {
+
+ var url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_anschreiben&do=orderAjax&noheader=1&wpsg_anschreiben_preview=1";
+
+ window.open(url, '_blank');
+
+ return false;
+
+ } // function wpsg_anschreiben_preview()
+
+
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_mod_anschreiben_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+
+ jQuery(".wpsg_anschreiben_preview").click(function(){ wpsg_anschreiben_preview(); });
+
+ } );
+
+ /* ]]> */</script> \ No newline at end of file