diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..1f77fee --- /dev/null +++ b/composer.json @@ -0,0 +1,20 @@ +{ + "name": "grent/simplesamlphp-module-themeopenaire", + "description": "A theme for SimpleSAMLphp based on Bootstrap", + "type": "simplesamlphp-module", + "keywords": ["simplesamlphp", "module", "theme", "bootstrap"], + "license": "Apache License 2.0", + "authors": [ + { + "name": "Athina Bekakou", + "email": "athinabek@grnet.gr" + }, + { + "name": "Nicolas Liampotis", + "email": "nliam@grnet.gr" + } + ], + "require": { + "simplesamlphp/composer-module-installer": "~1.0" + } +} diff --git a/default-enable b/default-enable new file mode 100644 index 0000000..e69de29 diff --git a/dictionaries/consent.definition.json b/dictionaries/consent.definition.json new file mode 100644 index 0000000..1b7f30c --- /dev/null +++ b/dictionaries/consent.definition.json @@ -0,0 +1,29 @@ +{ + "mandatory_field_error": { + "en": "Mandatory field!" + }, + "mail_field_error": { + "en": "Error in email" + }, + "terms_field_error": { + "en": "You must agree to continue" + }, + "affiliation_input_label": { + "en": "Organisation name" + }, + "header": { + "en": "We will be using the information below" + }, + "subheader": { + "en": "Please fill all missing information" + }, + "multiple_mails_tip": { + "en": "Choose your primary email address" + }, + "accept_terms_tip": { + "en": "Before continuing, you must agree to these terms. Please read them carefully" + }, + "terms_link_tip": { + "en": "here" + } +} diff --git a/dictionaries/discopower.definition.json b/dictionaries/discopower.definition.json new file mode 100644 index 0000000..3111b4a --- /dev/null +++ b/dictionaries/discopower.definition.json @@ -0,0 +1,12 @@ +{ + "header": { + "en": "Single Sign On" + }, + "subheader": { + "en": "Use the same credentials for all our services" + }, + "sign_up_url": { + "en": "https://beta.services.openaire.eu/uoa-user-management/register.jsp" + } +} + diff --git a/dictionaries/discopower_tabs.definition.json b/dictionaries/discopower_tabs.definition.json new file mode 100644 index 0000000..54f5c0e --- /dev/null +++ b/dictionaries/discopower_tabs.definition.json @@ -0,0 +1,47 @@ +{ + "norway": { + "en": "Norway" + }, + "kalmar": { + "en": "Kalmar" + }, + "finland": { + "en": "Finland" + }, + "sweden": { + "en": "Sweden" + }, + "iceland": { + "en": "Iceland" + }, + "denmark": { + "en": "Denmark" + }, + "switzerland": { + "en": "Switzerland" + }, + "edugain": { + "en": "Use your eduGAIN account" + }, + "misc": { + "en": "Miscellaneous" + }, + "incommon": { + "en": "InCommon" + }, + "ukacessfederation": { + "en": "UK Access Federation" + }, + "all": { + "en": "All" + }, + "social": { + "en": "Social Networks" + }, + "idps_with_logos": { + "en": "Use your account in social and other networks" + }, + "local": { + "en": "Use your OpenAIRE account" + } +} diff --git a/dictionaries/userid_error.definition.json b/dictionaries/userid_error.definition.json new file mode 100644 index 0000000..05f4832 --- /dev/null +++ b/dictionaries/userid_error.definition.json @@ -0,0 +1,20 @@ +{ + "friendly_title": { + "en": "Sorry, we were not able to log you in" + }, + "friendly_description": { + "en": "What is the problem? %IDP% does not return a persistent identifier to help us uniquely identify you." + }, + "resolution_description": { + "en": "What can you do? At the moment, the only way to log in is to use/create an OpenAIRE or social account. For future use, you may ask your institution administrator to release the required information, by sending them a print screen of this error, or asking them to contact our support at aai@openaire.eu." + }, + "details_title": { + "en": "Error details" + }, + "details_description": { + "en": "Your identity provider needs to release any of the following user identifiers to help us uniquely identify you:" + }, + "go2disco": { + "en": "Log in with a different account" + } +} diff --git a/themes/ssp/authX509/X509error.php b/themes/ssp/authX509/X509error.php new file mode 100644 index 0000000..b1e2f68 --- /dev/null +++ b/themes/ssp/authX509/X509error.php @@ -0,0 +1,41 @@ +data['header'] = $this->t('{authX509:X509error:certificate_header}'); + +$this->includeAtTemplateBase('includes/header.php'); + +?> + +data['errorcode'] !== NULL) { +?> +
t('{errors:title_' . $this->data['errorcode'] . '}'); ?>
+t('{errors:descr_' . $this->data['errorcode'] . '}'); ?>
+t('{authX509:X509error:certificate_text}'); ?>
+ + + t('{login:login_button}'); ?> + + +data['links'])) { + echo 'data['403_text']; ?>
+data['LogoutURL'])) { +?> + + +includeAtTemplateBase('includes/footer.php'); diff --git a/themes/ssp/consent/consentform.php b/themes/ssp/consent/consentform.php new file mode 100644 index 0000000..9468bf1 --- /dev/null +++ b/themes/ssp/consent/consentform.php @@ -0,0 +1,326 @@ +" . htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}')) . " "; + echo "" . $dstName . ""; + echo "
"; +} + +/** + * Recursive attribute array listing function + * + * @param SimpleSAML_XHTML_Template $t Template object + * @param array $attributes Attributes to be presented + * @param string $nameParent Name of parent element + * + * @return string HTML representation of the attributes + */ +function present_attributes($t, $attributes, $nameParent) +{ + $alternate = array('ssp-table--tr__odd', 'ssp-table--tr__even'); + $i = 0; + $summary = 'summary="' . $t->t('{consent:consent:table_summary}') . '"'; + + if (strlen($nameParent) > 0) { + $parentStr = strtolower($nameParent) . '_'; + $str = '' . + present_attributes($t, $child, $parentName) . ' | |
' . $t->t('{themeopenaire:consent:affiliation_input_label}');
+ } else {
+ $str .= "\n" . ' ' . htmlspecialchars($name);
+ }
+ if ($missing) {
+ $str .= ' (*)';
+ }
+ $str.= ' ';
+
+ $str .= '';
+
+ if (sizeof($value) > 1) {
+ // we hawe several values
+ $str .= ' ';
+ $str .= '
data['termsName'])) {
+ $str .=' ' . $t->data['termsName'];
+ }
+ $str .= ''.
+ $t->t('{themeopenaire:consent:terms_field_error}').
+ '';
+ $str .= ' ';
+ if (!empty($t->data['termsUrl'])) {
+ $str .='';
+ $str .= $t->t('{themeopenaire:consent:accept_terms_tip}');
+ $str .= ' '.$t->t('{themeopenaire:consent:terms_link_tip}').'. ';
+ }
+ } elseif ($editable) {
+ $str .='';
+ } elseif ($missing) {
+ $str .='';
+ $str .=''.
+ $t->t('{themeopenaire:consent:mandatory_field_error}').
+ '';
+ if ($nameraw === 'mail') {
+ $str .= ''.
+ $t->t('{themeopenaire:consent:mail_field_error}').
+ '';
+ }
+ $str .=' ';
+ } else {
+ $str .= htmlspecialchars($value[0]);
+ }
+
+ } // end of if multivalue
+ $str .= ' |
' . $this->t('{logout:logged_out_text}') . '
'); + +$this->includeAtTemplateBase('includes/footer.php'); diff --git a/themes/ssp/consent/noconsent.php b/themes/ssp/consent/noconsent.php new file mode 100644 index 0000000..d4bc8fa --- /dev/null +++ b/themes/ssp/consent/noconsent.php @@ -0,0 +1,38 @@ +data['dstMetadata'])) { + $dstName = $this->data['dstMetadata']['name']; +} elseif (array_key_exists('OrganizationDisplayName', $this->data['dstMetadata'])) { + $dstName = $this->data['dstMetadata']['OrganizationDisplayName']; +} else { + $dstName = $this->data['dstMetadata']['entityid']; +} +if (is_array($dstName)) { + $dstName = $this->t($dstName); +} +$dstName = htmlspecialchars($dstName); + + +$this->data['header'] = $this->t('{consent:consent:noconsent_title}');; + +$this->includeAtTemplateBase('includes/header.php'); + +echo '' . $this->t('{consent:consent:noconsent_text}', array('SPNAME' => $dstName)) . '
'; + +echo '' . $description . '
'); + +if ($retryURL !== NULL) { + echo('t('report_trackid'); ?>
+t('debuginfo_text'); ?>
+ +data['error']['exceptionMsg']); ?>
+data['error']['exceptionTrace']); ?>+
t('report_text'); ?>
+t('report_email'); ?> + +
++ +
++ + +
+t('howto_text'); ?>
+ +includeAtTemplateBase('includes/footer.php'); diff --git a/themes/ssp/default/includes/footer.php b/themes/ssp/default/includes/footer.php new file mode 100644 index 0000000..eb68779 --- /dev/null +++ b/themes/ssp/default/includes/footer.php @@ -0,0 +1,30 @@ + +data['htmlinject']['htmlContentPost'])) { + foreach($this->data['htmlinject']['htmlContentPost'] AS $c) { + echo $c; + } +} +?> + + + + + + + +