diff --git a/README.txt b/README.txt index 79d6870..05eacd4 100755 --- a/README.txt +++ b/README.txt @@ -76,4 +76,10 @@ For further information, product details, help and tutorials, please visit our w = 1.1.7 = * Fixed php errors detected by Query Monitor plugin * Fixed Viewing function of created forms not working - * Fixed Alignment issue in responsive layout \ No newline at end of file + * Fixed Alignment issue in responsive layout + += 1.1.8 = + * Fixed form fields not disappear after submission + * Fixed conflict between Wr Contact Form and NextGen Gallery + * Fixed blank Add New form on Xampp + * Fixed some bugs on our themes \ No newline at end of file diff --git a/assets/3rd-party/bs2/jsn/css/jsn-jqueryui.css b/assets/3rd-party/bs2/jsn/css/jsn-jqueryui.css index 1925112..bb7651c 100644 --- a/assets/3rd-party/bs2/jsn/css/jsn-jqueryui.css +++ b/assets/3rd-party/bs2/jsn/css/jsn-jqueryui.css @@ -12,303 +12,303 @@ /*=================== JQUERYUI OVERRIDES ===========================*/ /*========== TAB ========*/ .jsn-master .ui-tabs.ui-widget-content { - background: none; + background: none; } .jsn-master .ui-tabs .ui-tabs-panel { - padding: 15px; - background-color: #fff; - border: 1px solid #DDD; - border-top: none; + padding: 15px; + background-color: #fff; + border: 1px solid #DDD; + border-top: none; } .jsn-master .ui-tabs .ui-tabs-panel .control-group:last-child { - margin-bottom: 0; + margin-bottom: 0; } .jsn-master .ui-tabs { - padding: 0; + padding: 0; } .jsn-master .ui-tabs .ui-tabs-nav { - padding: 0; - margin: 0; + padding: 0; + margin: 0; } .jsn-master .ui-tabs .ui-tabs-nav li { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } .jsn-master .ui-tabs .ui-tabs-nav li a { - margin-right: 0; + margin-right: 0; } .jsn-master .ui-tabs .ui-tabs-nav li a, .jsn-master .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { - margin-bottom: 0; + margin-bottom: 0; } .jsn-master .ui-tabs .ui-tabs-nav li:hover, .jsn-master .ui-tabs .ui-tabs-nav li a:hover { - background-color: #eee; - border-bottom: none; + background-color: #eee; + border-bottom: none; } .jsn-master .ui-tabs .ui-tabs-nav [class^="icon-"], .jsn-master .ui-tabs .ui-tabs-nav [class*=" icon-"] { - margin-right: 5px; + margin-right: 5px; } .jsn-master .ui-tabs .ui-tabs-nav li.ui-state-active a { - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: #ffffff; - cursor: text; - outline: none; - font-weight: bold; - color: #333; - font-size: 1.1em; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: #ffffff; + cursor: text; + outline: none; + font-weight: bold; + color: #333; + font-size: 1.1em; } .jsn-master .ui-tabs .ui-tabs-nav li.ui-state-active a i { - font-weight: normal; + font-weight: normal; } .jsn-master .ui-tabs .ui-tabs-nav li.ui-state-active a:hover { - background-color: #fff; + background-color: #fff; } .jsn-master .ui-tabs.ui-tabs-vertical > .ui-tabs-nav { - width: 180px; - float: left; - padding: 10px 0; - border: none; + width: 180px; + float: left; + padding: 10px 0; + border: none; } .jsn-master .ui-tabs.ui-tabs-vertical > .ui-tabs-nav > li { - float: none; - margin-left: 10px; - position: relative; + float: none; + margin-left: 10px; + position: relative; } .jsn-master .ui-tabs.ui-tabs-vertical > .ui-tabs-nav > li > a { - display: block; - float: none; - border: none; - padding: 2px 20px; + display: block; + float: none; + border: none; + padding: 2px 20px; } .jsn-master .ui-tabs.ui-tabs-vertical > .ui-tabs-nav > li.ui-state-active { - top: 0; - left: 1px; + top: 0; + left: 1px; } .jsn-master .ui-tabs.ui-tabs-vertical > .ui-tabs-nav > li.ui-state-active a { - border: 1px solid #ddd; - border-bottom-color: #ddd; - border-right-color: #fff; + border: 1px solid #ddd; + border-bottom-color: #ddd; + border-right-color: #fff; } .jsn-master .ui-tabs.ui-tabs-vertical > .ui-tabs-nav > li.ui-state-active > a:hover { } .jsn-master .ui-tabs.ui-tabs-vertical > .ui-tabs-panel { - margin-left: 180px; - border: none; - border-left: 1px solid #ddd; + margin-left: 180px; + border: none; + border-left: 1px solid #ddd; } /*========== ACCORDION ========*/ .jsn-master .ui-accordion .ui-accordion-header { - background: none; - border-color: #E5E5E5; - font-weight: normal; - font-size: 13px; - margin: 0; - margin-top: 10px; - line-height: 1.5em; + background: none; + border-color: #E5E5E5; + font-weight: normal; + font-size: 13px; + margin: 0; + margin-top: 10px; + line-height: 1.5em; } .jsn-master .ui-accordion .ui-accordion-header:first-child { - margin-top: 0; + margin-top: 0; } .jsn-master .ui-accordion .ui-accordion-header .ui-icon { - display: none; + display: none; } .jsn-master .ui-accordion .ui-accordion-header a { - padding: 8px 15px; + padding: 8px 15px; } .jsn-master .ui-accordion .ui-accordion-header a:hover { - background-color: #EEE; + background-color: #EEE; } .jsn-master .ui-accordion .ui-accordion-header .jsn-accordion-radio { - margin: -3px 3px 0 0; + margin: -3px 3px 0 0; } .jsn-master .ui-accordion .ui-accordion-header.ui-state-active { - color: #000; - font-weight: bold; - border-bottom-width: 2px; - background-color: #EEE; + color: #000; + font-weight: bold; + border-bottom-width: 2px; + background-color: #EEE; } .jsn-master .ui-accordion .ui-accordion-content { - border-color: #E5E5E5; - padding: 15px; - margin-bottom: 10px; + border-color: #E5E5E5; + padding: 15px; + margin-bottom: 10px; } /*========== SLIDER ========*/ .jsn-master .ui-slider-horizontal { - width: 220px; - margin-top: 10px; + width: 220px; + margin-top: 10px; } /*========== MODAL WINDOW ==========*/ .jsn-master .ui-dialog .ui-dialog-titlebar { - padding: 5px 10px; + padding: 5px 10px; } .jsn-master .ui-dialog .ui-dialog-titlebar-close { - display: none; + display: none; } .jsn-master .ui-dialog .ui-dialog-content { - padding: 2px 0; + padding: 2px 0; } .jsn-master .jsn-modal.ui-dialog-content { - overflow: hidden; + overflow: hidden; } .jsn-master .ui-dialog .ui-dialog-content iframe { - overflow: auto; + overflow: auto; } .jsn-master .ui-dialog-content-inner { - padding: 15px; + padding: 15px; } .jsn-master.contentpane { - padding: 15px; - margin: 0; + padding: 15px; + margin: 0; } div.ui-dialog .ui-dialog-buttonpane { - margin: 0; + margin: 0; } /* SEARCH BOX ON TITLE BAR */ div.ui-dialog .ui-dialog-titlebar .ui-window-searchbar-wrapper { - position: absolute; - top: 8px; - right: 8px; + position: absolute; + top: 8px; + right: 8px; } div.ui-dialog .ui-dialog-titlebar .ui-window-searchbar { - color : #CCCCCC; + color : #CCCCCC; } div.ui-dialog .ui-dialog-titlebar .ui-window-closetext-keyword { - background: url("../images/icons-8/ui-window-closetextkeyword.png") center center no-repeat; - position: absolute; - top: 2px; - right: 2px; - width: 24px; - height: 24px; - display: none; + background: url("../images/icons-8/ui-window-closetextkeyword.png") center center no-repeat; + position: absolute; + top: 2px; + right: 2px; + width: 24px; + height: 24px; + display: none; } /* === */ .jsn-master .ui-widget-overlay { - opacity: 0.8; - filter: alpha(opacity=80); - background: #333; + opacity: 0.8; + filter: alpha(opacity=80); + background: #333; } .jsn-master .ui-widget-content form, .jsn-master .ui-widget-content table { - margin: 0; + margin: 0; } .jsn-master .ui-widget-content .jsn-page-list { - margin: 0; + margin: 0; } .jsn-master .img-box-loading { - width: 48px; - height: 48px; - position: relative; - background: #000; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; + width: 48px; + height: 48px; + position: relative; + background: #000; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; } .jsn-master .img-box-loading .imgLoading { - position: relative; - top: 12px; - left: 12px; + position: relative; + top: 12px; + left: 12px; } .jsn-master .ui-sortable .ui-state-default { - border: 1px solid transparent; - position: relative; - background: none; - -webkit-box-shadow: none; - box-shadow: none; + border: 1px solid transparent; + position: relative; + background: none; + -webkit-box-shadow: none; + box-shadow: none; } .jsn-master .ui-sortable .ui-state-default:hover, .jsn-master .ui-sortable .ui-state-default.ui-state-edit { -/* border: 1px solid #FBEED5; - background-color: #FCF8E3;*/ - border: 1px solid #ddd; - background-color: #f4f4f4; - cursor: move; + /* border: 1px solid #FBEED5; + background-color: #FCF8E3;*/ + border: 1px solid #ddd; + background-color: #f4f4f4; + cursor: move; transition: background 0.3s ease-out; -moz-transition: background 0.3s ease-out; -webkit-transition: background 0.3s ease-out; } .jsn-master .ui-sortable .ui-state-default:hover .jsn-iconbar { - background-color: #f4f4f4; + background-color: #f4f4f4; } .jsn-master .ui-sortable .ui-state-default.ui-state-edit { - cursor: default; + cursor: default; } .jsn-master .ui-sortable .ui-state-default.ui-sortable-helper { - box-shadow: 0 3px 5px 0 #999; - -webkit-box-shadow: 0 3px 5px 0 #999; + box-shadow: 0 3px 5px 0 #999; + -webkit-box-shadow: 0 3px 5px 0 #999; } .jsn-master .ui-sortable .ui-state-highlight { - border: 1px dashed #ccc; - background: none; - background-color: #FCF8E3; - padding: 10px; - margin: 0; + border: 1px dashed #ccc; + background: none; + background-color: #FCF8E3; + padding: 10px; + margin: 0; } .jsn-master .ui-sortable .ui-state-disabled { - opacity: 0.5; + opacity: 0.5; } .jsn-master .ui-sortable .ui-state-disabled:hover { - background-color: transparent; - border-color: transparent; + background-color: transparent; + border-color: transparent; } .jsn-master .jsn-style-dark .ui-sortable .ui-state-default { - color: #ccc; + color: #ccc; } .jsn-master .jsn-style-dark .ui-sortable .ui-state-default:hover, .jsn-master .jsn-style-dark .ui-sortable .ui-state-default.ui-state-edit { - border: 1px solid #666; - background-color: #444; + border: 1px solid #666; + background-color: #444; } .jsn-master .ui-resizable-e { - background: #fff url("../images/backgrounds/bg-handle-resize-h.png") center center no-repeat; + background: #fff url("../images/backgrounds/bg-handle-resize-h.png") center center no-repeat; } .jsn-master .ui-resizable-s { - background: #fff url("../images/backgrounds/bg-handle-resize-v.png") center center no-repeat; + background: #fff url("../images/backgrounds/bg-handle-resize-v.png") center center no-repeat; } /*========== MODAL WINDOW ========*/ .ui-dialog.jsn-loading { - background-image: url(../images/preloading.gif); - background-repeat: no-repeat; - background-position: center; + background-image: url(../images/preloading.gif); + background-repeat: no-repeat; + background-position: center; } .ui-dialog.jsn-loading .ui-dialog-content, .ui-dialog.jsn-loading .ui-dialog-buttonpane { - visibility: hidden; + visibility: hidden; } .jsn-modal-overlay { - display: none; - position: fixed; - left: 0; - top: 0; - bottom: 0; - right: 0; - background: #000; - opacity: 0.2; - -moz-opacity: 0.2; - filter:alpha(opacity=20); + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #000; + opacity: 0.2; + -moz-opacity: 0.2; + filter:alpha(opacity=20); } .jsn-modal-indicator { - display: none; - content: ' '; - background: #000 url(../images/icons-24/icon-24-dark-loading-circle.gif) no-repeat center center; - width: 40px; - height: 40px; - position: fixed; - left: 50%; - top: 50%; - margin-left: -20px; - margin-top: -20px; - border-radius: 3px; - opacity: 0.7; - -moz-opacity: 0.7; - filter:alpha(opacity=70); + display: none; + content: ' '; + background: #000 url(../images/icons-24/icon-24-dark-loading-circle.gif) no-repeat center center; + width: 40px; + height: 40px; + position: fixed; + left: 50%; + top: 50%; + margin-left: -20px; + margin-top: -20px; + border-radius: 3px; + opacity: 0.7; + -moz-opacity: 0.7; + filter:alpha(opacity=70); } diff --git a/assets/js/emailsettings.js b/assets/js/emailsettings.js index be1238f..0fea68f 100644 --- a/assets/js/emailsettings.js +++ b/assets/js/emailsettings.js @@ -68,13 +68,13 @@ } if ($("#template_notify_to").val() == 0) { - $("#jform_template_from").attr("placeholder", this.lang['WR_CONTACTFORM_PLACEHOLDER_EMAIL_FROM_0']); - $("#jform_template_reply_to").attr("placeholder", this.lang['WR_CONTACTFORM_PLACEHOLDER_EMAIL_REPLY_TO_0']); - $("#jform_template_subject").attr("placeholder", this.lang['WR_CONTACTFORM_PLACEHOLDER_EMAIL_SUBJECT_0']); + $("#jform_template_from").attr("placeholder", this.lang['e.g. Customer Department']); + $("#jform_template_reply_to").attr("placeholder", this.lang['e.g. support@yourdomain.com']); + $("#jform_template_subject").attr("placeholder", this.lang['e.g. Thank you for contacting us']); } else { - $("#jform_template_from").attr("placeholder", this.lang['WR_CONTACTFORM_PLACEHOLDER_EMAIL_FROM_1']); - $("#jform_template_reply_to").attr("placeholder", this.lang['WR_CONTACTFORM_PLACEHOLDER_EMAIL_REPLY_TO_1']); - $("#jform_template_subject").attr("placeholder", this.lang['WR_CONTACTFORM_PLACEHOLDER_EMAIL_SUBJECT_1']); + $("#jform_template_from").attr("placeholder", this.lang['Click the button on the right to select the form field identifying submitter name']); + $("#jform_template_reply_to").attr("placeholder", this.lang['Click the button on the right to select the form field identifying submitter email']); + $("#jform_template_subject").attr("placeholder", this.lang['e.g. Contact inquiry']); } parent.jQuery(" ul.jsn-page-list li.page-items").each(function () { listOptionPage.push([$(this).find("input").attr('data-id'), $(this).find("input").attr('value')]); diff --git a/assets/js/layout.js b/assets/js/layout.js index 4e43ecd..84285a0 100644 --- a/assets/js/layout.js +++ b/assets/js/layout.js @@ -260,7 +260,7 @@ $(".jsn-iconbar a.wr-move-up").parent().remove(); $(".jsn-row-container").each(function (e) { $(this).append( - $("
", {"class":"jsn-iconbar jsn-vertical", "title":self.lang['WR_CONTACTFORM_ADD_CONTAINER_COLUMN']}).append( + $("
", {"class":"jsn-iconbar jsn-vertical", "title":self.lang['Add Column']}).append( $("", {"href":"javascript:void(0);", "class":"add-container"}).append( $("", {"class":"icon-plus"}) ).click(function () { @@ -310,11 +310,11 @@ self.eventContainer(); }) ).append( - $("", {"href":"javascript:void(0);", "title":self.lang['WR_CONTACTFORM_DELETE_CONTAINER']}).append( + $("", {"href":"javascript:void(0);", "title":self.lang['Delete Container']}).append( $("", {"class":"icon-trash"}) ).click(function () { if ($(this).parents(".jsn-row-container").find(".jsn-column-container .jsn-element").length > 0) { - if (confirm(self.lang['WR_CONTACTFORM_CONFIRM_DELETE_CONTAINER'])) { + if (confirm(self.lang['Are you sure you want to delete the whole row including all elements it contains?'])) { $(this).parents(".jsn-row-container").remove(); self.eventContainer(); } @@ -325,7 +325,7 @@ }) ) ).append( - $("
", {"class":"jsn-iconbar jsn-vertical iconbar-left", "title":self.lang['WR_CONTACTFORM_ADD_CONTAINER_COLUMN']}).append( + $("
", {"class":"jsn-iconbar jsn-vertical iconbar-left", "title":self.lang['Add Column']}).append( $("", {"href":"javascript:void(0);", "title":self.lang['WR_CONTACTFORM_MOVE_UP_CONTAINER'], "class":"wr-move-up"}).append( $("", {"class":"icon-chevron-up"}) ).click(function () { @@ -391,7 +391,7 @@ self.eventContainer(); } if ($(this).parents(".jsn-column-container").find(".jsn-element").length > 0) { - if (confirm(self.lang['WR_CONTACTFORM_CONFIRM_DELETE_CONTAINER_COLUMN'])) { + if (confirm(self.lang['Are you sure you want to delete the whole column including all elements it contains?'])) { actionDelete(selfContainer, $(this)); } } else { diff --git a/frontend/css/form.css b/frontend/css/form.css index 8d93b47..065aa43 100644 --- a/frontend/css/form.css +++ b/frontend/css/form.css @@ -6,6 +6,24 @@ * @version $Id: * @license GNU/GPL v2 http://www.gnu.org/licenses/gpl-2.0.html */ + .ui-datepicker-trigger { + height: 26px !important; + } + .wr-daterangepicker { + width:221px !important; + height: 30px !important; + padding: 4px 6px !important; + } + + .jsn-bootstrap .jsn-row-container .jsn-form-content input{height:30px !important} + .jsn-bootstrap label.radio { + line-height: 36px !important; + } + input[type="text"], input[type="password"], input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"],.jsn-input-xxlarge-fluid,.jsn-input-xlarge-fluid,select, .uneditable-input{ + min-height: 30px !important; + padding-top: 0px !important; + padding-bottom: 0px !important; + } .jsn-bootstrap * { word-wrap: break-word; } diff --git a/frontend/languages/wr-contactform-en_US.mo b/frontend/languages/wr-contactform-en_US.mo index fffe6e2..2e3de20 100644 Binary files a/frontend/languages/wr-contactform-en_US.mo and b/frontend/languages/wr-contactform-en_US.mo differ diff --git a/frontend/languages/wr-contactform-en_US.po b/frontend/languages/wr-contactform-en_US.po index 0b138b2..4d98aa1 100644 --- a/frontend/languages/wr-contactform-en_US.po +++ b/frontend/languages/wr-contactform-en_US.po @@ -50,28 +50,28 @@ msgstr "The value %s is not valid" msgid "WR ContactForm - View Form" msgstr "WR ContactForm - View Form" -msgid "WR_CONTACTFORM_SELECT_FORM" +msgid "Select Form" msgstr "Select Form" -msgid "WR_CONTACTFORM_ERROR_WARNFILETYPE" +msgid "This file type %s is not supported." msgstr "This file type '%s' is not supported." -msgid "WR_CONTACTFORM_ERROR_WARNFILETOOLARGE" +msgid "This file is too large to upload." msgstr "This file is too large to upload." -msgid "WR_CONTACTFORM_ERROR_UNABLE_TO_UPLOAD_FILE" +msgid "Unable to upload file." msgstr "Unable to upload file." -msgid "WR_CONTACTFORM_ERROR_UPLOAD_INPUT" +msgid "Please input a file for upload" msgstr "Please input a file for upload" -msgid "WR_CONTACTFORM_ERROR_FIELD_INTEGER" +msgid "The value %s is not integer" msgstr "The value %s is not integer" -msgid "WR_CONTACTFORM_EMAIL_THANKS" +msgid "Thank you for your email." msgstr "Thank you for your email." -msgid "WR_CONTACTFORM_ERROR_CAPTCHA" +msgid "Incorrect captcha text!" msgstr "Incorrect captcha text!" msgid "WR ContactForm" @@ -83,67 +83,67 @@ msgstr "WR ContactForm - Select Form" msgid "WR_CONTACTFORM_BUTTON_SUBMIT" msgstr "Submit" -msgid "WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY" +msgid "This field can not be empty, please enter required information." msgstr "This field can not be empty, please enter required information." -msgid "WR_CONTACTFORM_CONFIRM_FIELD_INVALID" +msgid "The information is invalid, please correct." msgstr "The information is invalid, please correct." -msgid "WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH" +msgid "The information cannot contain more than" msgstr "The information cannot contain more than" -msgid "WR_CONTACTFORM_CONFIRM_FIELD_MIN_LENGTH" +msgid "The information cannot contain less than" msgstr "The information cannot contain less than" -msgid "WR_CONTACTFORM_POST_MAX_SIZE" +msgid "The file you want to upload is too big. Please keep file size under %s MB" msgstr "The file you want to upload is too big. Please keep file size under %s MB" -msgid "WR_CONTACTFORM_POST_UPLOAD_SIZE" +msgid "The file you want to upload is too big. Please keep file size under %s" msgstr "The file you want to upload is too big. Please keep file size under %s" -msgid "WR_CONTACTFORM_CONFIRM_FIELD_MAX_NUMBER" +msgid "The number cannot be greater than" msgstr "The number cannot be greater than" -msgid "WR_CONTACTFORM_CONFIRM_FIELD_MIN_NUMBER" +msgid "The number cannot be less than" msgstr "The number cannot be less than" -msgid "WR_CONTACTFORM_CONFIRM_FIELD_EMAIL_CONFIRM" +msgid "Both email addresses must be the same." msgstr "Both email addresses must be the same." -msgid "WR_CONTACTFORM_CONFIRM_FIELD_CONFIRM" +msgid "Both %s addresses must be the same." msgstr "Both %s addresses must be the same." -msgid "WR_CONTACTFORM_CONFIRM_FIELD_PASSWORD_CONFIRM" +msgid "Both password must be the same." msgstr "Both password must be the same." -msgid "WR_CONTACTFORM_CONFIRM_FIELD_PASSWORD_MIN_MAX_CHARACTER" +msgid "The password must contain minimum %mi% and maximum %mx% character(s)" msgstr "The password must contain minimum %mi% and maximum %mx% character(s)" msgid "WR_CONTACTFORM_FIELD_PASSWORD" msgstr "The value %s is not valid" -msgid "STREET_ADDRESS" +msgid "Street Address" msgstr "Street Address" -msgid "ADDRESS_LINE_2" +msgid "Address Line 2" msgstr "Address Line 2" -msgid "CITY" +msgid "City" msgstr "City" -msgid "POSTAL_ZIP_CODE" +msgid "Postal/Zip code" msgstr "Postal/Zip code" -msgid "STATE_PROVINCE_REGION" +msgid "State/Province/Region" msgstr "State/Province/Region " -msgid "FIRST" +msgid "First" msgstr "First" -msgid "MIDDLE" +msgid "Middle" msgstr "Middle" -msgid "LAST" +msgid "Last" msgstr "Last" msgid "OTHERS" @@ -269,149 +269,149 @@ msgstr "Minute" msgid "WR_CONTACTFORM_DATE_CLOSE_TEXT" msgstr "Close" -msgid "WR_CONTACTFORM_DATE_PREV_TEXT" +msgid "Prev" msgstr "Prev" -msgid "WR_CONTACTFORM_DATE_NEXT_TEXT" +msgid "Next" msgstr "Next" -msgid "WR_CONTACTFORM_DATE_CURRENT_TEXT" +msgid "Today" msgstr "Today" -msgid "WR_CONTACTFORM_DATE_MONTH_JANUARY" +msgid "January" msgstr "January" -msgid "WR_CONTACTFORM_DATE_MONTH_FEBRUARY" +msgid "February" msgstr "February" -msgid "WR_CONTACTFORM_DATE_MONTH_MARCH" +msgid "March" msgstr "March" -msgid "WR_CONTACTFORM_DATE_MONTH_APRIL" +msgid "April" msgstr "April" -msgid "WR_CONTACTFORM_DATE_MONTH_MAY" +msgid "May" msgstr "May" -msgid "WR_CONTACTFORM_DATE_MONTH_JUNE" +msgid "June" msgstr "June" -msgid "WR_CONTACTFORM_DATE_MONTH_JULY" +msgid "July" msgstr "July" -msgid "WR_CONTACTFORM_DATE_MONTH_AUGUST" +msgid "August" msgstr "August" -msgid "WR_CONTACTFORM_DATE_MONTH_SEPTEMBER" +msgid "September" msgstr "September" -msgid "WR_CONTACTFORM_DATE_MONTH_OCTOBER" +msgid "October" msgstr "October" -msgid "WR_CONTACTFORM_DATE_MONTH_NOVEMBER" +msgid "November" msgstr "November" -msgid "WR_CONTACTFORM_DATE_MONTH_DECEMBER" +msgid "December" msgstr "December" -msgid "WR_CONTACTFORM_DATE_MONTH_JANUARY_SHORT" +msgid "Jan" msgstr "Jan" -msgid "WR_CONTACTFORM_DATE_MONTH_FEBRUARY_SHORT" +msgid "Feb" msgstr "Feb" -msgid "WR_CONTACTFORM_DATE_MONTH_MARCH_SHORT" +msgid "Mar" msgstr "Mar" -msgid "WR_CONTACTFORM_DATE_MONTH_APRIL_SHORT" +msgid "Apr" msgstr "Apr" -msgid "WR_CONTACTFORM_DATE_MONTH_MAY_SHORT" +msgid "May" msgstr "May" -msgid "WR_CONTACTFORM_DATE_MONTH_JUNE_SHORT" +msgid "Jun" msgstr "Jun" -msgid "WR_CONTACTFORM_DATE_MONTH_JULY_SHORT" +msgid "Jul" msgstr "Jul" -msgid "WR_CONTACTFORM_DATE_MONTH_AUGUST_SHORT" +msgid "Aug" msgstr "Aug" -msgid "WR_CONTACTFORM_DATE_MONTH_SEPTEMBER_SHORT" +msgid "Sep" msgstr "Sep" -msgid "WR_CONTACTFORM_DATE_MONTH_OCTOBER_SHORT" +msgid "Oct" msgstr "Oct" -msgid "WR_CONTACTFORM_DATE_MONTH_NOVEMBER_SHORT" +msgid "Nov" msgstr "Nov" -msgid "WR_CONTACTFORM_DATE_MONTH_DECEMBER_SHORT" +msgid "Dec" msgstr "Dec" -msgid "WR_CONTACTFORM_DATE_DAY_SUNDAY" +msgid "Sunday" msgstr "Sunday" -msgid "WR_CONTACTFORM_DATE_DAY_MONDAY" +msgid "Monday" msgstr "Monday" -msgid "WR_CONTACTFORM_DATE_DAY_TUESDAY" +msgid "Tuesday" msgstr "Tuesday" -msgid "WR_CONTACTFORM_DATE_DAY_WEDNESDAY" +msgid "Wednesday" msgstr "Wednesday" -msgid "WR_CONTACTFORM_DATE_DAY_THURSDAY" +msgid "Thursday" msgstr "Thursday" -msgid "WR_CONTACTFORM_DATE_DAY_FRIDAY" +msgid "Friday" msgstr "Friday" -msgid "WR_CONTACTFORM_DATE_DAY_SATURDAY" +msgid "Saturday" msgstr "Saturday" -msgid "WR_CONTACTFORM_DATE_DAY_SUNDAY_SHORT" +msgid "Sun" msgstr "Sun" -msgid "WR_CONTACTFORM_DATE_DAY_MONDAY_SHORT" +msgid "Mon" msgstr "Mon" -msgid "WR_CONTACTFORM_DATE_DAY_TUESDAY_SHORT" +msgid "Tue" msgstr "Tue" -msgid "WR_CONTACTFORM_DATE_DAY_WEDNESDAY_SHORT" +msgid "Wed" msgstr "Wed" -msgid "WR_CONTACTFORM_DATE_DAY_THURSDAY_SHORT" +msgid "Thu" msgstr "Thu" -msgid "WR_CONTACTFORM_DATE_DAY_FRIDAY_SHORT" +msgid "Fri" msgstr "Fri" -msgid "WR_CONTACTFORM_DATE_DAY_SATURDAY_SHORT" +msgid "Sat" msgstr "Sat" -msgid "WR_CONTACTFORM_DATE_DAY_SUNDAY_MIN" +msgid "Su" msgstr "Su" -msgid "WR_CONTACTFORM_DATE_DAY_MONDAY_MIN" +msgid "Mo" msgstr "Mo" -msgid "WR_CONTACTFORM_DATE_DAY_TUESDAY_MIN" +msgid "Tu" msgstr "Tu" -msgid "WR_CONTACTFORM_DATE_DAY_WEDNESDAY_MIN" +msgid "We" msgstr "We" -msgid "WR_CONTACTFORM_DATE_DAY_THURSDAY_MIN" +msgid "Th" msgstr "Th" -msgid "WR_CONTACTFORM_DATE_DAY_FRIDAY_MIN" +msgid "Fr" msgstr "Fr" -msgid "WR_CONTACTFORM_DATE_DAY_SATURDAY_MIN" +msgid "Sa" msgstr "Sa" -msgid "WR_CONTACTFORM_DATE_DAY_WEEK_HEADER" +msgid "Wk" msgstr "Wk" diff --git a/helpers/contactform.php b/helpers/contactform.php index 0f14e00..9394e7f 100644 --- a/helpers/contactform.php +++ b/helpers/contactform.php @@ -368,7 +368,7 @@ public static function get_translated( $strings ) { $translated = array(); foreach ( $strings AS $string ) { - $translated[ strtoupper( $string ) ] = str_replace( "'", ''', __( $string, WR_CONTACTFORM_TEXTDOMAIN ) ); + $translated[ ( $string ) ] = str_replace( "'", ''', __( $string, WR_CONTACTFORM_TEXTDOMAIN ) ); } return $translated; @@ -822,7 +822,6 @@ static function get_link_types() { $taxonomies = self::get_public_taxonomies(); $post_types = self::get_post_types(); $action = array( - 'contactform_no_action' => __( 'No Action', WR_CONTACTFORM_TEXTDOMAIN ), 'contactform_show_message' => __( 'Show Custom Message', WR_CONTACTFORM_TEXTDOMAIN ), 'contactform_url' => __( 'Go to URL', WR_CONTACTFORM_TEXTDOMAIN ), 'single_entry' => array( @@ -835,6 +834,7 @@ static function get_link_types() { 'type' => 'optiongroup', 'options' => $taxonomies, ), + 'contactform_no_action' => __( 'No Action', WR_CONTACTFORM_TEXTDOMAIN ), ); /* Add filter get add action submit form */ $getAction = apply_filters( 'wr_contactform_get_action_submit_form', $action ); @@ -985,71 +985,71 @@ public static function generate_html_pages( $postId, $formId, $formName, $formTy /* define language */ $arrayTranslated = array( - 'WR_CONTACTFORM_CONFIRM_FIELD_PASSWORD_MIN_MAX_CHARACTER', - 'WR_CONTACTFORM_CONFIRM_FIELD_EMAIL_CONFIRM', - 'WR_CONTACTFORM_CONFIRM_FIELD_MIN_NUMBER', - 'WR_CONTACTFORM_CONFIRM_FIELD_MAX_NUMBER', + 'The password must contain minimum %mi% and maximum %mx% character(s)', + 'Both email addresses must be the same.', + 'The number cannot be less than', + 'The number cannot be greater than', 'WR_CONTACTFORM_DATE_HOUR_TEXT', 'WR_CONTACTFORM_DATE_MINUTE_TEXT', 'WR_CONTACTFORM_DATE_CLOSE_TEXT', - 'WR_CONTACTFORM_DATE_PREV_TEXT', - 'WR_CONTACTFORM_DATE_NEXT_TEXT', - 'WR_CONTACTFORM_DATE_CURRENT_TEXT', - 'WR_CONTACTFORM_DATE_MONTH_JANUARY', - 'WR_CONTACTFORM_DATE_MONTH_FEBRUARY', - 'WR_CONTACTFORM_DATE_MONTH_MARCH', - 'WR_CONTACTFORM_DATE_MONTH_APRIL', - 'WR_CONTACTFORM_DATE_MONTH_MAY', - 'WR_CONTACTFORM_DATE_MONTH_JUNE', - 'WR_CONTACTFORM_DATE_MONTH_JULY', - 'WR_CONTACTFORM_DATE_MONTH_AUGUST', - 'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER', - 'WR_CONTACTFORM_DATE_MONTH_OCTOBER', - 'WR_CONTACTFORM_DATE_MONTH_NOVEMBER', - 'WR_CONTACTFORM_DATE_MONTH_DECEMBER', - 'WR_CONTACTFORM_DATE_MONTH_JANUARY_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_FEBRUARY_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_MARCH_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_APRIL_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_MAY_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_JUNE_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_JULY_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_AUGUST_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_OCTOBER_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_NOVEMBER_SHORT', - 'WR_CONTACTFORM_DATE_MONTH_DECEMBER_SHORT', - 'WR_CONTACTFORM_DATE_DAY_SUNDAY', - 'WR_CONTACTFORM_DATE_DAY_MONDAY', - 'WR_CONTACTFORM_DATE_DAY_TUESDAY', - 'WR_CONTACTFORM_DATE_DAY_WEDNESDAY', - 'WR_CONTACTFORM_DATE_DAY_THURSDAY', - 'WR_CONTACTFORM_DATE_DAY_FRIDAY', - 'WR_CONTACTFORM_DATE_DAY_SATURDAY', - 'WR_CONTACTFORM_DATE_DAY_SUNDAY_SHORT', - 'WR_CONTACTFORM_DATE_DAY_MONDAY_SHORT', - 'WR_CONTACTFORM_DATE_DAY_TUESDAY_SHORT', - 'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_SHORT', - 'WR_CONTACTFORM_DATE_DAY_THURSDAY_SHORT', - 'WR_CONTACTFORM_DATE_DAY_FRIDAY_SHORT', - 'WR_CONTACTFORM_DATE_DAY_SATURDAY_SHORT', - 'WR_CONTACTFORM_DATE_DAY_SUNDAY_MIN', - 'WR_CONTACTFORM_DATE_DAY_MONDAY_MIN', - 'WR_CONTACTFORM_DATE_DAY_TUESDAY_MIN', - 'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_MIN', - 'WR_CONTACTFORM_DATE_DAY_THURSDAY_MIN', - 'WR_CONTACTFORM_DATE_DAY_FRIDAY_MIN', - 'WR_CONTACTFORM_DATE_DAY_SATURDAY_MIN', - 'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER', - 'WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH', - 'WR_CONTACTFORM_CONFIRM_FIELD_MIN_LENGTH', + 'Prev', + 'Next', + 'Today', + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', + 'Jan', + 'Feb', + 'Mar', + 'Apr', + 'May', + 'Jun', + 'Jul', + 'Aug', + 'Sep', + 'Oct', + 'Nov', + 'Dec', + 'Sunday', + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sun', + 'Mon', + 'Tue', + 'Wed', + 'Thu', + 'Fri', + 'Sat', + 'Su', + 'Mo', + 'Tu', + 'We', + 'Th', + 'Fr', + 'Sa', + 'Wk', + 'The information cannot contain more than', + 'The information cannot contain less than', 'WR_CONTACTFORM_CAPTCHA_PUBLICKEY', 'WR_CONTACTFORM_BUTTON_BACK', 'WR_CONTACTFORM_BUTTON_NEXT', 'WR_CONTACTFORM_BUTTON_RESET', 'WR_CONTACTFORM_BUTTON_SUBMIT', - 'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY', - 'WR_CONTACTFORM_CONFIRM_FIELD_INVALID', + 'This field can not be empty, please enter required information.', + 'The information is invalid, please correct.', ); /* Check load JS */ $checkLoadJS = array(); @@ -1401,4 +1401,5 @@ public static function get_default_mail_from() { $default_from = 'mail@' . $sitename; return $default_from; } + } \ No newline at end of file diff --git a/helpers/form-edit.php b/helpers/form-edit.php index a3aee71..9b12602 100644 --- a/helpers/form-edit.php +++ b/helpers/form-edit.php @@ -365,7 +365,7 @@ public function add_form_bar( $form, $formStyle, $formSettings, $listPage, $list
- +
'; + $html .= ' '; } break; case 'vmiddle': if ( ! empty( $data->options->vmiddle ) ) { - $html .= ' '; + $html .= ' '; } break; case 'vlast': if ( ! empty( $data->options->vlast ) ) { - $html .= ''; + $html .= ''; } break; } @@ -891,19 +891,19 @@ public static function fieldaddress( $data, $dataSumbission ) { } switch ( $val ) { case 'vstreetAddress': - $field[ $val ] = ''; + $field[ $val ] = ''; break; case 'vstreetAddress2': - $field[ $val ] = ''; + $field[ $val ] = ''; break; case 'vcity': - $field[ $val ] = ''; + $field[ $val ] = ''; break; case 'vstate': - $field[ $val ] = ''; + $field[ $val ] = ''; break; case 'vcode': - $field[ $val ] = ''; + $field[ $val ] = ''; break; case 'vcountry': $field[ $val ] = "'; $output .= '
'; $output .= '
'; -$output .= ''; +$output .= ''; $output .= '
'; if ( ! empty( $this->items ) ) { foreach ( $this->items as $items ) { diff --git a/libraries/gadget/contactform-frontend.php b/libraries/gadget/contactform-frontend.php index 8ad6476..4bbc704 100644 --- a/libraries/gadget/contactform-frontend.php +++ b/libraries/gadget/contactform-frontend.php @@ -88,7 +88,7 @@ public function task_save() { if ( $postMaxSize > (int)( ini_get( 'upload_max_filesize' ) ) ) { $postMaxSize = (int)( ini_get( 'upload_max_filesize' ) ); } - echo ' __( 'WR_CONTACTFORM_POST_MAX_SIZE', WR_CONTACTFORM_TEXTDOMAIN ) ) ), ENT_QUOTES, 'UTF-8' ) . '\'/>'; + echo ' __( 'The file you want to upload is too big. Please keep file size under %s MB', WR_CONTACTFORM_TEXTDOMAIN ) ) ), ENT_QUOTES, 'UTF-8' ) . '\'/>'; exit(); } } @@ -228,27 +228,27 @@ public static function check_limit_char( $post, $fieldSettings, $fieldIdentifier $countValue = explode( ' ', preg_replace( '/\s+/', ' ', trim( $postIndentifier ) ) ); if ( count( $countValue ) < $fieldSettings->options->limitMin ) { - $validationForm[ $fieldIdentifier ] = __( 'WR_CONTACTFORM_CONFIRM_FIELD_MIN_LENGTH', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMin . ' Words'; + $validationForm[ $fieldIdentifier ] = __( 'The information cannot contain less than', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMin . ' Words'; } else if ( count( $countValue ) > $fieldSettings->options->limitMax ) { - $validationForm[ $fieldIdentifier ] = __( 'WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMax . ' Words'; + $validationForm[ $fieldIdentifier ] = __( 'The information cannot contain more than', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMax . ' Words'; } } else { if ( isset( $fieldSettings->type ) && $fieldSettings->type != 'password' ) { if ( strlen( $postIndentifier ) < $fieldSettings->options->limitMin ) { - $validationForm[ $fieldIdentifier ] = __( 'WR_CONTACTFORM_CONFIRM_FIELD_MIN_LENGTH', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMin . ' Character'; + $validationForm[ $fieldIdentifier ] = __( 'The information cannot contain less than', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMin . ' Character'; } else if ( strlen( $postIndentifier ) > $fieldSettings->options->limitMax ) { - $validationForm[ $fieldIdentifier ] = __( 'WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMax . ' Character'; + $validationForm[ $fieldIdentifier ] = __( 'The information cannot contain more than', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMax . ' Character'; } } else { if ( strlen( $postIndentifier ) < $fieldSettings->options->limitMin ) { - $validationForm[ 'password' ][ $fieldIdentifier ] = __( 'WR_CONTACTFORM_CONFIRM_FIELD_MIN_LENGTH', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMin . ' Character'; + $validationForm[ 'password' ][ $fieldIdentifier ] = __( 'The information cannot contain less than', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMin . ' Character'; } else if ( strlen( $postIndentifier ) > $fieldSettings->options->limitMax ) { - $validationForm[ 'password' ][ $fieldIdentifier ] = __( 'WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMax . ' Character'; + $validationForm[ 'password' ][ $fieldIdentifier ] = __( 'The information cannot contain more than', WR_CONTACTFORM_TEXTDOMAIN ) . ' ' . $fieldSettings->options->limitMax . ' Character'; } } } @@ -311,7 +311,7 @@ public function save( $post, $postID ) { $resp = recaptcha_check_answer( WR_CONTACTFORM_CAPTCHA_PRIVATEKEY, $_SERVER[ 'REMOTE_ADDR' ], $recaptchaChallenge, $recaptchaResponse ); if ( ! $resp->is_valid ) { - $return->error[ 'captcha' ] = __( 'WR_CONTACTFORM_ERROR_CAPTCHA', WR_CONTACTFORM_TEXTDOMAIN ); + $return->error[ 'captcha' ] = __( 'Incorrect captcha text!', WR_CONTACTFORM_TEXTDOMAIN ); return $return; } @@ -320,12 +320,12 @@ public function save( $post, $postID ) { if ( ! empty( $_POST[ 'form_name' ] ) && ! empty( $_POST[ 'captcha' ] ) ) { $sCaptcha = $_SESSION[ 'securimage_code_value' ][ $_POST[ 'form_name' ] ] ? $_SESSION[ 'securimage_code_value' ][ $_POST[ 'form_name' ] ] : ''; if ( strtolower( $sCaptcha ) != strtolower( $_POST[ 'captcha' ] ) ) { - $return->error[ 'captcha_2' ] = __( 'WR_CONTACTFORM_ERROR_CAPTCHA', WR_CONTACTFORM_TEXTDOMAIN ); + $return->error[ 'captcha_2' ] = __( 'Incorrect captcha text!', WR_CONTACTFORM_TEXTDOMAIN ); return $return; } } else { - $return->error[ 'captcha_2' ] = __( 'WR_CONTACTFORM_ERROR_CAPTCHA', WR_CONTACTFORM_TEXTDOMAIN ); + $return->error[ 'captcha_2' ] = __( 'Incorrect captcha text!', WR_CONTACTFORM_TEXTDOMAIN ); return $return; } } @@ -466,11 +466,11 @@ public function save( $post, $postID ) { $postData = isset( $post[ $fieldName ] ) ? $post[ $fieldName ] : ''; $postDataConfirm = isset( $post[ $fieldName . '_confirm' ] ) ? $post[ $fieldName . '_confirm' ] : ''; if ( isset( $fieldSettings->options->required ) && (int)$fieldSettings->options->required == 1 && $postData != $postDataConfirm ) { - $error = __( 'WR_CONTACTFORM_CONFIRM_FIELD_CONFIRM', WR_CONTACTFORM_TEXTDOMAIN ); + $error = __( 'Both %s addresses must be the same.', WR_CONTACTFORM_TEXTDOMAIN ); $validationForm[ $fieldName ] = str_replace( '%s', $colum->field_title, $error ); } else if ( ! empty( $postData ) && ! empty( $postDataConfirm ) && $postData != $postDataConfirm ) { - $error = __( 'WR_CONTACTFORM_CONFIRM_FIELD_CONFIRM', WR_CONTACTFORM_TEXTDOMAIN ); + $error = __( 'Both %s addresses must be the same.', WR_CONTACTFORM_TEXTDOMAIN ); $validationForm[ $fieldName ] = str_replace( '%s', $colum->field_title, $error ); } } @@ -484,7 +484,7 @@ public function save( $post, $postID ) { } else { if ( isset( $post[ $fieldName ] ) && $post[ $fieldName ] == '' ) { - $validationForm[ $fieldName ] = __( 'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY', WR_CONTACTFORM_TEXTDOMAIN ); + $validationForm[ $fieldName ] = __( 'This field can not be empty, please enter required information.', WR_CONTACTFORM_TEXTDOMAIN ); } } } diff --git a/libraries/gadget/contactform-js-form-frontend.php b/libraries/gadget/contactform-js-form-frontend.php index cc662cd..2641b42 100644 --- a/libraries/gadget/contactform-js-form-frontend.php +++ b/libraries/gadget/contactform-js-form-frontend.php @@ -110,6 +110,7 @@ public function default_action() { self.createRecaptcha(selfsubmit, publickey, error); $(".jsn-modal-overlay,.jsn-modal-indicator").remove(); }, 1000 ); + $(".jsn-form-content, .form-actions").hide(200); } }); } else { @@ -131,6 +132,7 @@ public function default_action() { self.createRecaptcha(selfsubmit, publickey, error); $(".jsn-modal-overlay,.jsn-modal-indicator").remove(); }, 1000 ); + $(".jsn-form-content, .form-actions").hide(200); } }); } @@ -186,55 +188,55 @@ public function default_action() { hourText:lang[\'WR_CONTACTFORM_DATE_HOUR_TEXT\'], minuteText:lang[\'WR_CONTACTFORM_DATE_MINUTE_TEXT\'], closeText:lang[\'WR_CONTACTFORM_DATE_CLOSE_TEXT\'], - prevText:lang[\'WR_CONTACTFORM_DATE_PREV_TEXT\'], - nextText:lang[\'WR_CONTACTFORM_DATE_NEXT_TEXT\'], - currentText:lang[\'WR_CONTACTFORM_DATE_CURRENT_TEXT\'], - monthNames:[lang[\'WR_CONTACTFORM_DATE_MONTH_JANUARY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_FEBRUARY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MARCH\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_APRIL\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MAY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JUNE\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JULY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_AUGUST\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_OCTOBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_NOVEMBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_DECEMBER\']], - monthNamesShort:[lang[\'WR_CONTACTFORM_DATE_MONTH_JANUARY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_FEBRUARY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MARCH_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_APRIL_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JUNE_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JULY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_AUGUST_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_OCTOBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_NOVEMBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_DECEMBER_SHORT\']], - dayNames:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY\']], - dayNamesShort:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY_SHORT\']], - dayNamesMin:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY_MIN\']], - weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\'] + prevText:lang[\'Prev\'], + nextText:lang[\'Next\'], + currentText:lang[\'Today\'], + monthNames:[lang[\'January\'], + lang[\'February\'], + lang[\'March\'], + lang[\'April\'], + lang[\'May\'], + lang[\'June\'], + lang[\'July\'], + lang[\'August\'], + lang[\'September\'], + lang[\'October\'], + lang[\'November\'], + lang[\'December\']], + monthNamesShort:[lang[\'Jan\'], + lang[\'Feb\'], + lang[\'Mar\'], + lang[\'Apr\'], + lang[\'May\'], + lang[\'Jun\'], + lang[\'Jul\'], + lang[\'Aug\'], + lang[\'Sep\'], + lang[\'Oct\'], + lang[\'Nov\'], + lang[\'Dec\']], + dayNames:[lang[\'Sunday\'], + lang[\'Monday\'], + lang[\'Tuesday\'], + lang[\'Wednesday\'], + lang[\'Thursday\'], + lang[\'Friday\'], + lang[\'Saturday\']], + dayNamesShort:[lang[\'Sun\'], + lang[\'Mon\'], + lang[\'Tue\'], + lang[\'Wed\'], + lang[\'Thu\'], + lang[\'Fri\'], + lang[\'Sat\']], + dayNamesMin:[lang[\'Su\'], + lang[\'Mo\'], + lang[\'Tu\'], + lang[\'We\'], + lang[\'Th\'], + lang[\'Fr\'], + lang[\'Sa\']], + weekHeader:lang[\'Wk\'] }); } else if (dateSettings.dateFormat == "1") { $(this).datepicker({ @@ -246,55 +248,55 @@ public function default_action() { hourText:lang[\'WR_CONTACTFORM_DATE_HOUR_TEXT\'], minuteText:lang[\'WR_CONTACTFORM_DATE_MINUTE_TEXT\'], closeText:lang[\'WR_CONTACTFORM_DATE_CLOSE_TEXT\'], - prevText:lang[\'WR_CONTACTFORM_DATE_PREV_TEXT\'], - nextText:lang[\'WR_CONTACTFORM_DATE_NEXT_TEXT\'], - currentText:lang[\'WR_CONTACTFORM_DATE_CURRENT_TEXT\'], - monthNames:[lang[\'WR_CONTACTFORM_DATE_MONTH_JANUARY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_FEBRUARY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MARCH\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_APRIL\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MAY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JUNE\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JULY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_AUGUST\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_OCTOBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_NOVEMBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_DECEMBER\']], - monthNamesShort:[lang[\'WR_CONTACTFORM_DATE_MONTH_JANUARY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_FEBRUARY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MARCH_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_APRIL_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JUNE_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JULY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_AUGUST_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_OCTOBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_NOVEMBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_DECEMBER_SHORT\']], - dayNames:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY\']], - dayNamesShort:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY_SHORT\']], - dayNamesMin:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY_MIN\']], - weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\'] + prevText:lang[\'Prev\'], + nextText:lang[\'Next\'], + currentText:lang[\'Today\'], + monthNames:[lang[\'January\'], + lang[\'February\'], + lang[\'March\'], + lang[\'April\'], + lang[\'May\'], + lang[\'June\'], + lang[\'July\'], + lang[\'August\'], + lang[\'September\'], + lang[\'October\'], + lang[\'November\'], + lang[\'December\']], + monthNamesShort:[lang[\'Jan\'], + lang[\'Feb\'], + lang[\'Mar\'], + lang[\'Apr\'], + lang[\'May\'], + lang[\'Jun\'], + lang[\'Jul\'], + lang[\'Aug\'], + lang[\'Sep\'], + lang[\'Oct\'], + lang[\'Nov\'], + lang[\'Dec\']], + dayNames:[lang[\'Sunday\'], + lang[\'Monday\'], + lang[\'Tuesday\'], + lang[\'Wednesday\'], + lang[\'Thursday\'], + lang[\'Friday\'], + lang[\'Saturday\']], + dayNamesShort:[lang[\'Sun\'], + lang[\'Mon\'], + lang[\'Tue\'], + lang[\'Wed\'], + lang[\'Thu\'], + lang[\'Fri\'], + lang[\'Sat\']], + dayNamesMin:[lang[\'Su\'], + lang[\'Mo\'], + lang[\'Tu\'], + lang[\'We\'], + lang[\'Th\'], + lang[\'Fr\'], + lang[\'Sa\']], + weekHeader:lang[\'Wk\'] }); } else if (dateSettings.timeFormat == "1") { $(this).timepicker({ @@ -304,55 +306,55 @@ public function default_action() { hourText:lang[\'WR_CONTACTFORM_DATE_HOUR_TEXT\'], minuteText:lang[\'WR_CONTACTFORM_DATE_MINUTE_TEXT\'], closeText:lang[\'WR_CONTACTFORM_DATE_CLOSE_TEXT\'], - prevText:lang[\'WR_CONTACTFORM_DATE_PREV_TEXT\'], - nextText:lang[\'WR_CONTACTFORM_DATE_NEXT_TEXT\'], - currentText:lang[\'WR_CONTACTFORM_DATE_CURRENT_TEXT\'], - monthNames:[lang[\'WR_CONTACTFORM_DATE_MONTH_JANUARY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_FEBRUARY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MARCH\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_APRIL\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MAY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JUNE\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JULY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_AUGUST\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_OCTOBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_NOVEMBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_DECEMBER\']], - monthNamesShort:[lang[\'WR_CONTACTFORM_DATE_MONTH_JANUARY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_FEBRUARY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MARCH_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_APRIL_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JUNE_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JULY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_AUGUST_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_OCTOBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_NOVEMBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_DECEMBER_SHORT\']], - dayNames:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY\']], - dayNamesShort:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY_SHORT\']], - dayNamesMin:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY_MIN\']], - weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\'] + prevText:lang[\'Prev\'], + nextText:lang[\'Next\'], + currentText:lang[\'Today\'], + monthNames:[lang[\'January\'], + lang[\'February\'], + lang[\'March\'], + lang[\'April\'], + lang[\'May\'], + lang[\'June\'], + lang[\'July\'], + lang[\'August\'], + lang[\'September\'], + lang[\'October\'], + lang[\'November\'], + lang[\'December\']], + monthNamesShort:[lang[\'Jan\'], + lang[\'Feb\'], + lang[\'Mar\'], + lang[\'Apr\'], + lang[\'May\'], + lang[\'Jun\'], + lang[\'Jul\'], + lang[\'Aug\'], + lang[\'Sep\'], + lang[\'Oct\'], + lang[\'Nov\'], + lang[\'Dec\']], + dayNames:[lang[\'Sunday\'], + lang[\'Monday\'], + lang[\'Tuesday\'], + lang[\'Wednesday\'], + lang[\'Thursday\'], + lang[\'Friday\'], + lang[\'Saturday\']], + dayNamesShort:[lang[\'Sun\'], + lang[\'Mon\'], + lang[\'Tue\'], + lang[\'Wed\'], + lang[\'Thu\'], + lang[\'Fri\'], + lang[\'Sat\']], + dayNamesMin:[lang[\'Su\'], + lang[\'Mo\'], + lang[\'Tu\'], + lang[\'We\'], + lang[\'Th\'], + lang[\'Fr\'], + lang[\'Sa\']], + weekHeader:lang[\'Wk\'] }); } else { $(this).datepicker({ @@ -363,55 +365,55 @@ public function default_action() { hourText:lang[\'WR_CONTACTFORM_DATE_HOUR_TEXT\'], minuteText:lang[\'WR_CONTACTFORM_DATE_MINUTE_TEXT\'], closeText:lang[\'WR_CONTACTFORM_DATE_CLOSE_TEXT\'], - prevText:lang[\'WR_CONTACTFORM_DATE_PREV_TEXT\'], - nextText:lang[\'WR_CONTACTFORM_DATE_NEXT_TEXT\'], - currentText:lang[\'WR_CONTACTFORM_DATE_CURRENT_TEXT\'], - monthNames:[lang[\'WR_CONTACTFORM_DATE_MONTH_JANUARY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_FEBRUARY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MARCH\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_APRIL\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MAY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JUNE\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JULY\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_AUGUST\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_OCTOBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_NOVEMBER\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_DECEMBER\']], - monthNamesShort:[lang[\'WR_CONTACTFORM_DATE_MONTH_JANUARY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_FEBRUARY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MARCH_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_APRIL_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_MAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JUNE_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_JULY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_AUGUST_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_SEPTEMBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_OCTOBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_NOVEMBER_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_MONTH_DECEMBER_SHORT\']], - dayNames:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY\']], - dayNamesShort:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY_SHORT\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY_SHORT\']], - dayNamesMin:[lang[\'WR_CONTACTFORM_DATE_DAY_SUNDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_MONDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_TUESDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_WEDNESDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_THURSDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_FRIDAY_MIN\'], - lang[\'WR_CONTACTFORM_DATE_DAY_SATURDAY_MIN\']], - weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\'] + prevText:lang[\'Prev\'], + nextText:lang[\'Next\'], + currentText:lang[\'Today\'], + monthNames:[lang[\'January\'], + lang[\'February\'], + lang[\'March\'], + lang[\'April\'], + lang[\'May\'], + lang[\'June\'], + lang[\'July\'], + lang[\'August\'], + lang[\'September\'], + lang[\'October\'], + lang[\'November\'], + lang[\'December\']], + monthNamesShort:[lang[\'Jan\'], + lang[\'Feb\'], + lang[\'Mar\'], + lang[\'Apr\'], + lang[\'May\'], + lang[\'Jun\'], + lang[\'Jul\'], + lang[\'Aug\'], + lang[\'Sep\'], + lang[\'Oct\'], + lang[\'Nov\'], + lang[\'Dec\']], + dayNames:[lang[\'Sunday\'], + lang[\'Monday\'], + lang[\'Tuesday\'], + lang[\'Wednesday\'], + lang[\'Thursday\'], + lang[\'Friday\'], + lang[\'Saturday\']], + dayNamesShort:[lang[\'Sun\'], + lang[\'Mon\'], + lang[\'Tue\'], + lang[\'Wed\'], + lang[\'Thu\'], + lang[\'Fri\'], + lang[\'Sat\']], + dayNamesMin:[lang[\'Su\'], + lang[\'Mo\'], + lang[\'Tu\'], + lang[\'We\'], + lang[\'Th\'], + lang[\'Fr\'], + lang[\'Sa\']], + weekHeader:lang[\'Wk\'] }); } $("button.ui-datepicker-trigger").addClass("btn btn-icon").html($("", { @@ -540,13 +542,13 @@ public function default_action() { $(this).keypress(function (e) { if (e.which != 27 && e.which != 13 && e.which != 8) { if (limitSettings.limitType == "Characters" && $(this).val().length == limitSettings.limitMax) { - alert(lang[\'WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH\'] + " " + limitSettings.limitMax + " Characters"); + alert(lang[\'The information cannot contain more than\'] + " " + limitSettings.limitMax + " Characters"); return false; } if (limitSettings.limitType == "Words") { var lengthValue = $.trim($(this).val() + String.fromCharCode(e.which)).split(/[\s]+/); if (lengthValue.length > limitSettings.limitMax && e.which != 0) { - alert(lang[\'WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH\'] + " " + limitSettings.limitMax + " Words"); + alert(lang[\'The information cannot contain more than\'] + " " + limitSettings.limitMax + " Words"); return false; } } @@ -972,7 +974,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))); check++; } @@ -1002,7 +1004,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))); check++; } @@ -1021,7 +1023,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))) check++; } else if ($(this).find("select option:selected").hasClass(\'lbl-allowOther\')) { @@ -1043,7 +1045,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))) check++; } @@ -1070,7 +1072,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_INVALID\'] + text:lang[\'The information is invalid, please correct.\'] }))); check++; } else if (!$(this).hasClass("email-required") && val && !filter.test(val)) { @@ -1081,7 +1083,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_INVALID\'] + text:lang[\'The information is invalid, please correct.\'] }))); check++; } @@ -1094,7 +1096,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_EMAIL_CONFIRM\'] + text:lang[\'Both email addresses must be the same.\'] }))); check++; } @@ -1116,7 +1118,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_INVALID\'] + text:lang[\'The information is invalid, please correct.\'] }))); check++; } @@ -1148,7 +1150,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_INVALID\'] + text:lang[\'The information is invalid, please correct.\'] }) ) ); @@ -1202,7 +1204,7 @@ classHide.push("div.control-group." + actionField); if (checkPassword) { check++; - var textLang = lang[\'WR_CONTACTFORM_CONFIRM_FIELD_PASSWORD_MIN_MAX_CHARACTER\']; + var textLang = lang[\'The password must contain minimum %mi% and maximum %mx% character(s)\']; textLang = textLang.replace("%mi%", limitSettings.limitMin); textLang = textLang.replace("%mx%", limitSettings.limitMax); $(this).parent().addClass("error"); @@ -1272,7 +1274,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_MIN_LENGTH\'] + " " + limitSettings.limitMin + " Words" + text:lang[\'The information cannot contain less than\'] + " " + limitSettings.limitMin + " Words" }))); } else if (lengthValue.length > limitSettings.limitMax) { check++; @@ -1283,7 +1285,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH\'] + " " + limitSettings.limitMax + " Words" + text:lang[\'The information cannot contain more than\'] + " " + limitSettings.limitMax + " Words" }))); } } else { @@ -1296,7 +1298,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_MIN_LENGTH\'] + " " + limitSettings.limitMin + " Character" + text:lang[\'The information cannot contain less than\'] + " " + limitSettings.limitMin + " Character" }))); } else if ($(this).val().length > limitSettings.limitMax) { check++; @@ -1307,7 +1309,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_MAX_LENGTH\'] + " " + limitSettings.limitMax + " Character" + text:lang[\'The information cannot contain more than\'] + " " + limitSettings.limitMax + " Character" }))); } } @@ -1341,7 +1343,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_MIN_NUMBER\'] + " " + limitNumberSettings.limitMin + text:lang[\'The number cannot be less than\'] + " " + limitNumberSettings.limitMin }))); } else if (parseInt($(this).val(), 10) > limitNumberSettings.limitMax) { check++; @@ -1352,7 +1354,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_MAX_NUMBER\'] + " " + limitNumberSettings.limitMax + text:lang[\'The number cannot be greater than\'] + " " + limitNumberSettings.limitMax }))); } } @@ -1374,7 +1376,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_INVALID\'] + text:lang[\'The information is invalid, please correct.\'] }))); check++; } @@ -1393,7 +1395,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))) check++; } else if ($(this).find("input[type=radio]:checked").hasClass(\'allowOther\') && $(this).find("input[type=radio]:checked").length == 1) { @@ -1414,7 +1416,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))) check++; } @@ -1441,7 +1443,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))) } check++; @@ -1464,7 +1466,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))) check++; } else if ($(this).find("input[type=checkbox]:checked").length == 1 && $(this).find("input[type=checkbox]:checked").hasClass(\'allowOther\')) { @@ -1485,7 +1487,7 @@ classHide.push("div.control-group." + actionField); }).append( $("", { "class":"validation-result label label-important", - text:lang[\'WR_CONTACTFORM_CONFIRM_FIELD_CANNOT_EMPTY\'] + text:lang[\'This field can not be empty, please enter required information.\'] }))) check++; } diff --git a/libraries/gadget/contactform-js-form.php b/libraries/gadget/contactform-js-form.php index cd5052c..7d6a580 100644 --- a/libraries/gadget/contactform-js-form.php +++ b/libraries/gadget/contactform-js-form.php @@ -12,1419 +12,1419 @@ class WR_CF_Gadget_Contactform_Js_Form extends WR_CF_Gadget_Base { - /** - * Gadget file name without extension. - * - * @var string - */ - protected $gadget = 'contactform-js-form'; + /** + * Gadget file name without extension. + * + * @var string + */ + protected $gadget = 'contactform-js-form'; - /** - * Constructor. - * - * @return void - */ - public function __construct() { + /** + * Constructor. + * + * @return void + */ + public function __construct() { - } + } - /** - * set default action - */ - public function default_action() { - require_once( ABSPATH . 'wp-admin/includes/admin.php' ); - auth_redirect(); - header( 'Content-Type: application/javascript' ); - $actionFormInit = array(); - $actionFormInit = apply_filters( 'wr_contactform_js_form_action_form_init', $actionFormInit ); - $createPrototypeForm = array(); - $createPrototypeForm[ 'init' ] = 'init:function () { - var self = this; - this.visualDesign = new JSNVisualDesign("#form-container", this.params); - this.JSNLayoutCustomizer = new JSNLayoutCustomizer(this.visualDesign, this.lang); - this.selectPostAction = $("#jform_form_post_action"); - this.inputFormTitle = $("#jform_form_title"); - this.btnAddPageForm = $(".new-page"); - this.btnSelectFormStyle = $("#select_form_style"); - var idForm = $("#jform_form_id").val(); - this.menuToolBar = $("#wr-menu-item-toolbar-menu ul li a"); - colorScheme = $("#jform_form_theme").val(); - editorCustomStyle = CodeMirror.fromTextArea(document.getElementById("style_custom_css"), { - lineNumbers:true, - styleActiveLine:true, - matchBrackets:true - }); - editorCustomStyle.on("keydown", function (cm, change) { - $("#style_custom_css").html(cm.getValue()).trigger("change"); - $("#style_inline style.formstylecustom").html(cm.getValue()); - }); - editorCustomStyle.on("keyup", function (cm, change) { - $("#style_custom_css").html(cm.getValue()).trigger("change"); - $("#style_inline style.formstylecustom").html(cm.getValue()); - }); + /** + * set default action + */ + public function default_action() { + require_once( ABSPATH . 'wp-admin/includes/admin.php' ); + auth_redirect(); + header( 'Content-Type: application/javascript' ); + $actionFormInit = array(); + $actionFormInit = apply_filters( 'wr_contactform_js_form_action_form_init', $actionFormInit ); + $createPrototypeForm = array(); + $createPrototypeForm[ 'init' ] = 'init:function () { + var self = this; + this.visualDesign = new JSNVisualDesign("#form-container", this.params); + this.JSNLayoutCustomizer = new JSNLayoutCustomizer(this.visualDesign, this.lang); + this.selectPostAction = $("#jform_form_post_action"); + this.inputFormTitle = $("#jform_form_title"); + this.btnAddPageForm = $(".new-page"); + this.btnSelectFormStyle = $("#select_form_style"); + var idForm = $("#jform_form_id").val(); + this.menuToolBar = $("#wr-menu-item-toolbar-menu ul li a"); + colorScheme = $("#jform_form_theme").val(); + editorCustomStyle = CodeMirror.fromTextArea(document.getElementById("style_custom_css"), { + lineNumbers:true, + styleActiveLine:true, + matchBrackets:true + }); + editorCustomStyle.on("keydown", function (cm, change) { + $("#style_custom_css").html(cm.getValue()).trigger("change"); + $("#style_inline style.formstylecustom").html(cm.getValue()); + }); + editorCustomStyle.on("keyup", function (cm, change) { + $("#style_custom_css").html(cm.getValue()).trigger("change"); + $("#style_inline style.formstylecustom").html(cm.getValue()); + }); - $(".jsn-tabs").tabs({ - selected:0, - show:function (event, ui) { - if ($(ui.tab).attr("href") == "#formCustomCss") { - editorCustomStyle.refresh(); - } - } - }); + $(".jsn-tabs").tabs({ + selected:0, + show:function (event, ui) { + if ($(ui.tab).attr("href") == "#formCustomCss") { + editorCustomStyle.refresh(); + } + } + }); - var Jsnwysiwyg = { - // required - name:"jsnwysiwyg", - methodForRealLife:function (object, text) { - // jQuery chain - return object.each(function () { - // standard operations - var Wysiwyg = $(this).data("wysiwyg"); - if (!Wysiwyg) { - return this; - } - // Plugin code - // Wysiwyg gives access to all methods and properties, also - // you can extend base functionality - Wysiwyg.newPropertyName = "methodForRealLife"; - Wysiwyg.newMethodName = function () { - this.setContent(text); - }; - Wysiwyg.newMethodName(); - }); - } - }; - // Register your plugin - $.wysiwyg.plugin.register(Jsnwysiwyg); - $("#action_data_contactform_show_message textarea").wysiwyg({ - controls:{ - bold:{ visible:true }, - italic:{ visible:true }, - underline:{ visible:true }, - strikeThrough:{ visible:true }, - justifyLeft:{ visible:true }, - justifyCenter:{ visible:true }, - justifyRight:{ visible:true }, - justifyFull:{ visible:true }, - indent:{ visible:true }, - outdent:{ visible:true }, - subscript:{ visible:true }, - superscript:{ visible:true }, - undo:{ visible:true }, - redo:{ visible:true }, - insertOrderedList:{ visible:true }, - insertUnorderedList:{ visible:true }, - insertHorizontalRule:{ visible:true }, - h1:{ visible:false }, - h2:{ visible:false }, - h3:{ visible:false }, - h4:{ - visible:false, - className:"h4", - command:($.browser.msie || $.browser.safari) ? "formatBlock" : "heading", - arguments:($.browser.msie || $.browser.safari) ? "

" : "h4", - tags:["h4"], - tooltip:"Header 4" - }, - h5:{ - visible:false, - className:"h5", - command:($.browser.msie || $.browser.safari) ? "formatBlock" : "heading", - arguments:($.browser.msie || $.browser.safari) ? "

" : "h5", - tags:["h5"], - tooltip:"Header 5" - }, - h6:{ - visible:false, - className:"h6", - command:($.browser.msie || $.browser.safari) ? "formatBlock" : "heading", - arguments:($.browser.msie || $.browser.safari) ? "
" : "h6", - tags:["h6"], - tooltip:"Header 6" - }, - html:{ visible:true }, - increaseFontSize:{ visible:true }, - decreaseFontSize:{ visible:true } - }, - html:\'INITIAL_CONTENT\' - }); - if ($("#jform_form_type").val() == 2) { - $(".jsn-master #form-design #form-design-header").show(); - } else { - $(".jsn-master #form-design #form-design-header").hide(); - } - this.selectPostAction.change(function () { - $(".form-action-data .action-options").addClass("hide"); - $(".form-action-data .action-options#action_data_" + $(this).val()).removeClass("hide"); + var Jsnwysiwyg = { + // required + name:"jsnwysiwyg", + methodForRealLife:function (object, text) { + // jQuery chain + return object.each(function () { + // standard operations + var Wysiwyg = $(this).data("wysiwyg"); + if (!Wysiwyg) { + return this; + } + // Plugin code + // Wysiwyg gives access to all methods and properties, also + // you can extend base functionality + Wysiwyg.newPropertyName = "methodForRealLife"; + Wysiwyg.newMethodName = function () { + this.setContent(text); + }; + Wysiwyg.newMethodName(); + }); + } + }; + // Register your plugin + $.wysiwyg.plugin.register(Jsnwysiwyg); + $("#action_data_contactform_show_message textarea").wysiwyg({ + controls:{ + bold:{ visible:true }, + italic:{ visible:true }, + underline:{ visible:true }, + strikeThrough:{ visible:true }, + justifyLeft:{ visible:true }, + justifyCenter:{ visible:true }, + justifyRight:{ visible:true }, + justifyFull:{ visible:true }, + indent:{ visible:true }, + outdent:{ visible:true }, + subscript:{ visible:true }, + superscript:{ visible:true }, + undo:{ visible:true }, + redo:{ visible:true }, + insertOrderedList:{ visible:true }, + insertUnorderedList:{ visible:true }, + insertHorizontalRule:{ visible:true }, + h1:{ visible:false }, + h2:{ visible:false }, + h3:{ visible:false }, + h4:{ + visible:false, + className:"h4", + command:($.browser.msie || $.browser.safari) ? "formatBlock" : "heading", + arguments:($.browser.msie || $.browser.safari) ? "

" : "h4", + tags:["h4"], + tooltip:"Header 4" + }, + h5:{ + visible:false, + className:"h5", + command:($.browser.msie || $.browser.safari) ? "formatBlock" : "heading", + arguments:($.browser.msie || $.browser.safari) ? "

" : "h5", + tags:["h5"], + tooltip:"Header 5" + }, + h6:{ + visible:false, + className:"h6", + command:($.browser.msie || $.browser.safari) ? "formatBlock" : "heading", + arguments:($.browser.msie || $.browser.safari) ? "
" : "h6", + tags:["h6"], + tooltip:"Header 6" + }, + html:{ visible:true }, + increaseFontSize:{ visible:true }, + decreaseFontSize:{ visible:true } + }, + html:\'
INITIAL_CONTENT
\' + }); + if ($("#jform_form_type").val() == 2) { + $(".jsn-master #form-design #form-design-header").show(); + } else { + $(".jsn-master #form-design #form-design-header").hide(); + } + this.selectPostAction.change(function () { + $(".form-action-data .action-options").addClass("hide"); + $(".form-action-data .action-options#action_data_" + $(this).val()).removeClass("hide"); - }).change(); - $(".jsn-page-actions .prev-page").click(function () { - $("#visualdesign-options").remove(); - $("#visualdesign-toolbox").remove(); - self.prevpaginationPage(); - }); - $(".jsn-page-actions .next-page").click(function () { - $("#visualdesign-options").remove(); - $("#visualdesign-toolbox").remove(); - self.nextpaginationPage(); - }); - $("#jform_form_type").change(function () { - if ($(this).val() == 1) { - if (confirm(self.lang["Converting form type to Single Page will combine fields from all pages into one single page. Are you sure?"])) { - $(".jsn-master #form-design #form-design-header").hide(); - var dataValue = $(".jsn-page-list > li.page-items").attr("data-value"); - var dataText = $(".jsn-page-list > li.page-items > input").val(); - $("#form-design-header").attr("data-value", dataValue); - $("#form-design-header .page-title h1").text(dataText); - self.loadPage("join"); - } else { - $("#jform_form_type option").each(function () { - if ($(this).val() == 2) { - $(this).prop("selected", true); - } - }); - } - } else { - $(".jsn-master #form-design #form-design-header").show(); - } - }); - this.btnAddPageForm.click(function () { - self.addNewPage(); - }); + }).change(); + $(".jsn-page-actions .prev-page").click(function () { + $("#visualdesign-options").remove(); + $("#visualdesign-toolbox").remove(); + self.prevpaginationPage(); + }); + $(".jsn-page-actions .next-page").click(function () { + $("#visualdesign-options").remove(); + $("#visualdesign-toolbox").remove(); + self.nextpaginationPage(); + }); + $("#jform_form_type").change(function () { + if ($(this).val() == 1) { + if (confirm(self.lang["Converting form type to Single Page will combine fields from all pages into one single page. Are you sure?"])) { + $(".jsn-master #form-design #form-design-header").hide(); + var dataValue = $(".jsn-page-list > li.page-items").attr("data-value"); + var dataText = $(".jsn-page-list > li.page-items > input").val(); + $("#form-design-header").attr("data-value", dataValue); + $("#form-design-header .page-title h1").text(dataText); + self.loadPage("join"); + } else { + $("#jform_form_type option").each(function () { + if ($(this).val() == 2) { + $(this).prop("selected", true); + } + }); + } + } else { + $(".jsn-master #form-design #form-design-header").show(); + } + }); + this.btnAddPageForm.click(function () { + self.addNewPage(); + }); - this.checkPage(); + this.checkPage(); - self.publishReady = false; - $("#publish").click(function(e) { - if (!self.publishReady) { - $("#publish").trigger("prepare"); - return false; - } - }); - $("#publish").on("prepare", function () { - var listOptionPage = []; - var listContainer = []; - $(document).trigger("click"); + self.publishReady = false; + $("#publish").click(function(e) { + if (!self.publishReady) { + $("#publish").trigger("prepare"); + return false; + } + }); + $("#publish").on("prepare", function () { + var listOptionPage = []; + var listContainer = []; + $(document).trigger("click"); - $("body").append($("
", { - "class":"jsn-modal-overlay", - "style":"z-index: 1000; display: inline;" - })).append($("
", { - "class":"jsn-modal-indicator", - "style":"display:block" - })).addClass("jsn-loading-page"); + $("body").append($("
", { + "class":"jsn-modal-overlay", + "style":"z-index: 1000; display: inline;" + })).append($("
", { + "class":"jsn-modal-indicator", + "style":"display:block" + })).addClass("jsn-loading-page"); - $(" ul.jsn-page-list li.page-items").each(function () { - listOptionPage.push([$(this).find("input").attr("data-id"), $(this).find("input").attr("value")]); - }); - $("#form-container .jsn-row-container").each(function () { - var listColumn = []; - $(this).find(".jsn-column-content").each(function () { - var dataContainer = {}; - var columnName = $(this).attr("data-column-name"); - var columnClass = $(this).attr("data-column-class"); - dataContainer.columnName = columnName; - dataContainer.columnClass = columnClass; - listColumn.push(dataContainer); - }); - listContainer.push(listColumn); - }); - $.ajax({ - type:"POST", - url:"admin-ajax.php?action=wr_contactform_save_page", - data:{ - form_id:$("#jform_form_id").val(), - form_content:self.visualDesign.serialize(), - form_page_name:$("#form-design-header").attr("data-value"), - form_list_page:listOptionPage, - form_list_container:$.toJSON(listContainer) - }, - success:function () { - self.publishReady = true; - setTimeout( function() { $("#publish").trigger("click"); }, 1000 ); - } - }); - }); + $(" ul.jsn-page-list li.page-items").each(function () { + listOptionPage.push([$(this).find("input").attr("data-id"), $(this).find("input").attr("value")]); + }); + $("#form-container .jsn-row-container").each(function () { + var listColumn = []; + $(this).find(".jsn-column-content").each(function () { + var dataContainer = {}; + var columnName = $(this).attr("data-column-name"); + var columnClass = $(this).attr("data-column-class"); + dataContainer.columnName = columnName; + dataContainer.columnClass = columnClass; + listColumn.push(dataContainer); + }); + listContainer.push(listColumn); + }); + $.ajax({ + type:"POST", + url:"admin-ajax.php?action=wr_contactform_save_page", + data:{ + form_id:$("#jform_form_id").val(), + form_content:self.visualDesign.serialize(), + form_page_name:$("#form-design-header").attr("data-value"), + form_list_page:listOptionPage, + form_list_container:$.toJSON(listContainer) + }, + success:function () { + self.publishReady = true; + setTimeout( function() { $("#publish").trigger("click"); }, 1000 ); + } + }); + }); - $("#form-design-header a.element-edit").click(function () { - self.cerateEditPage($(this)); - }); - $("#form-design-header a.element-delete").click(function (e) { - self.removePage(this); - e.stopPropagation(); - }); - $(".jsn-modal-overlay,.jsn-modal-indicator").remove(); - $("body").append($("
", { - "class":"jsn-modal-overlay", - "style":"z-index: 1000; display: inline;" - })).append($("
", { - "class":"jsn-modal-indicator", - "style":"display:block" - })).addClass("jsn-loading-page"); - this.loadPage("defaultPage"); - this.actionForm(); - this.formCaptcha(); - if (this.titleForm) { - $("#jform_form_title").val(this.titleForm); - } - this.btnSelectFormStyle.click(function (e) { - self.dialogFormStyle($(this)); - e.stopPropagation(); - }); + $("#form-design-header a.element-edit").click(function () { + self.cerateEditPage($(this)); + }); + $("#form-design-header a.element-delete").click(function (e) { + self.removePage(this); + e.stopPropagation(); + }); + $(".jsn-modal-overlay,.jsn-modal-indicator").remove(); + $("body").append($("
", { + "class":"jsn-modal-overlay", + "style":"z-index: 1000; display: inline;" + })).append($("
", { + "class":"jsn-modal-indicator", + "style":"display:block" + })).addClass("jsn-loading-page"); + this.loadPage("defaultPage"); + this.actionForm(); + this.formCaptcha(); + if (this.titleForm) { + $("#jform_form_title").val(this.titleForm); + } + this.btnSelectFormStyle.click(function (e) { + self.dialogFormStyle($(this)); + e.stopPropagation(); + }); - $("#jform_form_theme").select2({ - formatResult:self.formatSelect2, - formatSelection:self.formatSelect2, - escapeMarkup:function (m) { - return m; - } - }); + $("#jform_form_theme").select2({ + formatResult:self.formatSelect2, + formatSelection:self.formatSelect2, + escapeMarkup:function (m) { + return m; + } + }); - $("#form-design-content").attr("class", $("#form-design-content").attr("class").replace(/\bwr-style[-_]*[^\s]+\b/, $("#jform_form_theme").val())); - /* - $("#jform_form_style").change(function () { - if ($(this).val() == "form-horizontal") { - $("#form-container").addClass("form-horizontal"); - } else { - $("#form-container").removeClass("form-horizontal"); - } - //$("#form-design-content").attr("class",$(this).val()) - }).trigger("change"); - */ + $("#form-design-content").attr("class", $("#form-design-content").attr("class").replace(/\bwr-style[-_]*[^\s]+\b/, $("#jform_form_theme").val())); + /* + $("#jform_form_style").change(function () { + if ($(this).val() == "form-horizontal") { + $("#form-container").addClass("form-horizontal"); + } else { + $("#form-container").removeClass("form-horizontal"); + } + //$("#form-design-content").attr("class",$(this).val()) + }).trigger("change"); + */ - // Form Layout toggle button - $(\'input[type="radio"][name="form_style[layout]"]\').change(function() { - if ($(this).is(":checked")) { - $(this).parent().parent(".btn-group").find("label.btn").removeClass("active"); - $(this).parent("label.btn").addClass("active"); - if ($(this).val() == "form-horizontal") { - $("#form-container").addClass("form-horizontal"); - } else { - $("#form-container").removeClass("form-horizontal"); - } - }; - }).trigger("change"); + // Form Layout toggle button + $(\'input[type="radio"][name="form_style[layout]"]\').change(function() { + if ($(this).is(":checked")) { + $(this).parent().parent(".btn-group").find("label.btn").removeClass("active"); + $(this).parent("label.btn").addClass("active"); + if ($(this).val() == "form-horizontal") { + $("#form-container").addClass("form-horizontal"); + } else { + $("#form-container").removeClass("form-horizontal"); + } + }; + }).trigger("change"); - //self.changeTheme(); - $("#theme_action_add").click(function () { - $("#add-theme-select").removeClass("hide"); - $("#form-select").addClass("hide"); - $("#theme_action").addClass("hide"); - $("#input_new_theme").focus().focus().bind("keypress", function (e) { - if (e.keyCode == 13) { - $("#btn_add_theme").trigger("click"); - return false; - } - if (e.keyCode == 27) { - $("#btn_cancel_theme").trigger("click"); - } - }); - $(document).click(function () { - $("#btn_cancel_theme").trigger("click"); - }); - }); - $("#btn_cancel_theme").click(function () { - $("#add-theme-select").addClass("hide"); - $("#form-select").removeClass("hide"); - $("#theme_action").removeClass("hide"); - $("#input_new_theme").val(""); - }); + //self.changeTheme(); + $("#theme_action_add").click(function () { + $("#add-theme-select").removeClass("hide"); + $("#form-select").addClass("hide"); + $("#theme_action").addClass("hide"); + $("#input_new_theme").focus().focus().bind("keypress", function (e) { + if (e.keyCode == 13) { + $("#btn_add_theme").trigger("click"); + return false; + } + if (e.keyCode == 27) { + $("#btn_cancel_theme").trigger("click"); + } + }); + $(document).click(function () { + $("#btn_cancel_theme").trigger("click"); + }); + }); + $("#btn_cancel_theme").click(function () { + $("#add-theme-select").addClass("hide"); + $("#form-select").removeClass("hide"); + $("#theme_action").removeClass("hide"); + $("#input_new_theme").val(""); + }); - $("#btn_add_theme").click(function () { - var theme = $("#input_new_theme").val(); - var check = false; - if (theme == "") { - return false; - } - $("#jform_form_theme option").each(function () { - if ($(this).val() == "wr-style-" + theme) { - check = true; - } - }); - if (check) { - alert(self.lang["Color scheme with such name already exists"]); - return false; - } - $("#jform_form_theme").append($("\'); + } else { + $("#jform_form_theme").append(\'\'); + } + }); + $(\'#option_themes input[name="last_form_style[theme]"]\').remove(); + $(\'input[type="radio"][name="form_style[layout]"][value="\' + $(\'#option_themes input[name="last_form_style[layout]"]\').val() + \'"]\').prop("checked", true); + $(\'#option_themes input[name="last_form_style[layout]"]\').remove(); + $(\'input[type="radio"][name="form_style[layout]"]\').trigger("change"); + colorScheme = ""; + $("#jform_form_theme").trigger("change"); + $(\'#option_themes input[name^="last_form_style"]\').each(function() { + $(this).attr("name", $(this).attr("name").replace(/^last_form_style/, "form_style")); + }); + closeDialog(); + }); - // Cancel button - $("#cancel-style-settings").click(function(e) { - // Revert to the last settings - $("#option_themes").empty(); - $("#option_themes").append($("#last-form-style").html()); - $("#jform_form_theme").empty(); - $(\'#option_themes input[name="last_form_style[themes][]"]\').each(function() { - if ($(\'#option_themes input[name="last_form_style[theme]"]\').val() == ("wr-style-" + $(this).val())) { - $("#jform_form_theme").append(\'\'); - } else { - $("#jform_form_theme").append(\'\'); - } - }); - $(\'#option_themes input[name="last_form_style[theme]"]\').remove(); - $(\'input[type="radio"][name="form_style[layout]"][value="\' + $(\'#option_themes input[name="last_form_style[layout]"]\').val() + \'"]\').prop("checked", true); - $(\'#option_themes input[name="last_form_style[layout]"]\').remove(); - $(\'input[type="radio"][name="form_style[layout]"]\').trigger("change"); - colorScheme = ""; - $("#jform_form_theme").trigger("change"); - $(\'#option_themes input[name^="last_form_style"]\').each(function() { - $(this).attr("name", $(this).attr("name").replace(/^last_form_style/, "form_style")); - }); - closeDialog(); - }); + function closeDialog() { + $(".tipsy").remove(); + $(dialog).appendTo($(parentDialog)); + dialog.hide(); + dialog.width("0"); + $("#overlay-form-style-dialog").remove(); + } + }'; + $createPrototypeForm[ 'formCaptcha' ] = 'formCaptcha:function () { + var self = this; + // Method to disable the reCaptcha represent image if + // public and private api key not input. + function disableCaptchaRepImage() { + if (($("#option-publicKey-text").val() == "") || ($("#option-privateKey-text").val() == "")) { + $(".recaptcha-content > div").addClass("img-captcha"); + $(".recaptcha-content > div span.label").html("Please input reCaptcha Public Key and Private Key to use it"); + $(".recaptcha-content > div span.label").css("left", "-3%"); + $(".recaptcha-content > div span.label").show(); + return true; + }else{ + return false; + } + } - function closeDialog() { - $(".tipsy").remove(); - $(dialog).appendTo($(parentDialog)); - dialog.hide(); - dialog.width("0"); - $("#overlay-form-style-dialog").remove(); - } - }'; - $createPrototypeForm[ 'formCaptcha' ] = 'formCaptcha:function () { - var self = this; - // Method to disable the reCaptcha represent image if - // public and private api key not input. - function disableCaptchaRepImage() { - if (($("#option-publicKey-text").val() == "") || ($("#option-privateKey-text").val() == "")) { - $(".recaptcha-content > div").addClass("img-captcha"); - $(".recaptcha-content > div span.label").html("Please input reCaptcha Public Key and Private Key to use it"); - $(".recaptcha-content > div span.label").css("left", "-3%"); - $(".recaptcha-content > div span.label").show(); - return true; - }else{ - return false; - } - } - - $(".form-captcha .jsn-iconbar a.element-edit").click(function () { - var sender = $(this).parents(".form-captcha"); - $(sender).addClass("ui-state-edit"); - var type = "form-captcha"; - var params = {}; - var action = $(this); - JSNVisualDesign.openOptionsBox(sender, type, params, action); - $("#visualdesign-options-general").append(\'
\'); - $("#option-formCaptcha-select option").each(function () { - if ($(this).val() == $("#jform_form_captcha").val()) { - $(this).attr("selected", "selected"); - } - }); - $("#option-formCaptcha-select").change(function () { - $("#jform_form_captcha").val($(this).val()); - if ($(this).val() == 0) { - $(".recaptcha-content > div").addClass("img-captcha"); - $(".recaptcha-content > div span.label").html("Captcha is disabled"); - $(".recaptcha-content > div span.label").attr("style", "display: inline-block;"); - $(".recaptcha-content > div span.label").show(); - $("#reCaptcha-extraoptions").html(\'\'); - } else { - $(".recaptcha-content > div").removeClass("img-captcha"); - $(".recaptcha-content > div span.label").hide(); - if ($(this).val() == 1) { - $(".form-captcha .recaptcha-content img").attr("src", $(".form-captcha .recaptcha-content img").attr("data-recaptcha")); - $("#reCaptcha-extraoptions").html(\'
\'); - $("#option-publicKey-text").val($("#recaptcha_publickey_saveform").val()); - $("#option-privateKey-text").val($("#recaptcha_privatekey_saveform").val()); - disableCaptchaRepImage(); - $("#option-publicKey-text").keyup(function() { - $("#recaptcha_publickey_saveform").val($("#option-publicKey-text").val()); - if ( !disableCaptchaRepImage() ) { - $(".recaptcha-content > div").removeClass("img-captcha"); - $(".recaptcha-content > div span.label").hide(); - } - }); - $("#option-privateKey-text").keyup(function() { - $("#recaptcha_privatekey_saveform").val($("#option-privateKey-text").val()); - if ( !disableCaptchaRepImage() ) { - $(".recaptcha-content > div").removeClass("img-captcha"); - $(".recaptcha-content > div span.label").hide(); - } - }); - } else { - $(".form-captcha .recaptcha-content img").attr("src", $(".form-captcha .recaptcha-content img").attr("data-securityimages")); - $("#reCaptcha-extraoptions").html(\'\'); - } - } - }).trigger("change"); - }); - if ($("#jform_form_captcha").val() == 0) { - $(".recaptcha-content > div").addClass("img-captcha"); - $(".recaptcha-content > div span.label").show(); - } else { - $(".recaptcha-content > div").removeClass("img-captcha"); - $(".recaptcha-content > div span.label").hide(); - if ($("#jform_form_captcha").val() == 1) { - $(".form-captcha .recaptcha-content img").attr("src", $(".form-captcha .recaptcha-content img").attr("data-recaptcha")); - // Check if reCaptcha keys are input or not - if (($("#recaptcha_publickey_saveform").val() == "") || ($("#recaptcha_privatekey_saveform").val() == "")) { - $(".recaptcha-content > div").addClass("img-captcha"); - $(".recaptcha-content > div span.label").html("Please input reCaptcha Public Key and Private Key to use it"); - $(".recaptcha-content > div span.label").css("left", "-3%"); - $(".recaptcha-content > div span.label").show(); - } - } else { - $(".form-captcha .recaptcha-content img").attr("src", $(".form-captcha .recaptcha-content img").attr("data-securityimages")); - } - } - }'; - $createPrototypeForm[ 'actionForm' ] = 'actionForm:function () { - var self = this; - $(".form-actions .jsn-iconbar a.element-edit").click(function () { - var sender = $(this).parents(".form-actions"); - $(sender).addClass("ui-state-edit"); - var type = "form-actions"; - var params = {}; - var action = $(this); - JSNVisualDesign.openOptionsBox(sender, type, params, action); - $("#option-btnNext-text").val($("#jform_form_btn_next_text").val()).keyup(function () { - var btnNext = $("#option-btnNext-text").val() ? $("#option-btnNext-text").val() : "Next"; - $("#jform_form_btn_next_text").val(btnNext); - $(".form-actions .btn-toolbar .jsn-form-next").text(btnNext); - $("#button_next_color").parents(".control-group").find("label").text(btnNext); - }); - $("#option-btnPrev-text").val($("#jform_form_btn_prev_text").val()).keyup(function () { - var btnPrev = $("#option-btnPrev-text").val() ? $("#option-btnPrev-text").val() : "Prev"; - $("#jform_form_btn_prev_text").val(btnPrev); - $(".form-actions .btn-toolbar .jsn-form-prev").text(btnPrev); - $("#button_prev_color").parents(".control-group").find("label").text(btnPrev); - }); - $("#option-btnSubmit-text").val($("#jform_form_btn_submit_text").val()).keyup(function () { - var btnSubmit = $("#option-btnSubmit-text").val() ? $("#option-btnSubmit-text").val() : "Submit"; - $("#jform_form_btn_submit_text").val(btnSubmit); - $(".form-actions .btn-toolbar .jsn-form-submit").text(btnSubmit); - $("#button_submit_color").parents(".control-group").find("label").text(btnSubmit); - }); - $("#option-btnReset-text").val($("#jform_form_btn_reset_text").val()).keyup(function () { - var btnReset = $("#option-btnReset-text").val() ? $("#option-btnReset-text").val() : "Reset"; - $("#jform_form_btn_reset_text").val(btnReset); - $(".form-actions .btn-toolbar .jsn-form-reset").text(btnReset); - $("#button_reset_color").parents(".control-group").find("label").text(btnReset); - }); - if ($("#jform_form_state_btn_reset_text").val() == "Yes") { - $("#option-stateBtnReset-radio-Yes").prop("checked", true); - $("#option-stateBtnReset-radio-No").prop("checked", false); - $("#option-btnReset-text").parents(".control-group").show(); - $(".form-actions .btn-toolbar .jsn-form-reset").show(); - } else { - $("#option-stateBtnReset-radio-Yes").prop("checked", false); - $("#option-stateBtnReset-radio-No").prop("checked", true); - $("#option-btnReset-text").parents(".control-group").hide(); - $(".form-actions .btn-toolbar .jsn-form-reset").hide(); - } - $("input[name=stateBtnReset]").change(function () { - $("#jform_form_state_btn_reset_text").val($(this).val()); - if ($(this).val() == "Yes") { - $("#option-btnReset-text").parents(".control-group").show(); - $(".form-actions .btn-toolbar .jsn-form-reset").show(); - } else { - $("#option-btnReset-text").parents(".control-group").hide(); - $(".form-actions .btn-toolbar .jsn-form-reset").hide(); - } - }); - }); - $(".settings-footer .jsn-iconbar a.element-delete").click(function () { - self.JSNContactformDialogEdition = new JSNContactformDialogEdition(self.params); - JSNContactformDialogEdition.createDialogLimitation($(this), self.lang["Please upgrade to PRO edition to be able to hide the copyright link."]); - return false; - }); - }'; - $actionPrototypeFormLoadPage = array(); - $actionPrototypeFormLoadPage[ 'load-google-maps' ] = ' JSNVisualDesign.contentGoogleMaps();'; - $actionPrototypeFormLoadPage = apply_filters( 'wr_contactform_js_form_action_prototype_form_load_page', $actionPrototypeFormLoadPage ); - $createPrototypeForm[ 'loadPage' ] = 'loadPage:function (action) { - if (action == "defaultPage") { - $("#wpbody-content").show(); + $(".form-captcha .jsn-iconbar a.element-edit").click(function () { + var sender = $(this).parents(".form-captcha"); + $(sender).addClass("ui-state-edit"); + var type = "form-captcha"; + var params = {}; + var action = $(this); + JSNVisualDesign.openOptionsBox(sender, type, params, action); + $("#visualdesign-options-general").append(\'
\'); + $("#option-formCaptcha-select option").each(function () { + if ($(this).val() == $("#jform_form_captcha").val()) { + $(this).attr("selected", "selected"); + } + }); + $("#option-formCaptcha-select").change(function () { + $("#jform_form_captcha").val($(this).val()); + if ($(this).val() == 0) { + $(".recaptcha-content > div").addClass("img-captcha"); + $(".recaptcha-content > div span.label").html("Captcha is disabled"); + $(".recaptcha-content > div span.label").attr("style", "display: inline-block;"); + $(".recaptcha-content > div span.label").show(); + $("#reCaptcha-extraoptions").html(\'\'); + } else { + $(".recaptcha-content > div").removeClass("img-captcha"); + $(".recaptcha-content > div span.label").hide(); + if ($(this).val() == 1) { + $(".form-captcha .recaptcha-content img").attr("src", $(".form-captcha .recaptcha-content img").attr("data-recaptcha")); + $("#reCaptcha-extraoptions").html(\'
\'); + $("#option-publicKey-text").val($("#recaptcha_publickey_saveform").val()); + $("#option-privateKey-text").val($("#recaptcha_privatekey_saveform").val()); + disableCaptchaRepImage(); + $("#option-publicKey-text").keyup(function() { + $("#recaptcha_publickey_saveform").val($("#option-publicKey-text").val()); + if ( !disableCaptchaRepImage() ) { + $(".recaptcha-content > div").removeClass("img-captcha"); + $(".recaptcha-content > div span.label").hide(); + } + }); + $("#option-privateKey-text").keyup(function() { + $("#recaptcha_privatekey_saveform").val($("#option-privateKey-text").val()); + if ( !disableCaptchaRepImage() ) { + $(".recaptcha-content > div").removeClass("img-captcha"); + $(".recaptcha-content > div span.label").hide(); + } + }); + } else { + $(".form-captcha .recaptcha-content img").attr("src", $(".form-captcha .recaptcha-content img").attr("data-securityimages")); + $("#reCaptcha-extraoptions").html(\'\'); + } + } + }).trigger("change"); + }); + if ($("#jform_form_captcha").val() == 0) { + $(".recaptcha-content > div").addClass("img-captcha"); + $(".recaptcha-content > div span.label").show(); + } else { + $(".recaptcha-content > div").removeClass("img-captcha"); + $(".recaptcha-content > div span.label").hide(); + if ($("#jform_form_captcha").val() == 1) { + $(".form-captcha .recaptcha-content img").attr("src", $(".form-captcha .recaptcha-content img").attr("data-recaptcha")); + // Check if reCaptcha keys are input or not + if (($("#recaptcha_publickey_saveform").val() == "") || ($("#recaptcha_privatekey_saveform").val() == "")) { + $(".recaptcha-content > div").addClass("img-captcha"); + $(".recaptcha-content > div span.label").html("Please input reCaptcha Public Key and Private Key to use it"); + $(".recaptcha-content > div span.label").css("left", "-3%"); + $(".recaptcha-content > div span.label").show(); + } + } else { + $(".form-captcha .recaptcha-content img").attr("src", $(".form-captcha .recaptcha-content img").attr("data-securityimages")); + } + } + }'; + $createPrototypeForm[ 'actionForm' ] = 'actionForm:function () { + var self = this; + $(".form-actions .jsn-iconbar a.element-edit").click(function () { + var sender = $(this).parents(".form-actions"); + $(sender).addClass("ui-state-edit"); + var type = "form-actions"; + var params = {}; + var action = $(this); + JSNVisualDesign.openOptionsBox(sender, type, params, action); + $("#option-btnNext-text").val($("#jform_form_btn_next_text").val()).keyup(function () { + var btnNext = $("#option-btnNext-text").val() ? $("#option-btnNext-text").val() : "Next"; + $("#jform_form_btn_next_text").val(btnNext); + $(".form-actions .btn-toolbar .jsn-form-next").text(btnNext); + $("#button_next_color").parents(".control-group").find("label").text(btnNext); + }); + $("#option-btnPrev-text").val($("#jform_form_btn_prev_text").val()).keyup(function () { + var btnPrev = $("#option-btnPrev-text").val() ? $("#option-btnPrev-text").val() : "Prev"; + $("#jform_form_btn_prev_text").val(btnPrev); + $(".form-actions .btn-toolbar .jsn-form-prev").text(btnPrev); + $("#button_prev_color").parents(".control-group").find("label").text(btnPrev); + }); + $("#option-btnSubmit-text").val($("#jform_form_btn_submit_text").val()).keyup(function () { + var btnSubmit = $("#option-btnSubmit-text").val() ? $("#option-btnSubmit-text").val() : "Submit"; + $("#jform_form_btn_submit_text").val(btnSubmit); + $(".form-actions .btn-toolbar .jsn-form-submit").text(btnSubmit); + $("#button_submit_color").parents(".control-group").find("label").text(btnSubmit); + }); + $("#option-btnReset-text").val($("#jform_form_btn_reset_text").val()).keyup(function () { + var btnReset = $("#option-btnReset-text").val() ? $("#option-btnReset-text").val() : "Reset"; + $("#jform_form_btn_reset_text").val(btnReset); + $(".form-actions .btn-toolbar .jsn-form-reset").text(btnReset); + $("#button_reset_color").parents(".control-group").find("label").text(btnReset); + }); + if ($("#jform_form_state_btn_reset_text").val() == "Yes") { + $("#option-stateBtnReset-radio-Yes").prop("checked", true); + $("#option-stateBtnReset-radio-No").prop("checked", false); + $("#option-btnReset-text").parents(".control-group").show(); + $(".form-actions .btn-toolbar .jsn-form-reset").show(); + } else { + $("#option-stateBtnReset-radio-Yes").prop("checked", false); + $("#option-stateBtnReset-radio-No").prop("checked", true); + $("#option-btnReset-text").parents(".control-group").hide(); + $(".form-actions .btn-toolbar .jsn-form-reset").hide(); + } + $("input[name=stateBtnReset]").change(function () { + $("#jform_form_state_btn_reset_text").val($(this).val()); + if ($(this).val() == "Yes") { + $("#option-btnReset-text").parents(".control-group").show(); + $(".form-actions .btn-toolbar .jsn-form-reset").show(); + } else { + $("#option-btnReset-text").parents(".control-group").hide(); + $(".form-actions .btn-toolbar .jsn-form-reset").hide(); + } + }); + }); + $(".settings-footer .jsn-iconbar a.element-delete").click(function () { + self.JSNContactformDialogEdition = new JSNContactformDialogEdition(self.params); + JSNContactformDialogEdition.createDialogLimitation($(this), self.lang["Please upgrade to PRO edition to be able to hide the copyright link."]); + return false; + }); + }'; + $actionPrototypeFormLoadPage = array(); + $actionPrototypeFormLoadPage[ 'load-google-maps' ] = ' JSNVisualDesign.contentGoogleMaps();'; + $actionPrototypeFormLoadPage = apply_filters( 'wr_contactform_js_form_action_prototype_form_load_page', $actionPrototypeFormLoadPage ); + $createPrototypeForm[ 'loadPage' ] = 'loadPage:function (action) { + if (action == "defaultPage") { + $("#wpbody-content").show(); $("#wr_contactform_master").show(); $("#post-body-content").show(); } - var self = this; - var listOptionPage = []; - var listContainer = []; - $(" ul.jsn-page-list li.page-items").each(function () { - listOptionPage.push([$(this).find("input").attr("data-id"), $(this).find("input").attr("value")]); - }); - $("#form-container .jsn-row-container").each(function () { - var listColumn = []; - $(this).find(".jsn-column-content").each(function () { - var dataContainer = {}; - var columnName = $(this).attr("data-column-name"); - var columnClass = $(this).attr("data-column-class"); - dataContainer.columnName = columnName; - dataContainer.columnClass = columnClass; - listColumn.push(dataContainer); - }); - listContainer.push(listColumn); - }); - $("#form-design-content #page-loading").show(); - $("#form-design-content .jsn-column-container ").hide(); - $(".jsn-page-actions").hide(); - $("#form-design-header .jsn-iconbar").css("display", "none"); - $.ajax({ - type:"POST", - dataType:"json", - url:"admin-ajax.php?action=wr_contactform_load_page", - data:{ - form_page_name:$("#form-design-header").attr("data-value"), - form_page_old_name:oldValuePage, - form_page_old_content:self.visualDesign.serialize(), - form_page_old_container:$.toJSON(listContainer), - form_id:$("#jform_form_id").val(), - form_list_page:listOptionPage, - join_page:action - }, - complete:function (response) { - if (response && response.responseJSON) { - var data = response.responseJSON; - self.JSNLayoutCustomizer.renderContainer(data.containerPage); + var self = this; + var listOptionPage = []; + var listContainer = []; + $(" ul.jsn-page-list li.page-items").each(function () { + listOptionPage.push([$(this).find("input").attr("data-id"), $(this).find("input").attr("value")]); + }); + $("#form-container .jsn-row-container").each(function () { + var listColumn = []; + $(this).find(".jsn-column-content").each(function () { + var dataContainer = {}; + var columnName = $(this).attr("data-column-name"); + var columnClass = $(this).attr("data-column-class"); + dataContainer.columnName = columnName; + dataContainer.columnClass = columnClass; + listColumn.push(dataContainer); + }); + listContainer.push(listColumn); + }); + $("#form-design-content #page-loading").show(); + $("#form-design-content .jsn-column-container ").hide(); + $(".jsn-page-actions").hide(); + $("#form-design-header .jsn-iconbar").css("display", "none"); + $.ajax({ + type:"POST", + dataType:"json", + url:"admin-ajax.php?action=wr_contactform_load_page", + data:{ + form_page_name:$("#form-design-header").attr("data-value"), + form_page_old_name:oldValuePage, + form_page_old_content:self.visualDesign.serialize(), + form_page_old_container:$.toJSON(listContainer), + form_id:$("#jform_form_id").val(), + form_list_page:listOptionPage, + join_page:action + }, + complete:function (response) { + if (response && response.responseJSON) { + var data = response.responseJSON; + self.JSNLayoutCustomizer.renderContainer(data.containerPage); - if ($("#jform_form_id").val() > 0 && self.pageContent) { - var pageContent = $.evalJSON(self.pageContent); - if (!data.dataField && action == "defaultPage" && $.inArray(oldValuePage, pageContent) != -1) { - location.reload(); - } - } - self.visualDesign.clearElements(); + if ($("#jform_form_id").val() > 0 && self.pageContent) { + var pageContent = $.evalJSON(self.pageContent); + if (!data.dataField && action == "defaultPage" && $.inArray(oldValuePage, pageContent) != -1) { + location.reload(); + } + } + self.visualDesign.clearElements(); - if (data.dataField) { - var dataField = $.evalJSON(data.dataField); + if (data.dataField) { + var dataField = $.evalJSON(data.dataField); - self.visualDesign.setElements(dataField); - } - if (action == "join") { - $(".jsn-page-list li.page-items").each(function (index) { - if (index != 0) { - $(this).remove(); - } - }); - self.checkPage(); - } - if (action == "defaultPage") { - JSNVisualDesign.emailNotification(); - $(".jsn-modal-overlay,.jsn-modal-indicator").remove(); - } - $(".jsn-page-actions").show(); - $("#form-design-content #page-loading").hide(); - $("body").removeClass("jsn-loading-page"); - $("#form-design-content .jsn-column-container ").show(); - $("#form-design-header .jsn-iconbar").css("display", ""); - $(".control-group.wr-hidden-field").parents(".jsn-element").addClass("jsn-disabled"); + self.visualDesign.setElements(dataField); + } + if (action == "join") { + $(".jsn-page-list li.page-items").each(function (index) { + if (index != 0) { + $(this).remove(); + } + }); + self.checkPage(); + } + if (action == "defaultPage") { + JSNVisualDesign.emailNotification(); + $(".jsn-modal-overlay,.jsn-modal-indicator").remove(); + } + $(".jsn-page-actions").show(); + $("#form-design-content #page-loading").hide(); + $("body").removeClass("jsn-loading-page"); + $("#form-design-content .jsn-column-container ").show(); + $("#form-design-header .jsn-iconbar").css("display", ""); + $(".control-group.wr-hidden-field").parents(".jsn-element").addClass("jsn-disabled"); - ' . implode( '', $actionPrototypeFormLoadPage ) . ' - $(window).trigger("resize"); - } + ' . implode( '', $actionPrototypeFormLoadPage ) . ' + $(window).trigger("resize"); + } - } - }); - oldValuePage = $("#form-design-header").attr("data-value"); - }'; - $createPrototypeForm[ 'addNewPage' ] = 'addNewPage:function () { - JSNVisualDesign.savePage(); - $("#form-container .jsn-row-container").remove(); - this.JSNLayoutCustomizer.renderContainer(); - this.visualDesign.clearElements(); - var randomMath = Math.floor((Math.random() * 100000000) + 10000); - var countSelect = $("ul.jsn-page-list li.page-items").size() + 1; - var selectAdd = "
  • Page " + countSelect + "
  • "; - $("ul.jsn-page-list").append(selectAdd); - $("#form-design #form-design-header").attr("data-value", $("#new_" + randomMath).attr("data-value")); - $("#form-design #form-design-header .page-title h1").text($("#new_" + randomMath).find("input").val()); - oldValuePage = $("#form-design-header").attr("data-value"); - this.checkPage(); - $("#form-design-header .icon-pencil").trigger("click") + } + }); + oldValuePage = $("#form-design-header").attr("data-value"); + }'; + $createPrototypeForm[ 'addNewPage' ] = 'addNewPage:function () { + JSNVisualDesign.savePage(); + $("#form-container .jsn-row-container").remove(); + this.JSNLayoutCustomizer.renderContainer(); + this.visualDesign.clearElements(); + var randomMath = Math.floor((Math.random() * 100000000) + 10000); + var countSelect = $("ul.jsn-page-list li.page-items").size() + 1; + var selectAdd = "
  • Page " + countSelect + "
  • "; + $("ul.jsn-page-list").append(selectAdd); + $("#form-design #form-design-header").attr("data-value", $("#new_" + randomMath).attr("data-value")); + $("#form-design #form-design-header .page-title h1").text($("#new_" + randomMath).find("input").val()); + oldValuePage = $("#form-design-header").attr("data-value"); + this.checkPage(); + $("#form-design-header .icon-pencil").trigger("click") - }'; - $createPrototypeForm[ 'cerateEditPage' ] = 'cerateEditPage:function (_this) { - var item = $(_this).parent().parent().parent(); + }'; + $createPrototypeForm[ 'cerateEditPage' ] = 'cerateEditPage:function (_this) { + var item = $(_this).parent().parent().parent(); - $("#form-design-header .jsn-page-actions").hide(); - $("#form-design-header .page-edit-form").remove(); - var self = this; - item.find(".page-title").hide(); - $("#form-design-header").addClass("edit-page-item").append( - $("
    ", { - "class":"page-edit-form form-inline" - }).append( - $("", { - "type":"text", - "value":item.find("h1").text(), - "class":"page-input-tmp input-xlarge" - })).append( - $("