-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As a Support User, I should be able to invite new Users to a School O…
…rganisation
- Loading branch information
Showing
13 changed files
with
204 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Claims::UserDecorator < Draper::Decorator | ||
delegate_all | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class NotifyMailer < ApplicationMailer | ||
# NotifyMailer.send_school_invite_email.deliver_now | ||
def send_school_invite_email(user, school, sign_in_url) | ||
body = "Dear #{user.full_name} \n\n You have been invited to join the claims service for #{school.name}.\n\n Sign in here #{sign_in_url}" | ||
|
||
mailer_options = { to: user.email, subject: "You have been invited to #{school.name}", body: } | ||
|
||
notify_email(mailer_options) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<%= content_for(:before_content) do %> | ||
<%= govuk_back_link(href: new_claims_support_school_user_path(@school)) %> | ||
<% end %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_with(model: @user, url: claims_support_school_users_path, method: :post) do |f| %> | ||
<%= f.hidden_field :first_name, value: @user.first_name %> | ||
<%= f.hidden_field :last_name, value: @user.last_name %> | ||
<%= f.hidden_field :email, value: @user.email %> | ||
|
||
<label class="govuk-label govuk-label--l"> | ||
<span class="govuk-caption-l"><%= t(".caption") %></span> | ||
<%= t(".title") %> | ||
</label> | ||
|
||
<dl class="govuk-summary-list"> | ||
<div class="govuk-summary-list__row"> | ||
<dt class="govuk-summary-list__key"><%= t(".first_name") %></dt> | ||
<dd class="govuk-summary-list__value"> | ||
<p class="govuk-body"><%= @user.first_name %></p> | ||
</dd> | ||
<dd class="govuk-summary-list__actions"> | ||
<ul class="govuk-summary-list__actions-list"> | ||
<li class="govuk-summary-list__actions-list-item"><a class="govuk-link" href="#">Change<span class="govuk-visually-hidden"></span></a></li> | ||
</ul> | ||
</dd> | ||
</div> | ||
<div class="govuk-summary-list__row"> | ||
<dt class="govuk-summary-list__key"><%= t(".last_name") %></dt> | ||
<dd class="govuk-summary-list__value"> | ||
<p class="govuk-body"><%= @user.last_name %></p> | ||
</dd> | ||
<dd class="govuk-summary-list__actions"> | ||
<ul class="govuk-summary-list__actions-list"> | ||
<li class="govuk-summary-list__actions-list-item"><a class="govuk-link" href="#">Change<span class="govuk-visually-hidden"></span></a></li> | ||
</ul> | ||
</dd> | ||
</div> | ||
<div class="govuk-summary-list__row"> | ||
<dt class="govuk-summary-list__key"><%= t(".email") %></dt> | ||
<dd class="govuk-summary-list__value"> | ||
<p class="govuk-body"><%= @user.email %></p> | ||
</dd> | ||
<dd class="govuk-summary-list__actions"> | ||
<ul class="govuk-summary-list__actions-list"> | ||
<li class="govuk-summary-list__actions-list-item"><a class="govuk-link" href="#">Change<span class="govuk-visually-hidden"></span></a></li> | ||
</ul> | ||
</dd> | ||
</div> | ||
</dl> | ||
|
||
<div class="govuk-warning-text"> | ||
<span class="govuk-warning-text__icon" aria-hidden="true">!</span> | ||
<strong class="govuk-warning-text__text"><%= t(".warning", school_name: @school.name) %></strong> | ||
</div> | ||
|
||
<%= f.govuk_submit t(".add_user") %> | ||
|
||
<p class="govuk-body"> | ||
<%= govuk_link_to(t(".cancel"), claims_support_school_users_path(@school)) %> | ||
</p> | ||
<% end %> | ||
<div> | ||
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<%= content_for(:before_content) do %> | ||
<%= govuk_back_link(href: claims_support_school_users_path(@school)) %> | ||
<% end %> | ||
|
||
<%= form_with(model: @user, url: check_claims_support_school_users_path, method: "get") do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<span class="govuk-caption-l"><%= t(".caption") %></span> | ||
<h2 class="govuk-heading-l"><%= t(".title") %></h2> | ||
|
||
<div class="govuk-form-group"> | ||
<%= f.govuk_text_field :first_name, | ||
class: "govuk-input--width-20", | ||
label: { text: t(".attributes.users.first_name"), size: "s" } %> | ||
</div> | ||
|
||
<div class="govuk-form-group"> | ||
<%= f.govuk_text_field :last_name, | ||
class: "govuk-input--width-20", | ||
label: { text: t(".attributes.users.last_name"), size: "s" } %> | ||
</div> | ||
|
||
<div class="govuk-form-group"> | ||
<%= f.govuk_text_field :email, label: { text: t(".attributes.users.email"), size: "s" } %> | ||
</div> | ||
|
||
<%= f.govuk_submit t("continue") %> | ||
|
||
<p class="govuk-body"> | ||
<%= govuk_link_to(t("cancel"), claims_support_school_users_path(@school)) %> | ||
</p> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,22 @@ en: | |
taken: This provider has already been added. Try another provider | ||
blank: Enter a provider name, UKPRN, URN or postcode | ||
school: | ||
attributes: | ||
urn: | ||
attributes: | ||
urn: | ||
taken: This school has already been added. Try another school | ||
blank: Enter a school name, URN or postcode | ||
gias_school: | ||
required: "" | ||
user: | ||
attributes: | ||
first_name: | ||
blank: Enter a first name | ||
last_name: | ||
blank: Enter a last name | ||
email: | ||
blank: Enter an email address | ||
taken: This email address is already in use. Try another email address | ||
invalid: Enter an email address in the correct format, like [email protected] | ||
add_organisation: Add organisation | ||
organisations: Organisations | ||
school: School | ||
|
@@ -83,11 +93,30 @@ en: | |
support: | ||
users: | ||
index: | ||
invite_user: Invite User | ||
heading: Users | ||
attributes: | ||
users: | ||
name: Name | ||
email: Email | ||
new: | ||
attributes: | ||
users: | ||
first_name: First name | ||
last_name: Last name | ||
email: Email | ||
title: Invite a new user | ||
caption: Add user | ||
description: Personal details | ||
check: | ||
title: Check your answers | ||
caption: Add user | ||
add_user: Add user | ||
cancel: Cancel | ||
first_name: First name | ||
last_name: Last name | ||
email: Email | ||
warning: "The user will be sent an email to tell them you’ve added them to %{school_name}." | ||
navigation_bar: | ||
organisation_details: Organisation details | ||
users: Users | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters