Merge branch 'master' into tax
Conflicts: install/insert.sql
This commit is contained in:
@@ -44,6 +44,14 @@
|
|||||||
|
|
||||||
<!-- end Customer rule management -->
|
<!-- end Customer rule management -->
|
||||||
|
|
||||||
|
<!-- Order rule management -->
|
||||||
|
|
||||||
|
<route id="admin.order" path="/admin/order">
|
||||||
|
<default key="_controller">Thelia\Controller\Admin\OrderController::indexAction</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<!-- end Customer rule management -->
|
||||||
|
|
||||||
<!-- Categories management -->
|
<!-- Categories management -->
|
||||||
|
|
||||||
<route id="admin.categories.default" path="/admin/categories">
|
<route id="admin.categories.default" path="/admin/categories">
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ namespace Thelia\Controller\Admin;
|
|||||||
use Symfony\Component\Routing\Exception\InvalidParameterException;
|
use Symfony\Component\Routing\Exception\InvalidParameterException;
|
||||||
use Symfony\Component\Routing\Exception\MissingMandatoryParametersException;
|
use Symfony\Component\Routing\Exception\MissingMandatoryParametersException;
|
||||||
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||||
use Symfony\Component\Routing\Router;
|
|
||||||
use Thelia\Controller\BaseController;
|
use Thelia\Controller\BaseController;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Thelia\Core\Security\Exception\AuthorizationException;
|
use Thelia\Core\Security\Exception\AuthorizationException;
|
||||||
@@ -40,6 +39,7 @@ use Thelia\Model\LangQuery;
|
|||||||
use Thelia\Form\BaseForm;
|
use Thelia\Form\BaseForm;
|
||||||
use Thelia\Form\Exception\FormValidationException;
|
use Thelia\Form\Exception\FormValidationException;
|
||||||
use Thelia\Log\Tlog;
|
use Thelia\Log\Tlog;
|
||||||
|
use Symfony\Component\Routing\Router;
|
||||||
|
|
||||||
class BaseAdminController extends BaseController
|
class BaseAdminController extends BaseController
|
||||||
{
|
{
|
||||||
@@ -227,7 +227,7 @@ class BaseAdminController extends BaseController
|
|||||||
*
|
*
|
||||||
* @see \Thelia\Controller\BaseController::getRouteFromRouter()
|
* @see \Thelia\Controller\BaseController::getRouteFromRouter()
|
||||||
*/
|
*/
|
||||||
protected function getRoute($routeId, $parameters = array(), $referenceType = Router::RELATIVE_PATH)
|
protected function getRoute($routeId, $parameters = array(), $referenceType = Router::ABSOLUTE_URL)
|
||||||
{
|
{
|
||||||
return $this->getRouteFromRouter(
|
return $this->getRouteFromRouter(
|
||||||
'router.admin',
|
'router.admin',
|
||||||
|
|||||||
39
core/lib/Thelia/Controller/Admin/OrderController.php
Normal file
39
core/lib/Thelia/Controller/Admin/OrderController.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* Thelia */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : info@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* This program is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU General Public License as published by */
|
||||||
|
/* the Free Software Foundation; either version 3 of the License */
|
||||||
|
/* */
|
||||||
|
/* This program is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU General Public License */
|
||||||
|
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
/* */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Controller\Admin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class OrderController
|
||||||
|
* @package Thelia\Controller\Admin
|
||||||
|
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class OrderController extends BaseAdminController
|
||||||
|
{
|
||||||
|
public function indexAction()
|
||||||
|
{
|
||||||
|
if (null !== $response = $this->checkAuth("admin.orders.view")) return $response;
|
||||||
|
return $this->render("orders", array("display_order" => 20));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -235,7 +235,7 @@ class BaseController extends ContainerAware
|
|||||||
* @throws \InvalidArgumentException When the router doesn't exist
|
* @throws \InvalidArgumentException When the router doesn't exist
|
||||||
* @return string The generated URL
|
* @return string The generated URL
|
||||||
*/
|
*/
|
||||||
protected function getRouteFromRouter($routerName, $routeId, $parameters = array(), $referenceType = Router::RELATIVE_PATH)
|
protected function getRouteFromRouter($routerName, $routeId, $parameters = array(), $referenceType = Router::ABSOLUTE_URL)
|
||||||
{
|
{
|
||||||
/** @var Router $router */
|
/** @var Router $router */
|
||||||
$router = $this->container->get($routerName);
|
$router = $this->container->get($routerName);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ use Assetic\Filter;
|
|||||||
use Assetic\Factory\AssetFactory;
|
use Assetic\Factory\AssetFactory;
|
||||||
use Assetic\Factory\Worker\CacheBustingWorker;
|
use Assetic\Factory\Worker\CacheBustingWorker;
|
||||||
use Assetic\AssetWriter;
|
use Assetic\AssetWriter;
|
||||||
|
use Thelia\Model\ConfigQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is a simple helper for generating assets using Assetic.
|
* This class is a simple helper for generating assets using Assetic.
|
||||||
@@ -126,25 +127,28 @@ class AsseticHelper
|
|||||||
//
|
//
|
||||||
if ($dev_mode == true || ! file_exists($target_file)) {
|
if ($dev_mode == true || ! file_exists($target_file)) {
|
||||||
|
|
||||||
// Delete previous version of the file
|
if (ConfigQuery::read('process_assets', true)) {
|
||||||
list($commonPart, $dummy) = explode('-', $asset_target_path);
|
|
||||||
|
|
||||||
foreach (glob("$output_path/$commonPart-*") as $filename) {
|
// Delete previous version of the file
|
||||||
@unlink($filename);
|
list($commonPart, $dummy) = explode('-', $asset_target_path);
|
||||||
}
|
|
||||||
|
|
||||||
// Apply filters now
|
foreach (glob("$output_path/$commonPart-*") as $filename) {
|
||||||
foreach ($filter_list as $filter) {
|
@unlink($filename);
|
||||||
if ('?' != $filter[0]) {
|
|
||||||
$asset->ensureFilter($fm->get($filter));
|
|
||||||
} elseif (!$debug) {
|
|
||||||
$asset->ensureFilter($fm->get(substr($filter, 1)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Apply filters now
|
||||||
|
foreach ($filter_list as $filter) {
|
||||||
|
if ('?' != $filter[0]) {
|
||||||
|
$asset->ensureFilter($fm->get($filter));
|
||||||
|
} elseif (!$debug) {
|
||||||
|
$asset->ensureFilter($fm->get(substr($filter, 1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$writer = new AssetWriter($output_path);
|
||||||
|
|
||||||
|
$writer->writeAsset($asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
$writer = new AssetWriter($output_path);
|
|
||||||
|
|
||||||
$writer->writeAsset($asset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rtrim($output_url, '/').'/'.$asset_target_path;
|
return rtrim($output_url, '/').'/'.$asset_target_path;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
namespace Thelia\Form;
|
namespace Thelia\Form;
|
||||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
|
use Thelia\Core\Translation\Translator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AddressCreateForm
|
* Class AddressCreateForm
|
||||||
@@ -59,65 +60,104 @@ class AddressCreateForm extends BaseForm
|
|||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new NotBlank()
|
new NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "address name",
|
"label" => Translator::getInstance()->trans("Address label *"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "label_create"
|
||||||
|
),
|
||||||
"required" => true
|
"required" => true
|
||||||
))
|
))
|
||||||
->add("title", "text", array(
|
->add("title", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new NotBlank()
|
new NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "title"
|
"label" => Translator::getInstance()->trans("Title"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "title_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("firstname", "text", array(
|
->add("firstname", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new NotBlank()
|
new NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "first name"
|
"label" => Translator::getInstance()->trans("Firstname"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "firstname_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("lastname", "text", array(
|
->add("lastname", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new NotBlank()
|
new NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "last name"
|
"label" => Translator::getInstance()->trans("Lastname"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "lastname_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("address1", "text", array(
|
->add("address1", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new NotBlank()
|
new NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "address"
|
"label" => Translator::getInstance()->trans("Street Address"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "address1_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("address2", "text", array(
|
->add("address2", "text", array(
|
||||||
"label" => "address (line 2)"
|
"label" => Translator::getInstance()->trans("Additional address"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "address2_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("address3", "text", array(
|
->add("address3", "text", array(
|
||||||
"label" => "address (line 3)"
|
"label" => Translator::getInstance()->trans("Additional address"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "address3_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("zipcode", "text", array(
|
->add("zipcode", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new NotBlank()
|
new NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "zipcode"
|
"label" => Translator::getInstance()->trans("Zip code"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "zipcode_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("city", "text", array(
|
->add("city", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new NotBlank()
|
new NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "city"
|
"label" => Translator::getInstance()->trans("City"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "city_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("country", "text", array(
|
->add("country", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new NotBlank()
|
new NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "country"
|
"label" => Translator::getInstance()->trans("Country"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "country_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("phone", "text", array(
|
->add("phone", "text", array(
|
||||||
"label" => "phone"
|
"label" => Translator::getInstance()->trans("Phone"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "phone_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("cellphone", "text", array(
|
->add("cellphone", "text", array(
|
||||||
"label" => "cellphone"
|
"label" => Translator::getInstance()->trans("Cellphone"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "cellphone_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("company", "text", array(
|
->add("company", "text", array(
|
||||||
"label" => "company"
|
"label" => Translator::getInstance()->trans("Compagny"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "company_create"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
namespace Thelia\Form;
|
namespace Thelia\Form;
|
||||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
|
use Thelia\Core\Translation\Translator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AddressUpdateForm
|
* Class AddressUpdateForm
|
||||||
@@ -55,6 +56,112 @@ class AddressUpdateForm extends AddressCreateForm
|
|||||||
{
|
{
|
||||||
parent::buildForm();
|
parent::buildForm();
|
||||||
|
|
||||||
|
$this->formBuilder
|
||||||
|
->add("label", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Address label *"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "label_update"
|
||||||
|
),
|
||||||
|
"required" => true
|
||||||
|
))
|
||||||
|
->add("title", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Title"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "title_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("firstname", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Firstname"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "firstname_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("lastname", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Lastname"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "lastname_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("address1", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Street Address"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "address1_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("address2", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Additional address"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "address2_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("address3", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Additional address"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "address3_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("zipcode", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Zip code"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "zipcode_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("city", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("City"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "city_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("country", "text", array(
|
||||||
|
"constraints" => array(
|
||||||
|
new NotBlank()
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Country"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "country_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("phone", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Phone"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "phone_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("cellphone", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Cellphone"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "cellphone_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
->add("company", "text", array(
|
||||||
|
"label" => Translator::getInstance()->trans("Compagny"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "company_update"
|
||||||
|
)
|
||||||
|
))
|
||||||
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
namespace Thelia\Form;
|
namespace Thelia\Form;
|
||||||
|
|
||||||
use Symfony\Component\Validator\Constraints;
|
use Symfony\Component\Validator\Constraints;
|
||||||
|
use Thelia\Core\Translation\Translator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CustomerModification
|
* Class CustomerModification
|
||||||
@@ -56,60 +57,93 @@ class CustomerModification extends BaseForm
|
|||||||
{
|
{
|
||||||
|
|
||||||
$this->formBuilder
|
$this->formBuilder
|
||||||
->add('update_logged_in_user', 'boolean') // In a front office context, update the in-memory logged-in user data
|
->add('update_logged_in_user', 'integer') // In a front office context, update the in-memory logged-in user data
|
||||||
->add("firstname", "text", array(
|
->add("firstname", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank()
|
new Constraints\NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "firstname"
|
"label" => Translator::getInstance()->trans("First Name"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "firstname"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("lastname", "text", array(
|
->add("lastname", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank()
|
new Constraints\NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "lastname"
|
"label" => Translator::getInstance()->trans("Last Name"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "lastname"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("address1", "text", array(
|
->add("address1", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank()
|
new Constraints\NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "address"
|
"label_attr" => array(
|
||||||
|
"for" => "address"
|
||||||
|
),
|
||||||
|
"label" => Translator::getInstance()->trans("Street Address")
|
||||||
))
|
))
|
||||||
->add("address2", "text", array(
|
->add("address2", "text", array(
|
||||||
"label" => "Address Line 2"
|
"label" => Translator::getInstance()->trans("Address Line 2"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "address2"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("address3", "text", array(
|
->add("address3", "text", array(
|
||||||
"label" => "Address Line 3"
|
"label" => Translator::getInstance()->trans("Address Line 3"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "address3"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("phone", "text", array(
|
->add("phone", "text", array(
|
||||||
"label" => "phone"
|
"label" => Translator::getInstance()->trans("Phone"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "phone"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("cellphone", "text", array(
|
->add("cellphone", "text", array(
|
||||||
"label" => "cellphone"
|
"label" => Translator::getInstance()->trans("Cellphone"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "cellphone"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("zipcode", "text", array(
|
->add("zipcode", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank()
|
new Constraints\NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "zipcode"
|
"label" => Translator::getInstance()->trans("Zip code"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "zipcode"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("city", "text", array(
|
->add("city", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank()
|
new Constraints\NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "city"
|
"label" => Translator::getInstance()->trans("City"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "city"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("country", "text", array(
|
->add("country", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank()
|
new Constraints\NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "country"
|
"label" => Translator::getInstance()->trans("Country"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "country"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
->add("title", "text", array(
|
->add("title", "text", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank()
|
new Constraints\NotBlank()
|
||||||
),
|
),
|
||||||
"label" => "title"
|
"label" => Translator::getInstance()->trans("Title"),
|
||||||
|
"label_attr" => array(
|
||||||
|
"for" => "title"
|
||||||
|
)
|
||||||
))
|
))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ class URL
|
|||||||
|
|
||||||
$schemeAuthority = "$scheme://$host"."$port";
|
$schemeAuthority = "$scheme://$host"."$port";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $schemeAuthority.$this->requestContext->getBaseUrl();
|
return $schemeAuthority.$this->requestContext->getBaseUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat
|
|||||||
('image_cache_dir_from_web_root', 'cache/images', 0, 0, NOW(), NOW()),
|
('image_cache_dir_from_web_root', 'cache/images', 0, 0, NOW(), NOW()),
|
||||||
('currency_rate_update_url', 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml', 0, 0, NOW(), NOW()),
|
('currency_rate_update_url', 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml', 0, 0, NOW(), NOW()),
|
||||||
('page_not_found_view', '404.html', 0, 0, NOW(), NOW()),
|
('page_not_found_view', '404.html', 0, 0, NOW(), NOW()),
|
||||||
('use_tax_free_amounts', 0, 1, 0, NOW(), NOW());
|
('use_tax_free_amounts', 0, 1, 0, NOW(), NOW()),
|
||||||
|
('process_assets', '1', 0, 0, NOW(), NOW());
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `module` (`id`, `code`, `type`, `activate`, `position`, `full_namespace`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `module` (`id`, `code`, `type`, `activate`, `position`, `full_namespace`, `created_at`, `updated_at`) VALUES
|
||||||
|
|||||||
@@ -69,6 +69,11 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -- Bootstrap tooltip --
|
||||||
|
if($('[rel="tooltip"]').length){
|
||||||
|
$('[rel="tooltip"]').tooltip();
|
||||||
|
}
|
||||||
|
|
||||||
// -- Confirm Box --
|
// -- Confirm Box --
|
||||||
if($('[data-toggle="confirm"]').length){
|
if($('[data-toggle="confirm"]').length){
|
||||||
$('[data-toggle="confirm"]').click(function(e){
|
$('[data-toggle="confirm"]').click(function(e){
|
||||||
|
|||||||
@@ -49,5 +49,8 @@
|
|||||||
// Forms
|
// Forms
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
|
||||||
|
|
||||||
@input-border-focus: @link-color;
|
@input-border-focus: @link-color;
|
||||||
|
|
||||||
|
// Breadcrumbs
|
||||||
|
// -------------------------
|
||||||
|
@breadcrumb-color: #333;
|
||||||
522
templates/admin/default/customer-edit.html
Normal file
522
templates/admin/default/customer-edit.html
Normal file
@@ -0,0 +1,522 @@
|
|||||||
|
{extends file="admin-layout.tpl"}
|
||||||
|
|
||||||
|
{block name="page-title"}{intl l='Edit a customer'}{/block}
|
||||||
|
|
||||||
|
{block name="check-permissions"}admin.customer.edit{/block}
|
||||||
|
|
||||||
|
{block name="main-content"}
|
||||||
|
<div class="customers edit-customer">
|
||||||
|
|
||||||
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
|
{loop name="customer_edit" type="customer" current="false" id="$customer_id" backend_context="1" lang="$edit_language_id"}
|
||||||
|
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||||
|
<li><a href="{url path='/admin/customers'}">{intl l="Customers"}</a></li>
|
||||||
|
<li>{intl l='Editing customer "%name"' name="{$FIRSTNAME} {$LASTNAME}"}</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 general-block-decorator">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12 title title-without-tabs">
|
||||||
|
{intl l="Edit customer $FIRSTNAME $LASTNAME"}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-container">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
{form name="thelia.customer.modification"}
|
||||||
|
<form method="POST" action="{url path='/admin/customers/save'}" {form_enctype form=$form} class="clearfix">
|
||||||
|
|
||||||
|
{* Be sure to get the customer ID, even if the form could not be validated *}
|
||||||
|
<input type="hidden" name="customer_id" value="{$customer_id}" />
|
||||||
|
|
||||||
|
{include file="includes/inner-form-toolbar.html"}
|
||||||
|
|
||||||
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
|
{form_field form=$form field='success_url'}
|
||||||
|
<input type="hidden" name="{$name}" value="{url path='/admin/customers'}" />
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<p class="title title-without-tabs">{intl l="Customer informations"}</p>
|
||||||
|
|
||||||
|
{form_field form=$form field='title'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
|
||||||
|
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||||
|
{loop type="title" name="title1"}
|
||||||
|
<option value="{$ID}">{$LONG}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='firstname'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$FIRSTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='lastname'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$LASTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="true"}
|
||||||
|
|
||||||
|
<p class="title title-without-tabs">{intl l="Default address"}</p>
|
||||||
|
|
||||||
|
{form_field form=$form field='address1'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS1}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='address2'}
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS2}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='address3'}
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS3}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='zipcode'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ZIPCODE}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='city'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$CITY}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='country'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||||
|
{loop type="country" name="country1"}
|
||||||
|
<option value="{$ID}">{$TITLE}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<p class="title title-without-tabs clearfix">
|
||||||
|
{intl l="Other addresses"}
|
||||||
|
<span class="pull-right">
|
||||||
|
<a class="btn btn-default btn-primary" title="{intl l='Add a new address'}" href="#address_creation_dialog" data-toggle="modal">
|
||||||
|
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{intl l="Address"}</th>
|
||||||
|
<th>{intl l="Actions"}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<address>
|
||||||
|
<strong>Twitter, Inc.</strong><br>
|
||||||
|
795 Folsom Ave, Suite 600<br>
|
||||||
|
San Francisco, CA 94107<br>
|
||||||
|
<abbr title="Phone">P:</abbr> (123) 456-7890
|
||||||
|
</address>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
|
||||||
|
<span class="glyphicon glyphicon-edit"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
|
||||||
|
<span class="glyphicon glyphicon-pushpin"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
|
||||||
|
<span class="glyphicon glyphicon-trash"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<address>
|
||||||
|
<strong>Twitter, Inc.</strong><br>
|
||||||
|
795 Folsom Ave, Suite 600<br>
|
||||||
|
San Francisco, CA 94107<br>
|
||||||
|
<abbr title="Phone">P:</abbr> (123) 456-7890
|
||||||
|
</address>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
|
||||||
|
<span class="glyphicon glyphicon-edit"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
|
||||||
|
<span class="glyphicon glyphicon-pushpin"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
|
||||||
|
<span class="glyphicon glyphicon-trash"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<address>
|
||||||
|
<strong>Twitter, Inc.</strong><br>
|
||||||
|
795 Folsom Ave, Suite 600<br>
|
||||||
|
San Francisco, CA 94107<br>
|
||||||
|
<abbr title="Phone">P:</abbr> (123) 456-7890
|
||||||
|
</address>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
|
||||||
|
<span class="glyphicon glyphicon-edit"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
|
||||||
|
<span class="glyphicon glyphicon-pushpin"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
|
||||||
|
<span class="glyphicon glyphicon-trash"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
{/form}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
{elseloop rel="customer_edit"}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="alert alert-error">
|
||||||
|
{intl l="Sorry, customer ID=$customer_id was not found."}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/elseloop}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{* Add an Address *}
|
||||||
|
|
||||||
|
{form name="thelia.address.create"}
|
||||||
|
|
||||||
|
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||||
|
{capture "address_creation_dialog"}
|
||||||
|
|
||||||
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
|
{form_field form=$form field='label'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Label'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='company'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='title'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
|
||||||
|
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||||
|
{loop type="title" name="title1"}
|
||||||
|
<option value="{$ID}">{$LONG}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='firstname'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='lastname'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='address1'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
{form_field form=$form field='address2'}
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
{form_field form=$form field='address3'}
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='zipcode'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='city'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='country'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||||
|
{loop type="country" name="country1"}
|
||||||
|
<option value="{$ID}">{$TITLE}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{/capture}
|
||||||
|
|
||||||
|
{include
|
||||||
|
file = "includes/generic-create-dialog.html"
|
||||||
|
|
||||||
|
dialog_id = "address_creation_dialog"
|
||||||
|
dialog_title = {intl l="Create an address"}
|
||||||
|
dialog_body = {$smarty.capture.address_creation_dialog nofilter}
|
||||||
|
|
||||||
|
dialog_ok_label = {intl l="Create this address"}
|
||||||
|
dialog_cancel_label = {intl l="Cancel"}
|
||||||
|
|
||||||
|
form_action = {url path='/admin/address/create'}
|
||||||
|
form_enctype = {form_enctype form=$form}
|
||||||
|
form_error_message = $form_error_message
|
||||||
|
}
|
||||||
|
|
||||||
|
{/form}
|
||||||
|
|
||||||
|
{* Update an Address *}
|
||||||
|
|
||||||
|
{form name="thelia.address.update"}
|
||||||
|
|
||||||
|
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||||
|
{capture "edit_address_dialog"}
|
||||||
|
|
||||||
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
|
{form_field form=$form field='label'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Label'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='company'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='title'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
|
||||||
|
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||||
|
{loop type="title" name="title1"}
|
||||||
|
<option value="{$ID}">{$LONG}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='firstname'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='lastname'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='address1'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
{form_field form=$form field='address2'}
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
{form_field form=$form field='address3'}
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
||||||
|
{/form_field}
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='zipcode'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='city'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='country'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||||
|
{loop type="country" name="country1"}
|
||||||
|
<option value="{$ID}">{$TITLE}</option>
|
||||||
|
{/loop}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{/capture}
|
||||||
|
|
||||||
|
{include
|
||||||
|
file = "includes/generic-create-dialog.html"
|
||||||
|
|
||||||
|
dialog_id = "edit_address_dialog"
|
||||||
|
dialog_title = {intl l="Edit an address"}
|
||||||
|
dialog_body = {$smarty.capture.edit_address_dialog nofilter}
|
||||||
|
|
||||||
|
dialog_ok_label = {intl l="Edit this address"}
|
||||||
|
dialog_cancel_label = {intl l="Cancel"}
|
||||||
|
|
||||||
|
form_action = {url path='/admin/address/update'}
|
||||||
|
form_enctype = {form_enctype form=$form}
|
||||||
|
form_error_message = $form_error_message
|
||||||
|
}
|
||||||
|
|
||||||
|
{/form}
|
||||||
|
|
||||||
|
|
||||||
|
{* Default confirmation dialog *}
|
||||||
|
|
||||||
|
{capture "use_address_dialog"}
|
||||||
|
<input type="hidden" name="address_id" id="address_use_id" value="" />
|
||||||
|
{/capture}
|
||||||
|
|
||||||
|
{include
|
||||||
|
file = "includes/generic-confirm-dialog.html"
|
||||||
|
|
||||||
|
dialog_id = "use_address_dialog"
|
||||||
|
dialog_title = {intl l="Use address by default"}
|
||||||
|
dialog_message = {intl l="Do you really want to use this address by default ?"}
|
||||||
|
|
||||||
|
form_action = {url path='/admin/address/use'}
|
||||||
|
form_content = {$smarty.capture.use_address_dialog nofilter}
|
||||||
|
}
|
||||||
|
|
||||||
|
{* Delete confirmation dialog *}
|
||||||
|
|
||||||
|
{capture "delete_address_dialog"}
|
||||||
|
<input type="hidden" name="address_id" id="address_delete_id" value="" />
|
||||||
|
{/capture}
|
||||||
|
|
||||||
|
{include
|
||||||
|
file = "includes/generic-confirm-dialog.html"
|
||||||
|
|
||||||
|
dialog_id = "delete_address_dialog"
|
||||||
|
dialog_title = {intl l="Delete address"}
|
||||||
|
dialog_message = {intl l="Do you really want to delete this address ?"}
|
||||||
|
|
||||||
|
form_action = {url path='/admin/address/delete'}
|
||||||
|
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||||
|
}
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name="javascript-initialization"}
|
||||||
|
{javascripts file='assets/js/main.js'}
|
||||||
|
<script src="{$asset_url}"></script>
|
||||||
|
{/javascripts}
|
||||||
|
{/block}
|
||||||
@@ -9,9 +9,13 @@
|
|||||||
{assign var=customer_page value={$smarty.get.page|default:1}}
|
{assign var=customer_page value={$smarty.get.page|default:1}}
|
||||||
|
|
||||||
|
|
||||||
<div class="catalog">
|
<div class="customer">
|
||||||
<div id="wrapper" class="container">
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||||
|
<li><a href="{url path='/admin/customers'}">{intl l="Customers"}</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
{module_include location='customer_top'}
|
{module_include location='customer_top'}
|
||||||
|
|
||||||
@@ -150,6 +154,12 @@
|
|||||||
<input type="hidden" name="{$name}" value="{url path='/admin/customer/update/_ID_'}" />
|
<input type="hidden" name="{$name}" value="{url path='/admin/customer/update/_ID_'}" />
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='company'}
|
||||||
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||||
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
{form_field form=$form field='title'}
|
{form_field form=$form field='title'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
|
|||||||
159
templates/admin/default/orders.html
Normal file
159
templates/admin/default/orders.html
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
{extends file="admin-layout.tpl"}
|
||||||
|
|
||||||
|
{block name="page-title"}{intl l='Orders'}{/block}
|
||||||
|
|
||||||
|
{block name="check-permissions"}admin.orders.view{/block}
|
||||||
|
|
||||||
|
{block name="main-content"}
|
||||||
|
<div class="orders">
|
||||||
|
|
||||||
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||||
|
<li><a href="{url path='/admin/orders'}">{intl l="Orders"}</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{module_include location='orders_top'}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<form action="{url path='/admin/orders/update-values'}" method="post">
|
||||||
|
<div class="general-block-decorator">
|
||||||
|
<table class="table table-striped table-condensed table-left-aligned">
|
||||||
|
<caption class="clearfix">
|
||||||
|
{intl l='Orders'}
|
||||||
|
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
|
||||||
|
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create an order'}" href="#creation_dialog">
|
||||||
|
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||||
|
</a>
|
||||||
|
{/loop}
|
||||||
|
</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{intl l="Order n°"}</th>
|
||||||
|
<th>{intl l="Date & Hour"}</th>
|
||||||
|
<th>{intl l="Compagny"}</th>
|
||||||
|
<th>{intl l="Name"}</th>
|
||||||
|
<th>{intl l="Amount"}</th>
|
||||||
|
<th>{intl l="Status"}</th>
|
||||||
|
|
||||||
|
{module_include location='orders_table_header'}
|
||||||
|
|
||||||
|
<th>{intl l="Actions"}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td><a href="">01230450123045</a></td>
|
||||||
|
<td>11/09/2013 10:24:31</td>
|
||||||
|
<td>Thelia</td>
|
||||||
|
<td><a href="">Dupont</a></td>
|
||||||
|
<td>251 €</td>
|
||||||
|
<td><span class="label label-success">Paid</span></td>
|
||||||
|
|
||||||
|
{module_include location='orders_table_row'}
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
|
||||||
|
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path='/admin/orders/update/$ID'}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
|
{/loop}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td><a href="">01230450123045</a></td>
|
||||||
|
<td>11/09/2013 10:24:31</td>
|
||||||
|
<td>Thelia</td>
|
||||||
|
<td><a href="">Dupont</a></td>
|
||||||
|
<td>251 €</td>
|
||||||
|
<td><span class="label label-danger">Canceled</span></td>
|
||||||
|
|
||||||
|
{module_include location='orders_table_row'}
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
|
||||||
|
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path='/admin/orders/update/$ID'}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
|
{/loop}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td><a href="">01230450123045</a></td>
|
||||||
|
<td>11/09/2013 10:24:31</td>
|
||||||
|
<td>Thelia</td>
|
||||||
|
<td><a href="">Dupont</a></td>
|
||||||
|
<td>251 €</td>
|
||||||
|
<td><span class="label label-info">Current</span></td>
|
||||||
|
|
||||||
|
{module_include location='orders_table_row'}
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
|
||||||
|
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path='/admin/orders/update/$ID'}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
|
||||||
|
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
|
{/loop}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- <tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<div class="alert alert-info">
|
||||||
|
{intl l="No mailing template has been created yet. Click the + button to create one."}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr> -->
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{module_include location='orders_bottom'}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{* Delete order confirmation dialog *}
|
||||||
|
|
||||||
|
{capture "delete_order_dialog"}
|
||||||
|
<input type="hidden" name="current_order_id" value="{$current_order_id}" />
|
||||||
|
<input type="hidden" name="order_id" id="delete_order_id" value"" />
|
||||||
|
{/capture}
|
||||||
|
|
||||||
|
{include
|
||||||
|
file = "includes/generic-confirm-dialog.html"
|
||||||
|
|
||||||
|
dialog_id = "delete_order_dialog"
|
||||||
|
dialog_title = {intl l="Delete an order"}
|
||||||
|
dialog_message = {intl l="Do you really want to delete this order ?"}
|
||||||
|
|
||||||
|
form_action = {url path='/admin/orders/delete'}
|
||||||
|
form_content = {$smarty.capture.delete_order_dialog nofilter}
|
||||||
|
}
|
||||||
|
|
||||||
|
{/block}
|
||||||
Reference in New Issue
Block a user