-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3919 from 3scale/THREESCALE-10399_personal_details
🦋 Update Personal details page
- Loading branch information
Showing
4 changed files
with
45 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 31 additions & 17 deletions
48
app/views/provider/admin/user/personal_details/edit.html.slim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
- content_for :page_header_title, 'Personal Details' | ||
- content_for :page_header_title, t('.header_title') | ||
|
||
= semantic_form_for current_user, | ||
builder: Fields::FormBuilder, | ||
url: provider_admin_user_personal_details_path do |form| | ||
- content_for :javascripts do | ||
= stylesheet_packs_chunks_tag 'pf_form' | ||
|
||
= hidden_field_tag :origin, params[:origin] | ||
= form.inputs name: 'User Information' do | ||
= form.user_defined_form | ||
- if current_user.using_password? | ||
= form.input :password, label: "New Password", required: current_user.password_required?, input_html: { value: "" } | ||
- if current_user.can_set_password? && !current_account.settings.enforce_sso? | ||
- content_for :page_header_alert do | ||
br | ||
= pf_inline_alert t('.set_password_html', href: new_provider_password_path), variant: :info | ||
|
||
- if current_user.using_password? | ||
= form.inputs name: "Provide your current password and update your personal details" do | ||
= form.input :current_password, required: true | ||
= form.actions do | ||
= form.commit_button I18n.t('provider.admin.user.personal_details.edit.form.submit_button_label') | ||
- using_password = current_user.using_password? | ||
|
||
- if current_user.can_set_password? && !current_account.settings.enforce_sso? | ||
p You have no password set. If you'd like to set one use the | ||
#{link_to 'password reset form', new_provider_password_path}. | ||
div class="pf-c-card" | ||
div class="pf-c-card__body" | ||
= semantic_form_for current_user, builder: Fields::PatternflyFormBuilder, | ||
url: provider_admin_user_personal_details_path, | ||
html: { class: 'pf-c-form pf-m-limit-width', autocomplete: 'new-password' } do |form| | ||
|
||
= hidden_field_tag :origin, params[:origin] | ||
|
||
= form.inputs 'User Information' do | ||
= form.user_defined_form | ||
- if using_password | ||
= form.input :password, as: :patternfly_input, | ||
label: t('.new_password_label'), | ||
required: current_user.password_required?, | ||
input_html: { value: '', required: current_user.password_required? } | ||
|
||
- if using_password | ||
= form.inputs "Provide your current password and update your personal details" do | ||
= form.input :current_password, as: :patternfly_input, | ||
required: true, | ||
input_html: { value: '', type: 'password', required: true } | ||
= form.actions do | ||
= form.commit_button t('.submit_button_label') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters