From afb446d60ed5cd1d0c2009b28f23dbefb5d1ce69 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Sun, 12 Aug 2018 16:37:22 +0200 Subject: [PATCH] Spacing --- modules/oauth/templates/registry.edit.tpl.php | 8 +--- modules/oauth/templates/registry.saved.php | 10 +---- templates/includes/header.php | 37 +++++-------------- 3 files changed, 13 insertions(+), 42 deletions(-) diff --git a/modules/oauth/templates/registry.edit.tpl.php b/modules/oauth/templates/registry.edit.tpl.php index 1e39b1ec7..0faa690e7 100644 --- a/modules/oauth/templates/registry.edit.tpl.php +++ b/modules/oauth/templates/registry.edit.tpl.php @@ -1,12 +1,8 @@ <?php $this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true); -$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/' . $this->data['baseurlpath'] . 'module.php/oauth/resources/style.css" />' . "\n"; -$this->data['head'] .= '<script type="text/javascript"> -$(document).ready(function() { - $("#tabdiv").tabs(); -}); -</script>'; +$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/'.$this->data['baseurlpath'].'module.php/oauth/assets/css/oauth.css" />'."\n"; +$this->data['head'] .= '<script type="text/javascript" src="/'.$this->data['baseurlpath'].'module.php/oauth/assets/js/oauth.js"></script>'; $this->includeAtTemplateBase('includes/header.php'); diff --git a/modules/oauth/templates/registry.saved.php b/modules/oauth/templates/registry.saved.php index fe63bfafd..2e4bd27a9 100644 --- a/modules/oauth/templates/registry.saved.php +++ b/modules/oauth/templates/registry.saved.php @@ -1,14 +1,8 @@ <?php - - $this->includeAtTemplateBase('includes/header.php'); - -echo('<h1>OAuth Client saved</h1>'); - -echo('<p><a href="registry.php">Go back to OAuth client listing</a></p>'); - - +echo '<h1>OAuth Client saved</h1>'; +echo '<p><a href="registry.php">Go back to OAuth client listing</a></p>'; $this->includeAtTemplateBase('includes/footer.php'); diff --git a/templates/includes/header.php b/templates/includes/header.php index 274639de2..7e730571f 100644 --- a/templates/includes/header.php +++ b/templates/includes/header.php @@ -1,7 +1,5 @@ <?php - - /** * Support the htmlinject hook, which allows modules to change header, pre and post body on all pages. */ @@ -11,7 +9,6 @@ $this->data['htmlinject'] = [ 'htmlContentHead' => [], ]; - $jquery = []; if (array_key_exists('jquery', $this->data)) { $jquery = $this->data['jquery']; @@ -68,23 +65,22 @@ if (!empty($jquery)) { if ($version == '1.8') { if (isset($jquery['core']) && $jquery['core']) { - echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-1.8.js"></script>' . "\n"); + echo '<script type="text/javascript" src="/'.$this->data['baseurlpath'].'resources/jquery-1.8.js"></script>'."\n"; } if (isset($jquery['ui']) && $jquery['ui']) { - echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-ui-1.8.js"></script>' . "\n"); + echo '<script type="text/javascript" src="/'.$this->data['baseurlpath'].'resources/jquery-ui-1.8.js"></script>'."\n"; } if (isset($jquery['css']) && $jquery['css']) { - echo('<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] . - 'resources/uitheme1.8/jquery-ui.css" />' . "\n"); + echo '<link rel="stylesheet" media="screen" type="text/css" href="/'.$this->data['baseurlpath']. + 'resources/uitheme1.8/jquery-ui.css" />'."\n"; } } } if (isset($this->data['clipboard.js'])) { - echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . - 'resources/clipboard.min.js"></script>' . "\n"; + echo '<script type="text/javascript" src="/'.$this->data['baseurlpath'].'resources/clipboard.min.js"></script>'."\n"; } if (!empty($this->data['htmlinject']['htmlContentHead'])) { @@ -93,34 +89,24 @@ if (!empty($this->data['htmlinject']['htmlContentHead'])) { } } - - - if ($this->isLanguageRTL()) { ?> <link rel="stylesheet" type="text/css" href="/<?php echo $this->data['baseurlpath']; ?>resources/default-rtl.css" /> <?php } ?> - - <meta name="robots" content="noindex, nofollow" /> - <?php if (array_key_exists('head', $this->data)) { - echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->'; + echo '<!-- head -->'.$this->data['head'].'<!-- /head -->'; } ?> </head> <?php $onLoad = ''; if (array_key_exists('autofocus', $this->data)) { - $onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');'; -} - -if ($onLoad !== '') { - $onLoad = ' onload="' . $onLoad . '"'; + $onLoad .= ' onload="SimpleSAML_focus(\''.$this->data['autofocus'].'\');"'; } ?> <body<?php echo $onLoad; ?>> @@ -194,13 +180,12 @@ if ($onLoad !== '') { if ($current) { $textarray[] = $langnames[$lang]; } else { - $textarray[] = '<a href="' . htmlspecialchars( + $textarray[] = '<a href="'.htmlspecialchars( \SimpleSAML\Utils\HTTP::addURLParameters( \SimpleSAML\Utils\HTTP::getSelfURL(), [$this->getTranslator()->getLanguage()->getLanguageParameterName() => $lang] ) - ) . '">' . - $langnames[$lang] . '</a>'; + ).'">'.$langnames[$lang].'</a>'; } } echo join(' | ', $textarray); @@ -208,13 +193,9 @@ if ($onLoad !== '') { } } - - ?> <div id="content"> - - <?php if (!empty($this->data['htmlinject']['htmlContentPre'])) { -- GitLab