refactor feature xml access, extend tests
[opensuse:openfate.git] / app / views / feature / _stakeholdereditor.html.erb
1 <h3>Edit Stakeholder data: </h3>
2
3 <% form_remote_tag( :url => url_for(:controller => "feature", :action => :edit_stakeholder, :id => @feature.id), :html => {:name => "edit_stakeholder_form"}, :update => "feature_html", :before => "validate_submit('stakeholder_benefit');", :loading => "tinyMCE.execCommand('mceRemoveControl',false,'stakeholder_benefit');" ) do %>
4 <table>
5
6 <% if !isOpenFate %>
7 <tr><td colspan="2">
8 <b>NDA Date:</b> <%= text_field_tag( "nda_date", @feature.get_field( "nda/expires" ), :size => "15") %> 
9 <b>External ID:</b> <%= text_field_tag( "external_id", @feature.get_field( "externalid" ), :size => "35") %> 
10 <p/>
11 </td></tr>
12 <% end %>
13
14 <tr><td colspan="2">
15 <b>Stakeholder benefit:</b> <p/>
16
17 <% if !@stakeholder_error.nil? %>
18 <table class="notice"><tr>
19 <td rowspan="2">
20 <%= image_tag("warning.png", :alt => "Warning", :title => "Warning") %>
21 </td><td>The richtext you entered did not validate:</td></tr>
22 <tr><td><%= @stakeholder_error %></td></tr></table>
23 <script type="text/javascript">
24   setTimeout("tinyMCE.execCommand('mceAddControl', false, 'stakeholder_benefit')", 100);
25 </script>
26 <% else %>
27 <% @stakeholder_benefit = @feature.get_richtextfield( 'partnerbenefit' ) %>
28 <% end %>
29
30
31 <%= add_richtext_form( 'stakeholder_benefit','stakeholder_benefit', 80, 18, @stakeholder_benefit ) %>
32
33 <%= submit_tag "Change stakeholder data", :id => "save_stakeholder_button" %>
34
35 </td></tr></table>
36
37 <% end %>