php-mpos/public/templates/mpos/login/small.tpl
xisi 3006cb544f Reworked csrf tokens, now enabled globally
The way this now works is, if csrf is enabled:
 * Any new or existing template can have csrf protection by adding the hidden input ctoken that's in this batch to its form, removes any logic in templates
 * Page controllers that already exist have been updated, new ones only require checking if csrf is enabled and valid
2014-01-24 13:00:24 -05:00

19 lines
781 B
Smarty

{if $smarty.session.AUTHENTICATED|default:"0" == 0}
<div class="login_small">
<form action="{$smarty.server.SCRIPT_NAME}" method="post" id="loginForm">
<input type="hidden" name="page" value="login" />
<input type="hidden" name="ctoken" value="{$CTOKEN|escape|default:""}" />
<input type="hidden" name="to" value="{$smarty.server.SCRIPT_NAME}?page=dashboard" />
<fieldset2 class="small">
<label>Username</label>
<input type="text" name="username" size="22" maxlength="100" required />
<fieldset2 class="small">
<label>Password</label>
<input type="password" name="password" size="22" maxlength="100" required />
</fieldset2>
</fieldset2>
<input type="submit" value="Login" class="alt_btn" />
</form>
</div>
{/if}