mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 08:43:37 +02:00
Add reserved pw field for registrar domain form #2565
This commit is contained in:
parent
048ab8a475
commit
5f1df12b48
3 changed files with 19 additions and 9 deletions
|
@ -182,16 +182,18 @@ module Depp
|
|||
# rubocop:enable Metrics/AbcSize
|
||||
|
||||
def construct_custom_params_hash(domain_params)
|
||||
custom_params = {}
|
||||
custom_params = { _anonymus: [] }
|
||||
if domain_params[:legal_document].present?
|
||||
type = domain_params[:legal_document].original_filename.split('.').last.downcase
|
||||
custom_params = {
|
||||
_anonymus: [
|
||||
custom_params[:_anonymus] << {
|
||||
legalDocument: { value: Base64.encode64(domain_params[:legal_document].read), attrs: { type: type } }
|
||||
]
|
||||
}
|
||||
end
|
||||
|
||||
if domain_params[:reserved_pw].present?
|
||||
custom_params[:_anonymus] << { reserved: { pw: { value: domain_params[:reserved_pw] } } }
|
||||
end
|
||||
|
||||
custom_params
|
||||
end
|
||||
|
||||
|
|
|
@ -23,3 +23,10 @@
|
|||
= select_tag "domain[registrant]",
|
||||
options_for_select(@contacts_autocomplete_map, selected: @domain_params[:registrant]),
|
||||
include_blank: true, class: 'js-combobox', required: true
|
||||
|
||||
- unless params[:domain_name]
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag :domain_reserved_pw, t(:reserved_pw)
|
||||
.col-md-7
|
||||
= text_field_tag('domain[reserved_pw]', @domain_params[:reserved_pw], class: 'form-control')
|
||||
|
|
|
@ -865,3 +865,4 @@ en:
|
|||
export_csv: 'Export CSV'
|
||||
reserved_domains: 'Reserved domains'
|
||||
invalid_yaml: 'Invalid YAML'
|
||||
reserved_pw: 'Reserved pw'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue