Browse code

Initial commit

Benjamin Roth authored on07/09/2015 15:02:25
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,78 @@
1
+<?php $this->extend('block_searchable'); ?>
2
+
3
+<?php $this->block('content'); ?>
4
+
5
+<?php if ($this->noVoucher): ?>
6
+<div class="box icon_left">
7
+	{{icon::fe:error:circle left error}}
8
+	<div>
9
+		<?= $this->noVoucher ?>
10
+	</div>
11
+</div>
12
+<?php else: ?>
13
+<?php if ($this->messages): ?>
14
+<div class="box messages">
15
+	<?= $this->messages ?>
16
+</div>
17
+<?php endif; ?>
18
+<div class="eq cf">
19
+	<div class="details">
20
+		<div class="box">
21
+			<h2><?= $this->titleDetails ?></h2>
22
+			<ul>
23
+				<li><span class="label"><?= $this->lblVoucherNo ?>:</span><?= $this->voucherNo ?></li>
24
+				<li><span class="label"><?= $this->lblRemainingVal ?>:</span><span class="highlight<?php if (!$this->isValid): ?> invalid<?php endif; ?>"><?= $this->fRemainingVal ?> &euro;</span></li>
25
+				<li><span class="label"><?= $this->lblSerieNo ?>:</span><?= $this->serieNo ?></li>
26
+				<li><span class="label"><?= $this->lblSerieDiscount ?>:</span><?= $this->serieDiscount ?> &euro;</li>
27
+				<li><span class="label"><?= $this->lblValidFrom ?>:</span><?= $this->validFrom ?></li>
28
+				<li><span class="label"><?= $this->lblValidTil ?>:</span><?= $this->validTil ?></li>
29
+			</ul>
30
+		</div>
31
+	</div>
32
+
33
+	<div class="deduct">
34
+		<div class="box">
35
+			<h2><?= $this->titleDeduct ?></h2>
36
+			<?php if (!$this->isValid): ?>
37
+				<?= $this->invalid ?>
38
+			<?php else: ?>
39
+			<form id="form_oxVoucherDetails_<?= $this->id ?>"<?php if ($this->action): ?> action="<?= $this->action ?>"<?php endif; ?> method="post">
40
+				<div class="formbody">
41
+					<input type="hidden" name="FORM_SUBMIT" value="eSM_oxVoucher_details">
42
+					<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
43
+					<input type="hidden" name="OXID" value="<?= $this->voucherOxid ?>">
44
+
45
+					<div class="widget widget-text w20">
46
+						<label for="voucher_deductValue_<?= $this->id ?>"><?= $this->valueLabel ?></label>
47
+						<input type="number" name="voucher_deductValue" id="voucher_deductValue_<?= $this->id ?>" min="0.00" step="0.01" max="<?= $this->remainingVal ?>" value="0"/>
48
+					</div>
49
+
50
+					<div class="widget widget-checkbox w100 clr">
51
+						<input type="checkbox" name="voucher_deductAll" id="voucher_deductAll_<?= $this->id ?>" value="1"/>
52
+						<label for="voucher_deductAll_<?= $this->id ?>"><?= $this->maxValueLabel ?></label>
53
+					</div>
54
+
55
+					<div class="submit_container widget lblp button_block">
56
+						<button type="submit" class="submit"><?= $this->submitLabel ?></button>
57
+					</div>
58
+				</div>
59
+			</form>
60
+			<?php endif; ?>
61
+		</div>
62
+	</div>
63
+</div>
64
+<script>
65
+	$(document).ready(function(){
66
+		$('#voucher_deductAll_<?= $this->id ?>').click(function(e) {
67
+			if ($(this).is(':checked'))
68
+			{
69
+				$('#voucher_deductValue_<?= $this->id ?>').val('<?= $this->remainingVal ?>').attr('disabled',true);
70
+			} else {
71
+				$('#voucher_deductValue_<?= $this->id ?>').attr('disabled',false);
72
+			}
73
+		});
74
+	});
75
+</script>
76
+<?php endif; ?>
77
+
78
+<?php $this->endblock(); ?>