Skip to content

Commit

Permalink
fixed nameserver issue
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Mar 15, 2024
1 parent a763d56 commit 883b5de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/controllers/registrant/domains_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def new
end

Tld::Estonian::MIN_NAMESERVER_COUNT.times do |i|
next if Setting.default_nameserver_records[i].blank?

current_nameserver = JSON.parse(Setting.default_nameserver_records[i])
@domain.nameservers.build(
hostname: current_nameserver['hostname'],
Expand Down
10 changes: 8 additions & 2 deletions app/views/registrant/domains/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@

<div class='w-96'>
<b>Price list</b><br />
<% DomainPrice.all.each do |price| %>
<%= form.radio_button :domain_price, price.id, checked: DomainPrice.first == price ? true : false %> <%= price.price %> - <%= price.duration / 1.month %> months <br />

<% if DomainPrice.all.any? %>
<% DomainPrice.all.each do |price| %>
<%= form.radio_button :domain_price, price.id, checked: DomainPrice.first == price ? true : false %> <%= price.price %> - <%= price.duration / 1.month %> months <br />
<% end %>
<% else %>
<%= t('.no_price_lists') %>
<% end %>

</div>

<%= component 'divider', label: t('.optional') %>
Expand Down

0 comments on commit 883b5de

Please sign in to comment.