% content_for :head do %> <%= javascript_include_tag 'jquery.validate', 'messages_ru' %> <%= javascript_include_tag "jscal2"%> <%= javascript_include_tag "private"%> <%= javascript_include_tag "calendar2/js/lang/ru"%> <%= stylesheet_link_tag "index" , :media => "all"%> <%= stylesheet_link_tag "formtastic" , :media => "all"%> <%= stylesheet_link_tag "jscal2" , :media => "all"%> <%= stylesheet_link_tag "messages" , :media => "all"%> <%= stylesheet_link_tag "materialsTable" , :media => "all"%> <% end -%> <% form_for @report, :url => {:action => 'create'}, :html => {:class => "formtastic", :autocomplete => "off"} do |f| -%> <%= f.hidden_field :id %> <%= f.hidden_field :request_id %> <%= f.hidden_field :style %> <%= f.hidden_field :status %> <%= f.hidden_field :request_acc_sum %> <%= f.hidden_field :com_other_materials %>
| Логин: | <%= f.text_field :name, :id => "report_name", :size => 20, :class => "required" %> <%= hidden_field_tag 'report_login_id', '', :class => "required" %> | |
| Данные о клиенте: | ||
| Дата работ: | <% if @boss %><%= calendar_field_tag "date", @report.date, {:size=>9, :name => 'report[date]', :class =>"dateRUS required", :readonly => true, :change_materials => true} %> | <% else %><%= f.text_field :date, :value => Russian::strftime(f.object.date.to_date), :readonly => true, :class => "date_s" %> | <% end %>
| Категория: | <%= f.select(:category, Category.private.collect{ |c| [c.name, c.id]}, {}, :onchange => remote_function(:url => {:controller => 'private', :action => 'change_price'}, :with => "'type=' + $(this).val() + '&id='+#{@report.id}") ) %> | |
| Наличие денег: | <%= f.radio_button :money_type, 0, :class => 'money' %> Без денег за работы и материалы <%= f.radio_button :money_type, 3, :class => 'money' %> Наличный расчет |
|
| Номер чека: | <%= f.text_field "pay_doc_number", :id => "doc_number" %> | |
| Обоснование невзятия денег: | <%= select_tag "total_sum_comment_example", options_for_select(total_sum_comment), :onchange => "if(this.value!='-Примеры-'){$('#report_total_sum_comment').val(this.value) } else{$('#report_total_sum_comment').val('') }" %> <%= f.text_field :total_sum_comment %> | |
| Приставка: | <%= @report.com_other_materials %> |
| <%= link_to_add_fields_pr "Добавить сотрудника", f, :done_employees %> |
| Общий комментарий <%= f.text_area :com_stay_work, :rows => 8, :style=> 'width: 500px;' %> |
<%= render :partial =>"/problems/problem.html.erb", :locals =>{:f => f} %>