Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
7258 daniel 1
<?php
2
 
7256 thomas 3
	/**
7258 daniel 4
	 * Template für die Integration des Anschreiben Moduls in die Bestellverwaltung
7256 thomas 5
	 */
6
 
7258 daniel 7
?>
7256 thomas 8
 
9
<?php echo wpsg_drawForm_AdminboxStart(__('Anschreiben', 'wpsg'));?>
10
 
11
	<?php if (sizeof($this->view['mod_anschreiben']['aranschreiben']) == 0 ) { ?>
12
 
13
	   <p><?php echo __('Bisher kein Anschreiben geschrieben.', 'wpsg'); ?></p>
14
 
15
	   <?php } else { ?>
16
	   	<table>
17
	        <?php foreach ($this->view['mod_anschreiben']['aranschreiben_gesamt'] as $a) { ?>
18
	            <tr>
19
	                <td>#<?php echo ($a['anr'] != ''); ?>
20
 
21
						<?php if ($a['anr'] != "") { ?>
22
	                    	<?php echo wpsg_translate(__('Anschreiben gespeichert am #1#', 'wpsg'), date("d.m.Y", $a['ts_datum'])); ?>
23
	                    <?php } ?>
24
 
25
	                </td>
26
	                <td style="text-align:right;">
27
 
28
	                    <?php if ($a['anr'] != "") {
29
 
30
	                    	$rfile = $this->callMod('wpsg_mod_anschreiben', 'getFilePath', array($this->view['data']['id'], true)).'A'.$r['anr'].'.pdf';
31
 
32
	                    } ?>
33
 
34
	            	</td>
35
	        	</tr>
36
	    	<?php } ?>
37
	 	</table>
38
	 <?php } ?>
39
 
40
	<br>
41
 
42
	<div class="wpsg_clear"></div>
43
 
7258 daniel 44
	<hr />
7256 thomas 45
 
46
	<div class="inside">
7258 daniel 47
		<div>
7256 thomas 48
 
7258 daniel 49
			<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">
7256 thomas 50
 
7258 daniel 51
				<?php $arShopLocations = $this->getShopLocations(); ?>
52
				<?php $arShopLocationLabels = []; foreach ($arShopLocations as $l_id => $l) $arShopLocationLabels[$l_id] = $l['label']; ?>
53
 
54
				<?php if (sizeof($arShopLocations) > 1) { ?>
55
 
56
					<?php echo wpsg_drawForm_Select('target', __('Shop Adresse', 'wpsg'), $arShopLocationLabels, '1'); ?>
57
 
58
				<?php } else { ?>
59
 
60
					<input type="hidden" name="target" value="1" />
61
 
62
				<?php } ?>
7256 thomas 63
 
7258 daniel 64
				<?php echo wpsg_drawForm_Textarea('text', __('Text', 'wpsg'),'', ['noLabel' => true, 'fullLabel' => __('Text für das Anschreiben', 'wpsg'), 'style' => 'height:200px']); ?>
65
 
7256 thomas 66
				<br />
67
 
7258 daniel 68
				<input type="submit" name="wpsg_mod_coverletter_write" value="<?php echo __("Speichern & Drucken", "wpsg"); ?>" style="float:left;" class="button button-primary" />
7256 thomas 69
 
70
				<div class="wpsg_clear"></div>
71
 
72
			</form>
73
 
74
		</div>
75
	</div>
76
 
7258 daniel 77
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
78
 
79
<script>
80
 
81
	jQuery('#wpsg_mod_coverletter_form').on('submit', function() {
82
 
83
		setTimeout(function() {
84
 
85
			location.reload();
86
 
87
		}, 1000);
88
 
89
	} );
90
 
91
</script>