@@ -77,7 +77,8 @@ protected function _prepareForm()
77
77
'label ' => __ ('Coupon Qty ' ),
78
78
'title ' => __ ('Coupon Qty ' ),
79
79
'required ' => true ,
80
- 'class ' => 'validate-digits validate-greater-than-zero '
80
+ 'class ' => 'validate-digits validate-greater-than-zero ' ,
81
+ 'onchange ' => 'window.validateCouponGenerate(this) '
81
82
]
82
83
);
83
84
@@ -91,7 +92,8 @@ protected function _prepareForm()
91
92
'required ' => true ,
92
93
'note ' => __ ('Excluding prefix, suffix and separators. ' ),
93
94
'value ' => $ couponHelper ->getDefaultLength (),
94
- 'class ' => 'validate-digits validate-greater-than-zero '
95
+ 'class ' => 'validate-digits validate-greater-than-zero ' ,
96
+ 'onchange ' => 'window.validateCouponGenerate(this) '
95
97
]
96
98
);
97
99
@@ -103,7 +105,8 @@ protected function _prepareForm()
103
105
'name ' => 'format ' ,
104
106
'options ' => $ couponHelper ->getFormatsList (),
105
107
'required ' => true ,
106
- 'value ' => $ couponHelper ->getDefaultFormat ()
108
+ 'value ' => $ couponHelper ->getDefaultFormat (),
109
+ 'onchange ' => 'window.validateCouponGenerate(this) '
107
110
]
108
111
);
109
112
@@ -138,7 +141,8 @@ protected function _prepareForm()
138
141
'title ' => __ ('Dash Every X Characters ' ),
139
142
'note ' => __ ('If empty no separation. ' ),
140
143
'value ' => $ couponHelper ->getDefaultDashInterval (),
141
- 'class ' => 'validate-digits '
144
+ 'class ' => 'validate-digits ' ,
145
+ 'onchange ' => 'window.validateCouponGenerate(this) '
142
146
]
143
147
);
144
148
0 commit comments