Merge branch 'master' of https://github.com/thelia/thelia
Conflicts: templates/admin/default/currencies.html
This commit is contained in:
@@ -66,6 +66,8 @@ class SmartyParser extends Smarty implements ParserInterface
|
||||
|
||||
$this->debugging = $debug;
|
||||
|
||||
$this->escape_html = true;
|
||||
|
||||
// Prevent smarty ErrorException: Notice: Undefined index bla bla bla...
|
||||
$this->error_reporting = E_ALL ^ E_NOTICE;
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ class URL
|
||||
*/
|
||||
public function getBaseUrl()
|
||||
{
|
||||
/*
|
||||
$request = $this->container->get('request');
|
||||
$lang = $request->getSession()->getLang();
|
||||
|
||||
@@ -106,6 +107,26 @@ class URL
|
||||
|
||||
// Normalize the base_url
|
||||
return rtrim($base_url, '/').'/';
|
||||
*/
|
||||
|
||||
$requestContext = $this->container->get('router.admin')->getGenerator()->getContext();
|
||||
|
||||
if ($host = $requestContext->getHost()) {
|
||||
|
||||
$scheme = $requestContext->getScheme();
|
||||
|
||||
$port = '';
|
||||
|
||||
if ('http' === $scheme && 80 != $requestContext->getHttpPort()) {
|
||||
$port = ':'.$requestContext->getHttpPort();
|
||||
} elseif ('https' === $scheme && 443 != $requestContext->getHttpsPort()) {
|
||||
$port = ':'.$requestContext->getHttpsPort();
|
||||
}
|
||||
|
||||
$schemeAuthority = "$scheme://$host"."$port";
|
||||
}
|
||||
|
||||
return $schemeAuthority.$requestContext->getBaseUrl().'/';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,15 +134,8 @@ class URL
|
||||
*/
|
||||
public function getIndexPage()
|
||||
{
|
||||
// Get the base URL
|
||||
$base_url = $this->getBaseUrl();
|
||||
|
||||
// For dev environment, add the proper page.
|
||||
if ($this->environment == 'dev') {
|
||||
$base_url .= "index_dev.php";
|
||||
}
|
||||
|
||||
return $base_url;
|
||||
// The index page is the base URL :)
|
||||
return $this->getBaseUrl();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -140,14 +154,16 @@ class URL
|
||||
// Already absolute ?
|
||||
if (substr($path, 0, 4) != 'http') {
|
||||
|
||||
/**
|
||||
* @etienne : can't be done here for it's already done in ::viewUrl / ::adminViewUrl
|
||||
* @franck : should be done, as absoluteUrl() is sometimes called directly (see UrlGenerator::generateUrlFunction())
|
||||
*/
|
||||
$root = $path_only == self::PATH_TO_FILE ? $this->getBaseUrl() : $this->getIndexPage();
|
||||
$base_url = $this->getBaseUrl();
|
||||
|
||||
// Normalize root path
|
||||
$base = rtrim($root, '/') . '/' . ltrim($path, '/');
|
||||
// If only a path is requested, be sure to remove the script name (index.php or index_dev.php), if any.
|
||||
if ($path_only == self::PATH_TO_FILE) {
|
||||
// As the base_url always ends with '/', if we don't find / at the end, we have a script.
|
||||
if (substr($base_url, -1) != '/') $base_url = dirname($base_url);
|
||||
}
|
||||
|
||||
// Normalize the given path
|
||||
$base = $base_url . ltrim($path, '/');
|
||||
} else
|
||||
$base = $path;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,811 +0,0 @@
|
||||
// -- Tools --------------------------------------------------------------------
|
||||
|
||||
.rounded(@radius: 2px) {
|
||||
-webkit-border-radius: @radius;
|
||||
-moz-border-radius: @radius;
|
||||
border-radius: @radius;
|
||||
}
|
||||
|
||||
.border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
|
||||
-webkit-border-top-right-radius: @topright;
|
||||
-webkit-border-bottom-right-radius: @bottomright;
|
||||
-webkit-border-bottom-left-radius: @bottomleft;
|
||||
-webkit-border-top-left-radius: @topleft;
|
||||
-moz-border-radius-topright: @topright;
|
||||
-moz-border-radius-bottomright: @bottomright;
|
||||
-moz-border-radius-bottomleft: @bottomleft;
|
||||
-moz-border-radius-topleft: @topleft;
|
||||
border-top-right-radius: @topright;
|
||||
border-bottom-right-radius: @bottomright;
|
||||
border-bottom-left-radius: @bottomleft;
|
||||
border-top-left-radius: @topleft;
|
||||
.background-clip(padding-box);
|
||||
}
|
||||
|
||||
.background-clip(@argument: padding-box) {
|
||||
-moz-background-clip: @argument;
|
||||
-webkit-background-clip: @argument;
|
||||
background-clip: @argument;
|
||||
}
|
||||
|
||||
.box-shadow(@shadow: 0 1px 2px rgba(0,0,0,.05)) {
|
||||
-webkit-box-shadow: @shadow;
|
||||
-moz-box-shadow: @shadow;
|
||||
box-shadow: @shadow;
|
||||
}
|
||||
|
||||
// -- Base styling ------------------------------------------------------------
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background: url("img/bg.jpg") repeat;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
h3, h4 {
|
||||
color: #5a6876;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#42505d), to(#72808e));
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
h3 {
|
||||
padding: 0px;
|
||||
margin: 0px 0px 20px 0px;
|
||||
text-align: left;
|
||||
font-size : 18px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
padding: 0px 0px 20px 0px;
|
||||
margin: 0px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #e9720f;
|
||||
font-weight: bold;
|
||||
|
||||
&.btn {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
// Bootstrap Adjustements ------------------------------------------------------
|
||||
|
||||
hr {
|
||||
border: 0;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
||||
border-bottom: 1px solid rgba(250, 250, 250, 0.1);
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.btn-primary, .btn-large {
|
||||
background: #e9730f;
|
||||
background-image: linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -webkit-gradient(
|
||||
linear,
|
||||
left bottom,
|
||||
left top,
|
||||
color-stop(0, rgb(227,83,11)),
|
||||
color-stop(1, rgb(243,153,34))
|
||||
);
|
||||
box-shadow: inset 0px 0px 2px rgba(250,250,250,0.5), 0px 1px 3px rgba(0,0,0,0.2);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-large:hover, .btn-primary:hover {
|
||||
background: #e9730f;
|
||||
background-image: linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(227,83,11) 0%, rgb(243,153,34) 100%);
|
||||
background-image: -webkit-gradient(
|
||||
linear,
|
||||
left bottom,
|
||||
left top,
|
||||
color-stop(0, rgb(227,83,11)),
|
||||
color-stop(1, rgb(243,153,34))
|
||||
);
|
||||
box-shadow: inset 0px 0px 2px rgba(250,250,250,0.8), 0px 1px 3px rgba(0,0,0,0.2);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background: none repeat scroll 0 0 transparent;
|
||||
border: medium none;
|
||||
box-shadow: none;
|
||||
color: #7D756A;
|
||||
margin-bottom: 0;
|
||||
padding: 35px 15px 15px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
// -- Top bar -----------------------------------------------------------------
|
||||
|
||||
.topbar {
|
||||
|
||||
@top-bar-height: 50px;
|
||||
|
||||
background: url("img/top.jpg") repeat-x;
|
||||
color: #6d737b;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
text-shadow: 0px 1px 1px black;
|
||||
|
||||
.form-search {
|
||||
|
||||
position: relative;
|
||||
float: right;
|
||||
margin: 0px;
|
||||
|
||||
.control-group {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
input.search-query {
|
||||
background: url("img/search.png") no-repeat;
|
||||
width: 212px;
|
||||
height: 20px;
|
||||
outline: none;
|
||||
border: none;
|
||||
padding: 5px 20px 5px 20px;
|
||||
.rounded(0px);
|
||||
font-size: 12px;
|
||||
color: #eee;
|
||||
|
||||
&:focus {
|
||||
box-shadow: none;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
button.btn {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
text-indent: -13337px;
|
||||
background: url("img/search-icon.png") no-repeat;
|
||||
width: 16px;
|
||||
height: 15px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
border: none;
|
||||
top: 17px;
|
||||
box-shadow: none;
|
||||
.rounded(0px);
|
||||
z-index: 1337;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
line-height: @top-bar-height;
|
||||
}
|
||||
|
||||
.version-info {
|
||||
float: left;
|
||||
line-height: @top-bar-height;
|
||||
background: url("img/top-bar-logo.png") left -3px no-repeat;
|
||||
padding-left: 100px;
|
||||
|
||||
}
|
||||
|
||||
.user-info {
|
||||
float: right;
|
||||
line-height: @top-bar-height;
|
||||
margin-left: 20px;
|
||||
color: #fff;
|
||||
|
||||
a.logout {
|
||||
text-indent: -13337px;
|
||||
display: inline-block;
|
||||
background: url("img/logout.png") left center no-repeat;
|
||||
width: 23px;
|
||||
height: @top-bar-height;
|
||||
}
|
||||
|
||||
a.profile {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.view-shop {
|
||||
line-height: @top-bar-height;
|
||||
margin-right: 20px;
|
||||
float: right;
|
||||
a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -- Brandbar ----------------------------------------------------------------
|
||||
|
||||
.loginpage {
|
||||
|
||||
.hero-unit {
|
||||
background-color: transparent !important;
|
||||
|
||||
h1 {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.well {
|
||||
background-color: #E4E3DE;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.05) inset;
|
||||
}
|
||||
}
|
||||
|
||||
.brandbar {
|
||||
|
||||
background: url("img/header.jpg") repeat-x;
|
||||
height: 90px;
|
||||
|
||||
a.brand {
|
||||
text-indent: -133337px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
background: url("img/logo.png") 0px 12px no-repeat;
|
||||
width: 124px;
|
||||
height: 63px;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
.rounded(0px);
|
||||
padding: 25px 0px 25px 30px;
|
||||
background: url("img/logo-light.png") left center no-repeat;
|
||||
float: left;
|
||||
margin: 12px 0px 0px 0px;
|
||||
|
||||
a {
|
||||
color: #949aa1;
|
||||
text-shadow: 0px 1px 0px rgba(0,0,0,0.8);
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #FFF;
|
||||
text-shadow: 0px 1px 0px rgba(0,0,0,0.8);
|
||||
border-bottom: 1px dotted white;
|
||||
}
|
||||
}
|
||||
|
||||
.Blocmoncompte {
|
||||
float: right;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
margin-top: 35px;
|
||||
|
||||
color: white;
|
||||
font-size: 13px;
|
||||
text-shadow: 0px 1px 0px rgba(0,0,0,0.8);
|
||||
}
|
||||
|
||||
dt {
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.deconnexion {
|
||||
float: right;
|
||||
margin: 0px;
|
||||
|
||||
a {
|
||||
text-indent: -13337px;
|
||||
display: block;
|
||||
background: url("img/deconnexion.png") no-repeat;
|
||||
width: 23px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.brandbar-wide {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// -- Navigation bar ----------------------------------------------------------
|
||||
|
||||
.navbar {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.navbar-inner {
|
||||
border-top: none;
|
||||
.border-radius(0, 4px, 4px, 0);
|
||||
|
||||
.container{
|
||||
width: 1170px;
|
||||
}
|
||||
}
|
||||
|
||||
// -- Breadcrumb --------------------------------------------------------------
|
||||
|
||||
.breadcrumb {
|
||||
margin-top: 0;
|
||||
background-color: transparent;
|
||||
padding: 0 15px;
|
||||
|
||||
|
||||
> li > .divider {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
> .active {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// -- Feed list on home page --------------------------------------------------
|
||||
|
||||
.feed-list {
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
line-height: 120%;
|
||||
color: #E9730F;
|
||||
|
||||
a {
|
||||
&:hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
font-size: 90%;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.feed-list-item{
|
||||
padding: 10px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
// -- Login form --------------------------------------------------------------
|
||||
|
||||
.form-signin {
|
||||
max-width: 400px;
|
||||
padding: 19px 29px 29px;
|
||||
margin: 0 auto 20px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
.rounded(5px);
|
||||
.box-shadow;
|
||||
}
|
||||
|
||||
textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus {
|
||||
border: 1px solid #E9730F;
|
||||
box-shadow: 0px 0px 8px #FFA65A;
|
||||
}
|
||||
|
||||
// -- Allow inline forms validation states ------------------------------------
|
||||
|
||||
form .warning .control-label,
|
||||
form .warning .help-block,
|
||||
form .warning .help-inline {
|
||||
color: #c09853;
|
||||
}
|
||||
|
||||
form .warning .checkbox,
|
||||
form .warning .radio,
|
||||
form .warning input,
|
||||
form .warning select,
|
||||
form .warning textarea {
|
||||
color: #c09853;
|
||||
}
|
||||
|
||||
form .warning input,
|
||||
form .warning select,
|
||||
form .warning textarea {
|
||||
border-color: #c09853;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
form .warning input:focus,
|
||||
form .warning select:focus,
|
||||
form .warning textarea:focus {
|
||||
border-color: #a47e3c;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
|
||||
}
|
||||
|
||||
form .warning .input-prepend .add-on,
|
||||
form .warning .input-append .add-on {
|
||||
color: #c09853;
|
||||
background-color: #fcf8e3;
|
||||
border-color: #c09853;
|
||||
}
|
||||
|
||||
form .error .control-label,
|
||||
form .error .help-block,
|
||||
form .error .help-inline {
|
||||
color: #b94a48;
|
||||
}
|
||||
|
||||
form .error .checkbox,
|
||||
form .error .radio,
|
||||
form .error input,
|
||||
form .error select,
|
||||
form .error textarea {
|
||||
color: #b94a48;
|
||||
}
|
||||
|
||||
form .error input,
|
||||
form .error select,
|
||||
form .error textarea {
|
||||
border-color: #b94a48;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
form .error input:focus,
|
||||
form .error select:focus,
|
||||
form .error textarea:focus {
|
||||
border-color: #953b39;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
|
||||
}
|
||||
|
||||
form .error .input-prepend .add-on,
|
||||
form .error .input-append .add-on {
|
||||
color: #b94a48;
|
||||
background-color: #f2dede;
|
||||
border-color: #b94a48;
|
||||
}
|
||||
|
||||
form .success .control-label,
|
||||
form .success .help-block,
|
||||
form .success .help-inline {
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
form .success .checkbox,
|
||||
form .success .radio,
|
||||
form .success input,
|
||||
form .success select,
|
||||
form .success textarea {
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
form .success input,
|
||||
form .success select,
|
||||
form .success textarea {
|
||||
border-color: #468847;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
form .success input:focus,
|
||||
form .success select:focus,
|
||||
form .success textarea:focus {
|
||||
border-color: #356635;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
|
||||
}
|
||||
|
||||
form .success .input-prepend .add-on,
|
||||
form .success .input-append .add-on {
|
||||
color: #468847;
|
||||
background-color: #dff0d8;
|
||||
border-color: #468847;
|
||||
}
|
||||
|
||||
form .info .control-label,
|
||||
form .info .help-block,
|
||||
form .info .help-inline {
|
||||
color: #3a87ad;
|
||||
}
|
||||
|
||||
form .info .checkbox,
|
||||
form .info .radio,
|
||||
form .info input,
|
||||
form .info select,
|
||||
form .info textarea {
|
||||
color: #3a87ad;
|
||||
}
|
||||
|
||||
form .info input,
|
||||
form .info select,
|
||||
form .info textarea {
|
||||
border-color: #3a87ad;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
form .info input:focus,
|
||||
form .info select:focus,
|
||||
form .info textarea:focus {
|
||||
border-color: #2d6987;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||
}
|
||||
|
||||
form .info .input-prepend .add-on,
|
||||
form .info .input-append .add-on {
|
||||
color: #3a87ad;
|
||||
background-color: #d9edf7;
|
||||
border-color: #3a87ad;
|
||||
}
|
||||
|
||||
// -- General decoration of back-office boxes ---------------------------------
|
||||
|
||||
.general-block-decorator {
|
||||
background: none repeat scroll 0 0 white;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.05) inset, 0 2px 3px rgba(0, 0, 0, 0.1);
|
||||
padding: 1em;
|
||||
margin-bottom: 20px;
|
||||
|
||||
// The block title
|
||||
.title {
|
||||
color: #5A6876;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
padding-bottom: 0.5em;
|
||||
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.title-without-tabs {
|
||||
border-bottom: 2px solid #A5CED8;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
// The action bar on the right
|
||||
.actions {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Reduce bottom margin of admin tabs.
|
||||
.admin-tabs {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
// The overall form container
|
||||
.form-container {
|
||||
|
||||
// The inner toolbar (flags & save buttons)
|
||||
.inner-toolbar {
|
||||
|
||||
line-height: 30px;
|
||||
margin-bottom: 1em;
|
||||
border-bottom: 1px dotted #A5CED8;
|
||||
padding-bottom: 0.5em;
|
||||
|
||||
.inner-actions {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.nav-pills {
|
||||
margin-bottom: 0;
|
||||
|
||||
li a {
|
||||
padding: 4px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
li.active a {
|
||||
opacity: 1;
|
||||
background-color: #E7E7E7;
|
||||
border: 1px solid #E9720F;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Modal dialog tweaking ------------------------------------------------------
|
||||
|
||||
.modal {
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
// -- Admin forms tweaking ----------------------------------------------------
|
||||
|
||||
label {
|
||||
font-weight: bold;
|
||||
|
||||
&.checkbox {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.input-append.input-block-level .add-on img {
|
||||
max-height: 16px;
|
||||
}
|
||||
|
||||
// Information in field label
|
||||
.label-help-block, .help-block {
|
||||
color: lighten(#595959, 20);
|
||||
display: block;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
line-height: 130%;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
.form-horizontal input + .help-block,
|
||||
.form-horizontal select + .help-block,
|
||||
.form-horizontal textarea + .help-block,
|
||||
.form-horizontal .uneditable-input + .help-block,
|
||||
.form-horizontal .input-prepend + .help-block,
|
||||
.form-horizontal .input-append + .help-block
|
||||
.help-block, .form-horizontal .help-block {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
||||
// Fix for append-fields shorter than others
|
||||
// see http://stackoverflow.com/questions/13306670/bootstrap-prepended-and-appended-input-how-to-max-input-field-width
|
||||
.input-append.input-block-level,
|
||||
.input-prepend.input-block-level {
|
||||
display: table;
|
||||
}
|
||||
|
||||
.input-append.input-block-level .add-on,
|
||||
.input-prepend.input-block-level .add-on {
|
||||
display: table-cell;
|
||||
width: 1%; /* remove this if you want default bootstrap button width */
|
||||
}
|
||||
|
||||
.input-append.input-block-level > input,
|
||||
.input-prepend.input-block-level > input {
|
||||
box-sizing: border-box; /* use bootstrap mixin or include vendor variants */
|
||||
display: table; /* table-cell is not working well in Chrome for small widths */
|
||||
min-height: inherit;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-append.input-block-level > input {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.input-prepend.input-block-level > input {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
// -- Catalog Tables ----------------------------------------------------------
|
||||
|
||||
.table-striped {
|
||||
|
||||
background: white;
|
||||
margin-bottom: 1em;
|
||||
|
||||
caption {
|
||||
text-align: left;
|
||||
color: #5A6876;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
background-color: #fff;
|
||||
padding-bottom: 0.5em;
|
||||
border-bottom: 2px solid #A5CED8;
|
||||
|
||||
line-height: 30px;
|
||||
|
||||
.action-btn {
|
||||
display: block;
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
td, th {
|
||||
text-align: center;
|
||||
|
||||
&.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
&.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
&.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
td.object-title, th.object-title {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td.message {
|
||||
// Center the alert box (20px bottom margin) in the table cell
|
||||
padding: 20px 20px 0 20px;
|
||||
}
|
||||
|
||||
th {
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: middle;
|
||||
|
||||
img {
|
||||
border: 2px solid white;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&.actions {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-list-table .table-striped {
|
||||
td, th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
caption {
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 2px solid #A5CED8;
|
||||
color: #5A6876;
|
||||
font-weight: bold;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
.table-left-aligned {
|
||||
th, td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Modal is no longer limited
|
||||
.modal-body {
|
||||
max-height: none;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
50
templates/admin/default/assets/bootstrap-editable/js/bootstrap-editable.js → templates/admin/default/assets/js/bootstrap-editable/bootstrap-editable.js
vendored
Executable file → Normal file
50
templates/admin/default/assets/bootstrap-editable/js/bootstrap-editable.js → templates/admin/default/assets/js/bootstrap-editable/bootstrap-editable.js
vendored
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
/*! X-editable - v1.4.7
|
||||
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
|
||||
* http://github.com/vitalets/x-editable
|
||||
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
|
||||
/*! X-editable - v1.4.7
|
||||
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
|
||||
* http://github.com/vitalets/x-editable
|
||||
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
|
||||
/**
|
||||
Form with single input element, two buttons and two states: normal/loading.
|
||||
Applied as jQuery method to DIV tag (not to form tag!). This is because form can be in loading state when spinner shown.
|
||||
@@ -625,7 +625,7 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
//engine
|
||||
$.fn.editableform.engine = 'jqeury';
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
* EditableForm utilites
|
||||
*/
|
||||
@@ -875,7 +875,7 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
|
||||
};
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
Attaches stand-alone container with editable-form to HTML element. Element is used only for positioning, value is not stored anywhere.<br>
|
||||
This method applied internally in <code>$().editable()</code>. You should subscribe on it's events (save / cancel) to get profit of it.<br>
|
||||
@@ -1391,7 +1391,7 @@ Applied as jQuery method.
|
||||
};
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
* Editable Inline
|
||||
* ---------------------
|
||||
@@ -1445,7 +1445,7 @@ Applied as jQuery method.
|
||||
}
|
||||
});
|
||||
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
/**
|
||||
Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
|
||||
@@ -2258,7 +2258,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
};
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
AbstractInput - base class for all editable inputs.
|
||||
It defines interface to be implemented by any input type.
|
||||
@@ -2466,7 +2466,7 @@ To create your own input you can inherit from this class.
|
||||
$.extend($.fn.editabletypes, {abstractinput: AbstractInput});
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
List - abstract class for inputs that have source option loaded from js array or via ajax
|
||||
|
||||
@@ -2788,7 +2788,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
$.fn.editabletypes.list = List;
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
Text input
|
||||
|
||||
@@ -2923,7 +2923,7 @@ $(function(){
|
||||
$.fn.editabletypes.text = Text;
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
Textarea input
|
||||
|
||||
@@ -3035,7 +3035,7 @@ $(function(){
|
||||
$.fn.editabletypes.textarea = Textarea;
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
Select (dropdown)
|
||||
|
||||
@@ -3131,7 +3131,7 @@ $(function(){
|
||||
$.fn.editabletypes.select = Select;
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
List of checkboxes.
|
||||
Internally value stored as javascript array of values.
|
||||
@@ -3284,7 +3284,7 @@ $(function(){
|
||||
$.fn.editabletypes.checklist = Checklist;
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
HTML5 input types.
|
||||
Following types are supported:
|
||||
@@ -3503,7 +3503,7 @@ Time
|
||||
});
|
||||
$.fn.editabletypes.time = Time;
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
Select2 input. Based on amazing work of Igor Vaynberg https://github.com/ivaynberg/select2.
|
||||
Please see [original select2 docs](http://ivaynberg.github.com/select2) for detailed description and options.
|
||||
@@ -3828,7 +3828,7 @@ $(function(){
|
||||
$.fn.editabletypes.select2 = Constructor;
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
* Combodate - 1.0.4
|
||||
* Dropdown date and time picker.
|
||||
@@ -4281,7 +4281,7 @@ $(function(){
|
||||
roundTime: true //whether to round minutes and seconds if step > 1
|
||||
};
|
||||
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
/**
|
||||
Combodate input - dropdown date and time picker.
|
||||
Based on [combodate](http://vitalets.github.com/combodate) plugin (included). To use it you should manually include [momentjs](http://momentjs.com).
|
||||
@@ -4478,7 +4478,7 @@ $(function(){
|
||||
$.fn.editabletypes.combodate = Constructor;
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/*
|
||||
Editableform based on Twitter Bootstrap 3
|
||||
*/
|
||||
@@ -4542,7 +4542,7 @@ Editableform based on Twitter Bootstrap 3
|
||||
$.fn.editableform.errorBlockClass = null;
|
||||
//engine
|
||||
$.fn.editableform.engine = 'bs3';
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
/**
|
||||
* Editable Popover3 (for Bootstrap 3)
|
||||
* ---------------------
|
||||
@@ -4742,7 +4742,7 @@ Editableform based on Twitter Bootstrap 3
|
||||
});
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/* =========================================================
|
||||
* bootstrap-datepicker.js
|
||||
* http://www.eyecon.ro/bootstrap-datepicker
|
||||
@@ -5997,7 +5997,7 @@ Editableform based on Twitter Bootstrap 3
|
||||
});
|
||||
|
||||
}( window.jQuery ));
|
||||
|
||||
|
||||
/**
|
||||
Bootstrap-datepicker.
|
||||
Description and examples: https://github.com/eternicode/bootstrap-datepicker.
|
||||
@@ -6227,7 +6227,7 @@ $(function(){
|
||||
$.fn.editabletypes.date = Date;
|
||||
|
||||
}(window.jQuery));
|
||||
|
||||
|
||||
/**
|
||||
Bootstrap datefield input - modification for inline mode.
|
||||
Shows normal <input type="text"> and binds popup datepicker.
|
||||
@@ -6308,7 +6308,7 @@ Automatically shown in inline mode.
|
||||
|
||||
$.fn.editabletypes.datefield = DateField;
|
||||
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
/**
|
||||
Bootstrap-datetimepicker.
|
||||
Based on [smalot bootstrap-datetimepicker plugin](https://github.com/smalot/bootstrap-datetimepicker).
|
||||
@@ -6552,7 +6552,7 @@ $(function(){
|
||||
|
||||
$.fn.editabletypes.datetime = DateTime;
|
||||
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
/**
|
||||
Bootstrap datetimefield input - datetime input for inline mode.
|
||||
Shows normal <input type="text"> and binds popup datetimepicker.
|
||||
18
templates/admin/default/assets/bootstrap-editable/css/bootstrap-editable.css → templates/admin/default/assets/less/thelia/bootstrap-editable.less
vendored
Executable file → Normal file
18
templates/admin/default/assets/bootstrap-editable/css/bootstrap-editable.css → templates/admin/default/assets/less/thelia/bootstrap-editable.less
vendored
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
/*! X-editable - v1.4.7
|
||||
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
|
||||
* http://github.com/vitalets/x-editable
|
||||
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
|
||||
/*! X-editable - v1.4.7
|
||||
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
|
||||
* http://github.com/vitalets/x-editable
|
||||
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
|
||||
.editableform {
|
||||
margin-bottom: 0; /* overwrites bootstrap margin */
|
||||
}
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
|
||||
.editableform-loading {
|
||||
background: url('../img/loading.gif') center center no-repeat;
|
||||
background: url('@{imgDir}/loading.gif') center center no-repeat;
|
||||
height: 25px;
|
||||
width: auto;
|
||||
min-width: 25px;
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
/* IOS-style clear button for text inputs */
|
||||
.editable-clear-x {
|
||||
background: url('../img/clear.png') center center no-repeat;
|
||||
background: url('@{imgDir}/clear.png') center center no-repeat;
|
||||
display: block;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
.editable-pre-wrapped {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
.editable-container.editable-popup {
|
||||
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
|
||||
}
|
||||
@@ -157,7 +157,7 @@
|
||||
.editable-container.ui-widget {
|
||||
font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
|
||||
z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
|
||||
}
|
||||
}
|
||||
.editable-click,
|
||||
a.editable-click,
|
||||
a.editable-click:hover {
|
||||
@@ -203,7 +203,7 @@ a.editable-click.editable-disabled:hover {
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* Datepicker for Bootstrap
|
||||
*
|
||||
@@ -17,9 +17,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
td, th {
|
||||
text-align: center;
|
||||
}
|
||||
// td, th {
|
||||
// text-align: center;
|
||||
// }
|
||||
|
||||
td.object-title, th.object-title {
|
||||
text-align: left;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
@import "modals.less";
|
||||
@import "tables.less";
|
||||
@import "tablesorter.less";
|
||||
@import "bootstrap-editable.less";
|
||||
|
||||
// -- Base styling ------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -4,404 +4,387 @@
|
||||
|
||||
{block name="check-permissions"}admin.configuration.currencies.view{/block}
|
||||
|
||||
{block name="after-admin-css"}
|
||||
{stylesheets file='assets/bootstrap-editable/css/bootstrap-editable.css' filters='cssembed'}
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="currencies">
|
||||
<div class="currencies">
|
||||
|
||||
<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/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/currencies'}">{intl l="Currencies"}</a></li>
|
||||
</ul>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/currencies'}">{intl l="Currencies"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='currencies_top'}
|
||||
{module_include location='currencies_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-12">
|
||||
<form action="{url path='/admin/configuration/currencies/update-rates'}" method="post">
|
||||
<div class="general-block-decorator">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l='Currencies'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new currency'}" href="#add_currency_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
<button class="btn btn-default btn-info action-btn" title="{intl l='Update rates'}">{intl l='Update rates'} <span class="glyphicon glyphicon-globe"></span></button>
|
||||
{/loop}
|
||||
<form action="{url path='/admin/configuration/currencies/update-rates'}" method="post">
|
||||
|
||||
</caption>
|
||||
<tr>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l='Name'}"
|
||||
}
|
||||
</th>
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption class="clearfix">
|
||||
{intl l='Currencies'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"}
|
||||
<span class="pull-right">
|
||||
<button class="btn btn-default btn-info" title="{intl l='Update rates'}">{intl l='Update rates'} <span class="glyphicon glyphicon-globe"></span></button>
|
||||
<a class="btn btn-default btn-primary" title="{intl l='Add a new currency'}" href="#add_currency_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</span>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='code'
|
||||
reverse_order='code_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="ISO 4217 Code"}"
|
||||
}
|
||||
<a title="{intl l='More information about ISO 4217'}" href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank"><i class="glyphicon glyphicon-question-sign"></i></a>
|
||||
</th>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l='Name'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='symbol'
|
||||
reverse_order='symbol_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="Symbol"}"
|
||||
}
|
||||
</th>
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='code'
|
||||
reverse_order='code_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="ISO 4217 Code"}"
|
||||
}
|
||||
<a title="{intl l='More information about ISO 4217'}" href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank"><i class="glyphicon glyphicon-question-sign"></i></a>
|
||||
</th>
|
||||
|
||||
<th class="text-right">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='rate'
|
||||
reverse_order='rate_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="Rate in €"}"
|
||||
}
|
||||
</th>
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='symbol'
|
||||
reverse_order='symbol_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="Symbol"}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="Position"}"
|
||||
}
|
||||
</th>
|
||||
<th class="text-right">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='rate'
|
||||
reverse_order='rate_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="Rate in €"}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='is_default'
|
||||
reverse_order='is_default_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="Default"}"
|
||||
}
|
||||
</th>
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="Position"}"
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='currencies_table_header'}
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='is_default'
|
||||
reverse_order='is_default_reverse'
|
||||
path='/admin/configuration/currencies'
|
||||
label="{intl l="Default"}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th> </th>
|
||||
</tr>
|
||||
{module_include location='currencies_table_header'}
|
||||
|
||||
{loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
<th class="text-right">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
|
||||
<a title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}">{$NAME}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
{$NAME}
|
||||
{/elseloop}
|
||||
</td>
|
||||
<tbody>
|
||||
{loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td class="text-center">{$ISOCODE}</td>
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
|
||||
<a title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}">{$NAME}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
{$NAME}
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td class="text-center">{$SYMBOL}</td>
|
||||
<td class="text-center">{$ISOCODE}</td>
|
||||
|
||||
<td class="text-right">{format_number number="$RATE" decimals="4"}</td>
|
||||
<td class="text-center">{$SYMBOL}</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.currencies.edit"
|
||||
path="/admin/configuration/currencies/update-position"
|
||||
url_parameter="currency_id"
|
||||
in_place_edit_class="currencyPositionChange"
|
||||
position="$POSITION"
|
||||
id="$ID"
|
||||
}
|
||||
</td>
|
||||
<td class="text-right">{format_number number="$RATE" decimals="4"}</td>
|
||||
|
||||
<td class="text-center">
|
||||
<input class="change-default" type="radio" name="is_default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.currencies.edit"
|
||||
path="/admin/configuration/currencies/update-position"
|
||||
url_parameter="currency_id"
|
||||
in_place_edit_class="currencyPositionChange"
|
||||
position="$POSITION"
|
||||
id="$ID"
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='currencies_table_row'}
|
||||
<td class="text-center">
|
||||
<input class="change-default" type="radio" name="is_default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
|
||||
</td>
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
|
||||
<a class="btn btn-default btn-xs currency-change" title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{module_include location='currencies_table_row'}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"}
|
||||
<a class="btn btn-default btn-xs currency-delete" title="{intl l='Delete this currency'}" href="#delete_currency_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
|
||||
<a class="btn btn-default btn-xs currency-change" title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="currencies"}
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No currency has been created yet. Click the + button to create one."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"}
|
||||
<a class="btn btn-default btn-xs currency-delete" title="{intl l='Delete this currency'}" href="#delete_currency_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{elseloop rel="currencies"}
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No currency has been created yet. Click the + button to create one."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{module_include location='currencies_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* Adding a new currency *}
|
||||
|
||||
<div class="modal fade" id="add_currency_dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{intl l="Create a new currency"}</h3>
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.currency.creation"}
|
||||
<form method="POST" action="{url path='/admin/configuration/currencies/create'}" {form_enctype form=$form}>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created currency ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/currencies/update' currency_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{* We do not allow users to create secured currencies from here *}
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
{if $form_error}<div class="alert alert-block alert-error" id="add_currency_dialog_error">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_field form=$form field='name'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
<label>{intl l='Name *'}</label>
|
||||
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='name'}
|
||||
<div class="input-group">
|
||||
<input type="text" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Currency name'}" placeholder="{intl l='Name'}">
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="help-block">{intl l="Enter here the currency name in the default language ($TITLE)"}</div>
|
||||
{/loop}
|
||||
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='code'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label class="control-label">{intl l='ISO 4217 code *'}</label>
|
||||
<input type="text" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='ISO 4217 code'}" placeholder="{intl l='Code'}">
|
||||
<span class="help-block"><a href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank">{intl l='More information about ISO 4217'}</a></span>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='symbol'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label class="control-label">{intl l='Symbol *'}</label>
|
||||
<input type="text" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Currency symbol'}" placeholder="{intl l='Symbol'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='rate'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label class="control-label">{intl l='Rate *'}</label>
|
||||
<input type="text" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Currency rate'}" placeholder="{intl l='Rate'}">
|
||||
<span class="help-block">{intl l="The rate from Euro (Price in Euro * rate = Price in this currency)"}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span> {intl l="Create this currency"}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove"></span> {intl l="Cancel"}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='currencies_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* Adding a new currency *}
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
<div class="modal fade" id="add_currency_dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal fade" id="delete_currency_dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{intl l="Create a new currency"}</h3>
|
||||
</div>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{intl l="Delete a currency"}</h3>
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.currency.creation"}
|
||||
<form method="POST" action="{url path='/admin/configuration/currencies/create'}" {form_enctype form=$form}>
|
||||
<div class="modal-body">
|
||||
<p>{intl l="Do you really want to delete this currency ?"}</p>
|
||||
</div>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
<form method="post" action="{url path='/admin/configuration/currencies/delete'}">
|
||||
<input type="hidden" name="currency_id" id="currency_delete_id" value="" />
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created currency ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/currencies/update' currency_id='_ID_'}" />
|
||||
{/form_field}
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span> {intl l="Yes"}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove"></span> {intl l="No"}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{* We do not allow users to create secured currencies from here *}
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
{if $form_error}<div class="alert alert-block alert-error" id="add_currency_dialog_error">{$form_error_message}</div>{/if}
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label">
|
||||
{intl l='Name *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
|
||||
<div class="input-group">
|
||||
{form_field form=$form field='name'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Currency name'}" placeholder="{intl l='Name'}">
|
||||
</span>
|
||||
{/form_field}
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l="Enter here the currency name in the default language ($TITLE)"}</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{intl l='ISO 4217 code *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='code'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='ISO 4217 code'}" placeholder="{intl l='Code'}">
|
||||
</span>
|
||||
|
||||
<div class="help-block">
|
||||
<a href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank">{intl l='More information about ISO 4217'}</a>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{intl l='Symbol *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='symbol'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Currency symbol'}" placeholder="{intl l='Symbol'}">
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{intl l='Rate *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='rate'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Currency rate'}" placeholder="{intl l='Rate'}">
|
||||
</span>
|
||||
<div class="help-block">{intl l="The rate from Euro (Price in Euro * rate = Price in this currency)"}</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-default btn-primary">{intl l="Create this currency"}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">{intl l="Cancel"}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
<div class="modal fade" id="delete_currency_dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{intl l="Delete a currency"}</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<p>{intl l="Do you really want to delete this currency ?"}</p>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{url path='/admin/configuration/currencies/delete'}">
|
||||
<input type="hidden" name="currency_id" id="currency_delete_id" value="" />
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-default btn-primary">{intl l="Yes"}</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">{intl l="No"}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/bootstrap-editable/js/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper currency ID in delete from
|
||||
$('a.currency-delete').click(function(ev) {
|
||||
$('#currency_delete_id').val($(this).data('id'));
|
||||
});
|
||||
// Set proper currency ID in delete from
|
||||
$('a.currency-delete').click(function(ev) {
|
||||
$('#currency_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
{* display the form creation dialog if it contains errors *}
|
||||
{* display the form creation dialog if it contains errors *}
|
||||
|
||||
{form name="thelia.admin.currency.creation"}
|
||||
{if #form_error}
|
||||
$('#add_currency_dialog').modal();
|
||||
{/if}
|
||||
{/form}
|
||||
{form name="thelia.admin.currency.creation"}
|
||||
{if #form_error}
|
||||
$('#add_currency_dialog').modal();
|
||||
{/if}
|
||||
{/form}
|
||||
|
||||
{* Always reset create dialog on close *}
|
||||
{* Always reset create dialog on close *}
|
||||
|
||||
$('#add_currency_dialog').on('hidden',function() {
|
||||
// Hide error currency
|
||||
$('#add_currency_dialog_error').remove();
|
||||
$('#add_currency_dialog').on('hidden',function() {
|
||||
|
||||
// Clear error status
|
||||
$("#add_currency_dialog .error").removeClass('error');
|
||||
// Hide error currency
|
||||
$('#add_currency_dialog_error').remove();
|
||||
|
||||
// Empty field values
|
||||
$("#add_currency_dialog input[type=text]").val('');
|
||||
});
|
||||
// Clear error status
|
||||
$("#add_currency_dialog .error").removeClass('error');
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
// Empty field values
|
||||
$("#add_currency_dialog input[type=text]").val('');
|
||||
});
|
||||
|
||||
$('.currencyPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new currency position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/currencies/update-position' currency_id='__ID__' position='__POS__'}";
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
$('.currencyPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new currency position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/currencies/update-position' currency_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
{* Change default status *}
|
||||
|
||||
$('.change-default').click(function(ev) {
|
||||
var url = "{url path='/admin/configuration/currencies/set-default' currency_id='__ID__'}";
|
||||
|
||||
// Perform ID subtitutions
|
||||
url = url.replace('__ID__', $(this).val());
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
{* Change default status *}
|
||||
|
||||
$('.change-default').click(function(ev) {
|
||||
var url = "{url path='/admin/configuration/currencies/set-default' currency_id='__ID__'}";
|
||||
|
||||
// Perform ID subtitutions
|
||||
url = url.replace('__ID__', $(this).val());
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{/block}
|
||||
@@ -5,138 +5,121 @@
|
||||
{block name="check-permissions"}admin.configuration.currencies.edit{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="currencies edit-currency">
|
||||
<div class="currencies edit-currency">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop name="currency_edit" type="currency" id="$currency_id" backend_context="1" lang="$edit_language_id"}
|
||||
{loop name="currency_edit" type="currency" id="$currency_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/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/currencies'}">{intl l="Currencies"}</a></li>
|
||||
<li>{intl l='Editing currency "%name"' name="{$NAME}"}</li>
|
||||
</ul>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/currencies'}">{intl l="Currencies"}</a></li>
|
||||
<li>{intl l='Editing currency "%name"' name="{$NAME}"}</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
<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 currency $NAME"}
|
||||
</div>
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Edit currency $NAME"}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
{form name="thelia.admin.currency.modification"}
|
||||
<form method="POST" action="{url path='/admin/configuration/currencies/save'}" {form_enctype form=$form}>
|
||||
|
||||
{* Be sure to get the currency ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="currency_id" value="{$currency_id}" />
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="thelia.admin.currency.modification"}
|
||||
<form method="POST" action="{url path='/admin/configuration/currencies/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{* Be sure to get the currency ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="currency_id" value="{$currency_id}" />
|
||||
|
||||
{include file="includes/inner-form-toolbar.html"}
|
||||
{include file="includes/inner-form-toolbar.html"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/currencies'}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/currencies'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-block alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
<div class="col-md-6">
|
||||
{if $form_error}<div class="alert alert-block alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
{form_field form=$form field='name'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label>{intl l='Name *'}</label>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Currency name'}" placeholder="{intl l='Currency name'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='code'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label>
|
||||
{intl l='ISO 4217 Code *'}
|
||||
<span class="label-help-block">
|
||||
<a title="{intl l='More information about ISO 4217'}" href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank">List of ISO 4217 code</a>
|
||||
</span>
|
||||
</label>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Currency ISO 4217 Code'}" placeholder="{intl l='Code'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{intl l='Name *'}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='name'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Currency name'}" placeholder="{intl l='Currency name'}" class="form-control input-medium">
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{intl l='ISO 4217 Code *'}
|
||||
<span class="label-help-block"><a title="{intl l='More information about ISO 4217'}" href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank">List of ISO 4217 code</a></span>
|
||||
</label>
|
||||
{form_field form=$form field='symbol'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label>
|
||||
{intl l='Symbol *'}
|
||||
<span class="label-help-block">The symbol, sur as $, £, €...</span>
|
||||
</label>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Currency symbol'}" placeholder="{intl l='Symbol'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='rate'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label>
|
||||
{intl l='Rate from € *'}
|
||||
<span class="label-help-block">The rate from Euro</span>
|
||||
</label>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Rate from Euro'}" placeholder="{intl l='Rate'}" class="form-control">
|
||||
<span class="help-block">Price in Euro x rate = Price in this currency</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='code'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Currency ISO 4217 Code'}" placeholder="{intl l='Code'}" class="form-control input-mini">
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{intl l='Symbol *'}
|
||||
<span class="label-help-block">The symbol, sur as $, £, €...</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='symbol'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Currency symbol'}" placeholder="{intl l='Symbol'}" class="form-control input-mini">
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{intl l='Rate from € *'}
|
||||
<span class="label-help-block">The rate from Euro</span>
|
||||
</label>
|
||||
{/loop}
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='rate'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Rate from Euro'}" placeholder="{intl l='Rate'}" class="form-control input-mini">
|
||||
</span>
|
||||
{/form_field}
|
||||
<span class="help-block">Price in Euro x rate = Price in this currency</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="currency_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, currency ID=$currency_id was not found."}
|
||||
{elseloop rel="currency_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, currency ID=$currency_id was not found."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
{/elseloop}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user