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

32 lines
1.1 KiB
Text
Raw Normal View History

2012-10-08 21:52:03 +02:00
- content_for :javascript do
:javascript
$(function() {
$("#task_user_list").tokenInput("#{users_path(:format => :json)}", {
crossDomain: false,
2012-07-31 18:48:41 +02:00
prePopulate: $("#task_user_list").data("pre"),
2013-04-12 00:00:02 +02:00
hintText: '#{escape_javascript(t('.search.hint'))}',
noResultText: '#{escape_javascript(t('.search.noresult'))}',
searchingText: '#{escape_javascript(t('.search.placeholder'))}',
2012-10-08 21:52:03 +02:00
theme: 'facebook'
});
});
2012-10-08 21:52:03 +02:00
- content_for :sidebar do
= render "shared/workgroup_members"
2011-05-14 19:02:52 +02:00
= simple_form_for @task do |f|
= f.hidden_field :current_user_id
2011-05-14 19:02:52 +02:00
= f.input :name
= f.input :description, as: :text, input_html: {rows: 10}
2011-05-14 19:02:52 +02:00
= 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
2012-10-08 21:52:03 +02:00
= f.input :due_date, as: :date_picker
= f.input :done
.form-actions
2013-06-21 13:48:48 +02:00
= f.submit class: 'btn btn-primary'
- if @task.new_record?
2013-06-24 11:53:52 +02:00
= f.submit t('.submit.periodic'), name: 'periodic', class: 'btn'
2013-04-12 00:00:02 +02:00
= link_to t('ui.or_cancel'), :back