set new product inactive by default

This commit is contained in:
Rimian Perkins 2019-12-05 17:07:26 +11:00
parent e1706ac099
commit 09bfe419d8
3 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@ export default Discourse.Route.extend({
let plans = [];
if (product_id === "new") {
product = AdminProduct.create({ active: true, isNew: true });
product = AdminProduct.create({ active: false, isNew: true });
} else {
product = AdminProduct.find(product_id);
plans = AdminPlan.findAll({ product_id });

View File

@ -26,6 +26,9 @@
<p>
<label for="active">{{i18n 'discourse_subscriptions.admin.products.product.active'}}</label>
{{input type="checkbox" name="active" checked=model.product.active}}
<div class="control-instructions">
{{i18n 'discourse_subscriptions.admin.products.product.active_help'}}
</div>
</p>
</form>

View File

@ -92,10 +92,11 @@ en:
name: Product Name
statement_descriptor: Statement Descriptor
statement_descriptor_help: Extra information about a product which will appear on your customers credit card statement.
plan_help: Create a pricing plan to subscribe customers to this product
plan_help: Create a pricing plan to subscribe customers to this product.
description: Description
description_help: This describes your subscription product.
active: Active
active_help: Toggle this off until your product is ready for consumers.
created_at: Created
updated_at: Updated
product_help: Before cutomers can subscribe to your site, you need to create at least one product and an associated plan.