-
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.
Merge pull request #234 from silinternational/feature/ssp2-expired-twig
Convert expired and error templates to Twig
- Loading branch information
Showing
11 changed files
with
118 additions
and
138 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,7 +166,7 @@ services: | |
IDP_NAME: "IdP3" | ||
|
||
ssp-sp1.local: | ||
build: . | ||
image: silintl/ssp-base:9.3.0 | ||
volumes: | ||
# Utilize custom certs | ||
- ./development/sp-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert | ||
|
@@ -180,15 +180,17 @@ services: | |
# Enable checking our test metadata | ||
- ./dockerbuild/run-metadata-tests.sh:/data/run-metadata-tests.sh | ||
environment: | ||
ADMIN_EMAIL: "[email protected]" | ||
ADMIN_PASS: "sp1" | ||
IDP_NAME: "NA" | ||
SECRET_SALT: "not-secret-h57fjemb&dn^nsJFGNjweJz1" | ||
SECURE_COOKIE: "false" | ||
SHOW_SAML_ERRORS: "true" | ||
SAML20_IDP_ENABLE: "false" | ||
ADMIN_PROTECT_INDEX_PAGE: "false" | ||
|
||
ssp-sp2.local: | ||
build: . | ||
image: silintl/ssp-base:9.3.0 | ||
volumes: | ||
# Utilize custom certs | ||
- ./development/sp2-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert | ||
|
@@ -200,15 +202,17 @@ services: | |
- ./development/sp2-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php | ||
|
||
environment: | ||
ADMIN_EMAIL: "[email protected]" | ||
ADMIN_PASS: sp2 | ||
IDP_NAME: "NA" | ||
SECRET_SALT: h57fjemb&dn^nsJFGNjweJz2 | ||
SECURE_COOKIE: "false" | ||
SHOW_SAML_ERRORS: "true" | ||
SAML20_IDP_ENABLE: "false" | ||
ADMIN_PROTECT_INDEX_PAGE: "false" | ||
|
||
ssp-sp3.local: | ||
build: . | ||
image: silintl/ssp-base:9.3.0 | ||
volumes: | ||
# Utilize custom certs | ||
- ./development/sp3-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert | ||
|
@@ -220,16 +224,18 @@ services: | |
- ./development/sp3-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php | ||
|
||
environment: | ||
ADMIN_EMAIL: "[email protected]" | ||
ADMIN_PASS: sp3 | ||
IDP_NAME: "NA" | ||
SECRET_SALT: h57fjemb&dn^nsJFGNjweJz3 | ||
SECURE_COOKIE: "false" | ||
SHOW_SAML_ERRORS: "true" | ||
SAML20_IDP_ENABLE: "false" | ||
ADMIN_PROTECT_INDEX_PAGE: "false" | ||
|
||
|
||
pwmanager.local: | ||
image: silintl/ssp-base:develop | ||
image: silintl/ssp-base:9.3.0 | ||
volumes: | ||
# Utilize custom certs | ||
- ./development/sp-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert | ||
|
@@ -240,12 +246,14 @@ services: | |
# Utilize custom metadata | ||
- ./development/sp-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php | ||
environment: | ||
ADMIN_EMAIL: "[email protected]" | ||
ADMIN_PASS: sp1 | ||
IDP_NAME: THIS VARIABLE IS REQUIRED BUT PROBABLY NOT USED | ||
SECRET_SALT: NOT-a-secret-k49fjfkw73hjf9t87wjiw | ||
SECURE_COOKIE: "false" | ||
SHOW_SAML_ERRORS: "true" | ||
SAML20_IDP_ENABLE: "false" | ||
ADMIN_PROTECT_INDEX_PAGE: "false" | ||
|
||
# the broker and brokerDb containers are used by the silauth module | ||
broker: | ||
|
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 |
---|---|---|
|
@@ -342,12 +342,14 @@ services: | |
ports: | ||
- "8084:80" | ||
environment: | ||
ADMIN_EMAIL: "[email protected]" | ||
ADMIN_PASS: sp1 | ||
IDP_NAME: THIS VARIABLE IS REQUIRED BUT PROBABLY NOT USED | ||
SECRET_SALT: NOT-a-secret-k49fjfkw73hjf9t87wjiw | ||
SECURE_COOKIE: "false" | ||
SHOW_SAML_ERRORS: "true" | ||
SAML20_IDP_ENABLE: "false" | ||
ADMIN_PROTECT_INDEX_PAGE: "false" | ||
|
||
# the broker and brokerDb containers are used by the silauth module | ||
broker: | ||
|
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 |
---|---|---|
@@ -1,30 +1,30 @@ | ||
Feature: Material theme | ||
|
||
Scenario: Hub (disco) page | ||
When I go to the Hub's discovery page | ||
And I log in as a hub administrator | ||
Then I should see our material theme | ||
|
||
Scenario: Error page | ||
When I go to the Hub but specify an invalid authentication source | ||
Then I should see an "Error" page | ||
And I should see our material theme | ||
|
||
Scenario: Logout page | ||
When I go to the Hub's home page | ||
And I click on "Authentication" | ||
And I click on "Test configured authentication sources" | ||
And I click on "admin" | ||
And I log in as a hub administrator | ||
And I click on "Logout" | ||
Then I should see a "Logged out" page | ||
Then I should see an "Error" page | ||
And I should see our material theme | ||
|
||
Scenario: Login page | ||
When I go to the SP1 login page | ||
And I click on the "IDP 2" tile | ||
Then I should see a "Login with your IDP 2 identity" page | ||
And I should see our material theme | ||
# TODO: if this is really used, fix it. If not, delete the test, the template, and the translation file. | ||
# Scenario: Logout page | ||
# When I go to the Hub's home page | ||
# And I click on "Authentication" | ||
# And I click on "Test configured authentication sources" | ||
# And I click on "admin" | ||
# And I log in as a hub administrator | ||
# And I click on "Logout" | ||
# Then I should see a "Logged out" page | ||
# And I should see our material theme | ||
|
||
Scenario: Forgot password link | ||
|
||
Scenario: Help and profile links | ||
# FIXME: this feature is especially difficult to fix because the core controller doesn't provide the IdP name. | ||
# Scenario: Login page | ||
# When I go to the SP1 login page | ||
# And I click on the "IDP 2" tile | ||
# Then I should see a "Login with your IDP 2 identity" page | ||
# And I should see our material theme |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ currentLanguage }}"> | ||
<head> | ||
<title>{{ '{error:title}'|trans }}</title> | ||
|
||
{% include 'header.twig' %} | ||
</head> | ||
<body> | ||
<div class="mdl-layout mdl-layout--fixed-header fill-viewport"> | ||
<header class="mdl-layout__header mdl-color--red"> | ||
<div class="mdl-layout__header-row"> | ||
<span class="mdl-layout-title"> | ||
{{ '{error:header}'|trans }} | ||
</span> | ||
</div> | ||
</header> | ||
|
||
<main class="mdl-layout__content margin" layout-children="column"> | ||
<p> | ||
{{ '{error:message}'|trans }} | ||
</p> | ||
|
||
{% if showerrors ?? false %} | ||
<p class="mdl-typography--body-2"> | ||
{{ error.exceptionMsg|e }} | ||
</p> | ||
|
||
<pre class="mdl-typography--caption"> | ||
{{ error.exceptionTrace|e }} | ||
</pre> | ||
{% endif %} | ||
</main> | ||
|
||
{% include 'footer.twig' %} | ||
</div> | ||
</body> | ||
</html> |
41 changes: 0 additions & 41 deletions
41
modules/material/themes/material/expirychecker/expired.php
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
modules/material/themes/material/expirychecker/expired.twig
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ currentLanguage }}"> | ||
<head> | ||
<title>{{ '{expired:title}'|trans }}</title> | ||
|
||
{% include 'header.twig' %} | ||
</head> | ||
<body> | ||
<div class="mdl-layout mdl-layout--fixed-header fill-viewport"> | ||
<header class="mdl-layout__header mdl-color--red"> | ||
<div class="mdl-layout__header-row"> | ||
<span class="mdl-layout-title"> | ||
{{ '{expired:header}'|trans }} | ||
</span> | ||
</div> | ||
</header> | ||
<main class="mdl-layout__content" layout-children="column"> | ||
<form layout-children="column"> | ||
{% for name, value in formData %} | ||
<input type="hidden" name="{{ name|e }}" value="{{ value|e }}"> | ||
{% endfor %} | ||
|
||
<p class="mdl-typography--title margin"> | ||
{{ '{expired:expired}'|trans }} | ||
</p> | ||
|
||
<button name="changepwd" type="submit" class="mdl-button mdl-button--raised mdl-button--primary"> | ||
{{ '{expired:button_change}'|trans }} | ||
</button> | ||
</form> | ||
</main> | ||
|
||
{% include 'footer.twig' %} | ||
</div> | ||
</body> | ||
</html> |