Improve UI

This commit is contained in:
Artur Beljajev 2019-05-30 16:00:36 +03:00
parent 02c37a1c31
commit 8c0d654475
3 changed files with 8 additions and 1 deletions

View file

@ -1,6 +1,7 @@
class Registrar class Registrar
class AccountController < BaseController class AccountController < BaseController
skip_authorization_check skip_authorization_check
helper_method :iban_max_length
def show; end def show; end
@ -20,5 +21,9 @@ class Registrar
def registrar_params def registrar_params
params.require(:registrar).permit(:billing_email, :iban) params.require(:registrar).permit(:billing_email, :iban)
end end
def iban_max_length
Iban.max_length
end
end end
end end

View file

@ -17,7 +17,8 @@
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<%= f.text_field :iban, class: 'form-control' %> <%= f.text_field :iban, maxlength: iban_max_length, class: 'form-control' %>
<span class="help-block"><%= t '.iban_hint' %></span>
</div> </div>
</div> </div>

View file

@ -8,6 +8,7 @@ en:
header: Edit your account header: Edit your account
form: form:
iban_hint: Required for sending e-invoices to the bank
submit_btn: Save changes submit_btn: Save changes
update: update: