Skip to content

Commit 372c7f9

Browse files
Merge pull request #4 from nikosev/feature-sync_themeegi
Add new features from other theme flavors
2 parents ca4b941 + 6e67f22 commit 372c7f9

26 files changed

Lines changed: 815 additions & 128 deletions

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,21 @@ This version is compatible with [SimpleSAMLphp v1.18](https://simplesamlphp.org/
1313

1414
- Add `login_with` key in discopower definitions.
1515
- Add style rules and logos for IdP umbrellaid.
16+
- Add exception template for attrauthcomanage module
17+
- Add template for Email Confirmation
18+
- Add configurable theme wrapper for simple html views
19+
- Add comanage loader
20+
- Add support to configure loader
21+
- Add view.php modal
22+
- Add attrauthcomanage noty template
1623

1724
### Fixed
1825

1926
- Load JavaScript scripts with the new way
2027
- Fix undefined index error for `idps_in_searchable_list_index`
2128
- Load jQuery CSS script
29+
- Fix searchable list and idp buttons display order
30+
- Fix "Not translated" error in HTML title
2231

2332
### Changed
2433

@@ -28,6 +37,8 @@ This version is compatible with [SimpleSAMLphp v1.18](https://simplesamlphp.org/
2837
guidelines
2938
- Apply modern array syntax to comply with [SimpleSAMLphp v1.17](https://simplesamlphp.org/docs/stable/simplesamlphp-upgrade-notes-1.17)
3039
- Comply to [markdownlint rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md)
40+
- Move default loader spinner into a shared element
41+
- Move language list into a shared element
3142

3243
<!-- markdownlint-disable line-length -->
3344

config-example/module_themevanilla.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878
'purpose' => 'Preserve user session ID to retrieve session information',
7979
],
8080
],
81+
'views' => [
82+
// 'aup' => 'https://example.com/aup.html', // Terms and Conditions URL. The key MUST BE `aup`
83+
// 'privacy' => 'https://example.com/privacy.html', // Privacy URL. The key MUST BE `privacy`
84+
],
85+
'loader' => 'loader', // Loading Spinner to use. Two options are available. `loader` or `cmg_loader`
8186
'enable_cookies_banner' => false,
8287
'ribbon_text' => '',
8388
];
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"exception_SUSPENDED_USER": {
3+
"en": "Your account has been suspended. Please contact example@email.org for further assistance."
4+
},
5+
"exception_USERIDATTRIBUTE_NOTAVAILABLE": {
6+
"en": "attrauthcomanage configuration error: 'userIdAttribute' not available"
7+
},
8+
"exception_CONFIG_VALIDATION_RULES_MISSING": {
9+
"en": "[attrauthcomanage] Config or validation Rules missing."
10+
},
11+
"exception_ATTRIBUTE_NOT_SPECIFIED": {
12+
"en": "attrauthcomanage configuration error: '%REQATTR%' not specified"
13+
},
14+
"exception_ATTRIBUTE_WRONG_FORMAT": {
15+
"en": "attrauthcomanage configuration error: '%REQATTR%' wrong format(array required)"
16+
},
17+
"exception_ATTRIBUTE_KEY_CONFIGURATION_ERROR": {
18+
"en": "attrauthcomanage configuration error: '%REQATTR%' key configuration error. Required keys missing: %NONKEYS%"
19+
},
20+
"exception_ATTRIBUTE_INVALID_VALUE": {
21+
"en": "attrauthcomanage configuration error: '%REQATTR%' invalid value"
22+
},
23+
"exception_ATTRIBUTE_NOT_BOOLEAN": {
24+
"en": "attrauthcomanage configuration error: %OPTATTR% not a boolean"
25+
},
26+
"exception_header": {
27+
"en": "Error in attribute aggregation"
28+
},
29+
"exception_title": {
30+
"en": "Oops! Something went wrong."
31+
},
32+
"exception_description": {
33+
"en": "An unexpected error occurred while retrieving attributes from an external attribute authority. The exception was:"
34+
}
35+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"yes": {
3+
"en": "Resend Verification Email"
4+
},
5+
"no": {
6+
"en": "Abort Login"
7+
},
8+
"title": {
9+
"en": "Please verify your email address by clicking the link in the email we sent you"
10+
},
11+
"msg_title": {
12+
"en": "<b>This is your current status:</b>"
13+
},
14+
"default_status": {
15+
"en": "Action Required"
16+
},
17+
"account_pending_confirmation": {
18+
"en": "Account in Pending Email Confirmation Status"
19+
},
20+
"invitation_restored": {
21+
"en": "Invitation has been restored."
22+
},
23+
"petition_info": {
24+
"en": "The identifier <cite><b>%ORGIDENT%</b></cite> is in Email Pending Confirmation Status.&nbsp;Please check your Mail <cite><b>%MAIL%</b></cite> Inbox or Spam for further information.&nbsp;"
25+
},
26+
"petition_user_notify": {
27+
"en": "<p class=\"petition-user-notify\">We have sent an email with a confirmation link to your email address <cite><b>%MAIL%</b></cite>. In order to complete the sign-up process, please click the confirmation link. If you do not find the email in your Inbox, please check your Spam or Junk folder for an email from \"RCIAM Notifications\". If you do find the email in these folders, mark the email as \"safe\" or \"not spam\" to ensure that you receive any future notifications about your RCIAM ID.</p><p>You can also click the <strong>\"Resend Verification Email\"</strong> button below to have another email sent to you."
28+
},
29+
"petition_token_expired": {
30+
"en": "<div class=\"invite-expire\">Email confirmation token EXPIRED <b>&nbsp;%DATE%</b>&nbsp;ago</div>"
31+
},
32+
"petition_token_expires": {
33+
"en": "<div class=\"invite-expire\">Email confirmation token EXPIRES in <b>&nbsp;%DATE%</b></div>"
34+
},
35+
"petition_invalidate_msg": {
36+
"en": "<p><i class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i>This action will invalidate any previous confirmation links.</p>"
37+
}
38+
}

dictionaries/default.definition.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,17 @@
1010
},
1111
"logo_link_url": {
1212
"en": "https://www.example.com"
13+
},
14+
"message_title": {
15+
"en": "We Sent You An Email"
16+
},
17+
"message_bd": {
18+
"en": "<p>Just <b>click the link in that email</b> to complete your signup.</p><p>If you do not find the email in your Inbox, please check your <b>Spam</b> or <b>Junk</b> folder for an email from <b>RCIAM Notifications</b>&nbsp<a href=\"mailto:example@email.org\"><i class=\"glyphicon-envelope email-address\">&nbspnoreply@faai.grnet.gr</i></a>. If you do find the email in these folders, mark the email as \"safe\" or \"not spam\" to ensure that you receive any future notifications about your RCIAM ID.</p>"
19+
},
20+
"message_sub": {
21+
"en": "<span class=\"subtitle-msg\">You will have <b>72 hours</b> to verify your account</span>"
22+
},
23+
"no_content": {
24+
"en": "<h2>Unable to retrieve content.</h2>"
1325
}
1426
}

templates/confirmemail.tpl.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
$this->includeAtTemplateBase('includes/header.php');
3+
?>
4+
<link rel="stylesheet" type="text/css" href="resources/css/confirmemail.css">
5+
6+
<div class="body-container" id="content">
7+
<div class="message-container">
8+
<span class="head-title">
9+
<img class="email-gif" src="resources/icons/email.gif">
10+
<h2><span class="title-msg"><?= $this->t('{themevanilla:default:message_title}') ?></span></h2>
11+
</span>
12+
<div class="message"><?= $this->t('{themevanilla:default:message_bd}') ?></div>
13+
<div class="subtitle"><?= $this->t('{themevanilla:default:message_sub}') ?></div>
14+
</div>
15+
</div>
16+
17+
<?php
18+
$this->includeAtTemplateBase('includes/footer.php'); ?>

templates/views.tpl.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
// Get Configuration
4+
$themeConfig = SimpleSAML\Configuration::getConfig('module_themevanilla.php');
5+
$views = $themeConfig->getValue('views');
6+
7+
// Content
8+
$body = $this->t('{themevanilla:default:no_content}');
9+
10+
// Get request parameter and load Content
11+
if (!empty($_REQUEST['id']) && !empty($views)) {
12+
$ld_view = $views[$_REQUEST['id']];
13+
$contextOptions = array(
14+
'ssl' => array(
15+
'verify_peer' => false,
16+
),
17+
'http' => array(
18+
'timeout' => 2, // 2 Seconds
19+
),
20+
);
21+
$sslContext = stream_context_create($contextOptions);
22+
$loaded_content = file_get_contents($ld_view, false, $sslContext);
23+
if (!empty($loaded_content)) {
24+
$body = $loaded_content;
25+
}
26+
}
27+
28+
// Load Head and Dependencies
29+
$this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true);
30+
// Load Header
31+
$this->includeAtTemplateBase('includes/header.php');
32+
// Load Body
33+
echo $body;
34+
// Load Footer
35+
$this->includeAtTemplateBase('includes/footer.php');
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
$this->data['header'] = $this->t('{themevanilla:attrauthcomanage:exception_header}');
3+
4+
$this->includeAtTemplateBase('includes/header.php');
5+
?>
6+
<h1><?= $this->t('{themevanilla:attrauthcomanage:exception_title}') ?></h1>
7+
8+
<?= $this->t('{themevanilla:attrauthcomanage:exception_description}') ?>
9+
<pre>
10+
<?php
11+
$tag = preg_replace('/attrauthcomanage:/', 'themevanilla:', $this->data['e'], 1);
12+
echo (
13+
!empty($this->getTag('{' . $tag . '}'))
14+
? $this->t('{' . $tag . '}', $this->data['parameters'])
15+
: $this->data['e']
16+
);
17+
?>
18+
</pre>
19+
20+
<?php
21+
$this->includeAtTemplateBase('includes/footer.php');

0 commit comments

Comments
 (0)