Not valid code in template
vsa_areg_invite:
HTML Code:
<script language="Javascript" type="text/javascript">
function VSaAReg_CheckMail(email_field,error_field,target){
emailRegExp = /^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.([A-Za-z]){2,4})$/;
error_address = '{vb:rawphrase vsaareg_invitation_mailerror}: ';
error_blank = '{vb:rawphrase vsaareg_invitation_missingmail}';
error_number = '{vb:rawphrase vsaareg_invitation_limit}: {vb:raw vboptions.vsaareg_invite_oncelimit}';
wait_message = '{vb:rawphrase vsaareg_wait}';
target_clean = target.replace(" ","");
email = target_clean.split(",");
errmail = "";
if (target_clean=='')
{
document.getElementById(error_field).innerHTML=error_blank;
document.vsaareg_invite.vsaareg_invite_email.focus();
return false;
}
else if (email.length>{vb:raw vboptions.vsaareg_invite_oncelimit})
{
document.getElementById(error_field).innerHTML=error_number;
document.vsaareg_invite.vsaareg_invite_email.focus();
return false;
}
else
{
for (var i in email)
{
if (!emailRegExp.test(email[i]))
{
errmail += "; " + email[i];
}
}
if (errmail)
{
document.vsaareg_invite.vsaareg_invite_email.focus();
document.getElementById(error_field).innerHTML=error_address + "<span class=\"smallfont\">" + errmail.substr(1) + "</span>";
return false;
} else {
document.getElementById(error_field).innerHTML=wait_message;
return true;
}
}
}
function VSaAReg_UpdName(name){
if (name=='')
{
vsaareg_name = "";
}
else
{
vsaareg_name = " (" + name + ")";
}
document.getElementById('vsaareg_nameupd').innerHTML = vsaareg_name;
}
</script>
Fix:
HTML Code:
<script language="Javascript" type="text/javascript">
<!--
function VSaAReg_CheckMail(email_field,error_field,target){
emailRegExp = /^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.([A-Za-z]){2,4})$/;
error_address = '{vb:rawphrase vsaareg_invitation_mailerror}: ';
error_blank = '{vb:rawphrase vsaareg_invitation_missingmail}';
error_number = '{vb:rawphrase vsaareg_invitation_limit}: {vb:raw vboptions.vsaareg_invite_oncelimit}';
wait_message = '{vb:rawphrase vsaareg_wait}';
target_clean = target.replace(" ","");
email = target_clean.split(",");
errmail = "";
if (target_clean=='')
{
document.getElementById(error_field).innerHTML=error_blank;
document.vsaareg_invite.vsaareg_invite_email.focus();
return false;
}
else if (email.length>{vb:raw vboptions.vsaareg_invite_oncelimit})
{
document.getElementById(error_field).innerHTML=error_number;
document.vsaareg_invite.vsaareg_invite_email.focus();
return false;
}
else
{
for (var i in email)
{
if (!emailRegExp.test(email[i]))
{
errmail += "; " + email[i];
}
}
if (errmail)
{
document.vsaareg_invite.vsaareg_invite_email.focus();
document.getElementById(error_field).innerHTML=error_address + "<span class=\"smallfont\">" + errmail.substr(1) + "</span>";
return false;
} else {
document.getElementById(error_field).innerHTML=wait_message;
return true;
}
}
}
function VSaAReg_UpdName(name){
if (name=='')
{
vsaareg_name = "";
}
else
{
vsaareg_name = " (" + name + ")";
}
document.getElementById('vsaareg_nameupd').innerHTML = vsaareg_name;
}
//-->
</script>
And not valid code in template
vsa_areg_manage:
HTML Code:
<script language="Javascript" type="text/javascript">
<!--
function VSaChAregAll(obj) {
arrInput = document.getElementsByTagName("input");
for (i=0; i<arrInput.length; i++) {
if (arrInput[i].type == 'checkbox') {
arrInput[i].checked = obj.checked;
}
}
}
function VSa_SwitchAreg(target)
{
if (target=="users_mod")
{
document.getElementById("vsaareg_tu_mod").style.display = "block";
document.getElementById("vsaareg_tu_act").style.display = "none";
document.getElementById("vsaareg_tu_inv").style.display = "none";
document.getElementById("vsaareg_tq").style.display = "none";
}
if (target=="users_act")
{
document.getElementById("vsaareg_tu_mod").style.display = "none";
document.getElementById("vsaareg_tu_act").style.display = "block";
document.getElementById("vsaareg_tu_inv").style.display = "none";
document.getElementById("vsaareg_tq").style.display = "none";
}
if (target=="users_inv")
{
document.getElementById("vsaareg_tu_mod").style.display = "none";
document.getElementById("vsaareg_tu_act").style.display = "none";
document.getElementById("vsaareg_tu_inv").style.display = "block";
document.getElementById("vsaareg_tq").style.display = "none";
}
if (target=="questions")
{
document.getElementById("vsaareg_tu_mod").style.display = "none";
document.getElementById("vsaareg_tu_act").style.display = "none";
document.getElementById("vsaareg_tu_inv").style.display = "none";
document.getElementById("vsaareg_tq").style.display = "block";
}
}
//-->
</script>
Fix:
HTML Code:
<script language="Javascript" type="text/javascript">
function VSaChAregAll(obj) {
arrInput = document.getElementsByTagName("input");
for (i=0; i<arrInput.length; i++) {
if (arrInput[i].type == 'checkbox') {
arrInput[i].checked = obj.checked;
}
}
}
function VSa_SwitchAreg(target)
{
if (target=="users_mod")
{
document.getElementById("vsaareg_tu_mod").style.display = "block";
document.getElementById("vsaareg_tu_act").style.display = "none";
document.getElementById("vsaareg_tu_inv").style.display = "none";
document.getElementById("vsaareg_tq").style.display = "none";
}
if (target=="users_act")
{
document.getElementById("vsaareg_tu_mod").style.display = "none";
document.getElementById("vsaareg_tu_act").style.display = "block";
document.getElementById("vsaareg_tu_inv").style.display = "none";
document.getElementById("vsaareg_tq").style.display = "none";
}
if (target=="users_inv")
{
document.getElementById("vsaareg_tu_mod").style.display = "none";
document.getElementById("vsaareg_tu_act").style.display = "none";
document.getElementById("vsaareg_tu_inv").style.display = "block";
document.getElementById("vsaareg_tq").style.display = "none";
}
if (target=="questions")
{
document.getElementById("vsaareg_tu_mod").style.display = "none";
document.getElementById("vsaareg_tu_act").style.display = "none";
document.getElementById("vsaareg_tu_inv").style.display = "none";
document.getElementById("vsaareg_tq").style.display = "block";
}
}
</script>
And bug on screenshot:
Attachment 123297