gitlab-org--gitlab-foss/app/views/profiles/show.html.haml
Dmitriy Zaporozhets b2e4664cc7
Read-only email field for LDAP user
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-27 10:32:37 +02:00

75 lines
2.7 KiB
Text

%h3.page-title
Profile settings
%p.light
This information appears on your profile.
- if current_user.ldap_user?
Some options are unavailable for LDAP accounts
%hr
= form_for @user, url: profile_path, method: :put, html: { multipart: true, class: "edit_user form-horizontal" } do |f|
-if @user.errors.any?
%div.alert.alert-error
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
.row
.span7
.control-group
= f.label :name, class: "control-label"
.controls
= f.text_field :name, class: "input-xlarge", required: true
%span.help-block Enter your name, so people you know can recognize you.
.control-group
= f.label :email, class: "control-label"
.controls
- if @user.ldap_user?
= f.text_field :email, class: "input-xlarge", required: true, readonly: true
%span.help-block.light
Email is read-only for LDAP user
- else
= f.text_field :email, class: "input-xlarge", required: true
- if @user.unconfirmed_email.present?
%span.help-block
We sent confirmation email to
%strong #{@user.unconfirmed_email}
- else
%span.help-block We also use email for avatar detection if no avatar is uploaded.
.control-group
= f.label :skype, class: "control-label"
.controls= f.text_field :skype, class: "input-xlarge"
.control-group
= f.label :linkedin, class: "control-label"
.controls= f.text_field :linkedin, class: "input-xlarge"
.control-group
= f.label :twitter, class: "control-label"
.controls= f.text_field :twitter, class: "input-xlarge"
.control-group
= f.label :bio, class: "control-label"
.controls
= f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250
%span.help-block Tell us about yourself in fewer than 250 characters.
.span5.pull-right
.light-well
= image_tag avatar_icon(@user.email, 160), alt: '', class: 'avatar s160'
.clearfix
.profile-avatar-form-option
%p.light
You can upload an avatar here
%br
or change it at #{link_to "gravatar.com", "http://gravatar.com"}
%hr
%a.choose-btn.btn.btn-small.js-choose-user-avatar-button
%i.icon-paper-clip
%span Choose File ...
&nbsp;
%span.file_name.js-avatar-filename File name...
= f.file_field :avatar, class: "js-user-avatar-input hide"
%span.help-block The maximum file size allowed is 100KB.
.form-actions
= f.submit 'Save changes', class: "btn btn-save"