Initial commit
This commit is contained in:
commit
a0c911299f
|
@ -0,0 +1,15 @@
|
|||
# fyrkat theme for SimpleSamlPhp
|
||||
|
||||
Clone this repo to your modules directory
|
||||
|
||||
git clone https://github.com/fyrkat/ssp-theme.git themefyrkat
|
||||
|
||||
Make the following changes in your SSP setup:
|
||||
|
||||
## config/config.php
|
||||
|
||||
'module.enable' => [
|
||||
'themefyrkat' => TRUE,
|
||||
],
|
||||
|
||||
'theme.use' => 'themefyrkat:fyrkat',
|
|
@ -0,0 +1,3 @@
|
|||
This file indicates that the default state of this module
|
||||
is disabled. To enable, create a file named enable in the
|
||||
same directory as this file.
|
|
@ -0,0 +1,189 @@
|
|||
<!DOCTYPE html>
|
||||
<title><?php echo $this->t('{login:user_pass_header}'); ?></title>
|
||||
<link rel="stylesheet" href="<?php echo SimpleSAML_Module::getModuleURL('themefyrkat/normalize.css'); ?>" type="text/css">
|
||||
<link rel="stylesheet" href="<?php echo SimpleSAML_Module::getModuleURL('themefyrkat/fyrkat.css'); ?>" type="text/css">
|
||||
<link rel="stylesheet" href="<?php echo SimpleSAML_Module::getModuleURL('themefyrkat/auth.css'); ?>" type="text/css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<?php
|
||||
$this->data['header'] = $this->t('{login:user_pass_header}');
|
||||
|
||||
if (strlen($this->data['username']) > 0) {
|
||||
$this->data['autofocus'] = 'password';
|
||||
} else {
|
||||
$this->data['autofocus'] = 'username';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form action="?" method="post" id="loginform">
|
||||
<h1><?php echo (isset($this->data['header']) ? $this->data['header'] : 'SimpleSAMLphp'); ?></h1>
|
||||
|
||||
<div class="inputstack">
|
||||
<p><input id="username"<?php echo ($this->data['forceUsername']) ? ' disabled="disabled"' : ''; ?> type="text" name="username" placeholder="<?php echo $this->t('{login:username}'); ?>" required
|
||||
<?php if (!$this->data['forceUsername']) {
|
||||
echo 'tabindex="1"';
|
||||
if (!$this->data['username']) {
|
||||
echo ' autofocus';
|
||||
}
|
||||
} ?> value="<?php echo htmlspecialchars($this->data['username']); ?>" onkeyup="setSubmit()">
|
||||
<p><input id="password" type="password" tabindex="2" name="password" placeholder="<?php echo $this->t('{login:password}'); ?>" required
|
||||
<?php if ($this->data['username']) {
|
||||
echo ' autofocus';
|
||||
} ?> onkeyup="setSubmit()">
|
||||
</div>
|
||||
<?php
|
||||
if ($this->data['rememberMeEnabled']) {
|
||||
// display the remember me checkbox (keep me logged in)
|
||||
?>
|
||||
<p><input type="checkbox" id="remember_me" tabindex="5"
|
||||
<?php echo ($this->data['rememberMeChecked']) ? 'checked="checked"' : ''; ?>
|
||||
name="remember_me" value="Yes"/>
|
||||
<small><?php echo $this->t('{login:remember_me}'); ?></small>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($this->data['rememberUsernameEnabled'] && !$this->data['forceUsername']) {
|
||||
// display the "remember my username" checkbox
|
||||
?>
|
||||
<p><input type="checkbox" id="remember_username" tabindex="4"
|
||||
<?php echo ($this->data['rememberUsernameChecked']) ? 'checked="checked"' : ''; ?>
|
||||
name="remember_username" value="Yes"/>
|
||||
<small><?php echo $this->t('{login:remember_username}'); ?></small>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (array_key_exists('organizations', $this->data)) {
|
||||
?>
|
||||
<p><label for="organization"><?php echo $this->t('{login:organization}'); ?></label></p>
|
||||
<p><select name="organization" tabindex="3">
|
||||
<?php
|
||||
if (array_key_exists('selectedOrg', $this->data)) {
|
||||
$selectedOrg = $this->data['selectedOrg'];
|
||||
} else {
|
||||
$selectedOrg = null;
|
||||
}
|
||||
|
||||
foreach ($this->data['organizations'] as $orgId => $orgDesc) {
|
||||
if (is_array($orgDesc)) {
|
||||
$orgDesc = $this->t($orgDesc);
|
||||
}
|
||||
|
||||
if ($orgId === $selectedOrg) {
|
||||
$selected = 'selected="selected" ';
|
||||
} else {
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
echo '<option '.$selected.'value="'.htmlspecialchars($orgId).'">'.htmlspecialchars($orgDesc).'</option>';
|
||||
}
|
||||
?>
|
||||
</select></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($this->data['errorcode'] !== null) {
|
||||
?>
|
||||
<p class="error"><?php
|
||||
echo htmlspecialchars($this->t(
|
||||
'{errors:title_'.$this->data['errorcode'].'}',
|
||||
$this->data['errorparams']
|
||||
)); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<p><input id="submit" type="submit" value="<?php echo $this->t('{login:login_button}'); ?>" tabindex="6">
|
||||
<?php
|
||||
foreach ($this->data['stateparams'] as $name => $value) {
|
||||
echo('<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />');
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if (!empty($this->data['links'])) {
|
||||
echo '<ul style="margin-top: 2em">';
|
||||
foreach ($this->data['links'] as $l) {
|
||||
echo '<li><a href="'.htmlspecialchars($l['href']).'">'.htmlspecialchars($this->t($l['text'])).'</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
?>
|
||||
<script src="<?php echo SimpleSAML_Module::getModuleURL('themefyrkat/scripts.js'); ?>" async></script>
|
||||
<?php return;
|
||||
|
||||
$includeLanguageBar = TRUE;
|
||||
if (!empty($_POST))
|
||||
$includeLanguageBar = FALSE;
|
||||
if (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === TRUE)
|
||||
$includeLanguageBar = FALSE;
|
||||
|
||||
if ($includeLanguageBar) {
|
||||
|
||||
$languages = $this->getLanguageList();
|
||||
if ( count($languages) > 1 ) {
|
||||
echo '<ul id="languagebar">';
|
||||
$langnames = array(
|
||||
'no' => 'Bokmål', // Norwegian Bokmål
|
||||
'nn' => 'Nynorsk', // Norwegian Nynorsk
|
||||
'se' => 'Sámegiella', // Northern Sami
|
||||
'sam' => 'Åarjelh-saemien giele', // Southern Sami
|
||||
'da' => 'Dansk', // Danish
|
||||
'en' => 'English',
|
||||
'de' => 'Deutsch', // German
|
||||
'sv' => 'Svenska', // Swedish
|
||||
'fi' => 'Suomeksi', // Finnish
|
||||
'es' => 'Español', // Spanish
|
||||
'fr' => 'Français', // French
|
||||
'it' => 'Italiano', // Italian
|
||||
'nl' => 'Nederlands', // Dutch
|
||||
'lb' => 'Lëtzebuergesch', // Luxembourgish
|
||||
'cs' => 'Čeština', // Czech
|
||||
'sl' => 'Slovenščina', // Slovensk
|
||||
'lt' => 'Lietuvių kalba', // Lithuanian
|
||||
'hr' => 'Hrvatski', // Croatian
|
||||
'hu' => 'Magyar', // Hungarian
|
||||
'pl' => 'Język polski', // Polish
|
||||
'pt' => 'Português', // Portuguese
|
||||
'pt-br' => 'Português brasileiro', // Portuguese
|
||||
'ru' => 'русский язык', // Russian
|
||||
'et' => 'eesti keel', // Estonian
|
||||
'tr' => 'Türkçe', // Turkish
|
||||
'el' => 'ελληνικά', // Greek
|
||||
'ja' => '日本語', // Japanese
|
||||
'zh' => '简体中文', // Chinese (simplified)
|
||||
'zh-tw' => '繁體中文', // Chinese (traditional)
|
||||
'ar' => 'العربية', // Arabic
|
||||
'fa' => 'پارسی', // Persian
|
||||
'ur' => 'اردو', // Urdu
|
||||
'he' => 'עִבְרִית', // Hebrew
|
||||
'id' => 'Bahasa Indonesia', // Indonesian
|
||||
'sr' => 'Srpski', // Serbian
|
||||
'lv' => 'Latviešu', // Latvian
|
||||
'ro' => 'Românește', // Romanian
|
||||
'eu' => 'Euskara', // Basque
|
||||
);
|
||||
|
||||
$textarray = array();
|
||||
foreach ($languages AS $lang => $current) {
|
||||
$lang = strtolower($lang);
|
||||
if ($current) {
|
||||
$textarray[] = '<li>' . $langnames[$lang];
|
||||
} else {
|
||||
$textarray[] = '<li><a href="' . htmlspecialchars(\SimpleSAML\Utils\HTTP::addURLParameters(\SimpleSAML\Utils\HTTP::getSelfURL(), array($this->languageParameterName => $lang))) . '">' .
|
||||
$langnames[$lang] . '</a>';
|
||||
}
|
||||
}
|
||||
echo join("\n", $textarray);
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
<title><?php echo $this->t($this->data['dictTitle']); ?></title>
|
||||
<link rel="stylesheet" href="<?php echo SimpleSAML_Module::getModuleURL('themefyrkat/fyrkat.css'); ?>" type="text/css">
|
||||
<?php
|
||||
$this->data['header'] = $this->t($this->data['dictTitle']);
|
||||
|
||||
$this->data['head'] = <<<EOF
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<meta name="googlebot" content="noarchive, nofollow" />
|
||||
EOF;
|
||||
|
||||
?>
|
||||
<h1><?php echo $this->t($this->data['dictTitle']); ?></h1>
|
||||
<div class="maintext">
|
||||
<?php
|
||||
echo htmlspecialchars($this->t($this->data['dictDescr'], $this->data['parameters']));
|
||||
|
||||
// include optional information for error
|
||||
if (isset($this->data['includeTemplate'])) {
|
||||
$this->includeAtTemplateBase($this->data['includeTemplate']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="trackidtext">
|
||||
<p><?php echo $this->t('report_trackid'); ?></p>
|
||||
<div class="input-group" style="width: 1em;">
|
||||
<pre id="trackid" class="input-left"><?php echo $this->data['error']['trackId']; ?></pre>
|
||||
<button data-clipboard-target="#trackid" id="btntrackid" class="btnaddonright">
|
||||
<img src="/<?php echo $this->data['baseurlpath'].'resources/icons/clipboard.svg'; ?>"
|
||||
alt="Copy to clipboard">
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
// print out exception only if the exception is available
|
||||
if ($this->data['showerrors']) {
|
||||
?>
|
||||
<h2><?php echo $this->t('debuginfo_header'); ?></h2>
|
||||
<p><?php echo $this->t('debuginfo_text'); ?></p>
|
||||
|
||||
<div style="border: 1px solid #eee; padding: 1em; font-size: x-small">
|
||||
<p style="margin: 1px"><?php echo htmlspecialchars($this->data['error']['exceptionMsg']); ?></p>
|
||||
<pre style="padding: 1em; font-family: monospace;"><?php
|
||||
echo htmlspecialchars($this->data['error']['exceptionTrace']); ?></pre>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/* Add error report submit section if we have a valid technical contact. 'errorreportaddress' will only be set if
|
||||
* the technical contact email address has been set.
|
||||
*/
|
||||
if (isset($this->data['errorReportAddress'])) {
|
||||
?>
|
||||
<h2><?php echo $this->t('report_header'); ?></h2>
|
||||
<form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post">
|
||||
<p><?php echo $this->t('report_text'); ?></p>
|
||||
<p><?php echo $this->t('report_email'); ?>
|
||||
<input type="text" size="25" name="email" value="<?php echo htmlspecialchars($this->data['email']); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<textarea class="metadatabox" name="text" rows="6" style="width: 100%; padding: 0.5em;"><?php
|
||||
echo $this->t('report_explain'); ?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="hidden" name="reportId" value="<?php echo $this->data['error']['reportId']; ?>"/>
|
||||
<button type="submit" name="send" class="btn"><?php echo $this->t('report_submit'); ?></button>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<h2 style="clear: both"><?php echo $this->t('howto_header'); ?></h2>
|
||||
<p><?php echo $this->t('howto_text'); ?></p>
|
||||
<script type="text/javascript">
|
||||
var clipboard = new Clipboard('#btntrackid');
|
||||
</script>
|
||||
<?php
|
||||
$this->includeAtTemplateBase('includes/footer.php');
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
if(!empty($this->data['htmlinject']['htmlContentPost'])) {
|
||||
foreach($this->data['htmlinject']['htmlContentPost'] AS $c) {
|
||||
echo $c;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,189 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Support the htmlinject hook, which allows modules to change header, pre and post body on all pages.
|
||||
*/
|
||||
$this->data['htmlinject'] = array(
|
||||
'htmlContentPre' => array(),
|
||||
'htmlContentPost' => array(),
|
||||
'htmlContentHead' => array(),
|
||||
);
|
||||
|
||||
|
||||
$jquery = array();
|
||||
if (array_key_exists('jquery', $this->data)) $jquery = $this->data['jquery'];
|
||||
|
||||
if (array_key_exists('pageid', $this->data)) {
|
||||
$hookinfo = array(
|
||||
'pre' => &$this->data['htmlinject']['htmlContentPre'],
|
||||
'post' => &$this->data['htmlinject']['htmlContentPost'],
|
||||
'head' => &$this->data['htmlinject']['htmlContentHead'],
|
||||
'jquery' => &$jquery,
|
||||
'page' => $this->data['pageid']
|
||||
);
|
||||
|
||||
SimpleSAML_Module::callHooks('htmlinject', $hookinfo);
|
||||
}
|
||||
?><!DOCTYPE html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="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)) {
|
||||
echo $this->data['header'];
|
||||
} else {
|
||||
echo 'SimpleSAMLphp';
|
||||
}
|
||||
?></title>
|
||||
|
||||
<!-- <link rel="stylesheet" type="text/css" href="/<?php echo $this->data['baseurlpath']; ?>resources/default.css" /> -->
|
||||
<link rel="icon" type="image/icon" href="/<?php echo $this->data['baseurlpath']; ?>resources/icons/favicon.ico" />
|
||||
|
||||
<?php
|
||||
|
||||
if(!empty($jquery)) {
|
||||
$version = '1.8';
|
||||
if (array_key_exists('version', $jquery))
|
||||
$version = $jquery['version'];
|
||||
|
||||
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");
|
||||
|
||||
if (isset($jquery['ui']) && $jquery['ui'])
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->data['clipboard.js'])) {
|
||||
echo '<script type="text/javascript" src="/'. $this->data['baseurlpath'] .
|
||||
'resources/clipboard.min.js"></script>'."\n";
|
||||
}
|
||||
|
||||
if(!empty($this->data['htmlinject']['htmlContentHead'])) {
|
||||
foreach($this->data['htmlinject']['htmlContentHead'] AS $c) {
|
||||
echo $c;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
|
||||
|
||||
<?php
|
||||
if(array_key_exists('head', $this->data)) {
|
||||
echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<?php
|
||||
$onLoad = '';
|
||||
if(array_key_exists('autofocus', $this->data)) {
|
||||
$onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');';
|
||||
}
|
||||
if (isset($this->data['onLoad'])) {
|
||||
$onLoad .= $this->data['onLoad'];
|
||||
}
|
||||
|
||||
if($onLoad !== '') {
|
||||
echo '<body onload="' . $onLoad . '">';
|
||||
}
|
||||
?>
|
||||
|
||||
<h1><a href="/<?php echo $this->data['baseurlpath']; ?>"><?php
|
||||
echo (isset($this->data['header']) ? $this->data['header'] : 'SimpleSAMLphp');
|
||||
?></a></h1>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$includeLanguageBar = TRUE;
|
||||
if (!empty($_POST))
|
||||
$includeLanguageBar = FALSE;
|
||||
if (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === TRUE)
|
||||
$includeLanguageBar = FALSE;
|
||||
|
||||
if ($includeLanguageBar) {
|
||||
|
||||
$languages = $this->getLanguageList();
|
||||
if ( count($languages) > 1 ) {
|
||||
echo '<div id="languagebar">';
|
||||
$langnames = array(
|
||||
'no' => 'Bokmål', // Norwegian Bokmål
|
||||
'nn' => 'Nynorsk', // Norwegian Nynorsk
|
||||
'se' => 'Sámegiella', // Northern Sami
|
||||
'sam' => 'Åarjelh-saemien giele', // Southern Sami
|
||||
'da' => 'Dansk', // Danish
|
||||
'en' => 'English',
|
||||
'de' => 'Deutsch', // German
|
||||
'sv' => 'Svenska', // Swedish
|
||||
'fi' => 'Suomeksi', // Finnish
|
||||
'es' => 'Español', // Spanish
|
||||
'fr' => 'Français', // French
|
||||
'it' => 'Italiano', // Italian
|
||||
'nl' => 'Nederlands', // Dutch
|
||||
'lb' => 'Lëtzebuergesch', // Luxembourgish
|
||||
'cs' => 'Čeština', // Czech
|
||||
'sl' => 'Slovenščina', // Slovensk
|
||||
'lt' => 'Lietuvių kalba', // Lithuanian
|
||||
'hr' => 'Hrvatski', // Croatian
|
||||
'hu' => 'Magyar', // Hungarian
|
||||
'pl' => 'Język polski', // Polish
|
||||
'pt' => 'Português', // Portuguese
|
||||
'pt-br' => 'Português brasileiro', // Portuguese
|
||||
'ru' => 'русский язык', // Russian
|
||||
'et' => 'eesti keel', // Estonian
|
||||
'tr' => 'Türkçe', // Turkish
|
||||
'el' => 'ελληνικά', // Greek
|
||||
'ja' => '日本語', // Japanese
|
||||
'zh' => '简体中文', // Chinese (simplified)
|
||||
'zh-tw' => '繁體中文', // Chinese (traditional)
|
||||
'ar' => 'العربية', // Arabic
|
||||
'fa' => 'پارسی', // Persian
|
||||
'ur' => 'اردو', // Urdu
|
||||
'he' => 'עִבְרִית', // Hebrew
|
||||
'id' => 'Bahasa Indonesia', // Indonesian
|
||||
'sr' => 'Srpski', // Serbian
|
||||
'lv' => 'Latviešu', // Latvian
|
||||
'ro' => 'Românește', // Romanian
|
||||
'eu' => 'Euskara', // Basque
|
||||
);
|
||||
|
||||
$textarray = array();
|
||||
foreach ($languages AS $lang => $current) {
|
||||
$lang = strtolower($lang);
|
||||
if ($current) {
|
||||
$textarray[] = $langnames[$lang];
|
||||
} else {
|
||||
$textarray[] = '<a href="' . htmlspecialchars(\SimpleSAML\Utils\HTTP::addURLParameters(\SimpleSAML\Utils\HTTP::getSelfURL(), array($this->languageParameterName => $lang))) . '">' .
|
||||
$langnames[$lang] . '</a>';
|
||||
}
|
||||
}
|
||||
echo join(' | ', $textarray);
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<main>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if(!empty($this->data['htmlinject']['htmlContentPre'])) {
|
||||
foreach($this->data['htmlinject']['htmlContentPre'] AS $c) {
|
||||
echo $c;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
body {
|
||||
background: #fafafa;
|
||||
}
|
||||
#loginform {
|
||||
text-align: center;
|
||||
/* background: #f8f8f8; */
|
||||
margin: 0 auto;
|
||||
width: 24em;
|
||||
padding: 2em 0 0 0;
|
||||
}
|
||||
#loginform h1 {
|
||||
background: url('fyrkat.svg') no-repeat 0 0;
|
||||
background-size: fill;
|
||||
padding-top: 18em;
|
||||
font-size: 1em;
|
||||
color: gray;
|
||||
|
||||
width: 18em;
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
|
||||
form .inputstack input {
|
||||
display: block;
|
||||
padding: .6rem;
|
||||
margin: 0 auto;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
form .inputstack p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
form .inputstack p input {
|
||||
border: .1em solid #aaa;
|
||||
border-top: none;
|
||||
width: 12.8rem;
|
||||
}
|
||||
form .inputstack p:first-child input {
|
||||
border-top: .1em solid #aaa;
|
||||
border-radius: .3em .3em 0 0;
|
||||
box-shadow: inset #eee 0 2px 0;
|
||||
}
|
||||
form .inputstack p:last-child input {
|
||||
border-radius: 0 0 .3em .3em;
|
||||
}
|
||||
#loginform input[type=submit] {
|
||||
width: 14rem;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
|
@ -0,0 +1,297 @@
|
|||
body {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
font-size: .8em;
|
||||
}
|
||||
h1, nav {
|
||||
color: gray;
|
||||
}
|
||||
.overview code:before, .overview span:before {
|
||||
content: attr(title) ':';
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
code, span {
|
||||
display: block;
|
||||
}
|
||||
main {
|
||||
margin-left: 20em;
|
||||
margin-right: 5em;
|
||||
min-height: 40em;
|
||||
}
|
||||
nav {
|
||||
background: url('fyrkat.svg') no-repeat 0 0;
|
||||
background-size: contain;
|
||||
position: absolute;
|
||||
width: 15em;
|
||||
padding-top: 14em;
|
||||
left: 2em;
|
||||
top: 2em;
|
||||
}
|
||||
nav ul {
|
||||
padding:0;
|
||||
}
|
||||
nav li {
|
||||
text-align: right;
|
||||
list-style: none;
|
||||
margin: .5em 0;
|
||||
}
|
||||
nav li a {
|
||||
padding: 1em;
|
||||
color: #257;
|
||||
display: block;
|
||||
border-radius: .2em;
|
||||
text-decoration: none;
|
||||
}
|
||||
nav li a:hover {
|
||||
background: #eee;
|
||||
}
|
||||
nav li a:active {
|
||||
background: #ddd;
|
||||
}
|
||||
nav li a.active {
|
||||
color: #fff;
|
||||
background: #257;
|
||||
}
|
||||
nav .current-user .username {
|
||||
display: block;
|
||||
margin-bottom: .3em;
|
||||
}
|
||||
nav .current-user {
|
||||
font-size: .9em;
|
||||
text-align: right;
|
||||
}
|
||||
nav .current-user .logout {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
background: #567;
|
||||
width: 6em;
|
||||
padding: .5em 0 .3em 0;
|
||||
border-radius: .3em;
|
||||
box-shadow: #345 0 2px 0;
|
||||
font-size: .9em;
|
||||
}
|
||||
nav .current-user .logout:active {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
box-shadow: #345 0 1px 0;
|
||||
}
|
||||
form .error {
|
||||
color: #a66;
|
||||
font-weight: bold;
|
||||
}
|
||||
form .error {
|
||||
width: 18em;
|
||||
margin: 1em auto;
|
||||
}
|
||||
.trackidtext, .maintext { /* remove form */
|
||||
background: #fff;
|
||||
color: #000;
|
||||
padding: 3.1em 0 2.1em 0;
|
||||
}
|
||||
|
||||
.buttons label, .buttons a {
|
||||
cursor: pointer;
|
||||
background: #06a;
|
||||
box-shadow: 0 3px 0 #048;
|
||||
color: white;
|
||||
padding: .8em 2em;
|
||||
border-radius: .3em;
|
||||
text-decoration: none;
|
||||
}
|
||||
.buttons label:active, .buttons a:active {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
box-shadow: 0 2px 0 #048;
|
||||
}
|
||||
.buttons {
|
||||
}
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
form input[type=submit] { /* remove explicit width, add padding */
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
border-radius: .3em;
|
||||
background: #084;
|
||||
color: #fff;
|
||||
box-shadow: #063 0 3px 0;
|
||||
padding: 1em 2.5em .8em 2.5em;
|
||||
}
|
||||
form input[type=submit].disabled, form input[type=submit].disabled:active {
|
||||
color: #ddd;
|
||||
background: #576;
|
||||
cursor: default;
|
||||
/* border-bottom: .2em solid #254 !important; */
|
||||
box-shadow: #254 0 3px 0;
|
||||
top: 0 !important;
|
||||
}
|
||||
form input[type=submit]:active, form input[type=submit].active {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
box-shadow: #063 0 2px 0;
|
||||
}
|
||||
|
||||
.input-group input[type=radio] {
|
||||
display: none;
|
||||
}
|
||||
.input-group input[type=radio] ~ label, .input-group input[type=text], .input-group input[type=password] {
|
||||
width: 17em;
|
||||
}
|
||||
.input-group input[type=radio] ~ label, .input-group input[type=text], .input-group input[type=password], .input-group textarea, .image-well {
|
||||
border: 1px solid #abc;
|
||||
display: block;
|
||||
padding: 1em 1em .9em 1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
.biginput {
|
||||
border: none;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
.image-well, .image-well img {
|
||||
width: 10em;
|
||||
height: 10em;
|
||||
}
|
||||
.image-well {
|
||||
padding: 1em;
|
||||
}
|
||||
.input-group input[type=radio] ~ label {
|
||||
cursor: pointer;
|
||||
box-shadow: #f2f2f2 0 2px 0;
|
||||
}
|
||||
.input-group input[type=text], .input-group input[type=password], .input-group textarea, .image-well {
|
||||
margin-top: .3em;
|
||||
box-shadow: inset #f2f2f2 0 2px 0;
|
||||
}
|
||||
.input-group input[type=text]:focus, .input-group input[type=password]:focus, .input-group textarea:focus {
|
||||
box-shadow: rgba(166,202,240) 0 0 .5em, inset #f2f2f2 0 2px 0;
|
||||
}
|
||||
.input-group input[type=radio] ~ label:hover {
|
||||
border: 1px solid #567;
|
||||
box-shadow: #eee 0 2px 0;
|
||||
}
|
||||
.input-group input[type=radio] ~ label:active {
|
||||
background: #eee;
|
||||
box-shadow: #ddd 0 2px 0;
|
||||
}
|
||||
.input-group input[type=radio]:checked ~ label {
|
||||
background: #257;
|
||||
border: 1px solid #257;
|
||||
color: #fff;
|
||||
box-shadow: #134 0 2px 0;
|
||||
}
|
||||
|
||||
.btnaddonright img {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
#languagebar {
|
||||
font-size: .7em;
|
||||
color: #aaa;
|
||||
}
|
||||
#languagebar li {
|
||||
display: inline;
|
||||
}
|
||||
#languagebar li:after {
|
||||
content: ' | ';
|
||||
}
|
||||
#languagebar li:last-child:after {
|
||||
content: '';
|
||||
}
|
||||
#languagebar a {
|
||||
color: #66a;
|
||||
}
|
||||
|
||||
.overview ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
}
|
||||
.overview li {
|
||||
display: inline-block;
|
||||
width: 20em;
|
||||
margin-bottom: 1.5em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
pre {
|
||||
border: 2px solid white;
|
||||
background: #fefefe;
|
||||
padding: .5em;
|
||||
border-radius: .3em;
|
||||
box-shadow: 0 0 0 1px #eee;
|
||||
}
|
||||
hr, footer {
|
||||
margin: 1em 2em 2em 2em;
|
||||
border: none;
|
||||
border-top: 1px solid #fafafa;
|
||||
}
|
||||
|
||||
@keyframes notification {
|
||||
0% { opacity: 0; display: block; }
|
||||
1% { opacity: 1; display: block; }
|
||||
70% { opacity: 1; display: block; }
|
||||
100% { opacity: 0; display: block; }
|
||||
}
|
||||
.hiding-notification {
|
||||
animation-name: notification;
|
||||
animation-duration: 30s;
|
||||
animation-iteration-count: 1;
|
||||
opacity: 0;
|
||||
}
|
||||
.notification-placeholder {
|
||||
border: .1em solid rgba(0,0,0,0);
|
||||
margin: 0 0 1em 0;
|
||||
padding: 0 1em 1em 1em;
|
||||
}
|
||||
.notification-placeholder:after {
|
||||
color: rgba(0,0,0,0);
|
||||
content: "x";
|
||||
}
|
||||
.info, .warning, .error, .complete {
|
||||
border: .1em solid #eee;
|
||||
border-radius: .3em;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
div.info, div.warning, div.error, div.complete {
|
||||
padding: 0 1em 1em 1em;
|
||||
}
|
||||
p.info, p.warning, p.error, p.complete {
|
||||
padding: 1em;
|
||||
}
|
||||
.info {
|
||||
border-left: 6px solid #06a;
|
||||
}
|
||||
.complete {
|
||||
border-left: 6px solid #082;
|
||||
}
|
||||
.error {
|
||||
border-left: 6px solid #c02;
|
||||
}
|
||||
.warning {
|
||||
border-left: 6px solid #fa0;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 2em;
|
||||
color: #557;
|
||||
margin-top: 2em;
|
||||
}
|
||||
footer a {
|
||||
color: #567;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg fill="#557" xmlns="http://www.w3.org/2000/svg" viewBox="-25 0 250 200" version="1.1">
|
||||
<defs>
|
||||
<mask id="mask" fill="white">
|
||||
<rect x="0" y="0" width="80" height="80"/>
|
||||
<rect x="120" y="0" width="80" height="80"/>
|
||||
<rect x="0" y="120" width="80" height="80"/>
|
||||
<rect x="120" y="120" width="80" height="80"/>
|
||||
</mask>
|
||||
</defs>
|
||||
<g transform="rotate(15 100 100)">
|
||||
<path d="
|
||||
M 199,100 A 99, 99 0 0 1 100,199 99, 99 0 0 1 1,100 99, 99 0 0 1 100, 1 99, 99 0 0 1 199,100 Z
|
||||
M 185,100 A 85, 85 0 0 1 100,185 85, 85 0 0 1 15,100 85, 85 0 0 1 100,15 85, 85 0 0 1 185,100 Z
|
||||
" fill-rule="evenodd" style="mask:url(#mask)" fill="#567"/>
|
||||
<path d="M 0,100 C 110,90 110,90 200,100 C 90,110 90,110 0,100 M 100,0 C 110,90 110,90 100,200 C 90,110 90,110 100,0"/>
|
||||
<path d="M175,100C100,100 100,100 100,25 C100,100 100,100 25,100 C100,100 100,100 100,175 C100,100 100,100 175,100Z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1015 B |
|
@ -0,0 +1,419 @@
|
|||
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/**
|
||||
* 1. Change the default font family in all browsers (opinionated).
|
||||
* 2. Prevent adjustments of font size after orientation changes in IE and iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in Edge, IE, and Firefox.
|
||||
* 2. Add the correct display in IE.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details, /* 1 */
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
main, /* 2 */
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary { /* 1 */
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in iOS 4-7.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10-.
|
||||
* 1. Add the correct display in IE.
|
||||
*/
|
||||
|
||||
template, /* 1 */
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Remove the gray background on active links in IE 10.
|
||||
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent; /* 1 */
|
||||
-webkit-text-decoration-skip: objects; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the outline on focused links when they are also active or hovered
|
||||
* in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Firefox 39-.
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font style in Android 4.3-.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct background and color in IE 9-.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10-.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the overflow in IE.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct margin in IE 8.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change font properties to `inherit` in all browsers (opinionated).
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font: inherit; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the font weight unset by the previous rule.
|
||||
*/
|
||||
|
||||
optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
* controls in Android 4.
|
||||
* 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
html [type="button"], /* 1 */
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the border, margin, and padding in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10-.
|
||||
* 2. Remove the padding in IE 10-.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the text style of placeholders in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
color: inherit;
|
||||
opacity: 0.54;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD 3 Clause
|
||||
|
||||
function checkSubmit() {
|
||||
try {
|
||||
var u = document.getElementById('username');
|
||||
var p = document.getElementById('password');
|
||||
if (!u.value) {
|
||||
u.focus();
|
||||
return false;
|
||||
}
|
||||
if (!p.value) {
|
||||
p.focus();
|
||||
return false;
|
||||
}
|
||||
var s = document.getElementById('submit');
|
||||
s.setAttribute('class', 'active');
|
||||
setTimeout(function(){
|
||||
s.removeAttribute('class');
|
||||
}, 250);
|
||||
} catch (e) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function setSubmit() {
|
||||
try {
|
||||
var u = document.getElementById('username');
|
||||
var p = document.getElementById('password');
|
||||
var s = document.getElementById('submit');
|
||||
if (u.value && p.value) {
|
||||
s.removeAttribute('class');
|
||||
} else {
|
||||
s.setAttribute('class', 'disabled');
|
||||
}
|
||||
} catch (e) {
|
||||
s.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
document.getElementById('loginform').onsubmit = checkSubmit;
|
||||
document.getElementById('username').onsubmit = setSubmit;
|
||||
document.getElementById('password').onsubmit = setSubmit;
|
||||
setSubmit();
|
||||
|
||||
document.getElementById('username').removeAttribute('required');
|
||||
document.getElementById('password').removeAttribute('required');
|
||||
|
||||
// @license-end
|
Loading…
Reference in New Issue