Admin namespace beendet.
This commit is contained in:
parent
6ddef7267a
commit
172db1d37e
23 changed files with 78 additions and 193 deletions
|
|
@ -1,41 +1,6 @@
|
|||
- title "Gruppe bearbeiten"
|
||||
|
||||
= simple_form_for [:foodcoop, @workgroup] do |f|
|
||||
= f.input :name
|
||||
= f.input :description
|
||||
|
||||
= f.input :weekly_task
|
||||
= f.input :weekday, :as => :select, :collection => Workgroup.weekdays, :input_html => {:class => 'weekly_option'}
|
||||
= f.input :task_name, :input_html => {:class => 'weekly_option'}
|
||||
= f.input :task_required_users, :input_html => {:class => 'weekly_option'}
|
||||
= f.input :task_duration, :input_html => {:class => 'weekly_option'}
|
||||
= f.input :task_description, :input_html => {:class => 'weekly_option'}
|
||||
|
||||
= f.input :user_tokens, :as => :string, :input_html => { 'data-pre' => @workgroup.users.map { |u| u.token_attributes }.to_json }
|
||||
|
||||
= render :partial => 'shared/group_form_fields', :locals => {:f => f}
|
||||
= f.submit
|
||||
= link_to "oder abbrechen", foodcoop_workgroups_path
|
||||
|
||||
- content_for :head do
|
||||
:javascript
|
||||
function toggleWeeklyTask() {
|
||||
$('.weekly_option').each(function() {
|
||||
if ($("#workgroup_weekly_task").is(':checked')) {
|
||||
$(this).removeAttr('disabled');
|
||||
} else {
|
||||
$(this).attr('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
toggleWeeklyTask();
|
||||
$('#workgroup_weekly_task').click(function() {
|
||||
toggleWeeklyTask();
|
||||
})
|
||||
|
||||
$("#workgroup_user_tokens").tokenInput("#{users_path(:format => :json)}", {
|
||||
crossDomain: false,
|
||||
prePopulate: $("#workgroup_user_tokens").data("pre")
|
||||
});
|
||||
})
|
||||
= link_to "oder abbrechen", foodcoop_workgroups_path
|
||||
Loading…
Add table
Add a link
Reference in a new issue