Add registrar website to UI

#279
This commit is contained in:
Artur Beljajev 2017-02-21 17:49:34 +02:00
parent c14d15d7b7
commit c037166085
8 changed files with 88 additions and 2 deletions

View file

@ -62,7 +62,7 @@ class Admin::RegistrarsController < AdminController
def registrar_params
params.require(:registrar).permit(
:name, :reg_no, :vat_no, :street, :city, :state, :zip, :billing_address,
:country_code, :email, :phone, :billing_email, :code, :test_registrar
:country_code, :email, :phone, :website, :billing_email, :code, :test_registrar
)
end
end

View file

@ -12,7 +12,7 @@ class Registrar < ActiveRecord::Base
has_many :priv_contacts, -> { privs }, class_name: 'Contact'
has_many :white_ips, dependent: :destroy
delegate :balance, to: :cash_account
delegate :balance, to: :cash_account, allow_nil: true
validates :name, :reg_no, :country_code, :email, :code, presence: true
validates :name, :reg_no, :reference_no, :code, uniqueness: true

View file

@ -27,6 +27,11 @@
= f.label :phone
.col-md-7
= f.text_field(:phone, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :website
.col-md-7
= f.url_field :website, class: 'form-control'
.form-group
.col-md-4.control-label
= f.label :email

View file

@ -39,6 +39,9 @@
%dt= t(:credit_balance)
%dd= @registrar.balance
%dt= Registrar.human_attribute_name :website
%dd= @registrar.website
.col-md-6
.panel.panel-default
.panel-heading