/* * PrivateShop * * Do not edit or add to this file. * You are not authorized to modify, copy or redistribute this file. * Permissions are reserved by FME Modules. * * @author FME Modules * @copyright 2021 FME Modules All right reserved * @license FME Modules * @category FMM Modules * @package PrivateShop */ $(document).ready(function(){ $(document).on('submit', '#create-account_form', function(e){ e.preventDefault(); submitFunction(); }); $('.is_customer_param').hide(); }); function submitFunction() { $('#create_account_error').html('').hide(); $.ajax({ type: 'POST', url: baseUri + '?rand=' + new Date().getTime(), async: true, cache: false, dataType : "json", headers: { "cache-control": "no-cache" }, data: { controller: 'authentication', SubmitCreate: 1, ajax: true, email_create: $('#email_create').val(), back: $('input[name=back]').val(), token: token }, success: function(jsonData) { if (jsonData.hasError) { var errors = ''; for(error in jsonData.errors) //IE6 bug fix if(error != 'indexOf') errors += '
  • ' + jsonData.errors[error] + '
  • '; $('#create_account_error').html('
      ' + errors + '
    ').show(); } else { // adding a div to display a transition $('#wrapper').addClass('private_wrapper'); $('#center_column').html('
    ' + $('#center_column').html() + '
    '); $('#noSlide').fadeOut('slow', function() { $('#noSlide').html(jsonData.page); $(this).fadeIn('slow', function() { if (typeof bindUniform !=='undefined') bindUniform(); if (typeof bindStateInputAndUpdate !=='undefined') bindStateInputAndUpdate(); document.location = '#account-creation'; }); }); } }, error: function(XMLHttpRequest, textStatus, errorThrown) { error = "TECHNICAL ERROR: unable to load form.\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus; if (!!$.prototype.fancybox) { $.fancybox.open([ { type: 'inline', autoScale: true, minHeight: 30, content: "

    " + error + '

    ' }], { padding: 0 }); } else alert(error); } }); }