- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
<hr style="border-bottom: 1px solid #d7d7d7"/> <br>
<a href="#" class="bt3" onclick="var error = 'N';
var useCaptha = 'N';
BX('popup_n_error').innerHTML = '';
var data = 'sessid='+BX.bitrix_sessid()+'&ajax=Y';
if (BX('notify_user_auth').value == 'Y')
{
data = data + '&user_auth=Y&user_login='+BX('notify_user_login').value+'&user_password='+BX('notify_user_password').value;
}
else
{
var reg = /@/i;
if(BX('popup_user_email').value.length == 0 || !reg.test(BX('popup_user_email').value))
{
BX('popup_n_error').innerHTML = '<?=GetMessage("NOTIFY_POPUP_MAIL_ERR");?>';
error = 'Y';
$('#popup_n_error').css('display', 'inline-block');
}
else
{
data = data + '&user_mail='+BX('popup_user_email').value;
if (BX('popup_captcha_sid') && BX('popup_captcha_word'))
{
data = data + '&captcha_sid='+BX('popup_captcha_sid').value;
data = data + '&captcha_word='+BX('popup_captcha_word').value;
useCaptha = 'Y';
}
}
}// end if notify_user_auth
if (error == 'N')
{
BX.showWait();
BX.ajax.post('/bitrix/components/bitrix/sale.notice.product/ajax.php', data, function(res) {
BX.closeWait();
var rs = eval( '('+res+')' );
if (rs['ERRORS'].length > 0)
{
$('#popup_n_error').css('display', 'inline-block');
if (rs['ERRORS'] == 'NOTIFY_ERR_LOGIN')
BX('popup_n_error').innerHTML = '<?=GetMessage('NOTIFY_ERR_LOGIN')?>';
else if (rs['ERRORS'] == 'NOTIFY_ERR_MAIL')
BX('popup_n_error').innerHTML = '<?=GetMessage('NOTIFY_ERR_MAIL')?>';
else if (rs['ERRORS'] == 'NOTIFY_ERR_CAPTHA')
BX('popup_n_error').innerHTML = '<?=GetMessage('NOTIFY_ERR_CAPTHA')?>';
else if (rs['ERRORS'] == 'NOTIFY_ERR_MAIL_EXIST')
BX('popup_n_error').innerHTML = '<?=GetMessage('NOTIFY_ERR_MAIL_EXIST')?>';
else if (rs['ERRORS'] == 'NOTIFY_ERR_REG')
BX('popup_n_error').innerHTML = '<?=GetMessage('NOTIFY_ERR_REG')?>';
else
BX('popup_n_error').innerHTML = rs['ERRORS'];
if (useCaptha == 'Y')
{
BX.ajax.get('/bitrix/components/bitrix/sale.notice.product/ajax.php?reloadcaptha=Y', '', function(res) {
BX('popup_captcha_sid').value = res;
BX('popup_captcha_img').innerHTML = '<img src=\'/bitrix/tools/captcha.php?captcha_sid='+res+'\' width=\'180\' height=\'40\' alt=\'CAPTCHA\' />';
});
}
}
else if (rs['STATUS'] == 'Y')
{
addProductToSubscribe(window.button, BX('popup_notify_url').value, window.subId);
authPopup.close();
}
});
}
"><?=GetMessage("NOTIFY_POPUP_OK")?></a>
<a href="javascript:void(0)" id="subscribeCancelButton" onclick="$('#popupFormSubscribe').css({'display':'none'});" class="bt2"><?=GetMessage("FOOTER_CANCEL")?></a>
<a href="javascript:void(0)" id="subscribeBackButton" onClick="showUserEmail();" style="margin-left: 10px;font-size: 14px;color: #888; display: none;"><?=GetMessage('NOTIFY_BACK_BUTTON');?></a>
<div class="close button"></div>
Вот такое чудо выдали очередные битриксоидные сертифицированные программисты...
71 строка кода в "onclick"!
Комментарии (0) RSS
Добавить комментарий