[upd] better install form

This commit is contained in:
Knah Tsaeb 2015-07-21 14:50:34 +02:00
parent 51f119e569
commit 4a4046e25c
5 changed files with 108 additions and 67 deletions

View file

@ -2270,7 +2270,7 @@ function install()
$GLOBALS['hash'] = sha1($_POST['setpassword'].$GLOBALS['login'].$GLOBALS['salt']);
$GLOBALS['title'] = (empty($_POST['title']) ? 'Shared links on '.htmlspecialchars(indexUrl()) : $_POST['title'] );
$GLOBALS['config']['ENABLE_UPDATECHECK'] = !empty($_POST['updateCheck']);
writeConfig();
//writeConfig();
echo '<script>alert("Shaarli is now configured. Please enter your login/password and start shaaring your links !");document.location=\'?do=login\';</script>';
exit;
}

View file

@ -1,23 +1,43 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}{$timezone_js}</head>
<body onload="document.installform.setlogin.focus();">
<div id="install">
<h1>Shaarli</h1>
It looks like it's the first time you run Shaarli. Please configure it:<br>
<form method="POST" action="#" name="installform" id="installform">
<table>
<tr><td><b>Login:</b></td><td><input type="text" name="setlogin" size="30"></td></tr>
<tr><td><b>Password:</b></td><td><input type="password" name="setpassword" size="30"></td></tr>
<head>
{include="includes"}{$timezone_js}
</head>
<body>
<div id="logo" title="Share your links !"></div>
<div id="pageheader">
<form method="post" action="?" name="installform" id="configform">
<p>
<h3>It looks like it's the first time you run Shaarli. Please configure it:</h3>
</p>
<p>
<label>Login : </label>
<input type="text" name="setlogin" autofocus="autofocus"/>
</p>
<p>
<label>Password : </label>
<input type="password" name="setpassword"/>
</p>
<p>
{$timezone_html}
<tr><td><b>Page title:</b></td><td><input type="text" name="title" size="30"></td></tr>
<tr><td valign="top"><b>Update:</b></td><td>
<input type="checkbox" name="updateCheck" id="updateCheck" checked="checked"><label for="updateCheck">&nbsp;Notify me when a new release is ready</label></td>
</tr>
<tr><td colspan="2"><input type="submit" name="Save" value="Save config" class="bigbutton"></td></tr>
</table>
</p>
<p>
<label>Page title : </label>
<input type="text" name="title" />
</p>
<p>
<label>Update : </label>
<input type="checkbox" name="updateCheck" id="updateCheck" checked="checked"/>
<label for="updateCheck">&nbsp;Notify me when a new release is ready</label>
</p>
<p>
More option avaible in my Shaarli configuration page.
</p>
<p>
<input type="submit" name="Save" value="Save config" class="bigbutton">
</p>
</form>
</div>
{include="page.footer"}
</body>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -270,7 +270,7 @@ a, .linkdescription a {
position: relative;
}
#pageheader #logo {
#logo {
background-image: url(../../images/logo_myShaarli.png);
background-repeat: no-repeat;
cursor: pointer;
@ -715,13 +715,6 @@ a, .linkdescription a {
text-decoration: none;
}
#installform td {
clear: left;
color: black;
font-size: 10pt;
padding: 10px 5px;
}
.thumbnail {
float: left;
margin: 0;
@ -964,6 +957,10 @@ a:hover, .linkdescription a:hover, .linktitle a:hover, .linkWallabag a:hover, .l
font-weight: bold;
}
#configform h3 {
color: #ffffff;
}
.picwall_pictureframe span.info, .lazyimage {
display: none;
}

View file

@ -271,14 +271,14 @@ a, .linkdescription a {
top: 0;
}
#pageheader #logo {
background-image: url(../../images/logo.png);
#logo {
background-image: url(../../images/logo_myShaarli.png);
background-repeat: no-repeat;
cursor: pointer;
float: left;
height: 50px;
height: 45px;
margin: 0 10px;
width: 105px;
width: 120px;
}
#pageheader {
@ -377,12 +377,6 @@ a, .linkdescription a {
width: 2em;
}
.removeTag {
border-left: 1px solid #aaa;
color: #6767A7;
padding-left: .2em;
}
.tagfilter input.bigbutton, .searchform input.bigbutton, .addform input.bigbutton {
background: linear-gradient(#dedede,#ffffff);
background-color: #dedede;
@ -672,6 +666,12 @@ a, .linkdescription a {
text-decoration: underline;
}
.removeTag {
border-left: 1px solid #aaa;
color: #6767A7;
padding-left: .2em;
}
.markdownHelp {
background-color: #FFFFFF;
padding: .3em;
@ -729,13 +729,6 @@ a, .linkdescription a {
text-decoration: none;
}
#installform td {
clear: left;
color: black;
font-size: 10pt;
padding: 10px 5px;
}
.thumbnail {
margin: 0;
min-height: 96px;
@ -974,6 +967,10 @@ a:hover, .linkdescription a:hover, .linktitle a:hover, .linkWallabag a:hover, .l
font-weight: bold;
}
#configform h3 {
color: #ffffff;
}
.picwall_pictureframe span.info, .lazyimage {
display: none;
}
@ -1021,7 +1018,7 @@ a:hover, .linkdescription a:hover, .linktitle a:hover, .linkWallabag a:hover, .l
-o-animation-duration: .5s;
-webkit-animation-duration: .5s;
animation-duration: .5s;
border: 1px solid #ccc;
border: .2em solid #ccc;
border-radius: .3em;
box-sizing: border-box;
display: none;
@ -1057,6 +1054,13 @@ a:hover, .linkdescription a:hover, .linktitle a:hover, .linkWallabag a:hover, .l
height: 1.1em;
}
.tabs li {
background: linear-gradient(#333333,#111111);
background-color: #333333;
box-shadow: 0 1px 2px rgba(0,0,0,0.5);
border-radius: .4em;
}
.tabs li,[id^=tab]:checked ~
[id^=tab-content] {
display: block;

View file

@ -1,23 +1,43 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}{$timezone_js}</head>
<body onload="document.installform.setlogin.focus();">
<div id="install">
<h1>Shaarli</h1>
It looks like it's the first time you run Shaarli. Please configure it:<br>
<form method="POST" action="#" name="installform" id="installform">
<table>
<tr><td><b>Login:</b></td><td><input type="text" name="setlogin" size="30"></td></tr>
<tr><td><b>Password:</b></td><td><input type="password" name="setpassword" size="30"></td></tr>
<head>
{include="includes"}{$timezone_js}
</head>
<body>
<div id="logo" title="Share your links !"></div>
<div id="pageheader">
<form method="post" action="?" name="installform" id="configform">
<p>
<h3>It looks like it's the first time you run Shaarli. Please configure it:</h3>
</p>
<p>
<label>Login : </label>
<input type="text" name="setlogin" autofocus="autofocus"/>
</p>
<p>
<label>Password : </label>
<input type="password" name="setpassword"/>
</p>
<p>
{$timezone_html}
<tr><td><b>Page title:</b></td><td><input type="text" name="title" size="30"></td></tr>
<tr><td valign="top"><b>Update:</b></td><td>
<input type="checkbox" name="updateCheck" id="updateCheck" checked="checked"><label for="updateCheck">&nbsp;Notify me when a new release is ready</label></td>
</tr>
<tr><td colspan="2"><input type="submit" name="Save" value="Save config" class="bigbutton"></td></tr>
</table>
</p>
<p>
<label>Page title : </label>
<input type="text" name="title" />
</p>
<p>
<label>Update : </label>
<input type="checkbox" name="updateCheck" id="updateCheck" checked="checked"/>
<label for="updateCheck">&nbsp;Notify me when a new release is ready</label>
</p>
<p>
More option avaible in my Shaarli configuration page.
</p>
<p>
<input type="submit" name="Save" value="Save config" class="bigbutton">
</p>
</form>
</div>
{include="page.footer"}
</body>
</div>
{include="page.footer"}
</body>
</html>