Sha256: 896dc2fd0b0f045491218e56bc263f21a4eaad0542329122d43e169f020b3d59

Contents?: true

Size: 1.46 KB

Versions: 28

Compression:

Stored size: 1.46 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 %>
  </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

28 entries across 28 versions & 1 rubygems

Version Path
think_feel_do_engine-3.19.4 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.3 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.2 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.1 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.19.0 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.18.0 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.17.2 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.17.1 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.17.0 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.16.3 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.16.2 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.16.1 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.15.7 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.16.0 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.15.6 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.15.5 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.15.4 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.15.3 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.15.2 app/views/think_feel_do_engine/coach/messages/new.html.erb
think_feel_do_engine-3.15.1 app/views/think_feel_do_engine/coach/messages/new.html.erb