var $allError=$errBox.find('.js-rule-error-all');if(!$allError||$allError.length==0){$errBox.append('<p class="js-rule-error-all"></p>');$allError=$errBox.find('.js-rule-error-all')}
if(error&&error.responseText>''){$allError.html(error.responseText+'. Please, try again later.')}else{if(error&&error.statusText){$allError.html('Error ['+error.statusText+']. Please, try again later.')}else{$allError.html('Unknown error. Please, try again later.')}}
$allError.show();$errBox.show();$jform.addClass('js-send-form-error');$jform.trigger('tildaform:aftererror')},timeout:1000*15});return!1}else{if($jform.data('is-formajax')=='y'){$.ajax({type:"POST",url:$jform.attr('action'),data:$jform.serialize(),dataType:"text",success:function(html){var json;var successurl=$jform.data('success-url');var successcallback=$jform.data('success-callback');btnformsubmit.removeClass('t-btn_sending');btnformsubmit.data('form-sending-status','0');btnformsubmit.data('submitform','');if(html&&html.length>0){if(html.substring(0,1)=='{'){if(window.JSON&&window.JSON.parse){json=window.JSON.parse(html)}else{json=$.parseJSON(html)}
if(json&&json.message){if(json.message!='OK'){$jform.find('.js-successbox').html(json.message)}}else{if(json&&json.error){var $errBox=$jform.find('.js-errorbox-all');if(!$errBox||$errBox.length==0){$jform.prepend('<div class="js-errorbox-all"></div>');$errBox=$jform.find('.js-errorbox-all')}