From 5567694e7003afa2c19eb4ff3d92353e50a679aa Mon Sep 17 00:00:00 2001 From: Clement Date: Mon, 26 Sep 2016 14:08:46 +1000 Subject: [PATCH] [MNOE-154] Fix phone number autofill in signup page --- .../auth/confirmations/default/_form.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/app/views/mno_enterprise/auth/confirmations/default/_form.html.haml b/api/app/views/mno_enterprise/auth/confirmations/default/_form.html.haml index 5d2d2e638..b39bd22bc 100644 --- a/api/app/views/mno_enterprise/auth/confirmations/default/_form.html.haml +++ b/api/app/views/mno_enterprise/auth/confirmations/default/_form.html.haml @@ -1,4 +1,4 @@ -%div{ 'ng-init' => "user = { $pwdScore: {}, name: '#{resource.name}', surname: '#{resource.surname}' }" } +%div{ 'ng-init' => "user = { $pwdScore: {}, name: '#{resource.name}', surname: '#{resource.surname}', phone: '#{resource.phone}' }" } = form_for(resource, as: resource_name, :url => mno_enterprise.user_confirmation_finalize_path, :html => { 'name' => 'loginForm', :class => 'autofill-detect text-center' }) do |f| @@ -18,8 +18,8 @@ .col-sm-12 .phone = f.select :phone_country_code, options_for_select(Country.all.map { |country,code| c = Country.new(code); ["#{c.alpha2} +#{c.country_code}", code]}, MnoEnterprise.app_country), {}, class: 'form-control unstyled' - = f.text_field :phone, placeholder: "*Phone", required: true, 'ng-model' => 'user.phone_number', class: 'form-control' - + = f.text_field :phone, placeholder: "*Phone", required: true, 'ng-model' => 'user.phone', class: 'form-control' + %br - # Password: two validation styles offered @@ -46,4 +46,4 @@ %br/ %div %button{ :class => "btn btn-warning btn-login", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'loginForm.$invalid', 'ng-hide' => 'hasClicked' } Confirm my account - %img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' } \ No newline at end of file + %img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }