_task.rhtml 762 Bytes
<%# a generic task solver %>
<h2><%= _('Processing task: %s') % task.description %></h2>

<% form_for('task', task, :url => { :action => 'close', :id => task.id}) do |f| %>

  <div>
    <%= labelled_radio_button _('OK'), :decision, 'finish', true, :onclick => 'if(this.checked) $("rejection-field").style.display="none"' %>
  </div>
  <div>
    <%= labelled_radio_button _('Cancel'), :decision, 'cancel', false, :onclick => 'if(this.checked) $("rejection-field").style.display="block"' %>
  </div>

  <div id="rejection-field" style='display: none'>
    <%= required labelled_form_field(_('Rejection explanation'), text_area(:task, :reject_explanation, :rows => 5))%>
  </div>

  <% button_bar do %>
    <%= submit_button(:ok, _('OK')) %>
  <% end %>

<% end %>