1
0

Target form WIP

This commit is contained in:
cryptogopher
2020-07-02 18:59:55 +02:00
parent 0df2c6ec4f
commit 5b83860ed7
6 changed files with 24 additions and 20 deletions

View File

@@ -1,6 +1,4 @@
<div>
<%= fields_for 'target[goal_attributes]', goal do |ff| %>
<p>
<label><%= l(:field_goal) %><span class="required"> *</span></label>
<%= ff.select :id,
options_from_collection_for_select(@project.goals, :id, :name, goal.id),
@@ -11,17 +9,15 @@
dataType: 'script'
});
return false;" %>
<%= link_to l(:button_edit), '#',
<%= 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),
dataType: 'script'
});
return false;",
class: 'icon icon-edit' %>
</p>
class: 'icon icon-add' %>
<% end %>
<% if goal.description? %>
<p style='white-space: pre-wrap;' ><%= goal.description %></p>
<% end %>
</div>