mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Refactor deprecated in rails 6.1 issues
This commit is contained in:
parent
83f3e14330
commit
39bbe6e06d
10 changed files with 122 additions and 50 deletions
|
@ -35,14 +35,14 @@
|
|||
.col-md-4.control-label
|
||||
= f.label :country_code, t(:country), class: 'required'
|
||||
.col-md-8
|
||||
= f.select :country_code, SortedCountry.all_options(f.object.country_code), {}, required: true, class: 'form-control'
|
||||
= f.select :country_code, ApplicationController.helpers.all_country_options(f.object.country_code), {}, required: true, class: 'form-control'
|
||||
%hr
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :role, nil, class: 'required'
|
||||
.col-md-8
|
||||
= select_tag 'admin_user[roles][]',
|
||||
options_for_select(AdminUser::ROLES.map {|x| [t(x), x] },
|
||||
= select_tag 'admin_user[roles][]',
|
||||
options_for_select(AdminUser::ROLES.map {|x| [t(x), x] },
|
||||
@admin_user.roles.try(:first)), class: 'form-control selectize'
|
||||
|
||||
%hr
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
.col-md-3
|
||||
.form-group
|
||||
= label_tag t(:country)
|
||||
= select_tag '[q][country_code_eq]', SortedCountry.all_options(params[:q][:country_code_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control selectize' }
|
||||
= select_tag '[q][country_code_eq]', ApplicationController.helpers.all_country_options(params[:q][:country_code_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control selectize' }
|
||||
.col-md-6
|
||||
.form-group
|
||||
= label_tag t(:contact_type)
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
<div class="col-md-7">
|
||||
<%= f.select :address_country_code,
|
||||
SortedCountry.all_options(f.object.address_country_code), {},
|
||||
ApplicationController.helpers.all_country_options(f.object.address_country_code), {},
|
||||
required: true, class: 'form-control' %>
|
||||
<span class="help-block"><%= t '.country_hint' %></span>
|
||||
</div>
|
||||
|
@ -59,4 +59,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue