Merge branch 'master' of github.com:thelia/thelia
This commit is contained in:
@@ -24,6 +24,7 @@ namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints\Length;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
class AdminLogin extends BaseForm
|
||||
{
|
||||
@@ -34,15 +35,27 @@ class AdminLogin extends BaseForm
|
||||
"constraints" => array(
|
||||
new NotBlank(),
|
||||
new Length(array("min" => 3))
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Username *"),
|
||||
"label_attr" => array(
|
||||
"for" => "username"
|
||||
)
|
||||
))
|
||||
->add("password", "password", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Password *"),
|
||||
"label_attr" => array(
|
||||
"for" => "password"
|
||||
)
|
||||
))
|
||||
->add("remember_me", "checkbox", array(
|
||||
'value' => 'yes'
|
||||
'value' => 'yes',
|
||||
"label" => Translator::getInstance()->trans("Remember me ?"),
|
||||
"label_attr" => array(
|
||||
"for" => "remember_me"
|
||||
)
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,26 @@
|
||||
{* this temlate is loaded via Ajax in the login page, to prevent login page slowdown *}
|
||||
|
||||
<div class="panel-group" id="accordion">
|
||||
{loop type="feed" name="thelia_feeds" url="http://thelia.net/Flux-rss.html?id_rubrique=8" limit="3"}
|
||||
<div class="span4 feed-list-item">
|
||||
<h3>{$DATE}</h3>
|
||||
<h2><a href="{$URL}" target="_blank" title="{intl l='Lire la suite'}">{$TITLE|strip_tags nofilter}</a></h2>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse-{$LOOP_COUNT}">
|
||||
{$TITLE|strip_tags nofilter} - {$DATE}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="collapse-{$LOOP_COUNT}" class="panel-collapse collapse {if $LOOP_COUNT == 1}in{/if}">
|
||||
<div class="panel-body">
|
||||
{* we use unescape:"htmlall" to unescape var before truncate, to prevent a cut in the middel of an HTML entity, eg &ea... *}
|
||||
<p>{$DESCRIPTION|strip_tags|unescape:"htmlall"|truncate:250:"...":true nofilter}</p>
|
||||
<p><a class="btn" href="{$URL}" target="_blank">{intl l='Lire la suite »'}</a></p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="{$URL}" target="_blank" class="btn btn-defaut btn-primary"><span class="glyphicon glyphicon-book"></span> {intl l='Lire la suite'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
</div>
|
||||
@@ -7,18 +7,24 @@
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="loginpage">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator clearfix">
|
||||
|
||||
<h1 class="title title-without-tabs">{intl l='Thelia Back Office'}</h1>
|
||||
|
||||
<div class="col-md-6">
|
||||
{module_include location='index_top'}
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>{intl l='Thelia Back Office'}</h1>
|
||||
|
||||
{form name="thelia.admin.login"}
|
||||
<form action="{url path='/admin/checklogin'}" method="post" class="well form-inline" {form_enctype form=$form}>
|
||||
<form action="{url path='/admin/checklogin'}" method="post" {form_enctype form=$form}>
|
||||
|
||||
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<fieldset>
|
||||
<legend>{intl l='Login'}</legend>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
@@ -27,38 +33,55 @@
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='username'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" id="username" class="input" placeholder="{intl l='User name'}" name="{$name}" value="{$value}" {$attr} />
|
||||
</span>
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Username'}" autofocus>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="password" id="password" class="input" placeholder="{intl l='Password'}" name="{$name}" {$attr} />
|
||||
</span>
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
|
||||
<input type="password" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Password'}">
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='remember_me'}
|
||||
<label class="checkbox"> <input type="checkbox" name="{$name}" value="{$value}" {$attr} {if $options.checked}checked="checked"{/if}/> {intl l='Remember me'}</label>
|
||||
<div class="checkbox">
|
||||
<label for="{$label_attr.for}">
|
||||
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="{$value}" {$attr} {if $options.checked}checked="checked"{/if}/> {intl l="{$label}"}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<span class="pull-right"><button type="submit" class="btn btn-default btn-primary">{intl l='Login'} <span class="glyphicon glyphicon-play"></span></button></span>
|
||||
<button type="submit" class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-off"></span> {intl l='Login'}</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
|
||||
{module_include location='index_middle'}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="row feed-list">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="alert alert-info">{intl l="Loading Thelia lastest news..."}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='index_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
Reference in New Issue
Block a user