shop-old/themes/easyshop_advanced/media/js/content_contact.js
Thomas Bartelt 0a669704ea Dev-Umgebung: Kompatibilität für PHP 8.3 + Smarty 4.5.6
- Smarty 4.1.1 → 4.5.6 (behebt dynamic property deprecations)
- Core-Klassen: #[\AllowDynamicProperties] für Admin_role, base, Config,
  Customer, Customer_group, CustomerGroups, Item, Structure, website
- website.class.php: counts[parent_id] initialisieren vor ++ (PHP 8.1)
- layout.class.php: HTTP_ACCEPT_LANGUAGE mit isset-Guard
- website_init.php: session_status()-Check vor session_start
- .htaccess: HTTPS-Redirect via X-Forwarded-Proto (statt SERVER_PORT)
- themes/easyshop_advanced/media/: Parent-Theme-Assets nachgezogen
- .gitignore: smarty.4.1.1.bak ausschließen
2026-04-20 01:19:01 +02:00

52 lines
1.6 KiB
JavaScript

$(document).ready(function() {
function codeTipped() {
document.getElementById('sendbutton').disabled = '';
}
function checkMail(obj) {
var checkedMail = '';
var mail = obj.value;
if (mail != '') {
/* info this function does not work perfectly. The quantifire is not accepted. In php works the expression */
checkedMail = obj.value.replace(/^[a-zA-Z0-9-_.]+(@)[a-z-.]+\.[a-z]{2,6}$/, '');
if (checkedMail != '') {
obj.value = '';
}
}
}
function onError(state) {
if (state == true) {
// Write the error-fields in an array called errorArray
var errorGets = '{/literal}{$data.onerror_fields}{literal}';
var errorArray = errorGets.split(',');
var iErrorArray = errorArray.length - 1; // - 1 because the split-function create 1 key/value which is empty
// Marks the fields which has posted wrong
for (i = 0; i < iErrorArray; i++) {
var errorFields = errorArray[i] + 'Text';
document.getElementById(errorFields).style.color = '#cc0000';
document.getElementById(errorFields).style.fontWeight = 'bold';
}
}
}
function changeHumImg() {
document.getElementById('huc_img').src = '{/literal}{$SUB_DIR}{literal}libs/captcha/new_captcha/capimg.php?blah=' + Math.random();
document.getElementById('captcha').value = '';
document.getElementById('captcha').focus();
}
$('#suchmaschinen label').hover(function() {
$(this).css('backgroundColor', '#DDDDDD');
}, function() {
$(this).css('backgroundColor', '#FFFFFF');
});
onError({/literal}{$data.state}{literal});
});