Newer
Older
dmpopidor / app / views / orgs / _feedback_form.html.erb
<%= form_for(@org, url: admin_update_org_path(@org), html: { multipart: true, method: :put, id: "edit_org_feedback_form" } ) do |f| %>
  <h2><%= _('Request Feedback') %></h2>
  <div class="row">
    <div class="radio col-xs-8">
      <%= f.label :feedback_enabled, raw("#{f.radio_button(:feedback_enabled, true)} #{_('On')}") %>
      <%= f.label :feedback_enabled, raw("#{f.radio_button(:feedback_enabled, false)} #{_('Off')}") %>
    </div>
  </div>
  <div id="feeback-email">
    <h3><%= _('Request Expert Feedback - Automated Email:') %></h3>
    <div class="row">
      <div class="form-group col-xs-8">
        <%= f.label :feedback_email_subject, _('Subject'), class: "control-label" %>
        <%= f.text_field :feedback_email_subject, class: "form-control" %>
      </div>
    </div>
    <div class="row">
      <div class="form-group col-xs-8" data-toggle="tooltip" data-html="true" title="<%= _('You may use the following keywords in your email: <ul><li>%{application_name} - the name of this tool</li><li>%{user_name} - the plan\'s owner</li><li>%{plan_name} - the plan\'s title</li><li>%{organisation_email} - the administrative contact email for your organisation</li></ul>') %>">
        <%= f.label :feedback_email_msg, _('Message'), class: "control-label" %>
        <%= f.text_area :feedback_email_msg, class: "form-control" %>
      </div>
    </div>
  </div>
  <div class="row">
    <div class="form-group col-xs-8">
      <%= f.button(_('Save'), id:"save_org_submit", class: "btn btn-primary", type: "submit") %>
      <%= f.button(_('Reset to defaults'), id:"reset-to-default-feedback-email", class: "btn btn-default", type: "button") %>
      <div id="feedback-email-default-subject" class="hide"><%= UserMailer.feedback_confirmation_default_subject %></div>
      <div id="feedback-email-default-message" class="hide"><%= UserMailer.feedback_confirmation_default_message %></div>
    </div>
  </div>
<% end %>