@@ -0,0 +1,5 @@
|
||||
<h3><%= dgettext "coherence", "Edit Account" %></h3>
|
||||
|
||||
<%= render "form.html", changeset: @changeset,
|
||||
label: dgettext("coherence", "Update"), required: [],
|
||||
action: registration_path(@conn, :update) %>
|
||||
@@ -0,0 +1,58 @@
|
||||
<%= form_for @changeset, @action, [as: :registration], fn f -> %>
|
||||
|
||||
<%= if @changeset.action do %>
|
||||
<div class="alert alert-danger">
|
||||
<p><%= dgettext "coherence", "Oops, something went wrong! Please check the errors below." %></p>
|
||||
<ul>
|
||||
<%= for error <- @changeset.errors do %>
|
||||
<li><%= error %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<%= required_label f, dgettext("coherence", "Name"), class: "control-label" %>
|
||||
<%= text_input f, :username, class: "form-control", required: "" %>
|
||||
<%= error_tag f, :username %>
|
||||
</div>
|
||||
|
||||
<%= unless (login_field = Coherence.Config.login_field) == :email do %>
|
||||
<div class="form-group">
|
||||
<%= required_label f, login_field, class: "control-label" %>
|
||||
<%= text_input f, login_field, class: "form-control", required: "" %>
|
||||
<%= error_tag f, login_field %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<%= required_label f, dgettext("coherence", "Email"), class: "control-label" %>
|
||||
<%= text_input f, :email, class: "form-control", required: "" %>
|
||||
<%= error_tag f, :email %>
|
||||
</div>
|
||||
|
||||
<%= if Coherence.Config.require_current_password and not is_nil(@changeset.data.id) do %>
|
||||
<div class="form-group">
|
||||
<%= required_label f, :current_password, class: "control-label" %>
|
||||
<%= password_input f, :current_password, [class: "form-control"] ++ @required %>
|
||||
<%= error_tag f, :current_password %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<%= required_label f, dgettext("coherence", "Password"), class: "control-label" %>
|
||||
<%= password_input f, :password, [class: "form-control"] ++ @required %>
|
||||
<%= error_tag f, :password %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= required_label f, dgettext("coherence", "Password Confirmation"), class: "control-label" %>
|
||||
<%= password_input f, :password_confirmation, [class: "form-control"] ++ @required %>
|
||||
<%= error_tag f, :password_confirmation %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= submit @label, class: "btn btn-primary" %>
|
||||
<%= link dgettext("coherence", "Cancel"), to: Coherence.Config.logged_out_url("/"), class: "btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,5 @@
|
||||
<h3><%= dgettext "coherence", "Register Account" %></h3>
|
||||
|
||||
<%= render "form.html", changeset: @changeset,
|
||||
label: dgettext("coherence", "Register"), required: [required: ""],
|
||||
action: registration_path(@conn, :create) %>
|
||||
@@ -0,0 +1,25 @@
|
||||
<h2><%= dgettext "coherence", "Show account" %></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<strong><%= dgettext "coherence", "Name:" %></strong>
|
||||
<%= @user.username %>
|
||||
</li>
|
||||
<%= unless (login_field = Coherence.Config.login_field) == :email do %>
|
||||
<li>
|
||||
<strong><%= humanize login_field %></strong>
|
||||
<%= Map.get(@user, login_field) %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li>
|
||||
<strong><%= dgettext "coherence", "Email:" %></strong>
|
||||
<%= @user.email %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<%= link dgettext("coherence", "Edit"), to: registration_path(@conn, :edit) %> |
|
||||
<%= link dgettext("coherence", "Delete"),
|
||||
to: registration_path(@conn, :delete),
|
||||
method: :delete,
|
||||
data: [confirm: dgettext("coherence", "Are you sure?")] %>
|
||||
Reference in New Issue
Block a user