diff --git a/app/models/discount-code.js b/app/models/discount-code.js index 2022605ecbe..a9dc786e53d 100644 --- a/app/models/discount-code.js +++ b/app/models/discount-code.js @@ -18,9 +18,9 @@ export default ModelBase.extend({ code : attr('string'), type : attr('string', { defaultValue: 'amount' }), value : attr('number'), - ticketsNumber : attr('number'), // For form (1) this holds the max. times this can be used for events + ticketsNumber : attr('number', { defaultValue: 10 }), // For form (1) this holds the max. times this can be used for events minQuantity : attr('number', { defaultValue: 0 }), // Not of any significance for form (1) - maxQuantity : attr('number'), // For form (1) this holds the number of months this code is valid for events + maxQuantity : attr('number', { defaultValue: 100000 }), validFrom : attr('moment', { defaultValue: () => moment().startOf('day') }), discountUrl : attr('string'), validTill : attr('moment', { defaultValue: () => moment().add(1, 'months').startOf('day') }), diff --git a/app/templates/components/forms/events/view/create-discount-code.hbs b/app/templates/components/forms/events/view/create-discount-code.hbs index 8dafd7b881c..f694c08bfe5 100644 --- a/app/templates/components/forms/events/view/create-discount-code.hbs +++ b/app/templates/components/forms/events/view/create-discount-code.hbs @@ -52,25 +52,6 @@ @value={{this.data.ticketsNumber}} @min="0" /> -
- -
- -
-
- -
-
{{#if this.eventTickets}}
@@ -98,64 +79,44 @@ {{/each}}
-
- -
- {{#if this.showMoreOptions}} -
{{t 'Set the min and max quantity allowed to purchase per order (Optional)'}}
-
-
- - -
-
- - -
-
-
-
- - - - +
+ +
+
+ +
+
+ +
-
- - - - +
+
+ +
+
+ +
+
+ +
-
- {{/if}} +