|
@@ -84,14 +84,14 @@ |
84 |
84 |
|
value : '', |
85 |
85 |
|
maxlength : 100 |
86 |
86 |
|
}, |
87 |
|
- |
'permissions' : { |
88 |
|
- |
type : 'select', |
89 |
|
- |
id : 'permissions', |
90 |
|
- |
title : 'User type', |
91 |
|
- |
value : '12', |
92 |
|
- |
dataStoreId : 'permissions', |
93 |
|
- |
disabled :true |
94 |
|
- |
}, |
|
87 |
+ |
//'permissions' : { |
|
88 |
+ |
// type : 'select', |
|
89 |
+ |
// id : 'permissions', |
|
90 |
+ |
// title : 'User type', |
|
91 |
+ |
// value : '12', |
|
92 |
+ |
// dataStoreId : 'permissions', |
|
93 |
+ |
// readonly :true |
|
94 |
+ |
//}, |
95 |
95 |
|
'email' : { |
96 |
96 |
|
type : 'input', |
97 |
97 |
|
id : 'email', |
|
@@ -755,17 +755,17 @@ |
755 |
755 |
|
clientType : "This field is required." |
756 |
756 |
|
}, |
757 |
757 |
|
submitHandler: function( form ) { |
758 |
|
- |
if (0 == _w.register.ownerCount) { |
759 |
|
- |
$('#ownerFirstName').addClass('error'); |
760 |
|
- |
$('#ownerFamilyName').addClass('error'); |
761 |
|
- |
$('#ownerIdNumber').addClass('error'); |
762 |
|
- |
alert('At least 1 owner / director required.'); |
763 |
|
- |
return false; |
764 |
|
- |
} else { |
|
758 |
+ |
//if (0 == _w.register.ownerCount) { |
|
759 |
+ |
//$('#ownerFirstName').addClass('error'); |
|
760 |
+ |
//$('#ownerFamilyName').addClass('error'); |
|
761 |
+ |
//$('#ownerIdNumber').addClass('error'); |
|
762 |
+ |
// alert('At least 1 owner / director required.'); |
|
763 |
+ |
// return false; |
|
764 |
+ |
//} else { |
765 |
765 |
|
$('#ownerFirstName').removeClass('error'); |
766 |
766 |
|
$('#ownerFamilyName').removeClass('error'); |
767 |
767 |
|
$('#ownerIdNumber').removeClass('error'); |
768 |
|
- |
} |
|
768 |
+ |
//} |
769 |
769 |
|
$('#btnUpdate').prop('disabled', true); |
770 |
770 |
|
var data = _w.register._prepRegisterUpdateData(); |
771 |
771 |
|
App.API.execTask( |
|
@@ -792,15 +792,15 @@ |
792 |
792 |
|
"firstName","familyName","permissions","email","confirmEmail", |
793 |
793 |
|
"pin","confirmPin","idNumber","dateOfBirth","mobile", "subscribeNewsletter" |
794 |
794 |
|
]; |
795 |
|
- |
var companyFields = [ |
796 |
|
- |
"dealerType","clientType","group","groupDivision","companyType", |
797 |
|
- |
"businessName","name","companyRegistrationNumber","vatNumber","turmiNumber", |
798 |
|
- |
"dealerStockNumber","turnover","foundMethod","foundMethodDetail", |
799 |
|
- |
"country","region","city","street","postalCode", |
800 |
|
- |
"billingCountry","billingRegion","billingCity","billingStreet","billingPostalCode", |
801 |
|
- |
"docStockCertificate","docAddressProof","docCopyOfId", |
802 |
|
- |
"docCopyOfDirectorId","docCompanyRegistration" |
803 |
|
- |
]; |
|
795 |
+ |
//var companyFields = [ |
|
796 |
+ |
// "dealerType","clientType","group","groupDivision","companyType", |
|
797 |
+ |
// "businessName","name","companyRegistrationNumber","vatNumber","turmiNumber", |
|
798 |
+ |
// "dealerStockNumber","turnover","foundMethod","foundMethodDetail", |
|
799 |
+ |
// "country","region","city","street","postalCode", |
|
800 |
+ |
// "billingCountry","billingRegion","billingCity","billingStreet","billingPostalCode", |
|
801 |
+ |
// "docStockCertificate","docAddressProof","docCopyOfId", |
|
802 |
+ |
// "docCopyOfDirectorId","docCompanyRegistration" |
|
803 |
+ |
// ]; |
804 |
804 |
|
var contactFields = { |
805 |
805 |
|
"contactFirstName" : "firstName", |
806 |
806 |
|
"contactFamilyName" : "familyName", |
|
@@ -817,22 +817,23 @@ |
817 |
817 |
|
}; |
818 |
818 |
|
for (var field in data) |
819 |
819 |
|
{ |
820 |
|
- |
if (-1 != companyFields.indexOf(field)) |
821 |
|
- |
{ |
822 |
|
- |
postData.Company[field] = '' != data[field] ? data[field] : null; |
823 |
|
- |
} |
824 |
|
- |
else if (-1 != profileFields.indexOf(field)) |
|
820 |
+ |
//if (-1 != companyFields.indexOf(field)) |
|
821 |
+ |
//{ |
|
822 |
+ |
// postData.Company[field] = '' != data[field] ? data[field] : null; |
|
823 |
+ |
//} |
|
824 |
+ |
//else |
|
825 |
+ |
if (-1 != profileFields.indexOf(field)) |
825 |
826 |
|
{ |
826 |
827 |
|
postData.Profile[field] = '' != data[field] ? data[field] : null; |
827 |
828 |
|
} |
828 |
|
- |
else if (contactFields[field]) |
829 |
|
- |
{ |
830 |
|
- |
postData.Contact[contactFields[field]] = '' != data[field] ? data[field] : null; |
831 |
|
- |
} |
832 |
|
- |
else if (billingContactFields[field]) |
833 |
|
- |
{ |
834 |
|
- |
postData.BillingContact[billingContactFields[field]] = '' != data[field] ? data[field] : null; |
835 |
|
- |
} |
|
829 |
+ |
//else if (contactFields[field]) |
|
830 |
+ |
//{ |
|
831 |
+ |
// postData.Contact[contactFields[field]] = '' != data[field] ? data[field] : null; |
|
832 |
+ |
//} |
|
833 |
+ |
//else if (billingContactFields[field]) |
|
834 |
+ |
//{ |
|
835 |
+ |
// postData.BillingContact[billingContactFields[field]] = '' != data[field] ? data[field] : null; |
|
836 |
+ |
//} |
836 |
837 |
|
} |
837 |
838 |
|
postData.Profile.password = postData.Profile.pin; |
838 |
839 |
|
postData.Company.owners = _w.register.owners; |