replace coherence with guardian

This commit is contained in:
Thomas Citharel
2017-12-09 14:58:37 +01:00
parent 90ceb4f6fe
commit 8ac705d8c2
52 changed files with 208 additions and 1254 deletions

View File

@@ -1,17 +0,0 @@
<br \>
<h3><%= dgettext "coherence", "Resend Confirmation Instructions" %></h3>
<%= form_for @changeset, confirmation_path(@conn, :create), [as: :confirmation], fn f -> %>
<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>
<div class="form-group">
<%= submit dgettext("coherence", "Resend Email"), class: "btn btn-primary" %>
<%= link dgettext("coherence", "Cancel"), to: Coherence.Config.logged_out_url("/"), class: "btn" %>
</div>
<% end %>

View File

@@ -1,11 +0,0 @@
<div>
<p><%= dgettext "coherence", "Hello %{name}!", name: @name %><p>
<p>
<%= dgettext "coherence", "Your new account is almost ready. Click the link below to confirm you new account." %>
</p>
<p>
<a href="<%= @url %>"><%= dgettext "coherence", "Confirm my Account" %></a>
</p>
<p><%= dgettext "coherence", "Thank you!" %></p>
</div>

View File

@@ -1,11 +0,0 @@
<div>
<p><%= dgettext "coherence", "Hello %{name}!", name: @name %><p>
<p>
<%= dgettext "coherence", "You have been invited to create an Account. Use the link below to create an account." %>
</p>
<p>
<a href="<%= @url %>"><%= dgettext "coherence", "Create my Account" %></a>
</p>
<p><%= dgettext "coherence", "Thank you!" %></p>
</div>

View File

@@ -1,16 +0,0 @@
<div>
<p><%= dgettext "coherence", "Hello %{name}!", name: @name %><p>
<p>
<%= dgettext "coherence", "Someone has requested a link to change your password, and you can do this through the link below." %>
</p>
<p>
<a href="<%= @url %>"><%= dgettext "coherence", "Change my password" %></a>
</p>
<p>
<%= dgettext "coherence", "If you didn't request this, please ignore this email." %>
</p>
<p>
<%= dgettext "coherence", "Your password won't change until you access the link above and create a new one." %>
</p>
</div>

View File

@@ -1,11 +0,0 @@
<div>
<p><%= dgettext "coherence", "Hello %{name}!", name: @name %><p>
<p>
<%= dgettext "coherence", "You requested unlock instructions for your locked account. Please click the link below to unlock your account." %>
</p>
<p>
<a href="<%= @url %>"><%= dgettext "coherence", "Unlock my Account" %></a>
</p>
<p><%= dgettext "coherence", "Thank you!" %></p>
</div>

View File

@@ -1,49 +0,0 @@
<br \>
<%= form_for @changeset, invitation_path(@conn, :create_user), fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p><%= dgettext "coherence", "Oops, something went wrong! Please check the errors below." %></p>
</div>
<% end %>
<input type="hidden" name="token" value="<%= @token %>">
<div class="form-group">
<%= required_label f, dgettext("coherence", "Email"), class: "control-label" %>
<%= text_input f, :name, class: "form-control", required: "" %>
<%= error_tag f, :name %>
</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>
<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 dgettext("coherence", "Create"), class: "btn btn-primary" %>
<%= link dgettext("coherence", "Cancel"), to: Coherence.Config.logged_out_url("/"), class: "btn" %>
</div>
<% end %>

View File

@@ -1,26 +0,0 @@
<%= form_for @changeset, invitation_path(@conn, :create), [as: :invitation], fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p><%= dgettext "coherence", "Oops, something went wrong! Please check the errors below." %></p>
</div>
<% end %>
<div class="form-group">
<%= required_label f, dgettext("coherence", "Name"), class: "control-label" %>
<%= text_input f, :name, class: "form-control", required: "" %>
<%= error_tag f, :name %>
</div>
<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>
<div class="form-group">
<%= submit dgettext("coherence", "Send Invitation"), class: "btn btn-primary" %>
<%= link dgettext("coherence", "Cancel"), to: Coherence.Config.logged_out_url("/"), class: "btn" %>
<%= if invitation = @conn.assigns[:invitation] do %>
<%= link dgettext("coherence", "Resend Invitation!"), to: invitation_path(@conn, :resend, invitation.id), class: "btn" %>
<% end %>
</div>
<% end %>

View File

@@ -1,8 +0,0 @@
<html>
<head>
<title><%= @email.subject %></title>
</head>
<body>
<%= render @view_module, @view_template, assigns %>
</body>
</html>

View File

@@ -1,25 +0,0 @@
<br \>
<h3><%= dgettext "coherence", "Create a New Password" %></h3>
<%= form_for @changeset, password_path(@conn, :update, @changeset.data), [as: :password], fn f -> %>
<%= hidden_input f, :reset_password_token %>
<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 dgettext("coherence", "Update Password"), class: "btn btn-primary" %>
<%= link dgettext("coherence", "Cancel"), to: Coherence.Config.logged_out_url("/"), class: "btn" %>
</div>
<% end %>

View File

@@ -1,17 +0,0 @@
<br \>
<h3><%= dgettext "coherence", "Send reset password link" %></h3>
<%= form_for @changeset, password_path(@conn, :create), [as: :password], fn f -> %>
<div class="form-group">
<%= required_label f, :email, class: "control-label" %>
<%= text_input f, :email, class: "form-control", required: "" %>
<%= error_tag f, :email %>
</div>
<div class="form-group">
<%= submit dgettext("coherence", "Reset Password"), class: "btn btn-primary" %>
<%= link dgettext("coherence", "Cancel"), to: Coherence.Config.logged_out_url("/"), class: "btn" %>
</div>
<% end %>

View File

@@ -1,5 +0,0 @@
<h3><%= dgettext "coherence", "Edit Account" %></h3>
<%= render "form.html", changeset: @changeset,
label: dgettext("coherence", "Update"), required: [],
action: registration_path(@conn, :update) %>

View File

@@ -1,58 +0,0 @@
<%= 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 %>

View File

@@ -1,5 +0,0 @@
<h3><%= dgettext "coherence", "Register Account" %></h3>
<%= render "form.html", changeset: @changeset,
label: dgettext("coherence", "Register"), required: [required: ""],
action: registration_path(@conn, :create) %>

View File

@@ -1,25 +0,0 @@
<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?")] %>

View File

@@ -1,35 +0,0 @@
<br \>
<%= form_for @conn, session_path(@conn, :create), [as: :session], fn f -> %>
<% login_field = Coherence.Config.login_field %>
<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>
<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>
<%= if @remember do %>
<div class="form-group">
<input type="checkbox" name="remember" id="remember">
<label for="remember"><%= dgettext "coherence", "Remember Me?" %></label>
</div>
<br />
<% end %>
<div class="form-group">
<%= submit dgettext("coherence", "Sign In"), class: "btn btn-primary" %>
<%= link dgettext("coherence", "Cancel"), to: Coherence.Config.logged_out_url("/"), class: "btn" %>
</div>
<div class="form-group">
<%= coherence_links(@conn, :new_session) %>
</div>
<% end %>

View File

@@ -1,22 +0,0 @@
<br \>
<%= form_for @conn, unlock_path(@conn, :create), [as: :unlock], fn f -> %>
<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>
<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">
<%= submit dgettext("coherence", "Send Instructions"), class: "btn btn-primary" %>
<%= link dgettext("coherence", "Cancel"), to: Coherence.Config.logged_out_url("/"), class: "btn" %>
</div>
<% end %>