foodsoft/app/views/tasks/_form.html.haml
2011-05-15 22:06:54 +02:00

18 lines
No EOL
604 B
Text

- content_for :head do
:javascript
$(function() {
$("#task_user_list").tokenInput("#{users_path(:format => :json)}", {
crossDomain: false,
prePopulate: $("#task_user_list").data("pre")
});
});
= simple_form_for @task do |f|
= f.input :name
= f.input :description
= f.input :duration, :as => :select, :collection => 1..3
= f.input :user_list, :as => :string, :input_html => { 'data-pre' => @task.users.map { |u| u.token_attributes }.to_json }
= f.input :required_users
= f.association :workgroup
= f.input :due_date, :include_blank => true
= f.submit