Commit 07ab0e42d3dc2c767ef09f032071a5cc8563d166

Authored by Rodrigo Souto
Committed by Antonio Terceiro
1 parent 9f7c80a6

Identifying the divs of rejection explanation field

* JS was working only over the first task.

(ActionItem1655)
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
app/views/tasks/_task.rhtml
... ... @@ -4,13 +4,13 @@
4 4 <% form_for('task', task, :url => { :action => 'close', :id => task.id}) do |f| %>
5 5  
6 6 <div>
7   - <%= labelled_radio_button _('OK'), :decision, 'finish', true, :onclick => 'if(this.checked) $("rejection-field").style.display="none"' %>
  7 + <%= labelled_radio_button _('OK'), :decision, 'finish', true, :onclick => "if(this.checked) $('rejection-field-#{task.id}').style.display='none'" %>
8 8 </div>
9 9 <div>
10   - <%= labelled_radio_button _('Cancel'), :decision, 'cancel', false, :onclick => 'if(this.checked) $("rejection-field").style.display="block"' %>
  10 + <%= labelled_radio_button _('Cancel'), :decision, 'cancel', false, :onclick => "if(this.checked) $('rejection-field-#{task.id}').style.display='block'" %>
11 11 </div>
12 12  
13   - <div id="rejection-field" style='display: none'>
  13 + <div id="rejection-field-<%= task.id %>" style='display: none'>
14 14 <%= required labelled_form_field(_('Rejection explanation'), text_area(:task, :reject_explanation, :rows => 5))%>
15 15 </div>
16 16  
... ...