app/views/projects/_edit_estimation_from_model.html.erb
<%= simple_form_for @new_project, :url => duplicate_path(params[:template_id]) do |f| %>
<%= f.error_notification %>
<%= hidden_field_tag(:organization_id, params[:organization_id]) %>
<%= hidden_field_tag(:project_id, params[:template_id]) %>
<%= f.input :title, :label => "#{I18n.t 'label_project_name'}", :input_html => {:class => 'input-large', :autofocus => (controller.action_name == 'new')} %>
<table>
<tr>
<td>
<%= f.input :product_name, :label => I18n.t(:label_product_name), :input_html => {:class => 'input-large', value: @new_project.root_component.nil? ? '' : @new_project.root_component.name } %>
</td>
<td><%= f.input :version, :input_html => {:class => 'input-large'} %></td>
</tr>
</table>
<%= f.input :description, :label => "#{I18n.t 'description'}", :input_html => {:class => 'from_model_text_area', :rows => 5} %>
<table>
<tr>
<td>
<%= f.input :start_date, :as => :string, label: I18n.t(:start_date), :input_html => { :class => 'date-picker', :value => I18n.l(Time.now.to_date) } %>
</td>
<script>
$(document).ready(function () {
$(".date-picker").datepicker({
language: '<%= set_user_language %>',
autoclose: true,
todayHighlight: true,
todayBtn: true
});
});
</script>
</tr>
</table>
<div class="actions-tabs">
<% if can? :create_project_from_template, Project %>
<%= f.submit I18n.t('save'), action_name: "test", name: "create_project_from_template", :id =>'change_new_estimation_data', :class => 'btn submit_project' %>
<button class="btn" data-dismiss="modal" aria-hidden="true"><%= I18n.t(:cancel) %></button>
<% end %>
</div>
</div>
<% end %>