text changes to registration mail content
[namibia] / public / js / app / brochure-workspace / register.js
index 4b86662..b7f2d5d 100644 (file)
                                ? true
                                : false;
 
-                       App.DataStore.setData('companytypes', [
-                          {"value":"Limited", "label":"Limited"},
-                          {"value":"PTY Limited", "label":"PTY Limited"},
-                          {"value":"Closed Corporation", "label":"Closed Corporation"},
-                          {"value":"Sole Proprietor", "label":"Sole Proprietor"}
-                          ]);
-                       App.DataStore.setData('dealertypes', [
-                          {"value":"Dealer", "label":"Dealer"},
-                          {"value":"Wholesale / Trader", "label":"Wholesale / Trader"},
-                          {"value":"Trade Center", "label":"Trade Center"}
-                          ]);
-                       App.DataStore.setData('clienttypes', [
-                  {"value":"Buyer", "label":"Buyer"},
-                  {"value":"Buyer & Seller", "label":"Buyer & Seller"}
-                  ]);
-                       App.DataStore.setData('companyturnover', [
-                  {"value":"Turnover > R500,000", "label":"Turnover > R500,000"},
-                  {"value":"Turnover > R2,000,000", "label":"Turnover > R2,000,000"},
-                  {"value":"Turnover > R3,000,000", "label":"Turnover > R3,000,000"}
-                  ]);
+                       //App.DataStore.setData('companytypes', [
+                    //      {"value":"Limited", "label":"Limited"},
+                    //      {"value":"PTY Limited", "label":"PTY Limited"},
+                    //      {"value":"Closed Corporation", "label":"Closed Corporation"},
+                    //      {"value":"Sole Proprietor", "label":"Sole Proprietor"}
+                    //      ]);
+                       //App.DataStore.setData('dealertypes', [
+                    //      {"value":"Dealer", "label":"Dealer"},
+                    //      {"value":"Wholesale / Trader", "label":"Wholesale / Trader"},
+                    //      {"value":"Trade Center", "label":"Trade Center"}
+                    //      ]);
+                       //App.DataStore.setData('clienttypes', [
+             //     {"value":"Buyer", "label":"Buyer"},
+             //     {"value":"Buyer & Seller", "label":"Buyer & Seller"}
+             //     ]);
+                       //App.DataStore.setData('companyturnover', [
+             //     {"value":"Turnover > R500,000", "label":"Turnover > R500,000"},
+             //     {"value":"Turnover > R2,000,000", "label":"Turnover > R2,000,000"},
+             //     {"value":"Turnover > R3,000,000", "label":"Turnover > R3,000,000"}
+             //     ]);
                        App.DataStore.loadSelectListData('permissions', true, 'User', 'Permissions.SelectList');
                        App.DataStore.loadSelectListData('countries', true, 'Location', 'Country.SelectList');
-                       App.DataStore.loadSelectListData('groups', true, 'Company', 'Group.SelectList');
-                       App.DataStore.loadSelectListData('foundmethods', true, 'Company', 'FoundMethod.SelectList');
+                       //App.DataStore.loadSelectListData('groups', true, 'Company', 'Group.SelectList');
+                       //App.DataStore.loadSelectListData('foundmethods', true, 'Company', 'FoundMethod.SelectList');
 
 
 
                                        value : '',
                                        maxlength : 100
                                },
-                               'permissions' : {
-                                       type        : 'select',
-                                       id          : 'permissions',
-                                       title       : 'User type',
-                                       value       : '',
-                                       dataStoreId : 'permissions'
-                               },
+                               //'permissions' : {
+                               //      type        : 'select',
+                               //      id          : 'permissions',
+                               //      title       : 'User type',
+                               //      value       : '12',
+                               //      dataStoreId : 'permissions',
+                               //      readonly    :true
+                               //},
                                'email' : {
                                        type  : 'input',
                                        id    : 'email',
                                        value : '',
                                        maxlength : 5
                                },
-                               'idNumber' : {
-                                       type  : 'input',
-                                       id    : 'idNumber',
-                                       title : 'ID Number',
-                                       value : '',
-                                       maxlength : 13,
-                                       onChange  : function() {
-                                               var dig = $(this).val().substring(0, 6);
-                                               $('#dateOfBirth').val(
-                                                               '19' + dig.substring(0, 2) +
-                                                               '-' + dig.substring(2, 4) +
-                                                               '-' + dig.substring(4, 6)
-                                                               );
-                                       }
-                               },
-                               'dateOfBirth' : {
-                                       type  : 'date',
-                                       id    : 'dateOfBirth',
-                                       title : 'Date of birth',
-                                       style : 'datepicker',
-                                       value : ''
-                               },
+                               //'idNumber' : {
+                               //      type  : 'input',
+                               //      id    : 'idNumber',
+                               //      title : 'ID Number',
+                               //      value : '',
+                               //      maxlength : 20,
+                               //      onChange  : function() {
+                               //              var dig = $(this).val().substring(0, 6);
+                               //              $('#dateOfBirth').val(
+                               //                              '19' + dig.substring(0, 2) +
+                               //                              '-' + dig.substring(2, 4) +
+                               //                              '-' + dig.substring(4, 6)
+                               //                              );
+                               //      }
+                               //},
+                               //'dateOfBirth' : {
+                               //      type  : 'date',
+                               //      id    : 'dateOfBirth',
+                               //      title : 'Date of birth',
+                               //      style : 'datepicker',
+                               //      value : ''
+                               //},
                                'mobile' : {
                                        type  : 'mobile',
                                        id    : 'mobile',
                                },
 
                                // Dealership contact
-                               'contactFirstName' : {
-                                       type  : 'input',
-                                       id    : 'contactFirstName',
-                                       title : 'Name',
-                                       value : '',
-                                       maxlength : 50
-                               },
-                               'contactFamilyName' : {
-                                       type  : 'input',
-                                       id    : 'contactFamilyName',
-                                       title : 'Surname',
-                                       value : '',
-                                       maxlength : 50
-                               },
-                               'contactOffice' : {
-                                       type  : 'input',
-                                       id    : 'contactOffice',
-                                       title : 'Landline',
-                                       value : '',
-                                       maxlength : 20
-                               },
-                               'contactMobile' : {
-                                       type  : 'mobile',
-                                       id    : 'contactMobile',
-                                       title : 'Mobile number',
-                                       value : '',
-                                       maxlength : 20
-                               },
-                               'contactEmail' : {
-                                       type  : 'input',
-                                       id    : 'contactEmail',
-                                       title : 'Email',
-                                       value : '',
-                                       maxlength : 255
-                               },
-
-                               // Dealership details
-                               'dealerType' : {
-                                       type  : 'select',
-                                       id    : 'dealerType',
-                                       title : 'Registration type',
-                                       value : '',
-                                       dataStoreId : 'dealertypes'
-                               },
-                               'clientType' : {
-                                       type  : 'select',
-                                       id    : 'clientType',
-                                       title : 'Register as',
-                                       value : '',
-                                       dataStoreId : 'clienttypes'
-                               },
-                               'group' : {
-                                       type  : 'select',
-                                       id    : 'group',
-                                       title : 'Group Member',
-                                       value : '',
-                                       dataStoreId : 'groups',
-                                       onChange    : function () {
-                                               if (!App.DataStore.getItem('BuildSelect:group', false))
-                                               {
-                                                       var groupId = $('#group').val();
-                                                       App.DataStore.loadSelectListData(
-                                                                       'groupdivisions', false, 'Company', 'GroupDivision.SelectList',
-                                                                       null, {Filter: {group: groupId}}
-                                                                       );
-                                               }
-                                       }
-                               },
-                               'groupDivision' : {
-                                       type  : 'select',
-                                       id    : 'groupDivision',
-                                       title : 'Group Division',
-                                       value : '',
-                                       dataStoreId : 'groupdivisions'
-                               },
-                               'companyType' : {
-                                       type  : 'select',
-                                       id    : 'companyType',
-                                       title : 'Company type',
-                                       value : '',
-                                       dataStoreId : 'companytypes',
-                                       onChange    : function() {
-                                               if (!App.DataStore.getItem('BuildSelect:companyType', false))
-                                               {
-                                                       if ('Sole Proprietor' == $(this).val())
-                                                       {
-                                                               $('#' + _w.register.ti.tid + '_docCopyOfDirectorId').hide();
-                                                               $('#' + _w.register.ti.tid + '_docCompanyRegistration').hide();
-                                                               $('#' + _w.register.ti.tid + '_docStockCertificate').show();
-                                                               $('#' + _w.register.ti.tid + '_docCopyOfId').show();
-                                                               $('#' + _w.register.ti.tid + '_docAddressProof').show();
-                                                       }
-                                                       else
-                                                       {
-                                                               $('#' + _w.register.ti.tid + '_docStockCertificate').hide();
-                                                               $('#' + _w.register.ti.tid + '_docCopyOfId').hide();
-                                                               $('#' + _w.register.ti.tid + '_docAddressProof').show();
-                                                               $('#' + _w.register.ti.tid + '_docCopyOfDirectorId').show();
-                                                               $('#' + _w.register.ti.tid + '_docCompanyRegistration').show();
-                                                       }
-                                               }
-                                       }
-                               },
-                               'businessName' : {
-                                       type  : 'input',
-                                       id    : 'businessName',
-                                       title : 'Registered business name',
-                                       value : '',
-                                       maxlength : 100
-                               },
-                               'name' : {
-                                       type  : 'input',
-                                       id    : 'name',
-                                       title : 'Trading name',
-                                       value : '',
-                                       maxlength : 100
-                               },
-                               'companyRegistrationNumber' : {
-                                       type  : 'input',
-                                       id    : 'companyRegistrationNumber',
-                                       title : 'Company Reg no',
-                                       value : '',
-                                       mask  : '9999/999999/99',
-                                       maxlength : 14
-                               },
-                               'vatNumber' : {
-                                       type  : 'input',
-                                       id    : 'vatNumber',
-                                       title : 'Vat no',
-                                       value : '',
-                                       maxlength : 20
-                               },
-                               'turmiNumber' : {
-                                       type  : 'input',
-                                       id    : 'turmiNumber',
-                                       title : 'TransUnion membership no',
-                                       value : '',
-                                       maxlength : 50
-                               },
-                               'dealerStockNumber' : {
-                                       type  : 'input',
-                                       id    : 'dealerStockNumber',
-                                       title : 'Dealer stock no',
-                                       value : '',
-                                       maxlength : 50
-                               },
-                               'turnover' : {
-                                       type  : 'select',
-                                       id    : 'turnover',
-                                       title : 'Turnover',
-                                       value : '',
-                                       dataStoreId : 'companyturnover'
-                               },
-                               'foundMethod' : {
-                                       type  : 'select',
-                                       id    : 'foundMethod',
-                                       title : 'Where did you find us?',
-                                       value : '',
-                                       dataStoreId : 'foundmethods',
-                                       onChange    : function () {
-                                               if (!App.DataStore.getItem('BuildSelect:foundMethod', false))
-                                               {
-                                                       var foundId = $('#foundMethod').val();
-                                                       App.DataStore.loadSelectListData(
-                                                                       'foundmethoddetails', false, 'Company', 'FoundMethodDetail.SelectList',
-                                                                       null, {Filter: {foundMethod: foundId}}
-                                                                       );
-                                               }
-                                       }
-                               },
-                               'foundMethodDetail' : {
-                                       type  : 'select',
-                                       id    : 'foundMethodDetail',
-                                       title : 'Details',
-                                       value : '',
-                                       dataStoreId : 'foundmethoddetails'
-                               },
-
-
-                               // Adresses and billing contact
+                               //'contactFirstName' : {
+                               //      type  : 'input',
+                               //      id    : 'contactFirstName',
+                               //      title : 'Name',
+                               //      value : '',
+                               //      maxlength : 50
+                               //},
+                               //'contactFamilyName' : {
+                               //      type  : 'input',
+                               //      id    : 'contactFamilyName',
+                               //      title : 'Surname',
+                               //      value : '',
+                               //      maxlength : 50
+                               //},
+                               //'contactOffice' : {
+                               //      type  : 'input',
+                               //      id    : 'contactOffice',
+                               //      title : 'Landline',
+                               //      value : '',
+                               //      maxlength : 20
+                               //},
+                               //'contactMobile' : {
+                               //      type  : 'mobile',
+                               //      id    : 'contactMobile',
+                               //      title : 'Mobile number',
+                               //      value : '',
+                               //      maxlength : 20
+                               //},
+                               //'contactEmail' : {
+                               //      type  : 'input',
+                               //      id    : 'contactEmail',
+                               //      title : 'Email',
+                               //      value : '',
+                               //      maxlength : 255
+                               //},
+                //
+                               //// Dealership details
+                               //'dealerType' : {
+                               //      type  : 'select',
+                               //      id    : 'dealerType',
+                               //      title : 'Registration type',
+                               //      value : '',
+                               //      dataStoreId : 'dealertypes'
+                               //},
+                               //'clientType' : {
+                               //      type  : 'select',
+                               //      id    : 'clientType',
+                               //      title : 'Register as',
+                               //      value : '',
+                               //      dataStoreId : 'clienttypes'
+                               //},
+                               //'group' : {
+                               //      type  : 'select',
+                               //      id    : 'group',
+                               //      title : 'Group Member',
+                               //      value : '',
+                               //      dataStoreId : 'groups',
+                               //      onChange    : function () {
+                               //              if (!App.DataStore.getItem('BuildSelect:group', false))
+                               //              {
+                               //                      var groupId = $('#group').val();
+                               //                      App.DataStore.loadSelectListData(
+                               //                                      'groupdivisions', false, 'Company', 'GroupDivision.SelectList',
+                               //                                      null, {Filter: {group: groupId}}
+                               //                                      );
+                               //              }
+                               //      }
+                               //},
+                               //'groupDivision' : {
+                               //      type  : 'select',
+                               //      id    : 'groupDivision',
+                               //      title : 'Group Division',
+                               //      value : '',
+                               //      dataStoreId : 'groupdivisions'
+                               //},
+                               //'companyType' : {
+                               //      type  : 'select',
+                               //      id    : 'companyType',
+                               //      title : 'Company type',
+                               //      value : '',
+                               //      dataStoreId : 'companytypes',
+                               //      onChange    : function() {
+                               //              if (!App.DataStore.getItem('BuildSelect:companyType', false))
+                               //              {
+                               //                      if ('Sole Proprietor' == $(this).val())
+                               //                      {
+                               //                              $('#' + _w.register.ti.tid + '_docCopyOfDirectorId').hide();
+                               //                              $('#' + _w.register.ti.tid + '_docCompanyRegistration').hide();
+                               //                              $('#' + _w.register.ti.tid + '_docStockCertificate').show();
+                               //                              $('#' + _w.register.ti.tid + '_docCopyOfId').show();
+                               //                              $('#' + _w.register.ti.tid + '_docAddressProof').show();
+                               //                      }
+                               //                      else
+                               //                      {
+                               //                              $('#' + _w.register.ti.tid + '_docStockCertificate').hide();
+                               //                              $('#' + _w.register.ti.tid + '_docCopyOfId').hide();
+                               //                              $('#' + _w.register.ti.tid + '_docAddressProof').show();
+                               //                              $('#' + _w.register.ti.tid + '_docCopyOfDirectorId').show();
+                               //                              $('#' + _w.register.ti.tid + '_docCompanyRegistration').show();
+                               //                      }
+                               //              }
+                               //      }
+                               //},
+                               //'businessName' : {
+                               //      type  : 'input',
+                               //      id    : 'businessName',
+                               //      title : 'Registered business name',
+                               //      value : '',
+                               //      maxlength : 100
+                               //},
+                               //'name' : {
+                               //      type  : 'input',
+                               //      id    : 'name',
+                               //      title : 'Trading name',
+                               //      value : '',
+                               //      maxlength : 100
+                               //},
+                               //'companyRegistrationNumber' : {
+                               //      type  : 'input',
+                               //      id    : 'companyRegistrationNumber',
+                               //      title : 'Company Reg no',
+                               //      value : '',
+                               //      mask  : '9999/999999/99',
+                               //      maxlength : 14
+                               //},
+                               //'vatNumber' : {
+                               //      type  : 'input',
+                               //      id    : 'vatNumber',
+                               //      title : 'Vat no',
+                               //      value : '',
+                               //      maxlength : 20
+                               //},
+                               //'turmiNumber' : {
+                               //      type  : 'input',
+                               //      id    : 'turmiNumber',
+                               //      title : 'TransUnion membership no',
+                               //      value : '',
+                               //      maxlength : 50
+                               //},
+                               //'dealerStockNumber' : {
+                               //      type  : 'input',
+                               //      id    : 'dealerStockNumber',
+                               //      title : 'Dealer stock no',
+                               //      value : '',
+                               //      maxlength : 50
+                               //},
+                               //'turnover' : {
+                               //      type  : 'select',
+                               //      id    : 'turnover',
+                               //      title : 'Turnover',
+                               //      value : '',
+                               //      dataStoreId : 'companyturnover'
+                               //},
+                               //'foundMethod' : {
+                               //      type  : 'select',
+                               //      id    : 'foundMethod',
+                               //      title : 'Where did you find us?',
+                               //      value : '',
+                               //      dataStoreId : 'foundmethods',
+                               //      onChange    : function () {
+                               //              if (!App.DataStore.getItem('BuildSelect:foundMethod', false))
+                               //              {
+                               //                      var foundId = $('#foundMethod').val();
+                               //                      App.DataStore.loadSelectListData(
+                               //                                      'foundmethoddetails', false, 'Company', 'FoundMethodDetail.SelectList',
+                               //                                      null, {Filter: {foundMethod: foundId}}
+                               //                                      );
+                               //              }
+                               //      }
+                               //},
+                               //'foundMethodDetail' : {
+                               //      type  : 'select',
+                               //      id    : 'foundMethodDetail',
+                               //      title : 'Details',
+                               //      value : '',
+                               //      dataStoreId : 'foundmethoddetails'
+                               //},
+                //
+                //
+                               //// Adresses and billing contact
                                'country' : {
                                        type        : 'select',
                                        id          : 'country',
                                        value : '',
                                        maxlength : 10
                                },
-                               'sameAsBusinessAddress' : {
-                                       type  : 'checkbox',
-                                       id    : 'sameAsBusinessAddress',
-                                       title : 'Same as business address',
-                                       value : '',
-                                       onChange : function() {
-                                               if ($(this).prop('checked'))
-                                               {
-                                                       App.DataStore.setItem('BuildSelect:migrateCountry', true);
-                                                       $('#billingCountry').selectpicker('val', $('#country').val());
-                                                       App.DataStore.removeItem('BuildSelect:migrateCountry');
-                                                       App.DataStore.setItem('BuildSelect:migrateRegion', true);
-                                                       App.DataStore.loadSelectListData(
-                                                                       'billregions', false, 'Location', 'Region.SelectList', null,
-                                                                       {"Filter": {
-                                                                               "country" : $('#country').val()
-                                                                       }}, {}, function() {
-                                                                               $('#billingRegion').selectpicker('val', $('#region').val());
-                                                                               App.DataStore.removeItem('BuildSelect:migrateRegion');
-                                                                       }
-                                                       );
-                                                       App.DataStore.setItem('BuildSelect:migrateTown', true);
-                                                       App.DataStore.loadSelectListData(
-                                                                       'billcities', false, 'Location', 'Town.SelectList', null,
-                                                                       {"Filter": {
-                                                                               "region" : $('#region').val()
-                                                                       }}, {}, function() {
-                                                                               $('#billingCity').selectpicker('val', $('#city').val());
-                                                                       }
-                                                       );
-                                                       $('#billingStreet').val($('#street').val());
-                                                       $('#billingPostalCode').val($('#postalCode').val());
-                                               }
-                                               else
-                                               {
-                                                       $('#billingCountry').selectpicker('val', '');
-                                                       App.DataStore.setData('billregions', []);
-                                                       App.DataStore.setData('billcities', []);
-                                                       $('#billingStreet').val('');
-                                                       $('#billingPostalCode').val('');
-                                               }
-                                       }
-                               },
-                               'billingCountry' : {
-                                       type        : 'select',
-                                       id          : 'billingCountry',
-                                       title       : 'Country',
-                                       dataStoreId : 'countries',
-                                       value       : '',
-                                       onChange    : function () {
-                                               if (!App.DataStore.getItem('BuildSelect:billingCountry', false)
-                                                               && !App.DataStore.getItem('BuildSelect:migrateCountry', false))
-                                               {
-                                                       App.DataStore.loadSelectListData(
-                                                                       'billregions', false, 'Location', 'Region.SelectList', null,
-                                                                       {"Filter": {
-                                                                               "country" : $(this).val()
-                                                                               }}
-                                                                       );
-                                                       App.DataStore.setData('billcities', []);
-                                               }
-                                       }
-                               },
-                               'billingRegion' : {
-                                       type        : 'select',
-                                       id          : 'billingRegion',
-                                       title       : 'Region',
-                                       dataStoreId : 'billregions',
-                                       value       : '',
-                                       onChange    : function () {
-                                               if (!App.DataStore.getItem('BuildSelect:billingRegion', false)
-                                                               && !App.DataStore.getItem('BuildSelect:migrateRegion', false))
-                                               {
-                                                       App.DataStore.loadSelectListData(
-                                                                       'billcities', false, 'Location', 'Town.SelectList', null,
-                                                                       {"Filter": {
-                                                                               "region" : $(this).val()
-                                                                               }}
-                                                                       );
-                                               }
-                                       }
-                               },
-                               'billingCity' : {
-                                       type        : 'select',
-                                       id          : 'billingCity',
-                                       title       : 'Town',
-                                       dataStoreId : 'billcities',
-                                       value       : ''
-                               },
-                               'billingStreet' : {
-                                       type  : 'input',
-                                       id    : 'billingStreet',
-                                       title : 'Street',
-                                       value : '',
-                                       maxlength : 75
-                               },
-                               'billingPostalCode' : {
-                                       type  : 'input',
-                                       id    : 'billingPostalCode',
-                                       title : 'Code',
-                                       value : '',
-                                       maxlength : 10
-                               },
-
-                               'sameAsDealerContact' : {
-                                       type  : 'checkbox',
-                                       id    : 'sameAsDealerContact',
-                                       title : 'Same as dealership contact',
-                                       value : '',
-                                       onChange : function() {
-                                               if ($(this).prop('checked'))
-                                               {
-                                                       $('#billingFirstName').val($('#contactFirstName').val());
-                                                       $('#billingFamilyName').val($('#contactFamilyName').val());
-                                                       $('#billingOffice').val($('#contactOffice').val());
-                                                       $('#billingMobile').val($('#contactMobile').val());
-                                                       $('#billingEmail').val($('#contactEmail').val());
-                                               }
-                                               else
-                                               {
-                                                       $('#billingFirstName').val('');
-                                                       $('#billingFamilyName').val('');
-                                                       $('#billingOffice').val('');
-                                                       $('#billingMobile').val('');
-                                                       $('#billingEmail').val('');
-                                               }
-                                       }
-                               },
-                               'billingFirstName' : {
-                                       type  : 'input',
-                                       id    : 'billingFirstName',
-                                       title : 'Name',
-                                       value : '',
-                                       maxlength : 50
-                               },
-                               'billingFamilyName' : {
-                                       type  : 'input',
-                                       id    : 'billingFamilyName',
-                                       title : 'Surname',
-                                       value : '',
-                                       maxlength : 50
-                               },
-                               'billingOffice' : {
-                                       type  : 'input',
-                                       id    : 'billingOffice',
-                                       title : 'Landline',
-                                       value : '',
-                                       maxlength : 20
-                               },
-                               'billingMobile' : {
-                                       type  : 'mobile',
-                                       id    : 'billingMobile',
-                                       title : 'Mobile number',
-                                       value : '',
-                                       maxlength : 20
-                               },
-                               'billingEmail' : {
-                                       type  : 'input',
-                                       id    : 'billingEmail',
-                                       title : 'Email',
-                                       value : '',
-                                       maxlength : 255
-                               },
-
-                               // Owners
-                               'ownerFirstName' : {
-                                       type  : 'input',
-                                       id    : 'ownerFirstName',
-                                       title : 'Name',
-                                       value : '',
-                                       maxlength : 100
-                               },
-                               'ownerFamilyName' : {
-                                       type  : 'input',
-                                       id    : 'ownerFamilyName',
-                                       title : 'Surname',
-                                       value : '',
-                                       maxlength : 100
-                               },
-                               'ownerIdNumber' : {
-                                       type  : 'input',
-                                       id    : 'ownerIdNumber',
-                                       title : 'ID Number',
-                                       value : '',
-                                       maxlength : 13
-                               },
-                               'owners' : {
-                                       type  : 'collector',
-                                       id    : 'owners',
-                                       value : []
-                               },
-
-                               // Documents
-                               'docStockCertificate' : {
-                                       type  : 'document',
-                                       id    : 'docStockCertificate',
-                                       title : 'Dealer stock certificate',
-                                       value : null
-                               },
-                               'docAddressProof' : {
-                                       type  : 'document',
-                                       id    : 'docAddressProof',
-                                       title : 'Proof of business address',
-                                       value : null
-                               },
-                               'docCopyOfId' : {
-                                       type  : 'document',
-                                       id    : 'docCopyOfId',
-                                       title : 'Copy of ID document',
-                                       value : null
-                               },
-                               'docCopyOfDirectorId' : {
-                                       type  : 'document',
-                                       id    : 'docCopyOfDirectorId',
-                                       title : 'Copy of directors ID document',
-                                       value : null
-                               },
-                               'docCompanyRegistration' : {
-                                       type  : 'document',
-                                       id    : 'docCompanyRegistration',
-                                       title : 'Company registration document',
-                                       value : null
-                               },
+                               //'sameAsBusinessAddress' : {
+                               //      type  : 'checkbox',
+                               //      id    : 'sameAsBusinessAddress',
+                               //      title : 'Same as business address',
+                               //      value : '',
+                               //      onChange : function() {
+                               //              if ($(this).prop('checked'))
+                               //              {
+                               //                      App.DataStore.setItem('BuildSelect:migrateCountry', true);
+                               //                      $('#billingCountry').selectpicker('val', $('#country').val());
+                               //                      App.DataStore.removeItem('BuildSelect:migrateCountry');
+                               //                      App.DataStore.setItem('BuildSelect:migrateRegion', true);
+                               //                      App.DataStore.loadSelectListData(
+                               //                                      'billregions', false, 'Location', 'Region.SelectList', null,
+                               //                                      {"Filter": {
+                               //                                              "country" : $('#country').val()
+                               //                                      }}, {}, function() {
+                               //                                              $('#billingRegion').selectpicker('val', $('#region').val());
+                               //                                              App.DataStore.removeItem('BuildSelect:migrateRegion');
+                               //                                      }
+                               //                      );
+                               //                      App.DataStore.setItem('BuildSelect:migrateTown', true);
+                               //                      App.DataStore.loadSelectListData(
+                               //                                      'billcities', false, 'Location', 'Town.SelectList', null,
+                               //                                      {"Filter": {
+                               //                                              "region" : $('#region').val()
+                               //                                      }}, {}, function() {
+                               //                                              $('#billingCity').selectpicker('val', $('#city').val());
+                               //                                      }
+                               //                      );
+                               //                      $('#billingStreet').val($('#street').val());
+                               //                      $('#billingPostalCode').val($('#postalCode').val());
+                               //              }
+                               //              else
+                               //              {
+                               //                      $('#billingCountry').selectpicker('val', '');
+                               //                      App.DataStore.setData('billregions', []);
+                               //                      App.DataStore.setData('billcities', []);
+                               //                      $('#billingStreet').val('');
+                               //                      $('#billingPostalCode').val('');
+                               //              }
+                               //      }
+                               //},
+                               //'billingCountry' : {
+                               //      type        : 'select',
+                               //      id          : 'billingCountry',
+                               //      title       : 'Country',
+                               //      dataStoreId : 'countries',
+                               //      value       : '',
+                               //      onChange    : function () {
+                               //              if (!App.DataStore.getItem('BuildSelect:billingCountry', false)
+                               //                              && !App.DataStore.getItem('BuildSelect:migrateCountry', false))
+                               //              {
+                               //                      App.DataStore.loadSelectListData(
+                               //                                      'billregions', false, 'Location', 'Region.SelectList', null,
+                               //                                      {"Filter": {
+                               //                                              "country" : $(this).val()
+                               //                                              }}
+                               //                                      );
+                               //                      App.DataStore.setData('billcities', []);
+                               //              }
+                               //      }
+                               //},
+                               //'billingRegion' : {
+                               //      type        : 'select',
+                               //      id          : 'billingRegion',
+                               //      title       : 'Region',
+                               //      dataStoreId : 'billregions',
+                               //      value       : '',
+                               //      onChange    : function () {
+                               //              if (!App.DataStore.getItem('BuildSelect:billingRegion', false)
+                               //                              && !App.DataStore.getItem('BuildSelect:migrateRegion', false))
+                               //              {
+                               //                      App.DataStore.loadSelectListData(
+                               //                                      'billcities', false, 'Location', 'Town.SelectList', null,
+                               //                                      {"Filter": {
+                               //                                              "region" : $(this).val()
+                               //                                              }}
+                               //                                      );
+                               //              }
+                               //      }
+                               //},
+                               //'billingCity' : {
+                               //      type        : 'select',
+                               //      id          : 'billingCity',
+                               //      title       : 'Town',
+                               //      dataStoreId : 'billcities',
+                               //      value       : ''
+                               //},
+                               //'billingStreet' : {
+                               //      type  : 'input',
+                               //      id    : 'billingStreet',
+                               //      title : 'Street',
+                               //      value : '',
+                               //      maxlength : 75
+                               //},
+                               //'billingPostalCode' : {
+                               //      type  : 'input',
+                               //      id    : 'billingPostalCode',
+                               //      title : 'Code',
+                               //      value : '',
+                               //      maxlength : 10
+                               //},
+                //
+                               //'sameAsDealerContact' : {
+                               //      type  : 'checkbox',
+                               //      id    : 'sameAsDealerContact',
+                               //      title : 'Same as dealership contact',
+                               //      value : '',
+                               //      onChange : function() {
+                               //              if ($(this).prop('checked'))
+                               //              {
+                               //                      $('#billingFirstName').val($('#contactFirstName').val());
+                               //                      $('#billingFamilyName').val($('#contactFamilyName').val());
+                               //                      $('#billingOffice').val($('#contactOffice').val());
+                               //                      $('#billingMobile').val($('#contactMobile').val());
+                               //                      $('#billingEmail').val($('#contactEmail').val());
+                               //              }
+                               //              else
+                               //              {
+                               //                      $('#billingFirstName').val('');
+                               //                      $('#billingFamilyName').val('');
+                               //                      $('#billingOffice').val('');
+                               //                      $('#billingMobile').val('');
+                               //                      $('#billingEmail').val('');
+                               //              }
+                               //      }
+                               //},
+                               //'billingFirstName' : {
+                               //      type  : 'input',
+                               //      id    : 'billingFirstName',
+                               //      title : 'Name',
+                               //      value : '',
+                               //      maxlength : 50
+                               //},
+                               //'billingFamilyName' : {
+                               //      type  : 'input',
+                               //      id    : 'billingFamilyName',
+                               //      title : 'Surname',
+                               //      value : '',
+                               //      maxlength : 50
+                               //},
+                               //'billingOffice' : {
+                               //      type  : 'input',
+                               //      id    : 'billingOffice',
+                               //      title : 'Landline',
+                               //      value : '',
+                               //      maxlength : 20
+                               //},
+                               //'billingMobile' : {
+                               //      type  : 'mobile',
+                               //      id    : 'billingMobile',
+                               //      title : 'Mobile number',
+                               //      value : '',
+                               //      maxlength : 20
+                               //},
+                               //'billingEmail' : {
+                               //      type  : 'input',
+                               //      id    : 'billingEmail',
+                               //      title : 'Email',
+                               //      value : '',
+                               //      maxlength : 255
+                               //},
+                //
+                               //// Owners
+                               //'ownerFirstName' : {
+                               //      type  : 'input',
+                               //      id    : 'ownerFirstName',
+                               //      title : 'Name',
+                               //      value : '',
+                               //      maxlength : 100
+                               //},
+                               //'ownerFamilyName' : {
+                               //      type  : 'input',
+                               //      id    : 'ownerFamilyName',
+                               //      title : 'Surname',
+                               //      value : '',
+                               //      maxlength : 100
+                               //},
+                               //'ownerIdNumber' : {
+                               //      type  : 'input',
+                               //      id    : 'ownerIdNumber',
+                               //      title : 'ID Number',
+                               //      value : '',
+                               //      maxlength : 13
+                               //},
+                               //'owners' : {
+                               //      type  : 'collector',
+                               //      id    : 'owners',
+                               //      value : []
+                               //},
+                //
+                               //// Documents
+                               //'docStockCertificate' : {
+                               //      type  : 'document',
+                               //      id    : 'docStockCertificate',
+                               //      title : 'Dealer stock certificate',
+                               //      value : null
+                               //},
+                               //'docAddressProof' : {
+                               //      type  : 'document',
+                               //      id    : 'docAddressProof',
+                               //      title : 'Proof of business address',
+                               //      value : null
+                               //},
+                               //'docCopyOfId' : {
+                               //      type  : 'document',
+                               //      id    : 'docCopyOfId',
+                               //      title : 'Copy of ID document',
+                               //      value : null
+                               //},
+                               //'docCopyOfDirectorId' : {
+                               //      type  : 'document',
+                               //      id    : 'docCopyOfDirectorId',
+                               //      title : 'Copy of directors ID document',
+                               //      value : null
+                               //},
+                               //'docCompanyRegistration' : {
+                               //      type  : 'document',
+                               //      id    : 'docCompanyRegistration',
+                               //      title : 'Company registration document',
+                               //      value : null
+                               //},
 
                                'subscribeNewsletter' : {
                                        type  : 'checkbox',
                                        id    : 'subscribeNewsletter',
-                                       title : 'Sign me up for the monthly newsletter abd Bid4Cars updates.',
+                                       title : 'Sign me up for the monthly newsletter and Bid4Cars updates.',
                                        value : false
                                },
                                'acceptTermsAndConditions' : {
                                rules: {
                                        firstName: {required: true},
                                        familyName: {required: true},
-                                       permissions: {required: true},
+                                       permissions: {required: false},
                                        email: {required: true, email: true, remote: {
                                        url: "/workspace/check-unique-email",
                                        type: "post"
                                        confirmEmail: {required: true, email: true, equalTo: "#email"},
                                        pin: {required: true, digits: true},
                                        confirmPin: {required: true, digits: true, equalTo: "#pin"},
-                                       idNumber: {required: true, minlength: 13, maxlength: 13, digits: true},
-                                       dateOfBirth: {required: true, dateISO: true},
+                                       //idNumber: {required: true, minlength: 13, maxlength: 13, digits: true},
+                                       //idNumber: {required: true, minlength: 3, maxlength: 20, digits: true},
+                                       //dateOfBirth: {required: true, dateISO: true},
                                        mobile: {required: true, mobile: true},
 
-                                       contactFirstName: {required: true},
-                                       contactFamilyName: {required: true},
-                                       contactOffice: {required: true, digits: true},
-                                       contactMobile: {required: true, mobile: true},
-                                       contactEmail: {required: true, email: true},
+                                       //contactFirstName: {required: true},
+                                       //contactFamilyName: {required: true},
+                                       //contactOffice: {required: true, digits: true},
+                                       //contactMobile: {required: true, mobile: true},
+                                       //contactEmail: {required: true, email: true},
 
-                                       dealerType: {required: true},
-                                       clientType: {required: true},
-                                       companyType: {required: true},
-                                       businessName: {required: true},
-                                       name: {required: true, remote: {
-                                       url: "/workspace/check-unique-company",
-                                       type: "post"
-                                     }},
-                                       companyRegistrationNumber: {companyReg: true},
-                                       vatNumber: {digits: true},
+                                       //dealerType: {required: true},
+                                       //clientType: {required: true},
+                                       //companyType: {required: true},
+                                       //businessName: {required: true},
+                                       //name: {required: true, remote: {
+                                    //   url: "/workspace/check-unique-company",
+                                    //   type: "post"
+                                    // }},
+                                       //companyRegistrationNumber: {companyReg: true},
+                                       //vatNumber: {digits: true},
 
                                        country: {required: true},
                                        region: {required: true},
                                        city: {required: true},
                                        street: {required: true},
                                        postalCode: {required: true, digits: true},
-                                       billingCountry: {required: true},
-                                       billingRegion: {required: true},
-                                       billingCity: {required: true},
-                                       billingStreet: {required: true},
-                                       billingPostalCode: {required: true, digits: true},
-                                       billingFirstName: {required: true},
-                                       billingFamilyName: {required: true},
-                                       billingOffice: {required: true, digits: true},
-                                       billingMobile: {required: true, mobile: true},
-                                       billingEmail: {required: true, email: true},
-
-                                       ownerIdNumber: {minlength: 13, maxlength: 13, digits: true}
+                                       //billingCountry: {required: true},
+                                       //billingRegion: {required: true},
+                                       //billingCity: {required: true},
+                                       //billingStreet: {required: true},
+                                       //billingPostalCode: {required: true, digits: true},
+                                       //billingFirstName: {required: true},
+                                       //billingFamilyName: {required: true},
+                                       //billingOffice: {required: true, digits: true},
+                                       //billingMobile: {required: true, mobile: true},
+                                       //billingEmail: {required: true, email: true},
+                    //
+                                       //ownerIdNumber: {minlength: 13, maxlength: 13, digits: true}
                                },
                                messages: {
                                        email: { email: "Must be a valid email address.", remote: "Email address already in use."},
                                        clientType : "This field is required."
                                },
                                submitHandler: function( form ) {
-                                       if (0 == _w.register.ownerCount) {
-                                               $('#ownerFirstName').addClass('error');
-                                               $('#ownerFamilyName').addClass('error');
-                                               $('#ownerIdNumber').addClass('error');
-                                           alert('At least 1 owner / director required.');
-                                           return false;
-                                   } else {
+                    //if (0 == _w.register.ownerCount) {
+                                               //$('#ownerFirstName').addClass('error');
+                                               //$('#ownerFamilyName').addClass('error');
+                                               //$('#ownerIdNumber').addClass('error');
+                                        //   alert('At least 1 owner / director required.');
+                                        //   return false;
+                                   //} else {
                                                $('#ownerFirstName').removeClass('error');
                                                $('#ownerFamilyName').removeClass('error');
                                                $('#ownerIdNumber').removeClass('error');
-                                   }
+                                   //}
                                        $('#btnUpdate').prop('disabled', true);
                                        var data = _w.register._prepRegisterUpdateData();
                                        App.API.execTask(
                  "pin","confirmPin","idNumber","dateOfBirth","mobile", "subscribeNewsletter"
                  ];
                        var companyFields = [
-                 "dealerType","clientType","group","groupDivision","companyType",
-                 "businessName","name","companyRegistrationNumber","vatNumber","turmiNumber",
-                 "dealerStockNumber","turnover","foundMethod","foundMethodDetail",
+                 //"dealerType","clientType","group","groupDivision","companyType",
+                 //"businessName","name","companyRegistrationNumber","vatNumber","turmiNumber",
+                 //"dealerStockNumber","turnover","foundMethod","foundMethodDetail",
                  "country","region","city","street","postalCode",
-                 "billingCountry","billingRegion","billingCity","billingStreet","billingPostalCode",
-                 "docStockCertificate","docAddressProof","docCopyOfId",
-                 "docCopyOfDirectorId","docCompanyRegistration"
+                 //"billingCountry","billingRegion","billingCity","billingStreet","billingPostalCode",
+                 //"docStockCertificate","docAddressProof","docCopyOfId",
+                 //"docCopyOfDirectorId","docCompanyRegistration"
                  ];
                        var contactFields = {
                  "contactFirstName"  : "firstName",
                                {
                                        postData.Company[field] = '' != data[field] ? data[field] : null;
                                }
-                               else if (-1 != profileFields.indexOf(field))
+                               else
+                               if (-1 != profileFields.indexOf(field))
                                {
                                        postData.Profile[field] = '' != data[field] ? data[field] : null;
                                }
-                               else if (contactFields[field])
-                               {
-                                       postData.Contact[contactFields[field]] = '' != data[field] ? data[field] : null;
-                               }
-                               else if (billingContactFields[field])
-                               {
-                                       postData.BillingContact[billingContactFields[field]] = '' != data[field] ? data[field] : null;
-                               }
+                               //else if (contactFields[field])
+                               //{
+                               //      postData.Contact[contactFields[field]] = '' != data[field] ? data[field] : null;
+                               //}
+                               //else if (billingContactFields[field])
+                               //{
+                               //      postData.BillingContact[billingContactFields[field]] = '' != data[field] ? data[field] : null;
+                               //}
                        }
                        postData.Profile.password = postData.Profile.pin;
                        postData.Company.owners = _w.register.owners;