Last active
August 21, 2017 19:42
-
-
Save buurzx/1d517a8607790d7134c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h4 | |
= fa_icon('arrow-circle-o-down', text: 'Получатель') | |
.form-group | |
// юридическое лицо | |
label.radio-inline | |
= radio_button_tag :'order[recipient_attributes][individual]', '0', false, :'ng-model' => 'order.recipient.individual', :'ng-click'=> 'choose_recipient_in_address =false' | |
| Юридическое лицо | |
// физическое лицо | |
label.radio-inline | |
= radio_button_tag :'order[recipient_attributes][individual]', '1', false, :'ng-model' => 'order.recipient.individual', :'ng-click'=> 'choose_recipient_in_address =false' | |
| Физическое лицо | |
// использовать контакты | |
- if user_have?(:recipients) | |
label.radio-inline | |
= check_box :'settings[recipient][type]', 'contact', :'ng-click'=>'choose_recipient()', :'ng-model'=>'choose_recipient_in_address' | |
| Выбрать из своих контактов | |
// список контактов | |
- if user_have?(:recipients) | |
.row[style="margin-left:0;" ng-show="choose_recipient_in_address" ] | |
.col-md-4 | |
.existed-contact | |
.form-group | |
= f.hidden_field_tag :'order[recipient_attributes][individual]', "{{order.recipient.individual}}" | |
= f.collection_select :recipient_id, current_user.recipients, :id, :name, {include_blank: 'Выбрать из адресной книги'}, :class => 'form-control' | |
// создание нового контакта | |
.new-contact | |
= render 'orders/form/step-2/contact_fields', :f => f, :contact => :recipient, :order => order | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment