[#4420] Added some Javascript to prompt the user if they try to create a Retainer without a date range.
This commit is contained in:
1 parent
918561d667
commit
e5853100d5
3 files changed
+21
-3
No files matched your search
@@ -1,3 +1,6 @@
|
||||
<%= javascript_tag("var i18nStartDateEmpty = '#{l(:text_start_date_empty)}'") %>
|
||||
<%= javascript_tag("var i18nEndDateEmpty = '#{l(:text_end_date_empty)}'") %>
|
||||
|
||||
<div class="box tabular">
|
||||
<% form.inputs :name => l(:text_deliverable_details_legend) do %>
|
||||
<%= form.input :title, :required => true %>
|
||||
@@ -12,8 +15,8 @@
|
||||
<%= form.input :type, :as => :hidden, :class => 'type' %>
|
||||
<% end %>
|
||||
<%= form.input :manager, :required => true, :collection => @project.users.sort %>
|
||||
<%= form.input :start_date, :as => :string, :input_html => {:size => 10}, :hint => calendar_for('deliverable_start_date') %>
|
||||
<%= form.input :end_date, :as => :string, :input_html => {:size => 10}, :hint => calendar_for('deliverable_end_date') %>
|
||||
<%= form.input :start_date, :as => :string, :input_html => {:size => 10, :class => 'start-date'}, :hint => calendar_for('deliverable_start_date') %>
|
||||
<%= form.input :end_date, :as => :string, :input_html => {:size => 10, :class => 'end-date'}, :hint => calendar_for('deliverable_end_date') %>
|
||||
<%= form.input :notes, :input_html => {:class => 'wiki-edit', :rows => '5'} %>
|
||||
|
||||
<% unless resource.new_record? %>
|
||||
@@ -28,7 +31,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if resource.retainer? %>
|
||||
<% if resource.retainer? && resource.respond_to?(:months) %>
|
||||
<% resource.months.each do |month| %>
|
||||
<%= render :partial => 'finance_form', :locals => {:form => form, :labor_budgets => resource.labor_budgets_for_date(month), :overhead_budgets => resource.overhead_budgets_for_date(month), :label => l(:text_deliverable_finances_date, :date => month.strftime("%B, %Y")), :fieldset_class => 'date-' + month.strftime('%Y-%m') } %>
|
||||
<% end %>
|
||||
|
||||
Reference in new issue
Block a user