WIP: Targets configurable with Quantities
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
<label for="goal_id"><%= l(:field_goal) %><span class="required"> *</span></label>
|
||||
<%= select_tag :goal_id,
|
||||
options_from_collection_for_select(@project.goals, :id, :name, @goal.id),
|
||||
required: true, autocomplete: 'off',
|
||||
onchange: "var goal_id = $('#target_goal_attributes_id').val();
|
||||
$.ajax({
|
||||
url: '#{goal_path(id: :goal_id)}'.replace('goal_id', goal_id),
|
||||
<%= goal_f.collection_select :id, @project.goals, :id, :name,
|
||||
{include_blank: false, required: true, label: :field_goal},
|
||||
autocomplete: 'off',
|
||||
onchange: "$.ajax({
|
||||
url: '#{goal_path(id: :goal_id)}'
|
||||
.replace('goal_id', $('#target_goal_attributes_id').val()),
|
||||
dataType: 'script'
|
||||
});
|
||||
return false;" %>
|
||||
<%= link_to l(:button_add), '#',
|
||||
onclick: "var goal_id = $('#target_goal_attributes_id').val();
|
||||
$.ajax({
|
||||
url: '#{edit_goal_path(id: :goal_id)}'.replace('goal_id', goal_id),
|
||||
onclick: "$.ajax({
|
||||
url: '#{edit_goal_path(id: :goal_id)}'
|
||||
.replace('goal_id', $('#target_goal_attributes_id').val()),
|
||||
dataType: 'script'
|
||||
});
|
||||
return false;",
|
||||
class: 'icon icon-add' %>
|
||||
<% if @goal.description? %>
|
||||
<p style='white-space: pre-wrap;' ><%= @goal.description %></p>
|
||||
<% if goal_f.object.description? %>
|
||||
<p style='white-space: pre-wrap;' ><%= goal_f.object.description %></p>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user