Add invisible field
This commit is contained in:
parent
d77173316f
commit
e5f83c46b4
@ -56,7 +56,10 @@ class ContactController extends ContactControllerCore {
|
||||
$fileAttachment['mime'] = $_FILES['fileUpload']['type'];
|
||||
}
|
||||
$message = Tools::htmlentitiesUTF8(Tools::getValue('message'));
|
||||
if (!($from = trim(Tools::getValue('from'))) OR !Validate::isEmail($from)){
|
||||
if (Tools::getValue('email2') != '') {
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail address');
|
||||
}
|
||||
elseif (!($from = trim(Tools::getValue('from'))) OR !Validate::isEmail($from)){
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail address');
|
||||
}
|
||||
elseif ($alert_mode AND Suspect::isBannished($from)){
|
||||
|
@ -73,10 +73,12 @@
|
||||
<label for="email">{l s='E-mail address'}</label>
|
||||
{if isset($customerThread.email)}
|
||||
<input type="text" id="email" name="from" value="{$customerThread.email}" readonly="readonly" />
|
||||
<input type="text" id="email2" name="email2" value="{$customerThread.email}" />
|
||||
{else}
|
||||
<input type="text" id="email" name="from" value="{$email}" />
|
||||
{/if}
|
||||
</p>
|
||||
<input type="text" id="email2" name="email2" value="{$email}" />
|
||||
{/if}
|
||||
</p>
|
||||
{if !$PS_CATALOG_MODE}
|
||||
{*{if (!isset($customerThread.id_order) || $customerThread.id_order > 0)}
|
||||
<p class="text">
|
||||
@ -137,6 +139,7 @@
|
||||
{literal}
|
||||
<script>
|
||||
$(function() {
|
||||
$('input#email2').val('').hide();
|
||||
if($("option:selected", $('#id_contact')).val() == 9 || $("option:selected", $('#id_contact')).val() == 1 || $("option:selected", $('#id_contact')).val() == 2){
|
||||
$('.overlay_bbb').fadeIn();
|
||||
$('.box_waiting').fadeIn();
|
||||
|
Loading…
Reference in New Issue
Block a user