From d0a25eb044942a078c28b96b43d2fc7e92dcc782 Mon Sep 17 00:00:00 2001 From: Kushal Pandya <kushalspandya@gmail.com> Date: Mon, 22 May 2017 07:49:58 +0000 Subject: [PATCH] Show password field mask while editing service settings --- app/views/shared/_field.html.haml | 4 ++-- changelogs/unreleased/31510-mask-password-field-edit.yml | 4 ++++ features/steps/project/services.rb | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelogs/unreleased/31510-mask-password-field-edit.yml diff --git a/app/views/shared/_field.html.haml b/app/views/shared/_field.html.haml index 8d6e16f74c3..d74b0043949 100644 --- a/app/views/shared/_field.html.haml +++ b/app/views/shared/_field.html.haml @@ -9,7 +9,7 @@ .form-group - if type == "password" && value.present? - = form.label name, "Change #{title}", class: "control-label" + = form.label name, "Enter new #{title.downcase}", class: "control-label" - else = form.label name, title, class: "control-label" .col-sm-10 @@ -22,6 +22,6 @@ - elsif type == 'select' = form.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" } - elsif type == 'password' - = form.password_field name, autocomplete: "new-password", class: 'form-control' + = form.password_field name, autocomplete: "new-password", class: "form-control" - if help %span.help-block= help diff --git a/changelogs/unreleased/31510-mask-password-field-edit.yml b/changelogs/unreleased/31510-mask-password-field-edit.yml new file mode 100644 index 00000000000..0ef37be328d --- /dev/null +++ b/changelogs/unreleased/31510-mask-password-field-edit.yml @@ -0,0 +1,4 @@ +--- +title: Update password field label while editing service settings +merge_request: 11431 +author: diff --git a/features/steps/project/services.rb b/features/steps/project/services.rb index 772b07d0ad8..3c0d987e403 100644 --- a/features/steps/project/services.rb +++ b/features/steps/project/services.rb @@ -211,7 +211,7 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps end step 'I should see empty field Change Password' do - expect(find_field('Change Password').value).to be_nil + expect(find_field('Enter new password').value).to be_nil end step 'I click JetBrains TeamCity CI service link' do -- 2.30.9