Replaced #current_goal with @goal
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
<div class="box">
|
||||
<div id='goal-form' class="tabular">
|
||||
<% if current_goal.persisted? %>
|
||||
<p><%= render partial: 'goals/show_form', locals: {goal: current_goal} %></p>
|
||||
<p><%= f.date_field :effective_from, disabled: !current_goal.is_binding? %></p>
|
||||
<% if @goal.persisted? %>
|
||||
<p><%= render partial: 'goals/show_form' %></p>
|
||||
<p><%= f.date_field :effective_from, disabled: !@goal.is_binding? %></p>
|
||||
<% else %>
|
||||
<%= render partial: 'goals/form', locals: {goal: current_goal} %>
|
||||
<%= render partial: 'goals/form' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<fieldset id="options" class="collapsible">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
|
||||
<div>
|
||||
<%= form_tag toggle_exposure_goal_path(current_goal, @view_params),
|
||||
<%= form_tag toggle_exposure_goal_path(@goal, @view_params),
|
||||
id: 'toggle-exposure-form', name: 'toggle-exposure-form',
|
||||
method: :post, remote: true do %>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<tr>
|
||||
<td style="width:100%"></td>
|
||||
<td><%= select_tag 'quantity_id',
|
||||
toggle_exposure_options(current_goal.quantities) %></td>
|
||||
toggle_exposure_options(@goal.quantities) %></td>
|
||||
<td><%= submit_tag l(:button_add) %></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
$('#new-target').empty();
|
||||
<% case @view_params[:view] %>
|
||||
<% when :by_date %>
|
||||
$('#targets').html('<%= j render partial: 'targets/by_effective_date' %>');
|
||||
<% else %>
|
||||
<%# case @view_params[:view] %>
|
||||
<%# when :by_date %>
|
||||
// $('#targets').html('<%#= j render partial: 'targets/by_effective_date' %>');
|
||||
<%# else %>
|
||||
$('#targets').html('<%= j render partial: 'targets/index' %>');
|
||||
<% end %>
|
||||
<%# end %>
|
||||
|
||||
Reference in New Issue
Block a user