50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
|
function addCart(addtype,hosting) {
|
||
|
if (hosting == '1') {
|
||
|
var domain_option = document.getElementById('domain_option').value;
|
||
|
var domain_name = document.getElementById('domain_name').value;
|
||
|
var domain_tld = document.getElementById('domain_tld').value;
|
||
|
|
||
|
if (domain_option == '0') {
|
||
|
//@todo To Translate
|
||
|
alert("You must choose a 'Domain Transfer / Registration Option' to continue.");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
if ((domain_name == '0' || domain_tld == '0') && (domain_option != 'ip')) {
|
||
|
//@todo To Translate
|
||
|
alert("You must select a valid domain name to continue.");
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
attrValidate(addtype);
|
||
|
}
|
||
|
|
||
|
function doCart(addtype) {
|
||
|
form = document.getElementById('view');
|
||
|
|
||
|
switch(addtype) {
|
||
|
case 'cart':
|
||
|
//document.getElementById('page').value = 'cart:admin_view';
|
||
|
document.getElementById('page').value = 'cart:cart';
|
||
|
break;
|
||
|
|
||
|
case 'login':
|
||
|
if (document.getElementById('wiz_username').value == '')
|
||
|
return;
|
||
|
if (document.getElementById('wiz_password').value == '')
|
||
|
return;
|
||
|
|
||
|
case 'register':
|
||
|
case 'checkout':
|
||
|
document.getElementById('page').value = 'checkout:checkout';
|
||
|
break;
|
||
|
|
||
|
default:
|
||
|
alert('Unknown addtype: '+addtype);
|
||
|
}
|
||
|
|
||
|
form.action = '';
|
||
|
form.submit();
|
||
|
}
|