##// END OF EJS Templates
Merge issue and time entry validation error messages....
Jean-Philippe Lang -
r3551:f77e5d093a0f
parent child
Show More
@@ -1,56 +1,55
1 <% labelled_tabular_form_for :issue, @issue,
1 <% labelled_tabular_form_for :issue, @issue,
2 :url => {:action => 'update', :id => @issue},
2 :url => {:action => 'update', :id => @issue},
3 :html => {:id => 'issue-form',
3 :html => {:id => 'issue-form',
4 :class => nil,
4 :class => nil,
5 :method => :put,
5 :method => :put,
6 :multipart => true} do |f| %>
6 :multipart => true} do |f| %>
7 <%= error_messages_for 'issue' %>
7 <%= error_messages_for 'issue', 'time_entry' %>
8 <%= error_messages_for 'time_entry' %>
9 <div class="box">
8 <div class="box">
10 <% if @edit_allowed || !@allowed_statuses.empty? %>
9 <% if @edit_allowed || !@allowed_statuses.empty? %>
11 <fieldset class="tabular"><legend><%= l(:label_change_properties) %>
10 <fieldset class="tabular"><legend><%= l(:label_change_properties) %>
12 <% if !@issue.new_record? && !@issue.errors.any? && @edit_allowed %>
11 <% if !@issue.new_record? && !@issue.errors.any? && @edit_allowed %>
13 <small>(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("issue_descr_fields", "appear", {duration:0.3}); return false;' %>)</small>
12 <small>(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("issue_descr_fields", "appear", {duration:0.3}); return false;' %>)</small>
14 <% end %>
13 <% end %>
15 </legend>
14 </legend>
16 <%= render :partial => (@edit_allowed ? 'form' : 'form_update'), :locals => {:f => f} %>
15 <%= render :partial => (@edit_allowed ? 'form' : 'form_update'), :locals => {:f => f} %>
17 </fieldset>
16 </fieldset>
18 <% end %>
17 <% end %>
19 <% if authorize_for('timelog', 'edit') %>
18 <% if authorize_for('timelog', 'edit') %>
20 <fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
19 <fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
21 <% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
20 <% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
22 <div class="splitcontentleft">
21 <div class="splitcontentleft">
23 <p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
22 <p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
24 </div>
23 </div>
25 <div class="splitcontentright">
24 <div class="splitcontentright">
26 <p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
25 <p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
27 </div>
26 </div>
28 <p><%= time_entry.text_field :comments, :size => 60 %></p>
27 <p><%= time_entry.text_field :comments, :size => 60 %></p>
29 <% @time_entry.custom_field_values.each do |value| %>
28 <% @time_entry.custom_field_values.each do |value| %>
30 <p><%= custom_field_tag_with_label :time_entry, value %></p>
29 <p><%= custom_field_tag_with_label :time_entry, value %></p>
31 <% end %>
30 <% end %>
32 <% end %>
31 <% end %>
33 </fieldset>
32 </fieldset>
34 <% end %>
33 <% end %>
35
34
36 <fieldset><legend><%= l(:field_notes) %></legend>
35 <fieldset><legend><%= l(:field_notes) %></legend>
37 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
36 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
38 <%= wikitoolbar_for 'notes' %>
37 <%= wikitoolbar_for 'notes' %>
39 <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
38 <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
40
39
41 <p><%=l(:label_attachment_plural)%><br /><%= render :partial => 'attachments/form' %></p>
40 <p><%=l(:label_attachment_plural)%><br /><%= render :partial => 'attachments/form' %></p>
42 </fieldset>
41 </fieldset>
43 </div>
42 </div>
44
43
45 <%= f.hidden_field :lock_version %>
44 <%= f.hidden_field :lock_version %>
46 <%= submit_tag l(:button_submit) %>
45 <%= submit_tag l(:button_submit) %>
47 <%= link_to_remote l(:label_preview),
46 <%= link_to_remote l(:label_preview),
48 { :url => { :controller => 'issues', :action => 'preview', :project_id => @project, :id => @issue },
47 { :url => { :controller => 'issues', :action => 'preview', :project_id => @project, :id => @issue },
49 :method => 'post',
48 :method => 'post',
50 :update => 'preview',
49 :update => 'preview',
51 :with => 'Form.serialize("issue-form")',
50 :with => 'Form.serialize("issue-form")',
52 :complete => "Element.scrollTo('preview')"
51 :complete => "Element.scrollTo('preview')"
53 }, :accesskey => accesskey(:preview) %>
52 }, :accesskey => accesskey(:preview) %>
54 <% end %>
53 <% end %>
55
54
56 <div id="preview" class="wiki"></div>
55 <div id="preview" class="wiki"></div>
General Comments 0
You need to be logged in to leave comments. Login now