password.html.haml 1.37 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
.ui-box.width-100p.append-bottom-20
  %h3 Password
  = form_for @user, :url => profile_password_path, :method => :put do |f|
    .data
      %p After successfull password update you will be redirected to login page where you should login with new password
      -if @user.errors.any?
        #error_explanation
          %ul
            - @user.errors.full_messages.each do |msg|
              %li= msg
gitlabhq's avatar
gitlabhq committed
11

12 13 14 15 16 17 18 19 20
      .form-row
        = f.label :password
        %br
        = f.password_field :password
      .form-row
        = f.label :password_confirmation
        %br
        = f.password_field :password_confirmation
    .buttons
21
      = f.submit 'Save', :class => "btn"
22
.clear
gitlabhq's avatar
gitlabhq committed
23

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
.ui-box.width-100p
  %h3 
    Private token
    %em.cred.right
      keep it in secret!
  = form_for @user, :url => profile_reset_private_token_path, :method => :put do |f|
    .data
      %p Private token used to access application resources without authentication.
      %p For example its required to access commits feed.
      %hr
      %p.cgray
        - if current_user.private_token
          = text_field_tag "token", current_user.private_token
        - else
          You don`t have one yet. Click generate to fix it.
    .buttons
      - if current_user.private_token
        = f.submit 'Reset', :confirm => "Are you sure?", :class => "grey-button"
      - else
43
        = f.submit 'Generate', :class => "btn"
Valery Sizov's avatar
Valery Sizov committed
44