[*] MO : updated modules blockcms and blocknewsletter for mobile theme

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13651 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mBertholino
2012-02-28 08:52:06 +00:00
parent 3c85a7784b
commit 975f2e2008
4 changed files with 139 additions and 27 deletions
@@ -0,0 +1,43 @@
{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2012 PrestaShop SA
* @version Release: $Revision: 6594 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block Mobile Newsletter module-->
<div id="newsletter">
<p>Newsletter</p>
<form action="form.php" method="post">
<div data-role="fieldcontain">
<label for="email">Your email:</label>
<input type="text" name="email" size="18"
value="{if isset($value) && $value}{$value}{else}{l s='your e-mail' mod='blocknewsletter'}{/if}"
onfocus="javascript:if(this.value=='{l s='your e-mail' mod='blocknewsletter'}')this.value='';"
onblur="javascript:if(this.value=='')this.value='{l s='your e-mail' mod='blocknewsletter'}';"
class="inputNew" />
<div data-theme="a" class="ui-btn ui-btn-corner-all ui-shadow ui-btn-up-a" aria-disabled="false">
<span aria-hidden="true" class="ui-btn-inner ui-btn-corner-all"><span class="ui-btn-text">OK</span></span>
</div>
</div>
</form>
</div><!-- /newsletter -->
+19 -7
View File
@@ -462,7 +462,7 @@ class Blocknewsletter extends Module
return $this->hookDisplayLeftColumn($params);
}
public function hookDisplayLeftColumn($params)
private function _prepareHook($params)
{
if (Tools::isSubmit('submitNewsletter'))
{
@@ -470,21 +470,26 @@ class Blocknewsletter extends Module
if ($this->error)
{
$this->smarty->assign(array('color' => 'red',
'msg' => $this->error,
'nw_value' => isset($_POST['email']) ? pSQL($_POST['email']) : false,
'nw_error' => true,
'action' => $_POST['action'])
'msg' => $this->error,
'nw_value' => isset($_POST['email']) ? pSQL($_POST['email']) : false,
'nw_error' => true,
'action' => $_POST['action'])
);
}
else if ($this->valid)
{
$this->smarty->assign(array('color' => 'green',
'msg' => $this->valid,
'nw_error' => false)
'msg' => $this->valid,
'nw_error' => false)
);
}
}
$this->smarty->assign('this_path', $this->_path);
}
public function hookDisplayLeftColumn($params)
{
$this->_prepareHook($params);
return $this->display(__FILE__, 'blocknewsletter.tpl');
}
@@ -492,6 +497,13 @@ class Blocknewsletter extends Module
{
$this->context->controller->addCSS($this->_path.'blocknewsletter.css', 'all');
}
public function hookDisplayMobileIndex()
{
$this->_prepareHook($params);
return $this->display(__FILE__, 'blockmobilenewsletter.tpl');
}
}
}