Skip to content

Commit

Permalink
Add wufoo form requirements to SMS Campaign form page. Issue #187
Browse files Browse the repository at this point in the history
  • Loading branch information
shua123 committed Aug 28, 2016
1 parent 8dba51f commit ea1ca48
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/views/twilio_messages/sendmessages.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
<%= text_area_tag :message2, '', class: "input-xlarge", placeholder: "Enter a 2nd message to send. (Optional)" %><br />
Twilio-Wufoo Connection? <%= select_tag :twiliowufoo_campaign,
options_for_select([[nil, nil]] + TwilioWufoo.all.order(:name).collect{|twiliowufoo| [twiliowufoo.name, twiliowufoo.id]}, selected: params[:twiliowufoo_campaign]),
:class => "input" %><br />
:class => "input" %>
<h3>If you are using a Wufoo form, please make sure it is set up correctly:</h3>
<ul>
<li>The second to last field should be the phone number field</li>
<li>The last field in the form should be the form type. The form type should be one of "Signup", "Screening", "Availability", or "Test"</li>
</ul>
<br />
Upload a comma seperated csv. The phone numbers must be in a field called 'phone_number': <%= file_field_tag "file", accept: 'text/csv' %><br>
<%= submit_tag "Upload Numbers", id: "submitData" , class: "btn btn-primary", data: { confirm: 'These messages will be added to the queue and sent as soon as possible. Are you sure you want to send these?' } %>
Expand Down
5 changes: 5 additions & 0 deletions app/views/twilio_wufoos/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<h3>If you are using a Wufoo form, please make sure it is set up correctly:</h3>
<ul>
<li>The second to last field should be the phone number field</li>
<li>The last field in the form should be the form type. The form type should be one of "Signup", "Screening", "Availability", or "Test"</li>
</ul>
<%= form_for(@twilio_wufoo) do |f| %>
<% if @twilio_wufoo.errors.any? %>
<div id="error_explanation">
Expand Down

0 comments on commit ea1ca48

Please sign in to comment.