// delete confirm message when updating module configuration
This commit is contained in:
@@ -102,7 +102,7 @@ class BankWire extends PaymentModule
|
||||
Configuration::updateValue('BANK_WIRE_OWNER', Tools::getValue('owner'));
|
||||
Configuration::updateValue('BANK_WIRE_ADDRESS', Tools::getValue('address'));
|
||||
}
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('ok').'" /> '.$this->l('Settings updated').'</div>';
|
||||
$this->_html .= '<div class="conf confirm"> '.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
|
||||
private function _displayBankWire()
|
||||
|
||||
@@ -136,7 +136,7 @@ class BlockCart extends Module
|
||||
$output .= '<div class="alert error">'.$this->l('Ajax : Invalid choice.').'</div>';
|
||||
else
|
||||
Configuration::updateValue('PS_BLOCK_CART_AJAX', (int)($ajax));
|
||||
$output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
|
||||
$output .= '<div class="conf confirm">'.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
return $output.$this->displayForm();
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class BlockCategories extends Module
|
||||
Configuration::updateValue('BLOCK_CATEG_SORT', Tools::getValue('BLOCK_CATEG_SORT'));
|
||||
|
||||
$this->_clearBlockcategoriesCache();
|
||||
$output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
|
||||
$output .= '<div class="conf confirm">'.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
}
|
||||
return $output.$this->displayForm();
|
||||
|
||||
@@ -58,6 +58,7 @@ class Blockcustomerprivacy extends Module
|
||||
$languages = Language::getLanguages(false);
|
||||
$iso = $this->context->language->iso_code;
|
||||
|
||||
$output = '';
|
||||
if (Tools::isSubmit('submitCustPrivMess'))
|
||||
{
|
||||
$message_trads = array();
|
||||
@@ -68,7 +69,7 @@ class Blockcustomerprivacy extends Module
|
||||
$message_trads[(int)$id_lang[1]] = $value;
|
||||
}
|
||||
Configuration::updateValue('CUSTPRIV_MESSAGE', $message_trads, true);
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
|
||||
$output = '<div class="conf confirm">'.$this->l('Configuration updated').'</div>';
|
||||
}
|
||||
|
||||
$content = '';
|
||||
@@ -118,6 +119,7 @@ class Blockcustomerprivacy extends Module
|
||||
}
|
||||
|
||||
$values = Configuration::getInt('CUSTPRIV_MESSAGE');
|
||||
$content .= $output;
|
||||
$content .= '
|
||||
<fieldset><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->displayName.'</legend>
|
||||
<form action="'.htmlentities($_SERVER['REQUEST_URI']).'" method="post">
|
||||
|
||||
@@ -64,7 +64,7 @@ class BlockNewProducts extends Module
|
||||
{
|
||||
Configuration::updateValue('PS_BLOCK_NEWPRODUCTS_DISPLAY', (int)(Tools::getValue('always_display')));
|
||||
Configuration::updateValue('NEW_PRODUCTS_NBR', (int)($productNbr));
|
||||
$output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
|
||||
$output .= '<div class="conf confirm">'.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
}
|
||||
return $output.$this->displayForm();
|
||||
|
||||
@@ -57,6 +57,7 @@ class Blockreinsurance extends Module
|
||||
return Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance` (
|
||||
`id_contactinfos` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_shop` int(10) unsigned NOT NULL ,
|
||||
`filename` VARCHAR(100) NOT NULL,
|
||||
`text` VARCHAR(300) NOT NULL,
|
||||
PRIMARY KEY (`id_contactinfos`)
|
||||
@@ -123,13 +124,14 @@ class Blockreinsurance extends Module
|
||||
public function getContent()
|
||||
{
|
||||
// If we try to update the settings
|
||||
$output = '';
|
||||
if (isset($_POST['submitModule']))
|
||||
{
|
||||
Configuration::updateValue('blockreinsurance_nbblocks', ((isset($_POST['nbblocks']) && $_POST['nbblocks'] != '') ? (int)$_POST['nbblocks'] : ''));
|
||||
if ($this->removeFromDB() && $this->addToDB())
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
|
||||
$output = '<div class="conf confirm">'.$this->l('Configuration updated').'</div>';
|
||||
else
|
||||
echo '<div class="conf error"><img src="../img/admin/disabled.gif"/>'.$this->l('An error occurred during the save').'</div>';
|
||||
$output = '<div class="conf error"><img src="../img/admin/disabled.gif"/>'.$this->l('An error occurred during the save').'</div>';
|
||||
}
|
||||
|
||||
$nb_blocks = Configuration::get('blockreinsurance_nbblocks');
|
||||
@@ -161,6 +163,7 @@ class Blockreinsurance extends Module
|
||||
});
|
||||
</script>
|
||||
<h2>'.$this->displayName.'</h2>
|
||||
'.$output.'
|
||||
<form method="post" action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" enctype="multipart/form-data">
|
||||
<fieldset class="width2">
|
||||
<select name="nbblocks">';
|
||||
|
||||
@@ -56,16 +56,18 @@ class blocksocial extends Module
|
||||
public function getContent()
|
||||
{
|
||||
// If we try to update the settings
|
||||
$output = '';
|
||||
if (isset($_POST['submitModule']))
|
||||
{
|
||||
Configuration::updateValue('blocksocial_facebook', (($_POST['facebook_url'] != '') ? $_POST['facebook_url']: ''));
|
||||
Configuration::updateValue('blocksocial_twitter', (($_POST['twitter_url'] != '') ? $_POST['twitter_url']: ''));
|
||||
Configuration::updateValue('blocksocial_rss', (($_POST['rss_url'] != '') ? $_POST['rss_url']: ''));
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
|
||||
$output = '<div class="conf confirm">'.$this->l('Configuration updated').'</div>';
|
||||
}
|
||||
|
||||
return '
|
||||
<h2>'.$this->displayName.'</h2>
|
||||
'.$output.'
|
||||
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<fieldset class="width2">
|
||||
<label for="facebook_url">'.$this->l('Facebook URL : ').'</label>
|
||||
|
||||
@@ -95,7 +95,7 @@ class BlockWishList extends Module
|
||||
$activated = Tools::getValue('activated');
|
||||
if ($activated != 0 AND $activated != 1)
|
||||
$this->_html .= '<div class="alert error">'.$this->l('Activate module : Invalid choice.').'</div>';
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
|
||||
$this->_html .= '<div class="conf confirm">'.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
$this->_displayForm();
|
||||
return ($this->_html);
|
||||
|
||||
@@ -96,7 +96,7 @@ class Cheque extends PaymentModule
|
||||
Configuration::updateValue('CHEQUE_NAME', Tools::getValue('name'));
|
||||
Configuration::updateValue('CHEQUE_ADDRESS', Tools::getValue('address'));
|
||||
}
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('OK').'" /> '.$this->l('Settings updated').'</div>';
|
||||
$this->_html .= '<div class="conf confirm"> '.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
|
||||
private function _displayCheque()
|
||||
|
||||
@@ -97,14 +97,14 @@ class Pagesnotfound extends Module
|
||||
if (Tools::isSubmit('submitTruncatePNF'))
|
||||
{
|
||||
Db::getInstance()->execute('TRUNCATE `'._DB_PREFIX_.'pagenotfound`');
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" /> '.$this->l('Pages not found has been emptied.').'</div>';
|
||||
$this->_html .= '<div class="conf confirm"> '.$this->l('Pages not found has been emptied.').'</div>';
|
||||
}
|
||||
else if (Tools::isSubmit('submitDeletePNF'))
|
||||
{
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'pagenotfound`
|
||||
WHERE date_add BETWEEN '.ModuleGraph::getDateBetween());
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" /> '.$this->l('Pages not found have been deleted.').'</div>';
|
||||
$this->_html .= '<div class="conf confirm"> '.$this->l('Pages not found have been deleted.').'</div>';
|
||||
}
|
||||
|
||||
$this->_html .= '<div class="blocStats"><h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2>';
|
||||
@@ -134,7 +134,7 @@ class Pagesnotfound extends Module
|
||||
</table>';
|
||||
}
|
||||
else
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" /> '.$this->l('No pages registered').'</div>';
|
||||
$this->_html .= '<div class="conf confirm"> '.$this->l('No pages registered').'</div>';
|
||||
|
||||
$this->_html .= '</div>';
|
||||
if (count($pages))
|
||||
|
||||
@@ -114,14 +114,14 @@ class ProductComments extends Module
|
||||
Configuration::updateValue('PRODUCT_COMMENTS_MODERATE', (int)Tools::getValue('moderate'));
|
||||
Configuration::updateValue('PRODUCT_COMMENTS_ALLOW_GUESTS', (int)Tools::getValue('allow_guest'));
|
||||
Configuration::updateValue('PRODUCT_COMMENTS_MINIMAL_TIME', (int)Tools::getValue('product_comments_minimal_time'));
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
|
||||
$this->_html .= '<div class="conf confirm">'.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
if ($id_criterion = (int)Tools::getValue('deleteCriterion'))
|
||||
{
|
||||
$productCommentCriterion = new ProductCommentCriterion((int)$id_criterion);
|
||||
if ($productCommentCriterion->id)
|
||||
if ($productCommentCriterion->delete())
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Criterion deleted').'</div>';
|
||||
$this->_html .= '<div class="conf confirm">'.$this->l('Criterion deleted').'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ class ProductComments extends Module
|
||||
$productCommentCriterion->active = (int)Tools::getValue('criterion_active');
|
||||
|
||||
if ($productCommentCriterion->save())
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.(Tools::getValue('editCriterion') ? $this->l('Criterion updated') : $this->l('Criterion added')).'</div>';
|
||||
$this->_html .= '<div class="conf confirm">'.(Tools::getValue('editCriterion') ? $this->l('Criterion updated') : $this->l('Criterion added')).'</div>';
|
||||
}
|
||||
else if (!empty($action_criterion) && empty($name))
|
||||
{
|
||||
@@ -307,7 +307,7 @@ class ProductComments extends Module
|
||||
}
|
||||
}
|
||||
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
|
||||
$this->_html .= '<div class="conf confirm">'.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,13 +80,13 @@ class StatsCheckUp extends Module
|
||||
);
|
||||
foreach ($confs as $confname)
|
||||
Configuration::updateValue($confname, (int)Tools::getValue($confname));
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"> '.$this->l('Configuration updated').'</div>';
|
||||
echo '<div class="conf confirm"> '.$this->l('Configuration updated').'</div>';
|
||||
}
|
||||
|
||||
if (Tools::isSubmit('submitCheckupOrder'))
|
||||
{
|
||||
$this->context->cookie->checkup_order = (int)Tools::getValue('submitCheckupOrder');
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"> '.$this->l('Configuration updated').'</div>';
|
||||
echo '<div class="conf confirm"> '.$this->l('Configuration updated').'</div>';
|
||||
}
|
||||
|
||||
if (!isset($this->context->cookie->checkup_order))
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>watermark</name>
|
||||
<displayName><![CDATA[Watermark]]></displayName>
|
||||
<displayName><![CDATA[Filigrane]]></displayName>
|
||||
<version><![CDATA[0.2]]></version>
|
||||
<description><![CDATA[Protect image by watermark.]]></description>
|
||||
<description><![CDATA[Protégez vos images avec un filigrane]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[administration]]></tab>
|
||||
<confirmUninstall>Are you sure you want to delete your details ?</confirmUninstall>
|
||||
<confirmUninstall>Êtes-vous sûr de vouloir tout supprimer ?</confirmUninstall>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
|
||||
Reference in New Issue
Block a user