= content_for :title do
  %h2
    = link_to 'Apps', applications_path
    %i.icon-angle-right
    = link_to @application.title, @application
    %i.icon-angle-right
    = @password.title

%p.cgray
  = @password.description

.panel.panel-default
  .panel-heading
    %h5 Your password:
  .panel-body
    = hidden_field_tag :encrypted_password, @password.decrypted_password
    .alert.alert-danger.errors.unvisible
    .password-decrypt
      = form_tag '#', class: 'decrypt-form' do
        .form-group
          = label_tag 'encrypt_key' do
            Encryption key (master password)
          = text_field_tag :encrypt_key, nil, class: 'form-control', required: true, autofocus: true
        = submit_tag 'Decrypt password', class: 'btn btn-primary'
    .password


%br
= link_to 'Edit', edit_application_password_path(@application, @password), class: 'btn btn-default'

:coffeescript
  new PasswordShow()

= content_for :title do
  %h2
    = link_to 'Apps', applications_path
    %i.icon-angle-right
    = link_to @application.title, @application
    %i.icon-angle-right
    = @password.title

%p.cgray
  = @password.description

.panel.panel-default
  .panel-heading
    %h5
      Your password:
      .pull-right
        = link_to edit_application_password_path(@application, @password) do
          %i.icon-edit
          Edit
  .panel-body
    = hidden_field_tag :encrypted_password, @password.decrypted_password
    .alert.alert-danger.errors.unvisible
    .password-decrypt
      = form_tag '#', class: 'decrypt-form' do
        .form-group
          = label_tag 'encrypt_key' do
            Encryption key (master password)
          = password_field_tag :encrypt_key, nil, class: 'form-control', required: true, autofocus: true
        = submit_tag 'Decrypt password', class: 'btn btn-primary'
    .password


%br

:coffeescript
  new PasswordShow()

Use password field when type encryption key
Use password field when type encryption key

Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
