File tree 2 files changed +12
-1
lines changed
Checkout/view/frontend/templates/cart
SalesRule/view/frontend/web/template/payment
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 24
24
<div class="field">
25
25
<label for="coupon_code" class="label"><span><?= /* @escapeNotVerified */ __ ('Enter discount code ' ) ?> </span></label>
26
26
<div class="control">
27
- <input type="text" class="input-text" id="coupon_code" name="coupon_code" value="<?= $ block ->escapeHtml ($ block ->getCouponCode ()) ?> " placeholder="<?= $ block ->escapeHtml (__ ('Enter discount code ' )) ?> " />
27
+ <input type="text" class="input-text" id="coupon_code" name="coupon_code" value="<?= $ block ->escapeHtml ($ block ->getCouponCode ()) ?> " placeholder="<?= $ block ->escapeHtml (__ ('Enter discount code ' )) ?> " <?php if ( strlen ( $ block -> getCouponCode ())): ?> disabled="disabled" <?php endif ; ?> />
28
28
</div>
29
29
</div>
30
30
<div class="actions-toolbar">
Original file line number Diff line number Diff line change 22
22
< span data-bind ="i18n: 'Enter discount code' "> </ span >
23
23
</ label >
24
24
< div class ="control ">
25
+ <!-- ko ifnot: isApplied() -->
25
26
< input class ="input-text "
26
27
type ="text "
27
28
id ="discount-code "
28
29
name ="discount_code "
29
30
data-validate ="{'required-entry':true} "
30
31
data-bind ="value: couponCode, attr:{placeholder: $t('Enter discount code')} " />
32
+ <!-- /ko -->
33
+ <!-- ko if: isApplied() -->
34
+ < input class ="input-text "
35
+ type ="text "
36
+ id ="discount-code-applied "
37
+ disabled ="disabled "
38
+ name ="discount_code "
39
+ data-validate ="{'required-entry':true} "
40
+ data-bind ="value: couponCode, attr:{placeholder: $t('Enter discount code')} " />
41
+ <!-- /ko -->
31
42
</ div >
32
43
</ div >
33
44
</ div >
You can’t perform that action at this time.
0 commit comments