gitlab-org--gitlab-foss/app/views/admin/users/_form.html.haml

97 lines
3.6 KiB
Text
Raw Normal View History

2011-10-08 17:36:38 -04:00
.user_new
= form_for [:admin, @user], html: { class: 'form-horizontal fieldset-form' } do |f|
-if @user.errors.any?
2011-10-08 17:36:38 -04:00
#error_explanation
.alert.alert-danger
- @user.errors.full_messages.each do |msg|
%p= msg
2011-10-08 17:36:38 -04:00
%fieldset
%legend Account
.form-group
= f.label :name, class: 'control-label'
.col-sm-10
= f.text_field :name, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required
.form-group
= f.label :username, class: 'control-label'
.col-sm-10
= f.text_field :username, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required
.form-group
= f.label :email, class: 'control-label'
.col-sm-10
= f.text_field :email, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required
- if @user.new_record?
%fieldset
%legend Password
.form-group
= f.label :password, class: 'control-label'
.col-sm-10
%strong
2014-07-17 08:03:17 -04:00
Reset link will be generated and sent to the user.
%br
2014-07-17 08:03:17 -04:00
User will be forced to set the password on first sign in.
- else
%fieldset
%legend Password
.form-group
= f.label :password, class: 'control-label'
.col-sm-10= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control'
.form-group
= f.label :password_confirmation, class: 'control-label'
.col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control'
%fieldset
%legend Access
.form-group
= f.label :projects_limit, class: 'control-label'
.col-sm-10= f.number_field :projects_limit, class: 'form-control'
.form-group
= f.label :can_create_group, class: 'control-label'
.col-sm-10= f.check_box :can_create_group
2013-01-25 04:30:49 -05:00
.form-group
= f.label :admin, class: 'control-label'
- if current_user == @user
.col-sm-10= f.check_box :admin, disabled: true
.col-sm-10 You cannot remove your own admin rights.
- else
.col-sm-10= f.check_box :admin
.form-group
= f.label :external, class: 'control-label'
.col-sm-10= f.check_box :external
2016-03-14 17:06:23 -04:00
.col-sm-10 External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects or groups.
%fieldset
%legend Profile
.form-group
= f.label :avatar, class: 'control-label'
.col-sm-10
= f.file_field :avatar
.form-group
= f.label :skype, class: 'control-label'
.col-sm-10= f.text_field :skype, class: 'form-control'
.form-group
= f.label :linkedin, class: 'control-label'
.col-sm-10= f.text_field :linkedin, class: 'form-control'
.form-group
= f.label :twitter, class: 'control-label'
.col-sm-10= f.text_field :twitter, class: 'form-control'
2014-01-18 14:07:00 -05:00
.form-group
= f.label :website_url, 'Website', class: 'control-label'
2014-01-18 14:07:00 -05:00
.col-sm-10= f.text_field :website_url, class: 'form-control'
2012-08-25 13:31:19 -04:00
2013-08-07 16:35:24 -04:00
.form-actions
- if @user.new_record?
2013-04-18 10:28:09 -04:00
= f.submit 'Create user', class: "btn btn-create"
2013-01-29 15:18:19 -05:00
= link_to 'Cancel', admin_users_path, class: "btn btn-cancel"
2012-04-17 21:34:14 -04:00
- else
2013-04-18 10:28:09 -04:00
= f.submit 'Save changes', class: "btn btn-save"
= link_to 'Cancel', admin_user_path(@user), class: "btn btn-cancel"