fixed bulk change nameserver form

This commit is contained in:
dinsmol 2021-09-22 18:15:54 +03:00
parent e1e8979736
commit 9b67dff2e4
3 changed files with 4 additions and 3 deletions

View file

@ -67,7 +67,7 @@ module Repp
end
def verify_nameserver_existance
return true if hostname.nil?
return true if hostname.blank?
current_user.registrar.nameservers.find_by!(hostname: hostname)
end

View file

@ -3,11 +3,11 @@
<div class="form-group">
<div class="col-md-2 control-label">
<%= label_tag :old_hostname %>
<%= label_tag t '.old_hostname' %>
</div>
<div class="col-md-4">
<%= text_field_tag :old_hostname, params[:old_hostname], required: true,
<%= text_field_tag :old_hostname, params[:old_hostname], required: false,
class: 'form-control' %>
</div>
</div>

View file

@ -32,6 +32,7 @@ en:
ident data ie for updating contact information.
nameserver_form:
old_hostname: Old hostname (optional)
ip_hint: One IP per line
replace_btn: Replace nameserver
help_btn: Toggle help