diff --git a/app/controllers/registrar/account_controller.rb b/app/controllers/registrar/account_controller.rb index 1bcf9e468..9252098b8 100644 --- a/app/controllers/registrar/account_controller.rb +++ b/app/controllers/registrar/account_controller.rb @@ -18,7 +18,7 @@ class Registrar private def registrar_params - params.require(:registrar).permit(:billing_email) + params.require(:registrar).permit(:billing_email, :iban) end end end \ No newline at end of file diff --git a/app/views/registrar/account/_details.html.erb b/app/views/registrar/account/_details.html.erb index 9e35da899..185b046c8 100644 --- a/app/views/registrar/account/_details.html.erb +++ b/app/views/registrar/account/_details.html.erb @@ -7,6 +7,9 @@
<%= Registrar.human_attribute_name :billing_email %>
<%= registrar.billing_email %>
+ +
<%= Registrar.human_attribute_name :iban %>
+
<%= registrar.iban %>
diff --git a/app/views/registrar/account/_form.html.erb b/app/views/registrar/account/_form.html.erb index c2bb6aa82..7a7e4491b 100644 --- a/app/views/registrar/account/_form.html.erb +++ b/app/views/registrar/account/_form.html.erb @@ -11,6 +11,16 @@ +
+
+ <%= f.label :iban %> +
+ +
+ <%= f.text_field :iban, class: 'form-control' %> +
+
+
diff --git a/app/views/registrar/account/show.html.erb b/app/views/registrar/account/show.html.erb index 53218d1f7..46813fa96 100644 --- a/app/views/registrar/account/show.html.erb +++ b/app/views/registrar/account/show.html.erb @@ -3,13 +3,13 @@
-
+
<%= render 'details', registrar: current_registrar_user.registrar %>
-
+
<%= render 'linked_users', linked_users: current_registrar_user.linked_users %>
\ No newline at end of file diff --git a/test/system/registrar_area/account_test.rb b/test/system/registrar_area/account_test.rb index 438de2629..81db3ed4b 100644 --- a/test/system/registrar_area/account_test.rb +++ b/test/system/registrar_area/account_test.rb @@ -8,15 +8,19 @@ class RegistrarAccountTest < ApplicationSystemTestCase def test_updates_account new_billing_email = 'new@registrar.test' + new_iban = 'GB77BARC20201530093459' assert_not_equal new_billing_email, @registrar.billing_email + assert_not_equal new_iban, @registrar.iban visit registrar_account_path click_on 'Edit' fill_in 'Billing email', with: new_billing_email + fill_in 'IBAN', with: new_iban click_on 'Save changes' assert_text 'Your account has been updated' assert_text new_billing_email + assert_text new_iban end end \ No newline at end of file