1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

Merge branch 'week' into dev

This commit is contained in:
Sylvain 2017-03-21 15:51:52 +01:00
commit ff8e804750
4 changed files with 4 additions and 1 deletions

View File

@ -49,6 +49,7 @@
ng-model="plan.interval"
ng-disabled="method == 'PATCH'"
required="required">
<option value="week" ng-selected="plan.interval == 'week'" translate>{{ 'plan_form.week' }}</option>
<option value="month" ng-selected="plan.interval == 'month'" translate>{{ 'plan_form.month' }}</option>
<option value="year" ng-selected="plan.interval == 'year'" translate>{{ 'plan_form.year' }}</option>
</select>

View File

@ -27,7 +27,7 @@ class Plan < ActiveRecord::Base
validates :amount, :group, :base_name, presence: true
validates :interval_count, numericality: { only_integer: true, greater_than_or_equal_to: 1 }
validates :interval, inclusion: { in: %w(year month) }
validates :interval, inclusion: { in: %w(year month week) }
validates :base_name, :slug, presence: true
def self.create_for_all_groups(plan_params)

View File

@ -213,6 +213,7 @@ en:
period: "Period"
year: "Year"
month: "Month"
week: "Week"
period_is_required: "Period is required."
subscription_price: "Subscription price"
price_is_required: "Price is required."

View File

@ -213,6 +213,7 @@ fr:
period: "Période"
year: "Année"
month: "Mois"
week: "Semaine"
period_is_required: "La période est requise."
subscription_price: "Coût de l'abonnement"
price_is_required: "Le prix est requis."