From bb517597156289a4eeae21214af409dcb89e965b Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Wed, 6 Nov 2019 12:08:40 +0200 Subject: [PATCH 1/2] Remove unnecessary HTML --- app/views/admin/domains/partials/_dnskeys.haml | 2 +- app/views/admin/domains/partials/_nameservers.haml | 2 +- app/views/admin/domains/partials/_tech_contacts.haml | 2 +- app/views/registrant/domains/partials/_dnskeys.haml | 2 +- app/views/registrant/domains/partials/_nameservers.haml | 2 +- app/views/registrar/domains/partials/_contacts.haml | 4 ++-- app/views/registrar/domains/partials/_nameservers.haml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/admin/domains/partials/_dnskeys.haml b/app/views/admin/domains/partials/_dnskeys.haml index 6d5759e65..51a90216d 100644 --- a/app/views/admin/domains/partials/_dnskeys.haml +++ b/app/views/admin/domains/partials/_dnskeys.haml @@ -1,5 +1,5 @@ - panel_class = @domain.errors.messages[:dnskeys] ? 'panel-danger' : 'panel-default' -#dnskeys.panel{class: panel_class} +.panel{class: panel_class} .panel-heading.clearfix = t(:dnskeys) .table-responsive diff --git a/app/views/admin/domains/partials/_nameservers.haml b/app/views/admin/domains/partials/_nameservers.haml index db3ca759a..871da2f0b 100644 --- a/app/views/admin/domains/partials/_nameservers.haml +++ b/app/views/admin/domains/partials/_nameservers.haml @@ -1,5 +1,5 @@ - panel_class = @domain.errors.messages[:nameservers] ? 'panel-danger' : 'panel-default' -#nameservers.panel{class: panel_class} +.panel{class: panel_class} .panel-heading.clearfix = t(:nameservers) .table-responsive diff --git a/app/views/admin/domains/partials/_tech_contacts.haml b/app/views/admin/domains/partials/_tech_contacts.haml index cca87434f..dbb4ecd12 100644 --- a/app/views/admin/domains/partials/_tech_contacts.haml +++ b/app/views/admin/domains/partials/_tech_contacts.haml @@ -1,6 +1,6 @@ - tech_contacts_invalid = @domain.errors.include?(:tech_contacts) - panel_class = tech_contacts_invalid ? 'panel-danger' : 'panel-default' -#tech_contacts.panel{class: panel_class} +.panel{class: panel_class} .panel-heading.clearfix = t('.title') .table-responsive diff --git a/app/views/registrant/domains/partials/_dnskeys.haml b/app/views/registrant/domains/partials/_dnskeys.haml index 6d5759e65..51a90216d 100644 --- a/app/views/registrant/domains/partials/_dnskeys.haml +++ b/app/views/registrant/domains/partials/_dnskeys.haml @@ -1,5 +1,5 @@ - panel_class = @domain.errors.messages[:dnskeys] ? 'panel-danger' : 'panel-default' -#dnskeys.panel{class: panel_class} +.panel{class: panel_class} .panel-heading.clearfix = t(:dnskeys) .table-responsive diff --git a/app/views/registrant/domains/partials/_nameservers.haml b/app/views/registrant/domains/partials/_nameservers.haml index db3ca759a..871da2f0b 100644 --- a/app/views/registrant/domains/partials/_nameservers.haml +++ b/app/views/registrant/domains/partials/_nameservers.haml @@ -1,5 +1,5 @@ - panel_class = @domain.errors.messages[:nameservers] ? 'panel-danger' : 'panel-default' -#nameservers.panel{class: panel_class} +.panel{class: panel_class} .panel-heading.clearfix = t(:nameservers) .table-responsive diff --git a/app/views/registrar/domains/partials/_contacts.haml b/app/views/registrar/domains/partials/_contacts.haml index b94f99ee2..48d1ac21f 100644 --- a/app/views/registrar/domains/partials/_contacts.haml +++ b/app/views/registrar/domains/partials/_contacts.haml @@ -1,4 +1,4 @@ -#tech_contacts.panel.panel-default +.panel.panel-default .panel-heading.clearfix %h3.panel-title= t(:contacts) .table-responsive @@ -14,4 +14,4 @@ %tr %td= x['type'] %td= registrant.name - %td= x.text \ No newline at end of file + %td= x.text diff --git a/app/views/registrar/domains/partials/_nameservers.haml b/app/views/registrar/domains/partials/_nameservers.haml index 66ef010e6..69f147bc4 100644 --- a/app/views/registrar/domains/partials/_nameservers.haml +++ b/app/views/registrar/domains/partials/_nameservers.haml @@ -1,4 +1,4 @@ -#nameservers.panel.panel-default +.panel.panel-default .panel-heading.clearfix %h3.panel-title= t(:nameservers) .table-responsive From 5847f8d57a8f617804552341f8d89a16d338a874 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Wed, 6 Nov 2019 12:15:40 +0200 Subject: [PATCH 2/2] Do not show errors in UI This feature was unused. --- app/views/admin/domains/partials/_dnskeys.haml | 9 +-------- app/views/admin/domains/partials/_nameservers.haml | 9 +-------- app/views/registrant/domains/partials/_dnskeys.haml | 9 +-------- app/views/registrant/domains/partials/_nameservers.haml | 9 +-------- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/app/views/admin/domains/partials/_dnskeys.haml b/app/views/admin/domains/partials/_dnskeys.haml index 51a90216d..ddd95e952 100644 --- a/app/views/admin/domains/partials/_dnskeys.haml +++ b/app/views/admin/domains/partials/_dnskeys.haml @@ -1,5 +1,4 @@ -- panel_class = @domain.errors.messages[:dnskeys] ? 'panel-danger' : 'panel-default' -.panel{class: panel_class} +.panel.panel-default .panel-heading.clearfix = t(:dnskeys) .table-responsive @@ -17,9 +16,3 @@ %td= x.protocol %td= x.alg %td= x.public_key - - if @domain.errors.messages[:dnskeys] - %tfoot - - @domain.errors.messages[:dnskeys].each do |x| - %tr - %td{colspan: 4}= x - diff --git a/app/views/admin/domains/partials/_nameservers.haml b/app/views/admin/domains/partials/_nameservers.haml index 871da2f0b..0bc22732d 100644 --- a/app/views/admin/domains/partials/_nameservers.haml +++ b/app/views/admin/domains/partials/_nameservers.haml @@ -1,5 +1,4 @@ -- panel_class = @domain.errors.messages[:nameservers] ? 'panel-danger' : 'panel-default' -.panel{class: panel_class} +.panel.panel-default .panel-heading.clearfix = t(:nameservers) .table-responsive @@ -15,9 +14,3 @@ %td= x %td= x.ipv4 %td= x.ipv6 - - if @domain.errors.messages[:nameservers] - %tfoot - - @domain.errors.messages[:nameservers].each do |x| - %tr - %td{colspan: 3}= x - diff --git a/app/views/registrant/domains/partials/_dnskeys.haml b/app/views/registrant/domains/partials/_dnskeys.haml index 51a90216d..ddd95e952 100644 --- a/app/views/registrant/domains/partials/_dnskeys.haml +++ b/app/views/registrant/domains/partials/_dnskeys.haml @@ -1,5 +1,4 @@ -- panel_class = @domain.errors.messages[:dnskeys] ? 'panel-danger' : 'panel-default' -.panel{class: panel_class} +.panel.panel-default .panel-heading.clearfix = t(:dnskeys) .table-responsive @@ -17,9 +16,3 @@ %td= x.protocol %td= x.alg %td= x.public_key - - if @domain.errors.messages[:dnskeys] - %tfoot - - @domain.errors.messages[:dnskeys].each do |x| - %tr - %td{colspan: 4}= x - diff --git a/app/views/registrant/domains/partials/_nameservers.haml b/app/views/registrant/domains/partials/_nameservers.haml index 871da2f0b..0bc22732d 100644 --- a/app/views/registrant/domains/partials/_nameservers.haml +++ b/app/views/registrant/domains/partials/_nameservers.haml @@ -1,5 +1,4 @@ -- panel_class = @domain.errors.messages[:nameservers] ? 'panel-danger' : 'panel-default' -.panel{class: panel_class} +.panel.panel-default .panel-heading.clearfix = t(:nameservers) .table-responsive @@ -15,9 +14,3 @@ %td= x %td= x.ipv4 %td= x.ipv6 - - if @domain.errors.messages[:nameservers] - %tfoot - - @domain.errors.messages[:nameservers].each do |x| - %tr - %td{colspan: 3}= x -