<%= form_for(@user, url: { action: 'update_password', id: @user }, html: { class: "form-horizontal" } ) do |f| %>
<% unless current_user.admin? && @user.id != current_user.id%>
<%= f.label :current_password, 'Současné heslo', :class => "col-sm-2 control-label" %>
<%= f.password_field :current_password, :class => "form-control" %>
<% end %>
<%= f.label :password, 'Heslo', :class => "col-sm-2 control-label" %>
<%= f.password_field :password, :class => "form-control" %>
<%= f.label :password_confirmation, 'Potvrzení hesla', :class => "col-sm-2 control-label" %>
<%= f.password_field :password_confirmation, :class => "form-control" %>
<%= f.submit 'Změnit heslo', class: 'btn btn-primary' %>
<% end %>