foodsoft/app/views/tasks/_form.html.haml

18 lines
604 B
Text
Raw Normal View History

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