start creating register and login pages
This commit is contained in:
@@ -15,6 +15,11 @@
|
||||
<default key="_view">connexion</default>
|
||||
</route>
|
||||
|
||||
<route id="customer.create.view" path="/register">
|
||||
<default key="_controller">Thelia\Controller\Front\DefaultController::noAction</default>
|
||||
<default key="_view">register</default>
|
||||
</route>
|
||||
|
||||
<route id="customer.update.process" path="/customer/update" methods="post">
|
||||
<default key="_controller">Thelia\Controller\Front\CustomerController::updateAction</default>
|
||||
</route>
|
||||
@@ -23,9 +28,15 @@
|
||||
<default key="_controller">Thelia\Controller\Front\CustomerController::loginAction</default>
|
||||
</route>
|
||||
|
||||
<route id="customer.login.view" path="/login">
|
||||
<default key="_controller">Thelia\Controller\Front\DefaultController::noAction</default>
|
||||
<default key="_view">login</default>
|
||||
</route>
|
||||
|
||||
<route id="customer.logout.process" path="/customer/logout">
|
||||
<default key="_controller">Thelia\Controller\Front\CustomerController::logoutAction</default>
|
||||
</route>
|
||||
|
||||
<!-- end customer routes -->
|
||||
|
||||
<!-- customer address routes -->
|
||||
|
||||
@@ -151,6 +151,17 @@ class DataAccessFunctions extends AbstractSmartyPlugin
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lang global data
|
||||
*
|
||||
* @param $params
|
||||
* @param $smarty
|
||||
*/
|
||||
public function langDataAccess($params, $smarty)
|
||||
{
|
||||
return $this->dataAccess("Lang", $params, $this->request->getSession()->getLang());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $objectLabel
|
||||
* @param $params
|
||||
@@ -251,6 +262,7 @@ class DataAccessFunctions extends AbstractSmartyPlugin
|
||||
new SmartyPluginDescriptor('function', 'content', $this, 'contentDataAccess'),
|
||||
new SmartyPluginDescriptor('function', 'folder', $this, 'folderDataAccess'),
|
||||
new SmartyPluginDescriptor('function', 'currency', $this, 'currencyDataAccess'),
|
||||
new SmartyPluginDescriptor('function', 'lang', $this, 'langDataAccess'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{block name="page-title" append}
|
||||
homepage
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="main-content"}
|
||||
<section class="carousel-container">
|
||||
@@ -72,7 +68,7 @@
|
||||
preorder : http://schema.org/PreOrder
|
||||
online_only : http://schema.org/OnlineOnly
|
||||
-->
|
||||
<span class="regular-price"><span itemprop="price" class="price">$ {format_number number="{#BEST_TAXED_PRICE}"}
|
||||
<span class="regular-price"><span itemprop="price" class="price">{currency attr="symbol"} {format_number number="{#BEST_TAXED_PRICE}"}
|
||||
</span></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,8 +127,8 @@
|
||||
online_only : http://schema.org/OnlineOnly
|
||||
-->
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product="{#ID}" limit="1"}
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">$ {format_number number="{#TAXED_PROMO_PRICE}"}</span></span>
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">$ {format_number number="{#TAXED_PRICE}"}</span></span>
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number="{#TAXED_PROMO_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number="{#TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -121,10 +121,11 @@ URL: http://www.thelia.net
|
||||
|
||||
<div class="language-switch" aria-labelledby="language-label">
|
||||
<span id="language-label" class="dropdown-label">Language:</span>
|
||||
<a class="current dropdown-toggle" data-toggle="dropdown" href="language.html">English</a>
|
||||
<a class="current dropdown-toggle" data-toggle="dropdown" href="language.html">{lang attr="title"}</a>
|
||||
<ul class="select dropdown-menu">
|
||||
<li><a href="?lang=fr">French</a></li>
|
||||
<li><a href="?lang=ge">German</a></li>
|
||||
{loop type="lang" name="lang_available" exclude="{lang attr="id"}"}
|
||||
<li><a href="?lang={#CODE}">{#TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -146,6 +147,7 @@ URL: http://www.thelia.net
|
||||
|
||||
<main class="main-container" role="main">
|
||||
<div class="container">
|
||||
{block name="breadcrumb"}{/block}
|
||||
{block name="main-content"}{/block}
|
||||
</div><!-- /.container -->
|
||||
</main><!-- /.main-container -->
|
||||
|
||||
51
templates/default/login.html
Normal file
51
templates/default/login.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{block name="breadcrumb"}
|
||||
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
|
||||
<strong id="breadcrumb-label">{intl l="You are here"}: </strong>
|
||||
<ul class="breadcrumb" itemprop="breadcrumb">
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="index.php" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Login"}</span></li>
|
||||
</ul>
|
||||
</nav><!-- /.nav-breadcrumb -->
|
||||
{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
|
||||
|
||||
<div class="main">
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
<h1 id="main-label" class="page-header">Login</h1>
|
||||
<form id="form-login" action="" method="post" role="form">
|
||||
<fieldset>
|
||||
<div class="form-group group-email">
|
||||
<label for="email">Please enter your email address</label>
|
||||
<input type="email" name="email" id="email" class="form-control" value="" aria-required="true" autofocus required>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Do you have an account?</legend>
|
||||
<div class="radio radio-account0" >
|
||||
<label for="account0">
|
||||
<input type="radio" name="account" id="account0" data-toggle="password" value="0" <?php if(!(isset($_POST['account']) && $_POST['account'] == '1')) { echo ' checked'; }?>> No, I am a new customer.
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio radio-account1">
|
||||
<label for="account1">
|
||||
<input type="radio" name="account" id="account1" data-toggle="password" value="1"<?php if(isset($_POST['account']) && $_POST['account'] == '1' ) { echo ' checked'; }?>> Yes, I have a password :
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group group-password">
|
||||
<label for="password" class="sr-only">Please enter your password</label>
|
||||
<input type="password" name="password" id="password" class="form-control" autocomplete="off">
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<div class="group-btn">
|
||||
<a href="password.php" class="forgot-password">Forgot your Password ?</a>
|
||||
<button type="submit" class="btn btn-login">Next</button>
|
||||
</div>
|
||||
</form>
|
||||
</article>
|
||||
</div>
|
||||
{/block}
|
||||
164
templates/default/register.html
Normal file
164
templates/default/register.html
Normal file
@@ -0,0 +1,164 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{block name="breadcrumb"}
|
||||
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
|
||||
<strong id="breadcrumb-label">{intl l="You are here"}: </strong>
|
||||
<ul class="breadcrumb" itemprop="breadcrumb">
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="index.php" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Register"}</span></li>
|
||||
</ul>
|
||||
</nav><!-- /.nav-breadcrumb -->
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main">
|
||||
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
|
||||
<h1 id="main-label" class="page-header">Create New Account</h1>
|
||||
|
||||
<form id="form-register" class="form-horizontal" action="" method="post" role="form">
|
||||
|
||||
<fieldset id="register-info" class="panel panel">
|
||||
<div class="panel-heading">
|
||||
1. Personal Informations
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-group group-firstname has-success">
|
||||
<label class="control-label" for="firstname">First Name: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="firstname" id="firstname" class="form-control" placeholder="John" autofocus required>
|
||||
<span class="help-block"><i class="icon-ok"></i> Available input!</span>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-lastname has-error">
|
||||
<label class="control-label " for="lastname">Last Name: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="lastname" id="lastname" class="form-control" placeholder="Doe" required>
|
||||
<span class="help-block"><i class="icon-remove"></i> Invalid input!</span>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-email">
|
||||
<label class="control-label" for="email">Email Address: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="email" name="email" id="email" class="form-control" placeholder="johndoe@domain.com" required>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-phone">
|
||||
<label class="control-label" for="phone">Telephone: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="tel" name="phone" id="phone" class="form-control" placeholder="(01) 02 03 04 05 " required>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-fax">
|
||||
<label class="control-label" for="fax">Fax: </label>
|
||||
<div class="control-input">
|
||||
<input type="tel" name="fax" id="fax" class="form-control" placeholder="(01) 02 03 04 05 ">
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="register-delivery" class="panel">
|
||||
<div class="panel-heading">
|
||||
2. Delivery Informations
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-group group-company">
|
||||
<label class="control-label" for="company">Company Name: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="company" id="company" class="form-control" placeholder="Thelia" required>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-address">
|
||||
<label class="control-label" for="address">Street Address: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="asresss" id="address" class="form-control" placeholder="Street address" required>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-address_2">
|
||||
<label class="control-label" for="address_2">Address 2:</label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="address_2" id="address_2" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-city">
|
||||
<label class="control-label" for="city">City: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="city" id="city" class="form-control" placeholder="New york" required>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-zip">
|
||||
<label class="control-label" for="zip">Postal Code: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="text" name="zip" id="zip" class="form-control" placeholder="H2T 2V6" required>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-country">
|
||||
<label class="control-label" for="country">Country: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<select name"country" id="country" class="form-control" required>
|
||||
<option value="">-- Select Country --</option>
|
||||
<option value="1">Country1</option>
|
||||
<option value="2">Country2</option>
|
||||
<option value="3">Country3</option>
|
||||
<option value="4">Country4</option>
|
||||
</select>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="register-login" class="panel">
|
||||
<div class="panel-heading">
|
||||
3. Login Information
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-group group-password">
|
||||
<label class="control-label" for="password">Password: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="password" name="password" id="password" class="form-control" required autocomplete="off">
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-confirm_password">
|
||||
<label class="control-label" for="confirm_password">Confirm Password: <span class="required">*</span></label>
|
||||
<div class="control-input">
|
||||
<input type="password" name="confirm_password" id="confirm_password" class="form-control" required autocomplete="off">
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="form-group group-agreed">
|
||||
<div class="control-input">
|
||||
<div class="checkbox">
|
||||
<label class="control-label" for="agreed">
|
||||
<input type="checkbox" name="agreed" id="agreed" value="1"> I've read and agreed on <a href="#">Terms & Conditions</a>.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
|
||||
<div class="form-group group-btn">
|
||||
<div class="control-btn">
|
||||
<button type="submit" class="btn btn-register">Sign in</button>
|
||||
</div>
|
||||
</div><!--/.form-group-->
|
||||
</form>
|
||||
</article>
|
||||
|
||||
</div><!-- /.layout -->
|
||||
{/block}
|
||||
Reference in New Issue
Block a user