account.html.haml 3.0 KB
Newer Older
1
- if Gitlab.config.omniauth.enabled
D
Dmitriy Zaporozhets 已提交
2
  %fieldset
3
    %legend Social Accounts
D
Dmitriy Zaporozhets 已提交
4 5 6 7 8 9 10
    .oauth_select_holder
      %p.hint Tip: Click on icon to activate sigin with one of the following services
      - User.omniauth_providers.each do |provider|
        %span{class: oauth_active_class(provider) }
          = link_to authbutton(provider, 32), omniauth_authorize_path(User, provider)


11

D
Dmitriy Zaporozhets 已提交
12 13
%fieldset
  %legend
14
    Private token
15
    %span.cred.pull-right
16
      keep it secret!
D
Dmitriy Zaporozhets 已提交
17
  .padded
18
    = form_for @user, url: reset_private_token_profile_path, method: :put do |f|
D
Dmitriy Zaporozhets 已提交
19 20 21 22 23 24 25 26
      .data
        %p.slead
          Private token used to access application resources without authentication.
          %br
          It can be used for atom feed or API
        %p.cgray
          - if current_user.private_token
            = text_field_tag "token", current_user.private_token, class: "xxlarge large_text"
D
Dmitriy Zaporozhets 已提交
27
            = f.submit 'Reset', confirm: "Are you sure?", class: "btn btn-primary btn-build-token"
D
Dmitriy Zaporozhets 已提交
28 29 30 31 32
          - else
            %span You don`t have one yet. Click generate to fix it.
            = f.submit 'Generate', class: "btn success btn-build-token"

%fieldset
33
  %legend Password
34
  = form_for @user, url: update_password_profile_path, method: :put do |f|
D
Dmitriy Zaporozhets 已提交
35 36 37
    .padded
      %p.slead After successful password update you will be redirected to login page where you should login with new password
      -if @user.errors.any?
D
Dmitriy Zaporozhets 已提交
38
        .alert.alert-error
D
Dmitriy Zaporozhets 已提交
39 40 41 42 43 44
          %ul
            - @user.errors.full_messages.each do |msg|
              %li= msg

      .clearfix
        = f.label :password
45
        .input= f.password_field :password, required: true
D
Dmitriy Zaporozhets 已提交
46 47
      .clearfix
        = f.label :password_confirmation
48
        .input
49
          = f.password_field :password_confirmation, required: true
50 51
      .clearfix
        .input
D
Dmitriy Zaporozhets 已提交
52
          = f.submit 'Save password', class: "btn btn-save"
D
Dmitriy Zaporozhets 已提交
53 54 55



56
%fieldset.update-username
57 58
  %legend
    Username
59
    %small.cred.pull-right
60
      Changing your username can have unintended side effects!
61
  = form_for @user, url: update_username_profile_path,  method: :put, remote: true do |f|
62 63 64
    .padded
      = f.label :username
      .input
65
        = f.text_field :username, required: true
66 67 68 69 70 71
         
        %span.loading-gif.hide= image_tag "ajax_loader.gif"
        %span.update-success.cgreen.hide
          %i.icon-ok
          Saved
        %span.update-failed.cred.hide
72
          %i.icon-remove
73
          Failed
74 75 76
        %ul.cred
          %li It will change web url for personal projects.
          %li It will change the git path to repositories for personal projects.
77
      .input
D
Dmitriy Zaporozhets 已提交
78
        = f.submit 'Save username', class: "btn btn-save"
D
Dmitriy Zaporozhets 已提交
79

M
Marin Jankovski 已提交
80 81 82 83 84 85 86
- if Gitlab.config.gitlab.signup_enabled
  %fieldset.update-username
    %legend
      Remove account
      %small.cred.pull-right
        Before removing the account you must remove all projects!
    = link_to 'Delete account', user_registration_path, confirm: "REMOVE #{current_user.name}? Are you sure?", method: :delete, class: "btn btn-remove delete-key btn-small pull-right"