Welcome to mirror list, hosted at ThFree Co, Russian Federation.

account.html.haml « profiles « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 42c7ec051cbbdd05ad216027483c2efefe9ad1c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
%h3.page-title
  Account settings
%p.light
  You can change your password, username and private token here.
  - if current_user.ldap_user?
    Some options are unavailable for LDAP accounts
%hr


.row
  .span2
    %ul.nav.nav-pills.nav-stacked.nav-stacked-menu
      %li.active
        = link_to '#tab-token', 'data-toggle' => 'tab' do
          Private Token
      %li
        = link_to '#tab-password', 'data-toggle' => 'tab' do
          Password

      - if show_profile_social_tab?
        %li
          = link_to '#tab-social', 'data-toggle' => 'tab' do
            Social Accounts

      - if show_profile_username_tab?
        %li
          = link_to '#tab-username', 'data-toggle' => 'tab' do
            Change Username

      - if show_profile_remove_tab?
        %li
          = link_to '#tab-remove', 'data-toggle' => 'tab' do
            Remove Account
  .span10
    .tab-content
      .tab-pane.active#tab-token
        %fieldset.update-token
          %legend
            Private token
            %span.cred.pull-right
              keep it secret!
          %div
            = form_for @user, url: reset_private_token_profile_path, method: :put do |f|
              .data
                %p.slead
                  Your private token is used to access application resources without authentication.
                  %br
                  It can be used for atom feeds or the API.
                %p.cgray
                  - if current_user.private_token
                    = text_field_tag "token", current_user.private_token, class: "input-xxlarge large_text input-xpadding"
                    = f.submit 'Reset', confirm: "Are you sure?", class: "btn btn-primary btn-build-token"
                  - else
                    %span You don`t have one yet. Click generate to fix it.
                    = f.submit 'Generate', class: "btn success btn-build-token"

      .tab-pane#tab-password
        %fieldset.update-password
          %legend Password
          - if current_user.ldap_user?
            %h3.nothing_here_message Not available for LDAP user
          - else
            = form_for @user, url: update_password_profile_path, method: :put do |f|
              %div
                %p.slead
                  You must provide current password in order to change it.
                  %br
                  After a successful password update you will be redirected to login page where you should login with your new password
                -if @user.errors.any?
                  .alert.alert-error
                    %ul
                      - @user.errors.full_messages.each do |msg|
                        %li= msg
                .control-group
                  = f.label :current_password, class: 'cgreen'
                  .controls= f.password_field :current_password, required: true
                .control-group
                  = f.label :password, 'New password'
                  .controls= f.password_field :password, required: true
                .control-group
                  = f.label :password_confirmation
                  .controls
                    = f.password_field :password_confirmation, required: true
                .control-group
                  .controls
                    = f.submit 'Save password', class: "btn btn-save"

      - if show_profile_social_tab?
        .tab-pane#tab-social
          %fieldset
            %legend Social Accounts
            .oauth_select_holder
              %p.hint Tip: Click on icon to activate signin with one of the following services
              - enabled_social_providers.each do |provider|
                %span{class: oauth_active_class(provider) }
                  = link_to authbutton(provider, 32), omniauth_authorize_path(User, provider)

      - if show_profile_username_tab?
        .tab-pane#tab-username
          %fieldset.update-username
            %legend
              Username
              %small.cred.pull-right
                Changing your username can have unintended side effects!
            = form_for @user, url: update_username_profile_path,  method: :put, remote: true do |f|
              %div
              .control-group
                = f.label :username
                .controls
                  = f.text_field :username, required: true
                   
                  %span.loading-gif.hide= image_tag "ajax_loader.gif"
                  %span.update-success.cgreen.hide
                    %i.icon-ok
                    Saved
                  %span.update-failed.cred.hide
                    %i.icon-remove
                    Failed
                  %ul.cred
                    %li This will change the web URL for personal projects.
                    %li This will change the git path to repositories for personal projects.
                .controls
                  = f.submit 'Save username', class: "btn btn-save"

      - if show_profile_remove_tab?
        .tab-pane#tab-remove
          %fieldset.remove-account
            %legend
              Remove account
            %div
              %p Deleting an account has the following effects:
              %ul
                %li All user content like authored issues, snippets, comments will be removed
                - rp = current_user.personal_projects.count
                - unless rp.zero?
                  %li #{pluralize rp, 'personal project'} will be removed and cannot be restored
                - if current_user.solo_owned_groups.present?
                  %li
                    Next groups will be abandoned. You should transfer or remove them:
                    %strong #{current_user.solo_owned_groups.map(&:name).join(', ')}
              = link_to 'Delete account', user_registration_path, confirm: "REMOVE #{current_user.name}? Are you sure?", method: :delete, class: "btn btn-remove"