<%=t "users.registrations.edit.title" %>
<% if not resource.errors.empty? %>
<%= devise_error_messages! %>
<% end %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, "data-for" => "avatar" }) do |f| %>
<%= hidden_field_tag "user[change_avatar]", "true" %>
<%=t "users.registrations.edit.avatar_title" %>
<%= f.label :avatar, t("users.registrations.edit.avatar_edit_label") %>
<%= f.file_field :avatar, class: "btn btn-default" %>
<%=t "general.cancel" %>
<% if @direct_upload %>
<%= f.submit t("users.registrations.edit.avatar_submit"), class: "btn btn-primary", onclick: 'startFileUpload(event, this);' %>
<% else %>
<%= f.submit t("users.registrations.edit.avatar_submit"), class: "btn btn-primary" %>
<% end %>
<% end %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name, format: :json), remote: true, html: { method: :put, "data-for" => "full_name" }) do |f| %>
<%=t "users.registrations.edit.name_title" %>
<%= f.label :full_name, t("users.registrations.edit.name_label") %>
<%= f.text_field :full_name, class: "form-control", "data-role" => "edit" %>
<% end %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name, format: :json), remote: true, html: { method: :put, "data-for" => "initials" }) do |f| %>
<%=t "users.registrations.edit.initials_title" %>
<%= f.label :initials, t("users.registrations.edit.initials_label") %>
<%= f.text_field :initials, class: "form-control", "data-role" => "edit" %>
<% end %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name, format: :json), remote: true, html: { method: :put, "data-for" => "email" }) do |f| %>
<%=t "users.registrations.edit.email_title" %>
<%= f.label :email, t("users.registrations.edit.new_email_label") %>
<%= f.email_field :email, class: "form-control", "data-role" => "edit" %>
<%= f.label :current_password, t("users.registrations.edit.current_password_label") %> <%=t "users.registrations.edit.password_explanation" %>
<%= f.password_field :current_password, autocomplete: "off", class: "form-control", "data-role" => "clear" %>
<% end %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name, format: :json), remote: true, html: { method: :put, "data-for" => "password" }) do |f| %>
<%= hidden_field_tag "user[change_password]", "true" %>
<%=t "users.registrations.edit.password_title" %>
<%= f.label :current_password, t("users.registrations.edit.current_password_label") %> <%=t "users.registrations.edit.password_explanation" %>
<%= f.password_field :current_password, autocomplete: "off", class: "form-control", "data-role" => "clear" %>
<%= f.label :password, t("users.registrations.edit.new_password_label") %>
<%= f.password_field :password, autocomplete: "off", class: "form-control", "data-role" => "clear" %>
<%= f.label :password_confirmation, t("users.registrations.edit.new_password_2_label") %>
<%= f.password_field :password_confirmation, autocomplete: "off", class: "form-control", "data-role" => "clear" %>
<% end %>
<%= javascript_include_tag("canvas-to-blob.min") %>
<%= javascript_include_tag("direct-upload") %>
<%= javascript_include_tag "users/registrations/edit" %>