summaryrefslogtreecommitdiff
path: root/app/views/profiles
diff options
context:
space:
mode:
authorAlexander Keramidas <dev.alexkeramidas@gmail.com>2017-08-29 11:57:41 +0300
committerAlexander Keramidas <dev.alexkeramidas@gmail.com>2017-09-06 16:38:52 +0300
commit4df54f260751a832ebf0b8c18524020d6604994b (patch)
tree2337fd9cc3fe1a1c82d9cc980dcce22465e493ce /app/views/profiles
parent021fb512e3c3f4b317307358dee8eecf448599b0 (diff)
downloadgitlab-ce-4df54f260751a832ebf0b8c18524020d6604994b.tar.gz
Profile updates from providers
Diffstat (limited to 'app/views/profiles')
-rw-r--r--app/views/profiles/show.html.haml16
1 files changed, 11 insertions, 5 deletions
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index a8ae0b92334..a127e98d8e8 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -45,12 +45,15 @@
Some options are unavailable for LDAP accounts
.col-lg-8
.row
- = f.text_field :name, required: true, wrapper: { class: 'col-md-9' },
- help: 'Enter your name, so people you know can recognize you.'
+ - if @user.read_only_attribute?(:name)
+ = f.text_field :name, required: true, readonly: true, wrapper: { class: 'col-md-9' },
+ help: "Your name was automatically set based on your #{ attribute_provider_label(:name) } account, so people you know can recognize you."
+ - else
+ = f.text_field :name, required: true, wrapper: { class: 'col-md-9' }, help: "Enter your name, so people you know can recognize you."
= f.text_field :id, readonly: true, label: 'User ID', wrapper: { class: 'col-md-3' }
- - if @user.external_email?
- = f.text_field :email, required: true, readonly: true, help: "Your email address was automatically set based on your #{email_provider_label} account."
+ - if @user.read_only_attribute?(:email)
+ = f.text_field :email, required: true, readonly: true, help: "Your email address was automatically set based on your #{ attribute_provider_label(:email) } account."
- else
= f.text_field :email, required: true, value: (@user.email unless @user.temp_oauth_email?),
help: user_email_help_text(@user)
@@ -64,7 +67,10 @@
= f.text_field :linkedin
= f.text_field :twitter
= f.text_field :website_url, label: 'Website'
- = f.text_field :location
+ - if @user.read_only_attribute?(:location)
+ = f.text_field :location, readonly: true, help: "Your location was automatically set based on your #{ attribute_provider_label(:location) } account."
+ - else
+ = f.text_field :location
= f.text_field :organization
= f.text_area :bio, rows: 4, maxlength: 250, help: 'Tell us about yourself in fewer than 250 characters.'
.prepend-top-default.append-bottom-default