From 9dc851820254e4d6b8541474307300e4498b4ec8 Mon Sep 17 00:00:00 2001 From: mespeche Date: Tue, 3 Sep 2013 11:04:55 +0200 Subject: [PATCH] Working Update of edit view - Add Is unlimited field --- templates/admin/default/assets/js/main.js | 18 ++++++ templates/admin/default/coupon/edit.html | 68 ++++++++++++----------- 2 files changed, 55 insertions(+), 31 deletions(-) diff --git a/templates/admin/default/assets/js/main.js b/templates/admin/default/assets/js/main.js index 1649449d8..f7ca302ea 100644 --- a/templates/admin/default/assets/js/main.js +++ b/templates/admin/default/assets/js/main.js @@ -51,6 +51,24 @@ }); } + // -- Max usage -- + if($('#is-unlimited').length){ + + if($('#is-unlimited').is(':checked')){ + $('#max-usage').hide().val(''); + } + + $('#is-unlimited').change(function(){ + if($('#is-unlimited').is(':checked')){ + $('#max-usage').hide().val(''); + } + else{ + $('#max-usage').show(); + } + }); + + } + // -- Confirm Box -- if($('[data-toggle="confirm"]').length){ $('[data-toggle="confirm"]').click(function(e){ diff --git a/templates/admin/default/coupon/edit.html b/templates/admin/default/coupon/edit.html index e7c23df73..f52bd88ea 100755 --- a/templates/admin/default/coupon/edit.html +++ b/templates/admin/default/coupon/edit.html @@ -65,45 +65,51 @@
+
-
-
-
- - - More description n°1 about item -
+
+
+
+
+ + + More description n°1 about item +
+
+ +
+
+ + +
+
+ + +
+
-
-
- - -
-
- - -
-
+
+ + +
-
- -
- - -
+