- Добавил Bootstrap и настроил внешний вид форм приложения.
https://www.youtube.com/watch?v=a51jGwoTNmI&list=PLU2ftbIeotGpAYRP9Iv2KLIwK36-o_qYk&index=13
This commit is contained in:
@@ -1,15 +1,28 @@
|
||||
<#macro login path>
|
||||
<form action="${path}" method="post">
|
||||
<div><label> User Name : <input type="text" name="username"/> </label></div>
|
||||
<div><label> Password: <input type="password" name="password"/> </label></div>
|
||||
<div><input type="submit" value="Sign in"/></div>
|
||||
<input type="hidden" name="_csrf" value="${_csrf.token}" />
|
||||
<#macro login path isRegistrationForm=false>
|
||||
<form action="${path}" method="post" xmlns="http://www.w3.org/1999/html">
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label"> User Name :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="username" placeholder="User name"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="inputPassword3" class="col-sm-2 col-form-label"> Password: </label>
|
||||
<div class="col-sm-6">
|
||||
<input type="password" class="form-control" name="password" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<#if !isRegistrationForm>
|
||||
<a href="/registration" class="btn btn-primary">Add new user</a>
|
||||
</#if>
|
||||
<input class="btn btn-primary" type="submit" <#if isRegistrationForm> value="Create" <#else> value="Sign in"</#if>/>
|
||||
<input type="hidden" name="_csrf" value="${_csrf.token}"/>
|
||||
</form>
|
||||
</#macro>
|
||||
|
||||
<#macro logout>
|
||||
<form action="/logout" method="post">
|
||||
<input type="hidden" name="_csrf" value="${_csrf.token}" />
|
||||
<input type="submit" value="Sign Out"/>
|
||||
<input type="hidden" name="_csrf" value="${_csrf.token}"/>
|
||||
<button type="submit" class="btn btn-primary">Sign Out</button>
|
||||
</form>
|
||||
</#macro>
|
||||
Reference in New Issue
Block a user