Sha256: d330b394e068d7c480d9094ebde8eac626cfbbc70efaf3dd072d119714621c44

Contents?: true

Size: 1.48 KB

Versions: 18

Compression:

Stored size: 1.48 KB

Contents

<h1>Compose Message</h1>

<% if message %>
  <%= render("think_feel_do_engine/messages/message_info", message: message) %>
  <hr>
<% end %>

<%= form_for @new_message, url: coach_group_messages_path(@group), html: { role: "form" } do |f| %>
  <div class="form-group">
    <label for="message_recipient_id">To</label>
    <% if @reply_recipient %>
      <%= f.hidden_field :recipient_id, value: @reply_recipient.id %><%= @reply_recipient.study_id %>
    <% else %>
      <%= f.select :recipient_id, participants.collect { |p| [p.study_id, p.id] }, { prompt: 'Select Participant', selected: params[:recipient_id] }, class: "form-control" %>
    <% end %>
    <%= f.hidden_field :recipient_type, value: 'Participant' %>
  </div>

  <div class="form-group">
    <label for="message_subject" class="control-label">Subject</label>
    <%= f.text_field :subject, required: true, class: "form-control", value: params[:subject] %>
  </div>

  <div class="form-group">
    <label for="coach-message-link-selection">Add a link</label>
    <%= select_tag nil, options_for_select(options_for_site_link_select), id: 'coach-message-link-selection', prompt: 'Please select...', class: "form-control" %>
  </div>

  <div class="form-group">
    <label for="message_body">Message</label>
    <%= f.text_area :body, class: "form-control", rows: 5, maxlength: 1700 %>
  </div>

  <button type="submit" class="btn btn-default">Send</button>
  <%= link_to "Cancel", coach_group_messages_path(@group), class: "btn btn-default" %>
<% end %>

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
think_feel_do_engine-3.22.9 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.22.8 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.22.7 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.22.6 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.22.5 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.22.4 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.22.2 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.22.1 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.22.0 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.21.2 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.21.1 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.21.0 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.20.1 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.9 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.8 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.7 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.6 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.5 app/views/think_feel_do_engine/coach/messages/new.html.erb