[-] BO : fix #PSFV-203
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12157 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -55,15 +55,16 @@ class blockcontact extends Module
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$html = '';
|
||||
// If we try to update the settings
|
||||
if (isset($_POST['submitModule']))
|
||||
{
|
||||
Configuration::updateValue('blockcontact_telnumber', (preg_match('/^[0-9]+/', $_POST['telnumber']) ? $_POST['telnumber']: ''));
|
||||
Configuration::updateValue('blockcontact_email', (($_POST['email'] != '') ? $_POST['email']: ''));
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
|
||||
$html .= '<div class="confirm">'.$this->l('Configuration updated').'</div>';
|
||||
}
|
||||
|
||||
return '
|
||||
|
||||
$html .= '
|
||||
<h2>'.$this->displayName.'</h2>
|
||||
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<fieldset>
|
||||
@@ -77,8 +78,9 @@ class blockcontact extends Module
|
||||
<input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
';
|
||||
</form>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function hookDisplayHeader()
|
||||
|
||||
@@ -64,6 +64,7 @@ class blockcontactinfos extends Module
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$html = '';
|
||||
// If we try to update the settings
|
||||
if (isset($_POST['submitModule']))
|
||||
{
|
||||
@@ -72,10 +73,10 @@ class blockcontactinfos extends Module
|
||||
Configuration::updateValue('blockcontactinfos_phone', ((isset($_POST['phone']) AND $_POST['phone'] != '') ? $_POST['phone'] : ''));
|
||||
Configuration::updateValue('blockcontactinfos_email', ((isset($_POST['email']) AND $_POST['email'] != '') ? $_POST['email'] : Configuration::get('PS_SHOP_EMAIL')));
|
||||
|
||||
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>';
|
||||
$html .= '<div class="confirm">'.$this->l('Configuration updated').'</div>';
|
||||
}
|
||||
|
||||
$content = '
|
||||
|
||||
$html .= '
|
||||
<h2>'.$this->displayName.'</h2>
|
||||
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<fieldset>
|
||||
@@ -94,7 +95,7 @@ class blockcontactinfos extends Module
|
||||
</form>
|
||||
';
|
||||
|
||||
return $content;
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function hookHeader()
|
||||
|
||||
Reference in New Issue
Block a user