Skip to content

Commit

Permalink
Improve UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Beljajev committed May 30, 2019
1 parent 486ef9d commit 8c99475
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/controllers/registrar/account_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class Registrar
class AccountController < BaseController
skip_authorization_check
helper_method :iban_max_length

def show; end

Expand All @@ -20,5 +21,9 @@ def update
def registrar_params
params.require(:registrar).permit(:billing_email, :iban)
end

def iban_max_length
Iban.max_length
end
end
end
3 changes: 2 additions & 1 deletion app/views/registrar/account/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
</div>

<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>

Expand Down
1 change: 1 addition & 0 deletions config/locales/registrar/account.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ en:
header: Edit your account

form:
iban_hint: Required for e-invoices
submit_btn: Save changes

update:
Expand Down

0 comments on commit 8c99475

Please sign in to comment.