MAJ en Thelia 2.3.4
This commit is contained in:
@@ -71,5 +71,4 @@ trait AddressCountryValidationTrait
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -201,6 +201,52 @@ class ConfigStoreForm extends BaseForm
|
||||
'placeholder' => $tr->trans('Country'),
|
||||
]
|
||||
]
|
||||
)
|
||||
->add(
|
||||
'favicon_file',
|
||||
'file',
|
||||
[
|
||||
'required' => false,
|
||||
'constraints' => [
|
||||
new Constraints\Image(array(
|
||||
'mimeTypes' => ['image/png', 'image/x-icon']
|
||||
))
|
||||
],
|
||||
'label' => $tr->trans('Favicon image'),
|
||||
'label_attr' => [
|
||||
'for' => 'favicon_file',
|
||||
'help' => $tr->trans('Icon of the website. Only PNG and ICO files are allowed.'),
|
||||
]
|
||||
]
|
||||
)
|
||||
->add(
|
||||
'logo_file',
|
||||
'file',
|
||||
[
|
||||
'required' => false,
|
||||
'constraints' => [
|
||||
new Constraints\Image()
|
||||
],
|
||||
'label' => $tr->trans('Store logo'),
|
||||
'label_attr' => [
|
||||
'for' => 'logo_file'
|
||||
]
|
||||
]
|
||||
)
|
||||
->add(
|
||||
'banner_file',
|
||||
'file',
|
||||
[
|
||||
'required' => false,
|
||||
'constraints' => [
|
||||
new Constraints\Image()
|
||||
],
|
||||
'label' => $tr->trans('Banner'),
|
||||
'label_attr' => [
|
||||
'for' => 'banner_file',
|
||||
'help' => $tr->trans('Banner of the website. Used in the e-mails send to the customers.'),
|
||||
]
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace Thelia\Form;
|
||||
|
||||
use Symfony\Component\Validator\Constraints\GreaterThan;
|
||||
|
||||
|
||||
class CountryModificationForm extends CountryCreationForm
|
||||
{
|
||||
use StandardDescriptionFieldsTrait;
|
||||
|
||||
@@ -295,7 +295,7 @@ class CouponCreationForm extends BaseForm
|
||||
*/
|
||||
public function checkLocalizedDate($value, ExecutionContextInterface $context)
|
||||
{
|
||||
$format = LangQuery::create()->findOneByByDefault(true)->getDateFormat();
|
||||
$format = LangQuery::create()->findOneByByDefault(true)->getDatetimeFormat();
|
||||
|
||||
if (false === \DateTime::createFromFormat($format, $value)) {
|
||||
$context->addViolation(
|
||||
@@ -320,7 +320,7 @@ class CouponCreationForm extends BaseForm
|
||||
return;
|
||||
}
|
||||
|
||||
$format = LangQuery::create()->findOneByByDefault(true)->getDateFormat();
|
||||
$format = LangQuery::create()->findOneByByDefault(true)->getDatetimeFormat();
|
||||
|
||||
$startDate = \DateTime::createFromFormat($format, $startDate);
|
||||
$expirationDate = \DateTime::createFromFormat($format, $value);
|
||||
|
||||
@@ -68,6 +68,9 @@ class CurrencyCreationForm extends BaseForm
|
||||
"label_attr" => [
|
||||
"for" => "format",
|
||||
"help" => $this->translator->trans("%n for number, %c for the currency code, %s for the currency symbol")
|
||||
],
|
||||
"attr" => [
|
||||
"placeholder" => "%n"
|
||||
]
|
||||
])
|
||||
->add("rate", "text", [
|
||||
|
||||
@@ -41,6 +41,7 @@ class CustomerProfileUpdateForm extends CustomerCreateForm
|
||||
->remove("city")
|
||||
->remove("zipcode")
|
||||
->remove("country")
|
||||
->remove("state")
|
||||
// Remove Login Information
|
||||
->remove("password")
|
||||
->remove("password_confirm")
|
||||
|
||||
@@ -227,6 +227,4 @@ class CustomerUpdateForm extends BaseForm
|
||||
{
|
||||
return "thelia_customer_update";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -23,142 +23,146 @@ final class AdminForm
|
||||
const ADMIN_LOGIN = 'thelia.admin.login';
|
||||
const ADMIN_LOST_PASSWORD = 'thelia.admin.lostpassword';
|
||||
const ADMIN_CREATE_PASSWORD = 'thelia.admin.createpassword';
|
||||
|
||||
|
||||
const SEO = 'thelia.admin.seo';
|
||||
|
||||
|
||||
const CUSTOMER_CREATE = 'thelia.admin.customer.create';
|
||||
const CUSTOMER_UPDATE = 'thelia.admin.customer.update';
|
||||
|
||||
|
||||
const ADDRESS_CREATE = 'thelia.admin.address.create';
|
||||
const ADDRESS_UPDATE = 'thelia.admin.address.update';
|
||||
|
||||
|
||||
const CATEGORY_CREATION = 'thelia.admin.category.creation';
|
||||
const CATEGORY_MODIFICATION = 'thelia.admin.category.modification';
|
||||
const CATEGORY_IMAGE_MODIFICATION = 'thelia.admin.category.image.modification';
|
||||
const CATEGORY_DOCUMENT_MODIFICATION = 'thelia.admin.category.document.modification';
|
||||
|
||||
|
||||
const PRODUCT_CREATION = 'thelia.admin.product.creation';
|
||||
const PRODUCT_CLONE = 'thelia.admin.product.clone';
|
||||
const PRODUCT_MODIFICATION = 'thelia.admin.product.modification';
|
||||
const PRODUCT_DETAILS_MODIFICATION = 'thelia.admin.product.details.modification';
|
||||
const PRODUCT_IMAGE_MODIFICATION = 'thelia.admin.product.image.modification';
|
||||
const PRODUCT_DOCUMENT_MODIFICATION = 'thelia.admin.product.document.modification';
|
||||
|
||||
|
||||
const PRODUCT_SALE_ELEMENT_UPDATE = 'thelia.admin.product_sale_element.update';
|
||||
const PRODUCT_DEFAULT_SALE_ELEMENT_UPDATE = 'thelia.admin.product_default_sale_element.update';
|
||||
const PRODUCT_COMBINATION_GENERATION = 'thelia.admin.product_combination.build';
|
||||
|
||||
|
||||
const PRODUCT_DELETE = 'thelia.admin.product.deletion';
|
||||
|
||||
|
||||
const FOLDER_CREATION = 'thelia.admin.folder.creation';
|
||||
const FOLDER_MODIFICATION = 'thelia.admin.folder.modification';
|
||||
const FOLDER_IMAGE_MODIFICATION = 'thelia.admin.folder.image.modification';
|
||||
const FOLDER_DOCUMENT_MODIFICATION = 'thelia.admin.folder.document.modification';
|
||||
|
||||
|
||||
const CONTENT_CREATION = 'thelia.admin.content.creation';
|
||||
const CONTENT_MODIFICATION = 'thelia.admin.content.modification';
|
||||
const CONTENT_IMAGE_MODIFICATION = 'thelia.admin.content.image.modification';
|
||||
const CONTENT_DOCUMENT_MODIFICATION = 'thelia.admin.content.document.modification';
|
||||
|
||||
|
||||
const BRAND_CREATION = 'thelia.admin.brand.creation';
|
||||
const BRAND_MODIFICATION = 'thelia.admin.brand.modification';
|
||||
const BRAND_IMAGE_MODIFICATION = 'thelia.admin.brand.image.modification';
|
||||
const BRAND_DOCUMENT_MODIFICATION = 'thelia.admin.brand.document.modification';
|
||||
|
||||
|
||||
const CART_ADD = 'thelia.cart.add';
|
||||
|
||||
|
||||
const ORDER_DELIVERY = 'thelia.order.delivery';
|
||||
const ORDER_PAYMENT = 'thelia.order.payment';
|
||||
const ORDER_UPDATE_ADDRESS = 'thelia.order.update.address';
|
||||
|
||||
|
||||
const ORDER_STATUS_CREATION = 'thelia.admin.order-status.creation';
|
||||
const ORDER_STATUS_MODIFICATION = 'thelia.admin.order-status.modification';
|
||||
|
||||
const COUPON_CODE = 'thelia.order.coupon';
|
||||
|
||||
|
||||
const CONFIG_CREATION = 'thelia.admin.config.creation';
|
||||
const CONFIG_MODIFICATION = 'thelia.admin.config.modification';
|
||||
|
||||
|
||||
const MESSAGE_CREATION = 'thelia.admin.message.creation';
|
||||
const MESSAGE_MODIFICATION = 'thelia.admin.message.modification';
|
||||
|
||||
const MESSAGE_SEND_SAMPLE = 'thelia.admin.message.send-sample';
|
||||
|
||||
const CURRENCY_CREATION = 'thelia.admin.currency.creation';
|
||||
const CURRENCY_MODIFICATION = 'thelia.admin.currency.modification';
|
||||
|
||||
|
||||
const COUPON_CREATION = 'thelia.admin.coupon.creation';
|
||||
|
||||
|
||||
const ATTRIBUTE_CREATION = 'thelia.admin.attribute.creation';
|
||||
const ATTRIBUTE_MODIFICATION = 'thelia.admin.attribute.modification';
|
||||
|
||||
|
||||
const FEATURE_CREATION = 'thelia.admin.feature.creation';
|
||||
const FEATURE_MODIFICATION = 'thelia.admin.feature.modification';
|
||||
|
||||
|
||||
const ATTRIBUTE_AV_CREATION = 'thelia.admin.attributeav.creation';
|
||||
|
||||
|
||||
const FEATURE_AV_CREATION = 'thelia.admin.featureav.creation';
|
||||
|
||||
|
||||
const TAX_RULE_MODIFICATION = 'thelia.admin.taxrule.modification';
|
||||
const TAX_RULE_TAX_LIST_UPDATE = 'thelia.admin.taxrule.taxlistupdate';
|
||||
const TAX_RULE_CREATION = 'thelia.admin.taxrule.add';
|
||||
|
||||
|
||||
const TAX_MODIFICATION = 'thelia.admin.tax.modification';
|
||||
const TAX_TAX_LIST_UPDATE = 'thelia.admin.tax.taxlistupdate';
|
||||
const TAX_CREATION = 'thelia.admin.tax.add';
|
||||
|
||||
|
||||
const PROFILE_CREATION = 'thelia.admin.profile.add';
|
||||
const PROFILE_MODIFICATION = 'thelia.admin.profile.modification';
|
||||
const PROFILE_UPDATE_RESOURCE_ACCESS = 'thelia.admin.profile.resource-access.modification';
|
||||
const PROFILE_UPDATE_MODULE_ACCESS = 'thelia.admin.profile.module-access.modification';
|
||||
|
||||
|
||||
const ADMINISTRATOR_CREATION = 'thelia.admin.administrator.add';
|
||||
const ADMINISTRATOR_MODIFICATION = 'thelia.admin.administrator.update';
|
||||
|
||||
|
||||
const MAILING_SYSTEM_MODIFICATION = 'thelia.admin.mailing-system.update';
|
||||
|
||||
|
||||
const TEMPLATE_CREATION = 'thelia.admin.template.creation';
|
||||
const TEMPLATE_MODIFICATION = 'thelia.admin.template.modification';
|
||||
|
||||
|
||||
const COUNTRY_CREATION = 'thelia.admin.country.creation';
|
||||
const COUNTRY_MODIFICATION = 'thelia.admin.country.modification';
|
||||
|
||||
|
||||
const STATE_CREATION = 'thelia.admin.state.creation';
|
||||
const STATE_MODIFICATION = 'thelia.admin.state.modification';
|
||||
|
||||
|
||||
const AREA_CREATE = 'thelia.admin.area.create';
|
||||
const AREA_MODIFICATION = 'thelia.admin.area.modification';
|
||||
const AREA_COUNTRY = 'thelia.admin.area.country';
|
||||
const AREA_DELETE_COUNTRY = 'thelia.admin.area.delete.country';
|
||||
const AREA_POSTAGE = 'thelia.admin.area.postage';
|
||||
|
||||
|
||||
const SHIPPING_ZONE_ADD_AREA = 'thelia.shopping_zone_area';
|
||||
const SHIPPING_ZONE_REMOVE_AREA = 'thelia.shopping_zone_remove_area';
|
||||
|
||||
|
||||
const LANG_UPDATE = 'thelia.lang.update';
|
||||
const LANG_CREATE = 'thelia.lang.create';
|
||||
const LANG_DEFAULT_BEHAVIOR = 'thelia.lang.defaultBehavior';
|
||||
const LANG_URL = 'thelia.lang.url';
|
||||
|
||||
|
||||
const CONFIG_STORE = 'thelia.configuration.store';
|
||||
const SYSTEM_LOG_CONFIGURATION = 'thelia.system-logs.configuration';
|
||||
|
||||
|
||||
const MODULE_MODIFICATION = 'thelia.admin.module.modification';
|
||||
const MODULE_INSTALL = 'thelia.admin.module.install';
|
||||
|
||||
|
||||
const HOOK_CREATION = 'thelia.admin.hook.creation';
|
||||
const HOOK_MODIFICATION = 'thelia.admin.hook.modification';
|
||||
|
||||
|
||||
const MODULE_HOOK_CREATION = 'thelia.admin.module-hook.creation';
|
||||
const MODULE_HOOK_MODIFICATION = 'thelia.admin.module-hook.modification';
|
||||
|
||||
|
||||
const CACHE_FLUSH = 'thelia.cache.flush';
|
||||
const ASSETS_FLUSH = 'thelia.assets.flush';
|
||||
const IMAGES_AND_DOCUMENTS_CACHE_FLUSH = 'thelia.images-and-documents-cache.flush';
|
||||
|
||||
|
||||
const EXPORT = 'thelia.export';
|
||||
const IMPORT = 'thelia.import';
|
||||
|
||||
|
||||
const SALE_CREATION = 'thelia.admin.sale.creation';
|
||||
const SALE_MODIFICATION = 'thelia.admin.sale.modification';
|
||||
|
||||
|
||||
const EMPTY_FORM = 'thelia.empty';
|
||||
|
||||
|
||||
const API_CREATE = 'thelia_api_create';
|
||||
const API_UPDATE = 'thelia_api_update';
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace Thelia\Form;
|
||||
|
||||
use Thelia\Form\Image\ImageModification;
|
||||
|
||||
|
||||
class ModuleImageModification extends ImageModification
|
||||
{
|
||||
/**
|
||||
@@ -27,4 +26,4 @@ class ModuleImageModification extends ImageModification
|
||||
{
|
||||
return 'thelia_module_image_modification';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,9 +129,9 @@ class ModuleInstallForm extends BaseForm
|
||||
protected function unzipModule(UploadedFile $file)
|
||||
{
|
||||
$extractPath = false;
|
||||
$zip = new ZipArchiver();
|
||||
$zip = new ZipArchiver(true);
|
||||
if (!$zip->open($file->getRealPath())) {
|
||||
throw new \Exception("unable to open zipfile");
|
||||
throw new \Exception("unable to open zipfile");
|
||||
}
|
||||
|
||||
$extractPath = $this->tempdir();
|
||||
|
||||
@@ -80,7 +80,7 @@ class OrderPayment extends FirewallForm
|
||||
->findOne();
|
||||
|
||||
if (null === $module) {
|
||||
$context->addViolation("Payment module ID not found");
|
||||
$context->addViolation(Translator::getInstance()->trans("Payment module ID not found"));
|
||||
} elseif (! $module->isPayementModule()) {
|
||||
$context->addViolation(
|
||||
sprintf(Translator::getInstance()->trans("payment module %s is not a Thelia\Module\PaymentModuleInterface"), $module->getCode())
|
||||
|
||||
@@ -85,7 +85,6 @@ class TaxCreationForm extends BaseForm
|
||||
foreach ($requirementList as $name => $requirements) {
|
||||
/** @var TaxTypeRequirementDefinition $requirement */
|
||||
foreach ($requirements as $requirement) {
|
||||
|
||||
if (!isset(self::$typeList[$requirement->getName()])) {
|
||||
self::$typeList[$requirement->getName()] = $requirement->getType();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user