18 lines
465 B
Plaintext
18 lines
465 B
Plaintext
= form_for :page, url: send_page_path do |f|
|
|
= f.label :person_id
|
|
= f.select :person_id, options_from_collection_for_select(@people, :id, :name, @page.person_id), include_blank: true
|
|
|
|
= 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) );
|
|
});
|