Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" src="%%GLOBAL_ShopPath%%/javascript/formfield.js?%%GLOBAL_JSCacheToken%%"></script>
- <script type="text/javascript" src="%%GLOBAL_ShopPath%%/javascript/validate.js?%%GLOBAL_JSCacheToken%%"></script>
- <script type="text/javascript"><!--
- /* Make sure all new account details are filled in */
- function check_create_account_form() {
- var formIdx = [%%GLOBAL_CreateAccountAccountFormFieldID%%, %%GLOBAL_CreateAccountShippingFormFieldID%%];
- var emailField, passwordField, confirmField, formfields;
- for (var i=0; i<formIdx.length; i++) {
- formfields = FormField.GetValues(formIdx[i]);
- for (var j=0; j<formfields.length; j++) {
- var rtn = FormField.Validate(formfields[j].field);
- if (!rtn.status) {
- alert(rtn.msg);
- FormField.Focus(formfields[j].field);
- return false;
- }
- if (formIdx[i] == %%GLOBAL_CreateAccountAccountFormFieldID%%) {
- if (formfields[j].privateId == 'EmailAddress') {
- emailField = formfields[j];
- } else if (formfields[j].privateId == 'Password') {
- passwordField = formfields[j];
- } else if (formfields[j].privateId == 'ConfirmPassword') {
- confirmField = formfields[j];
- }
- }
- }
- }
- if (!isValidEmailAddress(emailField.value)) {
- alert("%%LNG_AccountEnterValidEmail%%");
- FormField.Focus(emailField.field);
- return false;
- }
- if(passwordField.value == "") {
- alert("%%LNG_AccountEnterPassword%%");
- FormField.Focus(passwordField.field);
- FormField.Focus(passwordField.field);
- return false;
- }
- if((passwordField.value != "" || confirmField.value != "") && (passwordField.value != confirmField.value)) {
- alert("%%LNG_AccountPasswordsDontMatch%%");
- FormField.Focus(confirmField.field);
- return false;
- }
- return true;
- }
- lang.CustomFieldsValidationRequired ="השדה '%s' הינו שדה חובה";
- lang.CustomFieldsValidationOptionRequired = "Please choose an option for the '%s' field.";
- lang.CustomFieldsValidationNumbersOnly = "The '%s' field must only contain numbers.";
- lang.CustomFieldsValidationNumbersToLow = "The '%s' field cannot be lower than %d.";
- lang.CustomFieldsValidationNumbersToHigh = "The '%s' field cannot be higher than %d.";
- lang.CustomFieldsValidationDateToLow = "The '%s' field cannot be before %s.";
- lang.CustomFieldsValidationDateToHigh = "The '%s' field cannot be after %s.";
- lang.CustomFieldsValidationDateInvalid = "The '%s' field, if in use, must have all the date fields selected.";
- $(document).ready(
- function()
- {
- $(FormField.GetField(11)).live("change", {"fieldId":11,"countryId":11,"stateId":12}, FormFieldEvent.SingleSelectPopulateStates);
- }
- );
- //-->
- </script>
-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement