sms-pager/app/views/pages/page.html.haml

20 lines
495 B
Plaintext
Raw Normal View History

2015-09-21 20:40:07 -05:00
= form_for :page, url: send_page_path do |f|
2015-09-20 22:30:44 -05:00
= f.label :person_id
2015-10-03 08:57:06 -05:00
:ruby
options = options_from_collection_for_select(@people, :id, :name, @page.person_id)
= f.select :person_id, options, include_blank: true
2015-09-20 22:30:44 -05:00
= f.label :to
= f.phone_field :to
= f.label :message
= f.text_area :message
= f.submit 'Send Page'
:javascript
var people = #{@people.to_json};
$('#page_person_id').on('change', function(){
$('#page_to').val( getPersonPhone($(this).val(), people) );
});