From 8090b2ae46c3839d126c1b7770625e99483a3ca1 Mon Sep 17 00:00:00 2001 From: WHMCS Development Team Date: Wed, 13 Apr 2016 09:35:30 -0500 Subject: [PATCH] Version 6.3.1-release.1 --- js/whmcs.js | 32 +++++++++++++++----------------- oauth/authorize.tpl | 2 +- oauth/layout.tpl | 2 +- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/js/whmcs.js b/js/whmcs.js index d834056e..eeddad5d 100644 --- a/js/whmcs.js +++ b/js/whmcs.js @@ -296,7 +296,7 @@ jQuery(document).ready(function() { function parseMdeFooter(content, auto_save, saveText) { saveText = saveText || saving; - var pattern = /[a-zA-Z0-9_\u0392-\u03c9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g, + var pattern = /[^\s]+/g, m = [], word_count = 0, line_count = 0; @@ -304,11 +304,13 @@ jQuery(document).ready(function() { m = content.match(pattern); line_count = content.split(/\\r\\n|\\r|\\n/).length; } - for(var i = 0; i < m.length; i++) { - if(m[i].charCodeAt(0) >= 0x4E00) { - word_count += m[i].length; - } else { - word_count += 1; + if (m) { + for (var i = 0; i < m.length; i++) { + if (m[i].charCodeAt(0) >= 0x4E00) { + word_count += m[i].length; + } else { + word_count += 1; + } } } return '
lines: ' + line_count @@ -330,6 +332,13 @@ jQuery(document).ready(function() { setTimeout(doCountdown, 1000); } } + + // Two-Factor Activation Process Modal Handler. + var frmTwoFactorActivation = $('input[name=2fasetup]').parent('form'); + frmTwoFactorActivation.submit(function(e) { + e.preventDefault(); + openModal(frmTwoFactorActivation.attr('action'), frmTwoFactorActivation.serialize(), 'Loading...'); + }); }); /** @@ -447,17 +456,6 @@ function extraTicketAttachment() { jQuery("#fileUploadsContainer").append(''); } -/** - * Two-Factor Authentication dialog submit handler. - */ -function dialogSubmit() { - jQuery('div#twofaactivation form').attr('method', 'post'); - jQuery('div#twofaactivation form').attr('action', 'clientarea.php?action=security'); - jQuery('div#twofaactivation form').attr('onsubmit', ''); - jQuery('div#twofaactivation form').submit(); - return true; -} - /** * Fetch load and uptime for a given server. * diff --git a/oauth/authorize.tpl b/oauth/authorize.tpl index 49e4a7c1..d7b707c1 100644 --- a/oauth/authorize.tpl +++ b/oauth/authorize.tpl @@ -6,7 +6,7 @@
{/if} -

{lang key='oauth.authoriseAppToAccess' appName: $appName}

+

{lang key='oauth.authoriseAppToAccess' appName=$appName}

diff --git a/oauth/layout.tpl b/oauth/layout.tpl index d2a2c4ee..2efc6b10 100644 --- a/oauth/layout.tpl +++ b/oauth/layout.tpl @@ -40,7 +40,7 @@