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

30 lines
982 B
Plaintext

- content_for :javascript do
:javascript
$(function() {
$("#task_user_list").tokenInput("#{users_path(:format => :json)}", {
crossDomain: false,
prePopulate: $("#task_user_list").data("pre"),
hintText: 'Nach Nutzerin suchen',
noResultText: 'Keine Nutzerin gefunden',
searchingText: 'Suche ...',
theme: 'facebook'
});
});
- content_for :sidebar do
= render "shared/workgroup_members"
= simple_form_for @task do |f|
= f.hidden_field :current_user_id
= f.input :name
= f.input :description, as: :text, input_html: {rows: 10}
= 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, as: :date_picker
= f.input :done
.form-actions
= f.submit class: 'btn'
= link_to 'oder abbrechen', :back