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

View file

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

View file

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

View file

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

View file

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