<div class="pure-u-lg-1-3 pure-u-1-8"></div>
<div id="addlink-form" class="page-form pure-u-lg-1-3 pure-u-3-4">
<h2>{"Shaare a new link"|t}</h2>
- <form method="GET" action="" name="addform" class="addform page-form page-form-light">
+ <form method="GET" action="" name="addform" class="addform page-form page-form-light autofocus">
<div>
<input type="text" name="post" placeholder="{'URL or leave empty to post a note'|t}">
</div>
</div>
</div>
{include="page.footer"}
-<script>
- document.getElementsByName('post')[0].focus();
-</script>
</body>
</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+ {include="includes"}
+</head>
+<body>
+{include="page.header"}
+<div class="pure-g">
+ <div class="pure-u-lg-1-3 pure-u-1-8"></div>
+ <div id="addlink-form" class="page-form pure-u-lg-1-3 pure-u-3-4">
+ <h2>{"Change password"|t}</h2>
+ <form method="POST" action="" name="changepasswordform" id="changepasswordform"
+ class="addform page-form page-form-light">
+ <div>
+ <input type="password" name="oldpassword" placeholder="{'Current password'|t}" class="autofocus">
+ </div>
+ <div>
+ <input type="password" name="setpassword" placeholder="{'New password'|t}">
+ </div>
+ <input type="hidden" name="token" value="{$token}">
+ <div>
+ <input type="submit" value="{'Change'|t}">
+ </div>
+ </form>
+ </div>
+</div>
+{include="page.footer"}
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+ {include="includes"}
+</head>
+<body>
+{include="page.header"}
+<div class="pure-g">
+ <div class="pure-u-lg-1-3 pure-u-1-8"></div>
+ <div id="addlink-form" class="page-form pure-u-lg-1-3 pure-u-3-4">
+ <h2>{"Manage tags"|t}</h2>
+ <form method="POST" action="" name="changetag" id="changetag"
+ class="addform page-form page-form-light">
+ <div>
+ <input type="text" name="fromtag" placeholder="{'Tag'|t}"
+ list="tagsList" autocomplete="off" class="awesomplete autofocus" data-minChars="1">
+ <datalist id="tagsList">
+ {loop="$tags"}<option>{$key}</option>{/loop}
+ </datalist>
+ </div>
+ <div>
+ <input type="text" name="totag" placeholder="{'New name'|t}"
+ list="toTagsList" autocomplete="off" class="awesomplete" data-minChars="1">
+ <datalist id="toTagsList">
+ {loop="$tags"}<option>{$key}</option>{/loop}
+ </datalist>
+ </div>
+ <div>{'Case sensitive'|t}</div>
+ <input type="hidden" name="token" value="{$token}">
+ <div>
+ <input type="submit" value="{'Rename'|t}" name="renametag">
+ <span class="pure-u-0 pure-u-lg-visible">or</span>
+ <input type="submit" value="{'Delete'|t}" name="deletetag">
+ </div>
+ </form>
+ </div>
+</div>
+{include="page.footer"}
+</body>
+</html>
#pluginform .mobile-row, #pluginform .mobile-row td {
border-top-style: none;
}
-}
\ No newline at end of file
+}
var loginButton = document.getElementById('login-button');
var loginBlock = document.getElementById('header-login-form');
-loginButton.addEventListener('click', function(event) {
- event.preventDefault();
- loginBlock.classList.toggle('open');
- document.getElementById('content').style.boxShadow = 'none';
-});
+if (loginButton != null) {
+ loginButton.addEventListener('click', function(event) {
+ event.preventDefault();
+ loginBlock.classList.toggle('open');
+ document.getElementById('content').style.boxShadow = 'none';
+ });
+}
// Focus on login field.
-loginBlock.addEventListener('transitionend', function() {
- loginBlock.firstElementChild.focus();
-});
+if (loginBlock != null) {
+ loginBlock.addEventListener('transitionend', function () {
+ loginBlock.firstElementChild.focus();
+ });
+}
var hiddenReturnurl = document.getElementsByName('returnurl');
-hiddenReturnurl.value = window.location.href;
\ No newline at end of file
+if (hiddenReturnurl != null) {
+ hiddenReturnurl.value = window.location.href;
+}
+
+
+var autofocusElements = document.querySelector('.autofocus');
+console.log(autofocusElements);
+if (autofocusElements != null) {
+ autofocusElements.focus();
+}
\ No newline at end of file