Added i18n strings.
This commit is contained in:
parent
abe7c7181d
commit
c27127c745
6 changed files with 24 additions and 17 deletions
|
|
@ -18,7 +18,7 @@ class Task < ActiveRecord::Base
|
|||
validates :required_users, :presence => true
|
||||
validates_numericality_of :duration, :required_users, :only_integer => true, :greater_than => 0
|
||||
validates_length_of :description, maximum: 250
|
||||
validates :done, exclusion: { in: [true], message: 'erledigte Aufgaben können nicht wöchentlich wiederholt werden' }, if: :periodic?, on: :create
|
||||
validates :done, exclusion: { in: [true] }, if: :periodic?, on: :create
|
||||
|
||||
before_save :exclude_from_periodic_task_group, if: :changed?, unless: :new_record?
|
||||
after_save :update_ordergroup_stats
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@
|
|||
.form-actions
|
||||
= f.submit class: 'btn btn-primary'
|
||||
- if @task.new_record?
|
||||
= f.submit 'Wöchentliche Aufgabe erstellen', name: 'periodic', class: 'btn'
|
||||
= f.submit t('.submit.periodic'), name: 'periodic', class: 'btn'
|
||||
= link_to t('ui.or_cancel'), :back
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@
|
|||
= link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
|
||||
class: 'btn btn-danger'
|
||||
- if @task.periodic?
|
||||
= link_to 'Aufgabe und folgende löschen', task_path(@task, periodic: true), method: :delete,
|
||||
confirm: "Diese und alle folgenden wöchentlichen Aufgaben wirklich löschen?", class: 'btn btn-danger'
|
||||
= link_to t('.delete_group'), task_path(@task, periodic: true), method: :delete,
|
||||
confirm: t('.confirm_delete_group'), class: 'btn btn-danger'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue