<%# Copyright 2011-2018, The Trustees of Indiana University and Northwestern University. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --- END LICENSE_HEADER BLOCK --- %> <%= form_for(@user, url: main_app.persona_user_path(@user), method: "put", html: { class: 'form' } ) do |f| %>
<% if @user.errors.any? %>

<%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:

<% end %>
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: 'form-control' %>
<% if f.object.respond_to?(:username) %>
<%= f.label :username %>
<%= f.text_field :username, class: 'form-control' %>
<% end %>
<%= f.label :password %> (leave blank if you don't want to change it)
<%= f.password_field :password, autocomplete: "off", class: 'form-control' %> <% if @minimum_password_length %>
<%= @minimum_password_length %> characters minimum <% end %>
<%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' %>
<%= f.submit "Update", class: 'btn btn-primary' %> <%= link_to 'Cancel', main_app.persona_users_path, class: 'btn btn-default action-cancel' %>
<% end %>