Error handling for login in sidebar.
This commit is contained in:
parent
c1cf06c747
commit
77bcb14327
3 changed files with 31 additions and 5 deletions
|
|
@ -772,7 +772,12 @@ routes:
|
||||||
finishLogin()
|
finishLogin()
|
||||||
cacheHolder.invalidateAll()
|
cacheHolder.invalidateAll()
|
||||||
else:
|
else:
|
||||||
resp c.genMain(genFormLogin(c))
|
c.isThreadsList = true
|
||||||
|
var count = 0
|
||||||
|
let threadList = genThreadsList(c, count)
|
||||||
|
let data = genMain(c, threadList,
|
||||||
|
additionalHeaders = genRSSHeaders(c), showRssLinks = true)
|
||||||
|
resp data
|
||||||
|
|
||||||
post "/doregister":
|
post "/doregister":
|
||||||
createTFD()
|
createTFD()
|
||||||
|
|
|
||||||
14
main.tmpl
14
main.tmpl
|
|
@ -101,10 +101,18 @@
|
||||||
#else:
|
#else:
|
||||||
<div class="title">Login</div>
|
<div class="title">Login</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<span>Username: </span><input type="text" />
|
<form name="login" action="${frontQuery}dologin" method="POST">
|
||||||
<span>Password: </span><input type="password" />
|
<span>Username: </span><input type="text" name="name" />
|
||||||
|
<span>Password: </span><input type="password" name="password" />
|
||||||
|
<input type="submit" style="display: none;"
|
||||||
|
id="hdnLogin" value="Login" />
|
||||||
|
</form>
|
||||||
|
#if c.errorMsg != "":
|
||||||
|
<span class="error">$c.errorMsg</span>
|
||||||
|
#end if
|
||||||
<a href="#" class="button" style="float: left;">Register</a>
|
<a href="#" class="button" style="float: left;">Register</a>
|
||||||
<a href="#" class="button">Login</a>
|
<a href="#" onclick="document.forms['login'].submit()"
|
||||||
|
class="button">Login</a>
|
||||||
</div>
|
</div>
|
||||||
#end if
|
#end if
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,20 @@ div#sidebar .content .search
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
form
|
div#sidebar .content span.error
|
||||||
|
{
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
color: #FF4848;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 10pt;
|
||||||
|
background-color: rgba(0,0,0,0.8);
|
||||||
|
padding: 5pt 0pt;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
article#content form
|
||||||
{
|
{
|
||||||
|
|
||||||
border-right: 8px solid rgba(0, 0, 0, 0.2);
|
border-right: 8px solid rgba(0, 0, 0, 0.2);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue