mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
parent
c14d15d7b7
commit
c037166085
8 changed files with 88 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue