diff --git a/modules/core/hooks/hook_sanitycheck.php b/modules/core/hooks/hook_sanitycheck.php index 132e2ee26919f1a4fe576f26168cd8878b0298db..d5b5084d7fe9cbae9aecf64dc5514c656811df11 100644 --- a/modules/core/hooks/hook_sanitycheck.php +++ b/modules/core/hooks/hook_sanitycheck.php @@ -26,7 +26,7 @@ function core_hook_sanitycheck(&$hookinfo) { if (version_compare(phpversion(), '5.2', '>=')) { $hookinfo['info'][] = '[core] You are running PHP version ' . phpversion() . '. Great.'; } elseif( version_compare(phpversion(), '5.1.2', '>=')) { - $hookinfo['info'][] = '[core] You are running PHP version ' . phpversion() . '. Its reccomended to upgrade to >= 5.2'; + $hookinfo['info'][] = '[core] You are running PHP version ' . phpversion() . '. It\'s recommended to upgrade to >= 5.2'; } else { $hookinfo['errors'][] = '[core] You are running PHP version ' . phpversion() . '. SimpleSAMLphp requires version >= 5.1.2, and reccomends version >= 5.2. Please upgrade!'; } diff --git a/modules/core/templates/frontpage_auth.tpl.php b/modules/core/templates/frontpage_auth.tpl.php index b5976246b66a026c34c6e9b0b179d65bb979c0d6..aa60379605dae560b067d7891bb91c9ea5b8b174 100644 --- a/modules/core/templates/frontpage_auth.tpl.php +++ b/modules/core/templates/frontpage_auth.tpl.php @@ -7,9 +7,9 @@ $this->includeAtTemplateBase('includes/header.php'); <?php if ($this->data['isadmin']) { - echo '<p class="float-r">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; + echo '<p class="float-r youareadmin">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; } else { - echo '<p class="float-r"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; + echo '<p class="float-r youareadmin"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; } ?> diff --git a/modules/core/templates/frontpage_config.tpl.php b/modules/core/templates/frontpage_config.tpl.php index 9fb3bf97612a1713d761fd4f5f0b40fd1cebafef..9b32275eae4f31c962cac7dcddd1ffabe21dde30 100644 --- a/modules/core/templates/frontpage_config.tpl.php +++ b/modules/core/templates/frontpage_config.tpl.php @@ -15,9 +15,9 @@ $this->includeAtTemplateBase('includes/header.php'); </ul> --> <?php if ($this->data['isadmin']) { - echo '<p class="float-r">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; + echo '<p class="float-r youareadmin">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; } else { - echo '<p class="float-r"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; + echo '<p class="float-r youareadmin"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; } ?> diff --git a/modules/core/templates/frontpage_federation.tpl.php b/modules/core/templates/frontpage_federation.tpl.php index 3fe0b9eb3af1993959aa9041c4b9b9b5f63b7f16..afe93b08b1284a09d8a6b2b264b322d123bf1fae 100644 --- a/modules/core/templates/frontpage_federation.tpl.php +++ b/modules/core/templates/frontpage_federation.tpl.php @@ -15,9 +15,9 @@ $this->includeAtTemplateBase('includes/header.php'); </ul> --> <?php if ($this->data['isadmin']) { - echo '<p class="float-r">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; + echo '<p class="float-r youareadmin">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; } else { - echo '<p class="float-r"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; + echo '<p class="float-r youareadmin"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; } ?> diff --git a/modules/core/templates/frontpage_welcome.tpl.php b/modules/core/templates/frontpage_welcome.tpl.php index dcde4f21b5f381eeaa44c3f2a094775ebb5f3e0c..6a145c099de020701ba39b07e9c9c198f4bd368e 100644 --- a/modules/core/templates/frontpage_welcome.tpl.php +++ b/modules/core/templates/frontpage_welcome.tpl.php @@ -8,9 +8,9 @@ $this->includeAtTemplateBase('includes/header.php'); <?php if ($this->data['isadmin']) { - echo '<p class="float-r">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; + echo '<p class="float-r youareadmin">' . $this->t('{core:frontpage:loggedin_as_admin}') . '</p>'; } else { - echo '<p class="float-r"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; + echo '<p class="float-r youareadmin"><a href="' . $this->data['loginurl'] . '">' . $this->t('{core:frontpage:login_as_admin}') . '</a></p>'; } ?> diff --git a/modules/core/templates/loginuserpass.php b/modules/core/templates/loginuserpass.php index 35272a2849f54c849eca513c788ff3916bac0fe2..7b0cae6f9d80329bcf89493fb917990d8e26a707 100644 --- a/modules/core/templates/loginuserpass.php +++ b/modules/core/templates/loginuserpass.php @@ -14,7 +14,7 @@ $this->includeAtTemplateBase('includes/header.php'); if ($this->data['errorcode'] !== NULL) { ?> <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> - <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px " /> + <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l erroricon" style="margin: 15px " /> <h2><?php echo $this->t('{login:error_header}'); ?></h2> <p><b><?php echo htmlspecialchars($this->t('{errors:title_' . $this->data['errorcode'] . '}', $this->data['errorparams'])); ?></b></p> <p><?php echo htmlspecialchars($this->t('{errors:descr_' . $this->data['errorcode'] . '}', $this->data['errorparams'])); ?></p> @@ -24,12 +24,12 @@ if ($this->data['errorcode'] !== NULL) { ?> <h2 style="break: both"><?php echo $this->t('{login:user_pass_header}'); ?></h2> - <p><?php echo $this->t('{login:user_pass_text}'); ?></p> + <p class="logintext"><?php echo $this->t('{login:user_pass_text}'); ?></p> <form action="?" method="post" name="f"> <table> <tr> - <td rowspan="3"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" alt="" /></td> + <td rowspan="3"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" id="loginicon" alt="" /></td> <td style="padding: .3em;"><?php echo $this->t('{login:username}'); ?></td> <td> <?php @@ -59,7 +59,7 @@ if ($this->data['rememberUsernameEnabled']) { } else { $text = $this->t('{login:login_button}'); echo str_repeat("\t", 4); - echo "<input type=\"submit\" tabindex=\"4\" value=\"{$text}\" />"; + echo "<input type=\"submit\" tabindex=\"4\" id=\"regularsubmit\" value=\"{$text}\" />"; } ?> </td> @@ -73,7 +73,7 @@ if ($this->data['rememberUsernameEnabled']) { $rowspan = (array_key_exists('organizations', $this->data) ? 2 : 1); ?> <td style="padding: .4em;" rowspan="<?php echo $rowspan; ?>"> - <input type="submit" tabindex="5" value="<?php echo $this->t('{login:login_button}'); ?>" /> + <input type="submit" tabindex="5" id="regularsubmit" value="<?php echo $this->t('{login:login_button}'); ?>" /> </td> <?php } @@ -112,9 +112,10 @@ foreach ($this->data['organizations'] as $orgId => $orgDesc) { <?php } ?> - + <tr><td></td><td> + <input type="submit" tabindex="5" id="mobilesubmit" value="<?php echo $this->t('{login:login_button}'); ?>" /> + </td></tr> </table> - <?php foreach ($this->data['stateparams'] as $name => $value) { echo('<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'); @@ -136,8 +137,8 @@ if(!empty($this->data['links'])) { -echo('<h2>' . $this->t('{login:help_header}') . '</h2>'); -echo('<p>' . $this->t('{login:help_text}') . '</p>'); +echo('<h2 class="logintext">' . $this->t('{login:help_header}') . '</h2>'); +echo('<p class="logintext">' . $this->t('{login:help_text}') . '</p>'); $this->includeAtTemplateBase('includes/footer.php'); -?> \ No newline at end of file +?> diff --git a/modules/saml/www/sp/metadata.php b/modules/saml/www/sp/metadata.php index b6e4681da821c6f711909fd4b6dc0825b11d212b..6a33ba04d5873f2bd11bd44ab9b930ea43a28624 100644 --- a/modules/saml/www/sp/metadata.php +++ b/modules/saml/www/sp/metadata.php @@ -163,20 +163,23 @@ if ($orgName !== NULL) { } // add technical contact -$email = $config->getString('technicalcontact_email', NULL); -$contact = array('emailAddress' => $email); - -$name = $config->getString('technicalcontact_name', NULL); -if ($name === NULL) { - /* Nothing to do here... */ -} elseif (preg_match('@^(.*?)\s*,\s*(.*)$@D', $name, $matches)) { - $contact['surName'] = $matches[1]; - $contact['givenName'] = $matches[2]; -} elseif (preg_match('@^(.*?)\s+(.*)$@D', $name, $matches)) { - $contact['givenName'] = $matches[1]; - $contact['surName'] = $matches[2]; -} else { - $contact['givenName'] = $name; +$email = $config->getString('technicalcontact_email', 'na@example.org'); +if ( $email != 'na@example.org') { + + $contact = array('emailAddress' => $email); + + $name = $config->getString('technicalcontact_name', NULL); + if ($name === NULL) { + /* Nothing to do here... */ + } elseif (preg_match('@^(.*?)\s*,\s*(.*)$@D', $name, $matches)) { + $contact['surName'] = $matches[1]; + $contact['givenName'] = $matches[2]; + } elseif (preg_match('@^(.*?)\s+(.*)$@D', $name, $matches)) { + $contact['givenName'] = $matches[1]; + $contact['surName'] = $matches[2]; + } else { + $contact['givenName'] = $name; + } } // add certificate @@ -199,7 +202,7 @@ $metaArray20['entityid'] = $entityId; $metaBuilder = new SimpleSAML_Metadata_SAMLBuilder($entityId); $metaBuilder->addMetadataSP20($metaArray20, $supported_protocols); $metaBuilder->addOrganizationInfo($metaArray20); -$metaBuilder->addContact('technical', $contact); +if ( !empty($contact) ) $metaBuilder->addContact('technical', $contact); $xml = $metaBuilder->getEntityDescriptorText(); diff --git a/modules/sanitycheck/hooks/hook_sanitycheck.php b/modules/sanitycheck/hooks/hook_sanitycheck.php index 045b7f4f4918c015f6545efca55c806712e702b8..dbba1bec78c0476daa4cc246e18f2ff6045459b1 100644 --- a/modules/sanitycheck/hooks/hook_sanitycheck.php +++ b/modules/sanitycheck/hooks/hook_sanitycheck.php @@ -9,7 +9,7 @@ function sanitycheck_hook_sanitycheck(&$hookinfo) { assert('array_key_exists("errors", $hookinfo)'); assert('array_key_exists("info", $hookinfo)'); - $hookinfo['info'][] = '[sanitycheck] At least the sanity check it self is working :)'; + $hookinfo['info'][] = '[sanitycheck] At least the sanity check itself is working :)'; } -?> \ No newline at end of file +?> diff --git a/templates/includes/footer.php b/templates/includes/footer.php index 2837497892763bce64aaf5e5564521c56ba3a15a..d4850293489a697b901352f3d2622d0b0e177228 100644 --- a/templates/includes/footer.php +++ b/templates/includes/footer.php @@ -1,18 +1,12 @@ <?php - - - if(!empty($this->data['htmlinject']['htmlContentPost'])) { foreach($this->data['htmlinject']['htmlContentPost'] AS $c) { echo $c; } } - - ?> - - - + </div><!-- #content --> + <div id="footer"> <hr /> <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/ssplogo-fish-small.png" alt="Small fish logo" style="float: right" /> @@ -20,9 +14,9 @@ if(!empty($this->data['htmlinject']['htmlContentPost'])) { <br style="clear: right" /> - </div><!-- #content --> + </div><!-- #footer --> </div><!-- #wrap --> </body> -</html> \ No newline at end of file +</html> diff --git a/templates/includes/header.php b/templates/includes/header.php index 4dd83e423934f3073fa71e5653e3f2b5c0e1e5a0..e83cc4566dcfbbc5431827ef23bd32f9e51ef9f2 100644 --- a/templates/includes/header.php +++ b/templates/includes/header.php @@ -43,6 +43,7 @@ header('X-Frame-Options: SAMEORIGIN'); <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, height=device-height, initial-scale=1.0" /> <script type="text/javascript" src="/<?php echo $this->data['baseurlpath']; ?>resources/script.js"></script> <title><?php if(array_key_exists('header', $this->data)) { diff --git a/templates/login-ldapmulti.php b/templates/login-ldapmulti.php index 61a01ab865d26fc2f235df000f34a1bf4cf83f9a..9e9ae971e1a1f06c6368894e51f5ef5ed8bbcefd 100644 --- a/templates/login-ldapmulti.php +++ b/templates/login-ldapmulti.php @@ -5,10 +5,10 @@ <?php if (isset($this->data['error'])) { ?> <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> - <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px " /> + <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l erroricon" style="margin: 15px " /> <h2><?php echo $this->t('error_header'); ?></h2> - <p><?php echo htmlspecialchars($this->data['error']); ?> </p> + <p class="logintext"><?php echo htmlspecialchars($this->data['error']); ?> </p> </div> <?php } ?> @@ -22,7 +22,7 @@ <table> <tr> - <td rowspan="3"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" /></td> + <td rowspan="3"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" id="loginicon" /></td> <td style="padding: .3em;"><?php echo $this->t('username'); ?></td> <td><input type="text" tabindex="1" name="username" <?php if (isset($this->data['username'])) { @@ -31,7 +31,7 @@ <td style="padding: .4em;" rowspan="3"> - <input type="submit" tabindex="3" value="Login" /> + <input type="submit" tabindex="3" id="regularsubmit" value="<?php echo $this->t('login_button'); ?>" /> <input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" /> </td> </tr> @@ -55,17 +55,20 @@ <td style="padding: .3em;"><?php echo $this->t('password'); ?></td> <td><input type="password" tabindex="2" name="password" /></td> </tr> + <tr><td></td><td> + <input type="submit" tabindex="5" id="mobilesubmit" value="<?php echo $this->t('login_button'); ?>" /> + </td></tr> </table> </form> - <h2><?php echo $this->t('help_header'); ?>.</h2> + <h2 class="logintext"><?php echo $this->t('help_header'); ?>.</h2> - <p><?php echo $this->t('help_text'); ?>!</p> + <p class="logintext"><?php echo $this->t('help_text'); ?>!</p> -<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file +<?php $this->includeAtTemplateBase('includes/footer.php'); ?> diff --git a/templates/login.php b/templates/login.php index a7081b7219c417097ee27b80b36b68c39a03909e..6085b08c2ea7a7d8a23a2c7f423e253547375f3e 100644 --- a/templates/login.php +++ b/templates/login.php @@ -7,7 +7,7 @@ <?php if (isset($this->data['error'])) { ?> <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> - <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px " /> + <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l erroricon" style="margin: 15px" /> <h2><?php echo $this->t('error_header'); ?></h2> <p><?php echo $this->t($this->data['error']); ?> </p> @@ -16,13 +16,13 @@ <h2 style="break: both"><?php echo $this->t('user_pass_header'); ?></h2> - <p><?php echo $this->t('user_pass_text'); ?></p> + <p class="logintext"><?php echo $this->t('user_pass_text'); ?></p> <form action="?" method="post" name="f"> <table> <tr> - <td rowspan="2"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" /></td> + <td rowspan="2"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" id="loginicon" /></td> <td style="padding: .3em;"><?php echo $this->t('username'); ?></td> @@ -45,7 +45,7 @@ </td> <td style="padding: .4em;" rowspan="2"> - <input type="submit" tabindex="3" value="<?php echo $this->t('login_button'); ?>" /> + <input type="submit" class="regularsubmit" tabindex="3" value="<?php echo $this->t('login_button'); ?>" /> <input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" /> </td> </tr> @@ -53,16 +53,19 @@ <td style="padding: .3em;"><?php echo $this->t('password'); ?></td> <td><input id="password" type="password" tabindex="2" name="password" /></td> </tr> + <tr><td></td><td> + <input type="submit" tabindex="5" id="mobilesubmit" value="<?php echo $this->t('{login_button}'); ?>" /> + </td></tr> </table> </form> - <h2><?php echo $this->t('help_header'); ?></h2> + <h2 class="logintext"><?php echo $this->t('help_header'); ?></h2> - <p><?php echo $this->t('help_text'); ?></p> + <p class="logintext"><?php echo $this->t('help_text'); ?></p> -<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file +<?php $this->includeAtTemplateBase('includes/footer.php'); ?> diff --git a/www/resources/default.css b/www/resources/default.css index 958a86f701121b4f4660c1da29fd0bd0f7462f19..2d2584112f74000b397b3e06ef115477a3b80735 100644 --- a/www/resources/default.css +++ b/www/resources/default.css @@ -119,7 +119,7 @@ dt { } -#content { +#content, #footer { padding: 0 20px; } @@ -348,4 +348,37 @@ caption { .float-l { float: left; } +#mobilesubmit { + display: none; +} +@media handheld, only screen and (max-width: 480px), only screen and (max-device-width: 480px) { + #header, #languagebar, #footer, .erroricon, #loginicon, .logintext, #regularsubmit { + display: none; + } + body { + font-size: 20px; + } + #wrap { + margin: 0; + } + h1,h2,h3,h4 { + font-size: 110%; + } + + #content { + margin-bottom: 10px; + padding: 0; + padding-left: 5px; + } + input[type="text"], input[type="password"] { + height: 1.5em; + font-size: 1em; + } + #mobilesubmit { + display: inline; + } + .youareadmin { + font-size: 50%; + } +}