From 2da4f5f3b9ca4931c2ee65f1c243a306f043f1d5 Mon Sep 17 00:00:00 2001 From: Oluwaseun Olorunsola Date: Tue, 17 Jan 2023 16:34:29 +0100 Subject: [PATCH] Add basic accordion to group coupon data and free shipping field MAILPOET-4762 --- .../js/src/newsletter_editor/blocks/coupon.ts | 4 + .../templates/blocks/coupon/settings.hbs | 80 ++++++++++++++----- 2 files changed, 64 insertions(+), 20 deletions(-) diff --git a/mailpoet/assets/js/src/newsletter_editor/blocks/coupon.ts b/mailpoet/assets/js/src/newsletter_editor/blocks/coupon.ts index dba9527cfd..128bd546d3 100644 --- a/mailpoet/assets/js/src/newsletter_editor/blocks/coupon.ts +++ b/mailpoet/assets/js/src/newsletter_editor/blocks/coupon.ts @@ -66,6 +66,10 @@ Module.CouponBlockSettingsView = base.BlockSettingsView.extend({ this.changeField, 'expiryDay', ), + 'change .mailpoet_field_coupon_free_shipping': _.partial( + this.changeBoolCheckboxField, + 'freeShipping', + ), 'change .mailpoet_field_coupon_alignment': _.partial( this.changeField, 'styles.block.textAlign', diff --git a/mailpoet/views/newsletter/templates/blocks/coupon/settings.hbs b/mailpoet/views/newsletter/templates/blocks/coupon/settings.hbs index 90c671da9a..961cd755cf 100644 --- a/mailpoet/views/newsletter/templates/blocks/coupon/settings.hbs +++ b/mailpoet/views/newsletter/templates/blocks/coupon/settings.hbs @@ -15,36 +15,76 @@
-
-
<%= __('Discount type') %>
-
+
+ + <%= __('General') %> + +
+
+
<%= __('Discount type') %>
+
+
-
-
- +
+ +
+
+ +
+
+
+ + +
+ + <%= __('Usage restriction') %> + +
+ + Content here + +
+
+ +
+ + <%= __('Usage limits') %> + +
+ + Content here + +
+