@@ -521,70 +521,70 @@ public function add_container_form_design( $form, $formStyle, $formSettings, $li
'WR_CONTACTFORM_MOVE_UP_CONTAINER',
'Edit email content being sent to specified address(es)',
'WR_CONTACTFORM_MOVE_DOWN_CONTAINER',
- 'WR_CONTACTFORM_ADD_CONTAINER_COLUMN',
- 'WR_CONTACTFORM_DELETE_CONTAINER',
- 'WR_CONTACTFORM_DELETE_CONTAINER_COLUMN',
- 'WR_CONTACTFORM_CONFIRM_DELETE_CONTAINER',
- 'WR_CONTACTFORM_CONFIRM_DELETE_CONTAINER_COLUMN',
+ 'Add Column',
+ 'Delete Container',
+ 'Delete Column',
+ 'Are you sure you want to delete the whole row including all elements it contains?',
+ 'Are you sure you want to delete the whole column including all elements it contains?',
'you sure you want to restore all style settings to default state?',
'Are you sure you want to delete current color scheme?',
'Color scheme with such name already exists',
'WR_CONTACTFORM_ALL_FORM_FIELD_ARE_HIDDEN',
'WR_CONTACTFORM_ALL_FORM_FIELD_ARE_DISPLAYED',
'Enable Range selection',
- 'TITLES',
+ 'Titles',
'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',
+ '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',
'WR_CONTACTFORM__MAIL_SETTINGS',
'Select menu item',
'Select article',
@@ -592,7 +592,7 @@ public function add_container_form_design( $form, $formStyle, $formSettings, $li
'Select',
'Save',
'Cancel',
- 'WR_CONTACTFORM_ADD_FIELD',
+ 'Add Field',
'WR_CONTACTFORM_BUTTON_SAVE',
'Cancel',
'Converting form type to Single Page will combine fields from all pages into one single page. Are you sure?',
@@ -612,16 +612,15 @@ public function add_container_form_design( $form, $formStyle, $formSettings, $li
'Even if you do not set limitation here, there will still be a limitation set by server which is: ',
'For security reasons following file extensions are always prohibited: ',
'Even if you do not set limitation here, there will still be a limitation set by server which is: ',
- 'STREET_ADDRESS',
- 'ADDRESS_LINE_2',
- 'CITY',
- 'POSTAL_ZIP_CODE',
- 'STATE_PROVINCE_REGION',
- 'FIRST',
- 'MIDDLE',
- 'LAST',
- 'COUNTRY',
- 'Allow user’s choice',
+ 'Street Address',
+ 'Address Line 2',
+ 'City',
+ 'Postal/Zip code',
+ 'State/Province/Region',
+ 'First',
+ 'Middle',
+ 'Last',
+ 'Country',
'Set the first item as placeholder',
'When checked, the first item will be used as placeholder without contributing value to form data.',
'Show Date in format',
@@ -670,7 +669,7 @@ public function add_container_form_action( $form, $formStyle, $formSettings, $li
-
+
options->vfirst ) ) {
- $html .= ' ';
+ $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 .= '
';
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($("", {"value":"wr-style-" + theme, "text":theme}));
- $("#option_themes").append(
- $("", {"class":"wr-style-" + theme, "type":"hidden", "name":"form_style[themes_style][" + theme + "]"})
- ).append(
- $("", {"value":theme, "type":"hidden", "name":"form_style[themes][]"})
- )
- $("#add-theme-select").addClass("hide");
- $("#form-select").removeClass("hide");
- $("#theme_action").removeClass("hide");
+ $("#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($("", {"value":"wr-style-" + theme, "text":theme}));
+ $("#option_themes").append(
+ $("", {"class":"wr-style-" + theme, "type":"hidden", "name":"form_style[themes_style][" + theme + "]"})
+ ).append(
+ $("", {"value":theme, "type":"hidden", "name":"form_style[themes][]"})
+ )
+ $("#add-theme-select").addClass("hide");
+ $("#form-select").removeClass("hide");
+ $("#theme_action").removeClass("hide");
- $("#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;
+ }
+ });
- $("#jform_form_theme").val("wr-style-" + theme).prop("selected", true);
- $("#jform_form_theme").trigger("change");
- self.resetTheme("wr-style-light");
- $("#input_new_theme").val("");
- });
- $("#jform_form_theme").change(function () {
- var theme = $(this).val();
- var styleTheme = {};
- $("#style_accordion_content input[type=text],#style_accordion_content input[type=number],#style_accordion_content input[type=radio]:checked,#style_accordion_content select,#style_accordion_content textarea").each(function () {
- var nameStyle = $(this).attr("name");
- if (nameStyle) {
- nameStyle = nameStyle.match(/form_style\[(.*?)\]/);
- styleTheme[nameStyle[1]] = $(this).val();
- }
- $("#option_themes input[name$=\'[themes_style][" + colorScheme.replace("wr-style-", "") + "]\']").val($.toJSON(styleTheme));
- });
- var optionTheme = $("#option_themes input[name$=\'[themes_style][" + theme.replace("wr-style-", "") + "]\']").val();
- if (optionTheme) {
- var options = $.evalJSON(optionTheme);
- $("#style_accordion_content input[type=text],#style_accordion_content input[type=number]").each(function () {
- if (!$(this).hasClass(\'select2-focusser\')) {
- var className = $(this).attr("id");
- if (className) {
- var nameOption = className.replace("style_", "");
- $(this).val(options[nameOption]);
- }
- }
- });
- $("#style_accordion_content input[type=radio]").each(function () {
- if (!$(this).hasClass(\'select2-focusser\')) {
- var className = $(this).attr("id");
- if (className) {
- var nameOption = className.replace(/style\d*_/g, "");
- if ($(this).attr("value") == options[nameOption]) {
- $(this).prop("checked", true);
- }
- }
- }
- });
- $("#style_accordion_content select").each(function () {
- var className = $(this).attr("id");
- var nameOption = className.replace("style_", "");
- $(this).val(options[nameOption]).prop("selected", true);
- $(this).select2("val", options[nameOption]);
- });
- $("#style_accordion_content textarea").each(function () {
- var className = $(this).attr("id");
- if (className) {
- var nameOption = className.replace("style_", "");
- $(this).html(options[nameOption]);
- }
- });
- } else {
- if (theme == "wr-style-light" || theme == "wr-style-dark") {
- self.resetTheme($("#jform_form_theme").val());
- } else {
- $("#style_accordion_content input[type=text]").each(function () {
- $(this).val("");
- });
- $("#style_accordion_content select").each(function () {
- $(this).eq(1).prop("selected", true);
- });
- }
- }
- $(".jsn-select-color").each(function () {
- var inputParent = $(this).prev();
- $(this).find("div").css("background-color", $(inputParent).val());
- $(this).colpickSetColor($(inputParent).val());
- });
- $("#style_accordion_content input[type=radio]").trigger("change");
- $("#style_accordion_content select").trigger("change");
- editorCustomStyle.setValue($("#style_custom_css").html());
- $("#style_inline style.formstylecustom").html(editorCustomStyle.getValue());
- $("#form-design-content").attr("class", $("#form-design-content").attr("class").replace(/\bwr-style[-_]*[^\s]+\b/, theme));
- self.changeStyleInline();
- self.actionTheme();
- colorScheme = $(this).val();
- });
+ $("#jform_form_theme").val("wr-style-" + theme).prop("selected", true);
+ $("#jform_form_theme").trigger("change");
+ self.resetTheme("wr-style-light");
+ $("#input_new_theme").val("");
+ });
+ $("#jform_form_theme").change(function () {
+ var theme = $(this).val();
+ var styleTheme = {};
+ $("#style_accordion_content input[type=text],#style_accordion_content input[type=number],#style_accordion_content input[type=radio]:checked,#style_accordion_content select,#style_accordion_content textarea").each(function () {
+ var nameStyle = $(this).attr("name");
+ if (nameStyle) {
+ nameStyle = nameStyle.match(/form_style\[(.*?)\]/);
+ styleTheme[nameStyle[1]] = $(this).val();
+ }
+ $("#option_themes input[name$=\'[themes_style][" + colorScheme.replace("wr-style-", "") + "]\']").val($.toJSON(styleTheme));
+ });
+ var optionTheme = $("#option_themes input[name$=\'[themes_style][" + theme.replace("wr-style-", "") + "]\']").val();
+ if (optionTheme) {
+ var options = $.evalJSON(optionTheme);
+ $("#style_accordion_content input[type=text],#style_accordion_content input[type=number]").each(function () {
+ if (!$(this).hasClass(\'select2-focusser\')) {
+ var className = $(this).attr("id");
+ if (className) {
+ var nameOption = className.replace("style_", "");
+ $(this).val(options[nameOption]);
+ }
+ }
+ });
+ $("#style_accordion_content input[type=radio]").each(function () {
+ if (!$(this).hasClass(\'select2-focusser\')) {
+ var className = $(this).attr("id");
+ if (className) {
+ var nameOption = className.replace(/style\d*_/g, "");
+ if ($(this).attr("value") == options[nameOption]) {
+ $(this).prop("checked", true);
+ }
+ }
+ }
+ });
+ $("#style_accordion_content select").each(function () {
+ var className = $(this).attr("id");
+ var nameOption = className.replace("style_", "");
+ $(this).val(options[nameOption]).prop("selected", true);
+ $(this).select2("val", options[nameOption]);
+ });
+ $("#style_accordion_content textarea").each(function () {
+ var className = $(this).attr("id");
+ if (className) {
+ var nameOption = className.replace("style_", "");
+ $(this).html(options[nameOption]);
+ }
+ });
+ } else {
+ if (theme == "wr-style-light" || theme == "wr-style-dark") {
+ self.resetTheme($("#jform_form_theme").val());
+ } else {
+ $("#style_accordion_content input[type=text]").each(function () {
+ $(this).val("");
+ });
+ $("#style_accordion_content select").each(function () {
+ $(this).eq(1).prop("selected", true);
+ });
+ }
+ }
+ $(".jsn-select-color").each(function () {
+ var inputParent = $(this).prev();
+ $(this).find("div").css("background-color", $(inputParent).val());
+ $(this).colpickSetColor($(inputParent).val());
+ });
+ $("#style_accordion_content input[type=radio]").trigger("change");
+ $("#style_accordion_content select").trigger("change");
+ editorCustomStyle.setValue($("#style_custom_css").html());
+ $("#style_inline style.formstylecustom").html(editorCustomStyle.getValue());
+ $("#form-design-content").attr("class", $("#form-design-content").attr("class").replace(/\bwr-style[-_]*[^\s]+\b/, theme));
+ self.changeStyleInline();
+ self.actionTheme();
+ colorScheme = $(this).val();
+ });
- $("#theme_action_refresh").click(function () {
- if (confirm(self.lang["you sure you want to restore all style settings to default state?"])) {
- self.resetTheme($("#jform_form_theme").val());
- }
- });
- $("#jform_form_edit_submission0,#jform_form_edit_submission1").change(function () {
- if ($("#jform_form_edit_submission1").is(":checked")) {
- $("#wr-select-user-group").removeClass("hide");
- } else {
- $("#wr-select-user-group").addClass("hide");
- }
- }).trigger("change");
- $("#theme_action_delete").click(function () {
- if (confirm(self.lang["Are you sure you want to delete current color scheme?"])) {
- var valueSelectTheme = $("#jform_form_theme").val();
- if (valueSelectTheme == "wr-style-light" || valueSelectTheme == "wr-style-dark") {
- return false;
- } else {
- $("#jform_form_theme option:selected").each(function () {
- if ($(this).val() != "wr-style-light" && $(this).val() != "wr-style-dark") {
- var classRemove = $(this).val();
- var valueRemove = classRemove.replace("wr-style-", "");
- $("#option_themes input").each(function () {
- if ($(this).attr("class") == classRemove) {
- $(this).remove();
- }
- if ($(this).val() == valueRemove) {
- $(this).remove();
- }
- });
- $(this).remove();
- }
- });
- $("#jform_form_theme").eq(1).prop("selected", true);
- $("#jform_form_theme").trigger("change");
- }
- }
- });
- self.actionTheme();
+ $("#theme_action_refresh").click(function () {
+ if (confirm(self.lang["you sure you want to restore all style settings to default state?"])) {
+ self.resetTheme($("#jform_form_theme").val());
+ }
+ });
+ $("#jform_form_edit_submission0,#jform_form_edit_submission1").change(function () {
+ if ($("#jform_form_edit_submission1").is(":checked")) {
+ $("#wr-select-user-group").removeClass("hide");
+ } else {
+ $("#wr-select-user-group").addClass("hide");
+ }
+ }).trigger("change");
+ $("#theme_action_delete").click(function () {
+ if (confirm(self.lang["Are you sure you want to delete current color scheme?"])) {
+ var valueSelectTheme = $("#jform_form_theme").val();
+ if (valueSelectTheme == "wr-style-light" || valueSelectTheme == "wr-style-dark") {
+ return false;
+ } else {
+ $("#jform_form_theme option:selected").each(function () {
+ if ($(this).val() != "wr-style-light" && $(this).val() != "wr-style-dark") {
+ var classRemove = $(this).val();
+ var valueRemove = classRemove.replace("wr-style-", "");
+ $("#option_themes input").each(function () {
+ if ($(this).attr("class") == classRemove) {
+ $(this).remove();
+ }
+ if ($(this).val() == valueRemove) {
+ $(this).remove();
+ }
+ });
+ $(this).remove();
+ }
+ });
+ $("#jform_form_theme").eq(1).prop("selected", true);
+ $("#jform_form_theme").trigger("change");
+ }
+ }
+ });
+ self.actionTheme();
- // Text help tooltip initialization
- $(\'#formStyleHelpText .icon-question-sign\').tipsy({
- gravity: \'w\',
- fade: true,
- trigger: \'manual\'
- });
- $(\'#formStyleHelpText input[name="form_style[help_text_type]"]\').change(function() {
- if (($(this).attr("value") == "tooltip") && ($(this).is(":checked"))) {
- $("#formStyleHelpText .icon-question-sign").unbind("mouseover");
- $("#formStyleHelpText .icon-question-sign").unbind("mouseout");
- $("#formStyleHelpText .icon-question-sign").tipsy("show");
- } else {
- $("#formStyleHelpText .icon-question-sign").mouseover(function(e) {
- $("#formStyleHelpText .icon-question-sign").tipsy("show");
- });
- $("#formStyleHelpText .icon-question-sign").mouseout(function(e) {
- $("#formStyleHelpText .icon-question-sign").tipsy("hide");
- });
- $("#formStyleHelpText .icon-question-sign").tipsy("hide");
- }
- });
- $("#style_accordion_content .ui-tabs-nav .ui-tabs-anchor").click(function(e) {
- if ($(this).attr("href") == "#formStyleHelpText") {
- $(\'#formStyleHelpText input[name="form_style[help_text_type]"]\').trigger("change");
- }
- else {
- $(".tipsy").remove();
- }
- });
+ // Text help tooltip initialization
+ $(\'#formStyleHelpText .icon-question-sign\').tipsy({
+ gravity: \'w\',
+ fade: true,
+ trigger: \'manual\'
+ });
+ $(\'#formStyleHelpText input[name="form_style[help_text_type]"]\').change(function() {
+ if (($(this).attr("value") == "tooltip") && ($(this).is(":checked"))) {
+ $("#formStyleHelpText .icon-question-sign").unbind("mouseover");
+ $("#formStyleHelpText .icon-question-sign").unbind("mouseout");
+ $("#formStyleHelpText .icon-question-sign").tipsy("show");
+ } else {
+ $("#formStyleHelpText .icon-question-sign").mouseover(function(e) {
+ $("#formStyleHelpText .icon-question-sign").tipsy("show");
+ });
+ $("#formStyleHelpText .icon-question-sign").mouseout(function(e) {
+ $("#formStyleHelpText .icon-question-sign").tipsy("hide");
+ });
+ $("#formStyleHelpText .icon-question-sign").tipsy("hide");
+ }
+ });
+ $("#style_accordion_content .ui-tabs-nav .ui-tabs-anchor").click(function(e) {
+ if ($(this).attr("href") == "#formStyleHelpText") {
+ $(\'#formStyleHelpText input[name="form_style[help_text_type]"]\').trigger("change");
+ }
+ else {
+ $(".tipsy").remove();
+ }
+ });
- $("#button_submit_color").change(function () {
- if ($(".wr-sortable-disable .form-actions button.jsn-form-submit").hasClass("hide")) {
- $(".wr-sortable-disable .form-actions button.jsn-form-submit").attr("class", "jsn-form-submit hide " + $(this).val());
- } else {
- $(".wr-sortable-disable .form-actions button.jsn-form-submit").attr("class", "jsn-form-submit " + $(this).val());
- }
- });
- $("#button_reset_color").change(function () {
+ $("#button_submit_color").change(function () {
+ if ($(".wr-sortable-disable .form-actions button.jsn-form-submit").hasClass("hide")) {
+ $(".wr-sortable-disable .form-actions button.jsn-form-submit").attr("class", "jsn-form-submit hide " + $(this).val());
+ } else {
+ $(".wr-sortable-disable .form-actions button.jsn-form-submit").attr("class", "jsn-form-submit " + $(this).val());
+ }
+ });
+ $("#button_reset_color").change(function () {
- if ($(".wr-sortable-disable .form-actions button.jsn-form-reset").hasClass("hide")) {
- $(".wr-sortable-disable .form-actions button.jsn-form-reset").attr("class", "jsn-form-reset hide " + $(this).val());
- } else {
- $(".wr-sortable-disable .form-actions button.jsn-form-reset").attr("class", "jsn-form-reset " + $(this).val());
- }
- });
- $("#button_prev_color").change(function () {
- if ($(".wr-sortable-disable .form-actions button.jsn-form-prev").hasClass("hide")) {
- $(".wr-sortable-disable .form-actions button.jsn-form-prev").attr("class", "jsn-form-prev hide " + $(this).val());
- } else {
- $(".wr-sortable-disable .form-actions button.jsn-form-prev").attr("class", "jsn-form-prev " + $(this).val());
- }
- });
- $("#button_next_color").change(function () {
- if ($(".wr-sortable-disable .form-actions button.jsn-form-next").hasClass("hide")) {
- $(".wr-sortable-disable .form-actions button.jsn-form-next").attr("class", "jsn-form-next hide " + $(this).val());
- } else {
- $(".wr-sortable-disable .form-actions button.jsn-form-next").attr("class", "jsn-form-next " + $(this).val());
- }
- });
- $("#button_position").change(function () {
- $(".wr-sortable-disable .form-actions .btn-toolbar").attr("class", $(this).val());
- });
+ if ($(".wr-sortable-disable .form-actions button.jsn-form-reset").hasClass("hide")) {
+ $(".wr-sortable-disable .form-actions button.jsn-form-reset").attr("class", "jsn-form-reset hide " + $(this).val());
+ } else {
+ $(".wr-sortable-disable .form-actions button.jsn-form-reset").attr("class", "jsn-form-reset " + $(this).val());
+ }
+ });
+ $("#button_prev_color").change(function () {
+ if ($(".wr-sortable-disable .form-actions button.jsn-form-prev").hasClass("hide")) {
+ $(".wr-sortable-disable .form-actions button.jsn-form-prev").attr("class", "jsn-form-prev hide " + $(this).val());
+ } else {
+ $(".wr-sortable-disable .form-actions button.jsn-form-prev").attr("class", "jsn-form-prev " + $(this).val());
+ }
+ });
+ $("#button_next_color").change(function () {
+ if ($(".wr-sortable-disable .form-actions button.jsn-form-next").hasClass("hide")) {
+ $(".wr-sortable-disable .form-actions button.jsn-form-next").attr("class", "jsn-form-next hide " + $(this).val());
+ } else {
+ $(".wr-sortable-disable .form-actions button.jsn-form-next").attr("class", "jsn-form-next " + $(this).val());
+ }
+ });
+ $("#button_position").change(function () {
+ $(".wr-sortable-disable .form-actions .btn-toolbar").attr("class", $(this).val());
+ });
$("select#jform_form_type,select#jform_form_style").select2({
- minimumResultsForSearch:99,
- escapeMarkup:function (m) {
- return m;
- }
- });
- $("select.wr-select2").select2({
- formatResult:self.formatButtonSelect2,
- formatSelection:self.formatButtonSelect2,
- minimumResultsForSearch:99,
- escapeMarkup:function (m) {
- return m;
- }
- });
+ minimumResultsForSearch:99,
+ escapeMarkup:function (m) {
+ return m;
+ }
+ });
+ $("select.wr-select2").select2({
+ formatResult:self.formatButtonSelect2,
+ formatSelection:self.formatButtonSelect2,
+ minimumResultsForSearch:99,
+ escapeMarkup:function (m) {
+ return m;
+ }
+ });
- if (!idForm) {
- self.resetTheme($("#jform_form_theme").val());
- }
- ' . implode( '', $actionFormInit ) . '
+ if (!idForm) {
+ self.resetTheme($("#jform_form_theme").val());
+ }
+ ' . implode( '', $actionFormInit ) . '
- }';
- $createPrototypeForm[ 'formatButtonSelect2' ] = 'formatButtonSelect2:function (state) {
- var imgName = state.id.split("-");
- return "" + state.text;
- }';
- $createPrototypeForm[ 'formatSelect2' ] = 'formatSelect2:function (state) {
- var self = this, imgName = "";
- if (state.id.toLowerCase() == "wr-style-dark" || state.id.toLowerCase() == "wr-style-light") {
- imgName = state.id.toLowerCase();
- } else {
- imgName = "wr-style-custom";
- }
- return "" + state.text;
- }';
- $createPrototypeForm[ 'actionTheme' ] = 'actionTheme:function () {
- var valueSelectTheme = $("#jform_form_theme").val();
- if (valueSelectTheme == "wr-style-light" || valueSelectTheme == "wr-style-dark") {
- $("#theme_action_refresh").removeClass("hide");
- $("#theme_action_delete").addClass("hide");
- } else {
- $("#theme_action_refresh").addClass("hide");
- $("#theme_action_delete").removeClass("hide");
- }
- }';
- $createPrototypeForm[ 'resetTheme' ] = 'resetTheme:function (theme) {
- var self = this;
- $("#form-design-content").attr("class", $("#form-design-content").attr("class").replace(/\bwr-style[-_]*[^\s]+\b/, theme));
- if (theme == "wr-style-light") {
- $("#style_background_color").val("#ffffff");
- $("#style_background_active_color").val("#fcf8e3");
- $("#style_border_color").val("#ffffff");
- $("#style_border_active_color").val("#fbeed5");
- $("#style_text_color").val("#333333");
- $("#style_font_size").val("14");
- $("#style_message_error_text_color").val("#ffffff");
- $("#style_message_error_background_color").val("#b94a48");
- $("#style_field_background_color").val("#ffffff");
- $("#style_field_shadow_color").val("#ffffff");
- $("#style_field_text_color").val("#666666");
- $("#style_field_border_color").val("#cccccc");
- $("#style_padding_space").val(10);
- $("#style_margin_space").val(0);
- $("#style_border_thickness").val(0);
- $("#style_rounded_corner_radius").val(0);
- $("#style1_help_text_type").prop("checked", true);
- $("#style_font_type option:eq(0)").prop("selected", true).trigger("change");
- $("#button_submit_color option:eq(1)").prop("selected", true).trigger("change");
- $("#button_reset_color option:eq(0)").prop("selected", true).trigger("change");
- $("#button_prev_color option:eq(0)").prop("selected", true).trigger("change");
- $("#button_next_color option:eq(0)").prop("selected", true).trigger("change");
- $("#button_position option:eq(0)").prop("selected", true).trigger("change");
- $("#style_custom_css").html(""); editorCustomStyle.setValue(""); $("#style_inline style.formstylecustom").html("");
+ }';
+ $createPrototypeForm[ 'formatButtonSelect2' ] = 'formatButtonSelect2:function (state) {
+ var imgName = state.id.split("-");
+ return "" + state.text;
+ }';
+ $createPrototypeForm[ 'formatSelect2' ] = 'formatSelect2:function (state) {
+ var self = this, imgName = "";
+ if (state.id.toLowerCase() == "wr-style-dark" || state.id.toLowerCase() == "wr-style-light") {
+ imgName = state.id.toLowerCase();
+ } else {
+ imgName = "wr-style-custom";
+ }
+ return "" + state.text;
+ }';
+ $createPrototypeForm[ 'actionTheme' ] = 'actionTheme:function () {
+ var valueSelectTheme = $("#jform_form_theme").val();
+ if (valueSelectTheme == "wr-style-light" || valueSelectTheme == "wr-style-dark") {
+ $("#theme_action_refresh").removeClass("hide");
+ $("#theme_action_delete").addClass("hide");
+ } else {
+ $("#theme_action_refresh").addClass("hide");
+ $("#theme_action_delete").removeClass("hide");
+ }
+ }';
+ $createPrototypeForm[ 'resetTheme' ] = 'resetTheme:function (theme) {
+ var self = this;
+ $("#form-design-content").attr("class", $("#form-design-content").attr("class").replace(/\bwr-style[-_]*[^\s]+\b/, theme));
+ if (theme == "wr-style-light") {
+ $("#style_background_color").val("#ffffff");
+ $("#style_background_active_color").val("#fcf8e3");
+ $("#style_border_color").val("#ffffff");
+ $("#style_border_active_color").val("#fbeed5");
+ $("#style_text_color").val("#333333");
+ $("#style_font_size").val("14");
+ $("#style_message_error_text_color").val("#ffffff");
+ $("#style_message_error_background_color").val("#b94a48");
+ $("#style_field_background_color").val("#ffffff");
+ $("#style_field_shadow_color").val("#ffffff");
+ $("#style_field_text_color").val("#666666");
+ $("#style_field_border_color").val("#cccccc");
+ $("#style_padding_space").val(10);
+ $("#style_margin_space").val(0);
+ $("#style_border_thickness").val(0);
+ $("#style_rounded_corner_radius").val(0);
+ $("#style1_help_text_type").prop("checked", true);
+ $("#style_font_type option:eq(0)").prop("selected", true).trigger("change");
+ $("#button_submit_color option:eq(1)").prop("selected", true).trigger("change");
+ $("#button_reset_color option:eq(0)").prop("selected", true).trigger("change");
+ $("#button_prev_color option:eq(0)").prop("selected", true).trigger("change");
+ $("#button_next_color option:eq(0)").prop("selected", true).trigger("change");
+ $("#button_position option:eq(0)").prop("selected", true).trigger("change");
+ $("#style_custom_css").html(""); editorCustomStyle.setValue(""); $("#style_inline style.formstylecustom").html("");
+
+ } else if (theme == "wr-style-dark") {
+ $("#style_background_color").val("#ffffff");
+ $("#style_background_active_color").val("#444444");
+ $("#style_border_color").val("#ffffff");
+ $("#style_border_active_color").val("#666666");
+ $("#style_text_color").val("#c6c6c6");
+ $("#style_font_size").val("14");
+ $("#style_message_error_text_color").val("#ffffff");
+ $("#style_message_error_background_color").val("#b94a48");
+ $("#style_field_background_color").val("#000000");
+ $("#style_field_shadow_color").val("#000000");
+ $("#style_field_text_color").val("#333333");
+ $("#style_field_border_color").val("#111111");
+ $("#style_padding_space").val(10);
+ $("#style_margin_space").val(0);
+ $("#style_border_thickness").val(0);
+ $("#style_rounded_corner_radius").val(0);
+ $("#style1_help_text_type").prop("checked", true);
+ $("#style_font_type option:eq(0)").prop("selected", true).trigger("change");
+ $("#button_submit_color option:eq(1)").prop("selected", true).trigger("change");
+ $("#button_reset_color option:eq(0)").prop("selected", true).trigger("change");
+ $("#button_prev_color option:eq(0)").prop("selected", true).trigger("change");
+ $("#button_next_color option:eq(0)").prop("selected", true).trigger("change");
+ $("#button_position option:eq(0)").prop("selected", true).trigger("change");
+ $("#style_custom_css").html(""); editorCustomStyle.setValue(""); $("#style_inline style.formstylecustom").html("");
+ }
+ $(".jsn-select-color").each(function () {
+ var inputParent = $(this).prev();
+ $(this).find("div").css("background-color", $(inputParent).val());
+ $(this).colpickSetColor($(inputParent).val());
+ });
+ self.changeStyleInline();
+ }';
+ $createPrototypeForm[ 'hexToRgb' ] = 'hexToRgb:function (h) {
+ var r = parseInt((this.cutHex(h)).substring(0, 2), 16), g = ((this.cutHex(h)).substring(2, 4), 16), b = parseInt((this.cutHex(h)).substring(4, 6), 16)
+ return r + "," + b + "," + b;
+ }';
+ $createPrototypeForm[ 'cutHex' ] = 'cutHex:function (h) {
+ return (h.charAt(0) == "#") ? h.substring(1, 7) : h
+ }';
+ $createPrototypeForm[ 'changeStyleInline' ] = 'changeStyleInline:function () {
+ var self = this,
+ styleField = ".jsn-master #form-design-content .jsn-element-container .jsn-element .controls input,.jsn-master #form-design-content .jsn-element-container .jsn-element .controls select,.jsn-master #form-design-content .jsn-element-container .jsn-element .controls textarea{\n",
+ styleFormElement = ".jsn-master #form-design-content .jsn-element-container .jsn-element {\n",
+ styleActive = ".jsn-master #form-design-content .jsn-element-container .jsn-element.ui-state-edit {\n",
+ styleTitle = ".jsn-master #form-design-content .jsn-element-container .jsn-element .control-label, #formStyleHelpText .controls label>span {\n";
+ $("#style_accordion_content input[type=text],#style_accordion_content input[type=number],#style_accordion_content select").each(function () {
+ var dataValue = $(this).attr("data-value");
+ var valueInput = $(this).val();
+ if (valueInput) {
+ if ($(this).attr("type") == "number") {
+ if (dataValue == "border") {
+ valueInput = valueInput + "px solid";
+ } else if (dataValue == "margin") {
+ valueInput = valueInput + "px 0px";
+ } else {
+ valueInput = valueInput + "px";
+ }
+ }
+ var dataType = $(this).attr("data-type");
+ switch (dataType) {
+ case "jsn-element":
+ if (dataValue) {
+ var items = dataValue.split(",");
+ if (items.length > 1) {
+ $.each(items, function (value, key) {
+ styleFormElement += key + ":" + valueInput + ";\n";
+ });
+ } else {
+ styleFormElement += items + ":" + valueInput + ";\n";
+ }
+ }
+ break;
+ case "ui-state-edit":
+ styleActive += dataValue + ":" + valueInput + ";\n";
+ break;
+ case "control-label":
+ styleTitle += dataValue + ":" + valueInput + ";\n";
+ break;
+ case "field":
+ if (dataValue == "background-color") {
+ styleField += "background:" + valueInput + ";\n";
+ } else if (dataValue == "box-shadow") {
+ valueInput = self.hexToRgb(valueInput);
+ styleField += "box-shadow:0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 7px 0 rgba(" + valueInput + ", 0.8) inset;\n";
+ } else {
+ styleField += dataValue + ":" + valueInput + ";\n";
+ }
+ break;
+ }
+ }
+ });
+ styleFormElement += "}\n";
+ styleActive += "}\n";
+ styleTitle += "}\n";
+ styleField += "}\n";
+ $(\'#style_accordion_content input[type=radio][name="form_style[help_text_type]"]:checked\').each(function() {
+ if ($(this).attr("value") == "tooltip") {
+ styleHelpText = ".jsn-master #form-design-content .jsn-element-container .jsn-element .control-label .wr-help-text {\n";
+ } else {
+ styleHelpText = ".jsn-master #form-design-content .jsn-element-container .jsn-element .control-label .icon-question-sign {\n";
+ }
+ });
+ styleHelpText += "display: none;\n";
+ styleHelpText += "}\n";
+ $("#style_inline style.formstyle").html(styleFormElement + styleActive + styleTitle + styleField + styleHelpText);
+ }';
+ $createPrototypeForm[ 'dialogFormStyle' ] = 'dialogFormStyle:function (_this) {
+ var self = this;
+ var dialog = $("#container-select-style"), parentDialog = $("#container-select-style").parent();
+ dialog.width("550");
+ // Add overlay to disable other controls
+ $("body").append($(\'\'));
+ $(dialog).appendTo("body");
+ var elmStyle = JSNVisualDesign.getBoxStyle($(dialog)),
+ parentStyle = JSNVisualDesign.getBoxStyle($(_this)),
+ position = {};
+ position.left = parentStyle.offset.left - elmStyle.outerWidth + parentStyle.outerWidth;
+ // position.left = parentStyle.offset.left + (parentStyle.outerWidth - elmStyle.outerWidth) / 2;
+ position.top = parentStyle.offset.top + parentStyle.outerHeight;
- } else if (theme == "wr-style-dark") {
- $("#style_background_color").val("#ffffff");
- $("#style_background_active_color").val("#444444");
- $("#style_border_color").val("#ffffff");
- $("#style_border_active_color").val("#666666");
- $("#style_text_color").val("#c6c6c6");
- $("#style_font_size").val("14");
- $("#style_message_error_text_color").val("#ffffff");
- $("#style_message_error_background_color").val("#b94a48");
- $("#style_field_background_color").val("#000000");
- $("#style_field_shadow_color").val("#000000");
- $("#style_field_text_color").val("#333333");
- $("#style_field_border_color").val("#111111");
- $("#style_padding_space").val(10);
- $("#style_margin_space").val(0);
- $("#style_border_thickness").val(0);
- $("#style_rounded_corner_radius").val(0);
- $("#style1_help_text_type").prop("checked", true);
- $("#style_font_type option:eq(0)").prop("selected", true).trigger("change");
- $("#button_submit_color option:eq(1)").prop("selected", true).trigger("change");
- $("#button_reset_color option:eq(0)").prop("selected", true).trigger("change");
- $("#button_prev_color option:eq(0)").prop("selected", true).trigger("change");
- $("#button_next_color option:eq(0)").prop("selected", true).trigger("change");
- $("#button_position option:eq(0)").prop("selected", true).trigger("change");
- $("#style_custom_css").html(""); editorCustomStyle.setValue(""); $("#style_inline style.formstylecustom").html("");
- }
- $(".jsn-select-color").each(function () {
- var inputParent = $(this).prev();
- $(this).find("div").css("background-color", $(inputParent).val());
- $(this).colpickSetColor($(inputParent).val());
- });
- self.changeStyleInline();
- }';
- $createPrototypeForm[ 'hexToRgb' ] = 'hexToRgb:function (h) {
- var r = parseInt((this.cutHex(h)).substring(0, 2), 16), g = ((this.cutHex(h)).substring(2, 4), 16), b = parseInt((this.cutHex(h)).substring(4, 6), 16)
- return r + "," + b + "," + b;
- }';
- $createPrototypeForm[ 'cutHex' ] = 'cutHex:function (h) {
- return (h.charAt(0) == "#") ? h.substring(1, 7) : h
- }';
- $createPrototypeForm[ 'changeStyleInline' ] = 'changeStyleInline:function () {
- var self = this,
- styleField = ".jsn-master #form-design-content .jsn-element-container .jsn-element .controls input,.jsn-master #form-design-content .jsn-element-container .jsn-element .controls select,.jsn-master #form-design-content .jsn-element-container .jsn-element .controls textarea{\n",
- styleFormElement = ".jsn-master #form-design-content .jsn-element-container .jsn-element {\n",
- styleActive = ".jsn-master #form-design-content .jsn-element-container .jsn-element.ui-state-edit {\n",
- styleTitle = ".jsn-master #form-design-content .jsn-element-container .jsn-element .control-label, #formStyleHelpText .controls label>span {\n";
- $("#style_accordion_content input[type=text],#style_accordion_content input[type=number],#style_accordion_content select").each(function () {
- var dataValue = $(this).attr("data-value");
- var valueInput = $(this).val();
- if (valueInput) {
- if ($(this).attr("type") == "number") {
- if (dataValue == "border") {
- valueInput = valueInput + "px solid";
- } else if (dataValue == "margin") {
- valueInput = valueInput + "px 0px";
- } else {
- valueInput = valueInput + "px";
- }
- }
- var dataType = $(this).attr("data-type");
- switch (dataType) {
- case "jsn-element":
- if (dataValue) {
- var items = dataValue.split(",");
- if (items.length > 1) {
- $.each(items, function (value, key) {
- styleFormElement += key + ":" + valueInput + ";\n";
- });
- } else {
- styleFormElement += items + ":" + valueInput + ";\n";
- }
- }
- break;
- case "ui-state-edit":
- styleActive += dataValue + ":" + valueInput + ";\n";
- break;
- case "control-label":
- styleTitle += dataValue + ":" + valueInput + ";\n";
- break;
- case "field":
- if (dataValue == "background-color") {
- styleField += "background:" + valueInput + ";\n";
- } else if (dataValue == "box-shadow") {
- valueInput = self.hexToRgb(valueInput);
- styleField += "box-shadow:0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 7px 0 rgba(" + valueInput + ", 0.8) inset;\n";
- } else {
- styleField += dataValue + ":" + valueInput + ";\n";
- }
- break;
- }
- }
- });
- styleFormElement += "}\n";
- styleActive += "}\n";
- styleTitle += "}\n";
- styleField += "}\n";
- $(\'#style_accordion_content input[type=radio][name="form_style[help_text_type]"]:checked\').each(function() {
- if ($(this).attr("value") == "tooltip") {
- styleHelpText = ".jsn-master #form-design-content .jsn-element-container .jsn-element .control-label .wr-help-text {\n";
- } else {
- styleHelpText = ".jsn-master #form-design-content .jsn-element-container .jsn-element .control-label .icon-question-sign {\n";
- }
- });
- styleHelpText += "display: none;\n";
- styleHelpText += "}\n";
- $("#style_inline style.formstyle").html(styleFormElement + styleActive + styleTitle + styleField + styleHelpText);
- }';
- $createPrototypeForm[ 'dialogFormStyle' ] = 'dialogFormStyle:function (_this) {
- var self = this;
- var dialog = $("#container-select-style"), parentDialog = $("#container-select-style").parent();
- dialog.width("550");
- // Add overlay to disable other controls
- $("body").append($(\'\'));
- $(dialog).appendTo("body");
- var elmStyle = JSNVisualDesign.getBoxStyle($(dialog)),
- parentStyle = JSNVisualDesign.getBoxStyle($(_this)),
- position = {};
- position.left = parentStyle.offset.left - elmStyle.outerWidth + parentStyle.outerWidth;
- // position.left = parentStyle.offset.left + (parentStyle.outerWidth - elmStyle.outerWidth) / 2;
- position.top = parentStyle.offset.top + parentStyle.outerHeight;
+ $(dialog).find(".arrow").css("left", elmStyle.outerWidth - (parentStyle.outerWidth / 2));
+ dialog.css(position).click(function (e) {
+ e.stopPropagation();
+ });
+ $(".jsn-select-color").each(function () {
+ var inputParent = $(this).prev();
+ var selfColor = this;
+ $(this).find("div").css("background-color", $(inputParent).val());
- $(dialog).find(".arrow").css("left", elmStyle.outerWidth - (parentStyle.outerWidth / 2));
- dialog.css(position).click(function (e) {
- e.stopPropagation();
- });
- $(".jsn-select-color").each(function () {
- var inputParent = $(this).prev();
- var selfColor = this;
- $(this).find("div").css("background-color", $(inputParent).val());
+ $(this).colpick({
+ color:$(inputParent).val(),
+ onChange:function (hsb, hex, rgb) {
+ $(selfColor).prev().val("#" + hex);
+ var idInput = $(selfColor).prev().attr("id");
+ $(selfColor).find("div").css("background-color", "#" + hex);
+ self.changeStyleInline();
+ colorScheme = $("#jform_form_theme").val();
+ var styleTheme = {};
+ $("#style_accordion_content input[type=text],#style_accordion_content input[type=number],#style_accordion_content input[type=radio]:checked,#style_accordion_content select,#style_accordion_content textarea").each(function () {
+ var nameStyle = $(this).attr("name");
+ if (nameStyle) {
+ nameStyle = nameStyle.match(/form_style\[(.*?)\]/);
+ styleTheme[nameStyle[1]] = $(this).val();
+ }
- $(this).colpick({
- color:$(inputParent).val(),
- onChange:function (hsb, hex, rgb) {
- $(selfColor).prev().val("#" + hex);
- var idInput = $(selfColor).prev().attr("id");
- $(selfColor).find("div").css("background-color", "#" + hex);
- self.changeStyleInline();
- colorScheme = $("#jform_form_theme").val();
- var styleTheme = {};
- $("#style_accordion_content input[type=text],#style_accordion_content input[type=number],#style_accordion_content input[type=radio]:checked,#style_accordion_content select,#style_accordion_content textarea").each(function () {
- var nameStyle = $(this).attr("name");
- if (nameStyle) {
- nameStyle = nameStyle.match(/form_style\[(.*?)\]/);
- styleTheme[nameStyle[1]] = $(this).val();
- }
+ $("#option_themes input[name$=\'[themes_style][" + colorScheme.replace("wr-style-", "") + "]\']").val($.toJSON(styleTheme));
+ });
+ }
+ });
+ });
+ $("#style_accordion_content input,#style_accordion_content select,#style_accordion_content textarea").change(function () {
+ self.changeStyleInline();
+ var styleTheme = {};
+ $("#style_accordion_content input[type=text],#style_accordion_content input[type=number],#style_accordion_content input[type=radio]:checked,#style_accordion_content select,#style_accordion_content textarea").each(function () {
+ var nameStyle = $(this).attr("name");
+ if (nameStyle) {
+ nameStyle = nameStyle.match(/form_style\[(.*?)\]/);
+ styleTheme[nameStyle[1]] = $(this).val();
+ }
+ $("#option_themes input[name$=\'[themes_style][" + colorScheme.replace("wr-style-", "") + "]\']").val($.toJSON(styleTheme));
+ });
+ });
- $("#option_themes input[name$=\'[themes_style][" + colorScheme.replace("wr-style-", "") + "]\']").val($.toJSON(styleTheme));
- });
- }
- });
- });
- $("#style_accordion_content input,#style_accordion_content select,#style_accordion_content textarea").change(function () {
- self.changeStyleInline();
- var styleTheme = {};
- $("#style_accordion_content input[type=text],#style_accordion_content input[type=number],#style_accordion_content input[type=radio]:checked,#style_accordion_content select,#style_accordion_content textarea").each(function () {
- var nameStyle = $(this).attr("name");
- if (nameStyle) {
- nameStyle = nameStyle.match(/form_style\[(.*?)\]/);
- styleTheme[nameStyle[1]] = $(this).val();
- }
- $("#option_themes input[name$=\'[themes_style][" + colorScheme.replace("wr-style-", "") + "]\']").val($.toJSON(styleTheme));
- });
- });
+ // Store last form style settings
+ $("#last-form-style").remove();
+ dialog.append(\'\');
+ $("#jform_form_theme option").each(function() {
+ var theme = $(this).attr("value").replace("wr-style-", "");
+ var themeValue = $(\'#option_themes input[name="form_style[themes_style][\' + theme + \']"]\').val();
+ $("#last-form-style").append(
+ $("", {"class":"wr-style-" + theme, "type":"hidden", "value":themeValue, "name":"last_form_style[themes_style][" + theme + "]"})
+ ).append(
+ $("", {"value":theme, "type":"hidden", "name":"last_form_style[themes][]"})
+ );
+ });
+ $("#last-form-style").append(
+ $("", {"value":$("#jform_form_theme").val(), "type":"hidden", "name":"last_form_style[theme]"})
+ ).append(
+ $("", {"value":$(\'input[name="form_style[layout]"]:checked\').attr("value"), "type":"hidden", "name":"last_form_style[layout]"})
+ );
- // Store last form style settings
- $("#last-form-style").remove();
- dialog.append(\'\');
- $("#jform_form_theme option").each(function() {
- var theme = $(this).attr("value").replace("wr-style-", "");
- var themeValue = $(\'#option_themes input[name="form_style[themes_style][\' + theme + \']"]\').val();
- $("#last-form-style").append(
- $("", {"class":"wr-style-" + theme, "type":"hidden", "value":themeValue, "name":"last_form_style[themes_style][" + theme + "]"})
- ).append(
- $("", {"value":theme, "type":"hidden", "name":"last_form_style[themes][]"})
- );
- });
- $("#last-form-style").append(
- $("", {"value":$("#jform_form_theme").val(), "type":"hidden", "name":"last_form_style[theme]"})
- ).append(
- $("", {"value":$(\'input[name="form_style[layout]"]:checked\').attr("value"), "type":"hidden", "name":"last_form_style[layout]"})
- );
+ $(dialog).show();
- $(dialog).show();
+ // Fix bug display Tipsy when open dialog
+ $("#style_accordion_content input[type=radio]").trigger("change");
- // Fix bug display Tipsy when open dialog
- $("#style_accordion_content input[type=radio]").trigger("change");
+ // Fix bug display CodeMirror
+ $("#style_accordion_content a[href=#formCustomCss]").click(function() {
+ $(".CodeMirror").each(function(i, el) {
+ el.CodeMirror.refresh();
+ });
+ });
- // Fix bug display CodeMirror
- $("#style_accordion_content a[href=#formCustomCss]").click(function() {
- $(".CodeMirror").each(function(i, el) {
- el.CodeMirror.refresh();
- });
- });
+ $("#container-select-style .popover").show();
+ $(".jsn-input-number").keypress(function (e) {
+ if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
+ return false;
+ }
+ });
- $("#container-select-style .popover").show();
- $(".jsn-input-number").keypress(function (e) {
- if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
- return false;
- }
- });
+ // Save button
+ $("#save-style-settings").click(function(e) {
+ closeDialog();
+ });
- // Save button
- $("#save-style-settings").click(function(e) {
- 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();
+ });
- // 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(
- $("
", {
- "onclick":"return false;",
- "class":"btn btn-icon save-page"
- }).append(
- $("
", {
- "class":"icon-ok"
- })).click(function () {
- self.saveEditPage();
- return false;
- })).append(
- $("
", {
- "onclick":"return false;",
- "class":"btn btn-icon cancel-page"
- }).append(
- $("
", {
- "class":"icon-remove"
- })).click(function () {
- self.cancelEditPage();
- return false;
- })))
- $(" .edit-page-item .page-input-tmp").focus().bind("keypress", function (e) {
- if (e.keyCode == 13) {
- self.saveEditPage();
- return false;
- }
- if (e.keyCode == 27) {
- self.cancelEditPage();
- }
- });
- }';
- $createPrototypeForm[ 'removePage' ] = 'removePage:function (_this) {
- var self = this;
- var liActive = $(_this).parent().parent().parent();
- var itemRemove = liActive.attr("data-value");
- if (confirm("Are you sure you want to delete page " + liActive.find("h3").text() + " with all fields?")) {
- if ($("ul.jsn-page-list li.page-items").size() > 1) {
- $("ul.jsn-page-list li.page-items").each(function () {
- if ($(this).attr("data-value") == itemRemove) {
- if ($(this).next().attr("data-value")) {
- $("#form-design #form-design-header").attr("data-value", $(this).next().attr("data-value"));
- $("#form-design #form-design-header .page-title h1").html($(this).next().find("input").val());
- $(this).remove();
+ $("#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(
+ $("
", {
+ "onclick":"return false;",
+ "class":"btn btn-icon save-page"
+ }).append(
+ $("
", {
+ "class":"icon-ok"
+ })).click(function () {
+ self.saveEditPage();
+ return false;
+ })).append(
+ $("
", {
+ "onclick":"return false;",
+ "class":"btn btn-icon cancel-page"
+ }).append(
+ $("
", {
+ "class":"icon-remove"
+ })).click(function () {
+ self.cancelEditPage();
+ return false;
+ })))
+ $(" .edit-page-item .page-input-tmp").focus().bind("keypress", function (e) {
+ if (e.keyCode == 13) {
+ self.saveEditPage();
+ return false;
+ }
+ if (e.keyCode == 27) {
+ self.cancelEditPage();
+ }
+ });
+ }';
+ $createPrototypeForm[ 'removePage' ] = 'removePage:function (_this) {
+ var self = this;
+ var liActive = $(_this).parent().parent().parent();
+ var itemRemove = liActive.attr("data-value");
+ if (confirm("Are you sure you want to delete page " + liActive.find("h3").text() + " with all fields?")) {
+ if ($("ul.jsn-page-list li.page-items").size() > 1) {
+ $("ul.jsn-page-list li.page-items").each(function () {
+ if ($(this).attr("data-value") == itemRemove) {
+ if ($(this).next().attr("data-value")) {
+ $("#form-design #form-design-header").attr("data-value", $(this).next().attr("data-value"));
+ $("#form-design #form-design-header .page-title h1").html($(this).next().find("input").val());
+ $(this).remove();
- } else if ($(this).prev().attr("data-value")) {
- $("#form-design #form-design-header").attr("data-value", $(this).prev().attr("data-value"));
- $("#form-design #form-design-header .page-title h1").html($(this).prev().find("input").val());
- $(this).remove();
+ } else if ($(this).prev().attr("data-value")) {
+ $("#form-design #form-design-header").attr("data-value", $(this).prev().attr("data-value"));
+ $("#form-design #form-design-header .page-title h1").html($(this).prev().find("input").val());
+ $(this).remove();
- }
- }
- });
- $("#form-design-content #page-loading").show();
- $("#form-design-content .jsn-column-container ").hide();
- $.ajax({
- type:"POST",
- dataType:"json",
- url:"admin-ajax.php?action=wr_contactform_load_page",
- data:{
- form_id:$("#jform_form_id").val(),
- form_page_name:$("#form-design-header").attr("data-value"),
- form_page_old_name:oldValuePage,
- form_page_old_content:this.visualDesign.serialize()
- },
- success:function (response) {
- self.JSNLayoutCustomizer.renderContainer(response.containerPage);
- self.visualDesign.clearElements();
- if (response.dataField) {
- var dataField = $.evalJSON(response.dataField);
- self.visualDesign.setElements(dataField);
- }
- JSNVisualDesign.savePage();
- $("#form-design-content #page-loading").hide();
- $("#form-design-content .jsn-column-container ").show();
- }
- });
+ }
+ }
+ });
+ $("#form-design-content #page-loading").show();
+ $("#form-design-content .jsn-column-container ").hide();
+ $.ajax({
+ type:"POST",
+ dataType:"json",
+ url:"admin-ajax.php?action=wr_contactform_load_page",
+ data:{
+ form_id:$("#jform_form_id").val(),
+ form_page_name:$("#form-design-header").attr("data-value"),
+ form_page_old_name:oldValuePage,
+ form_page_old_content:this.visualDesign.serialize()
+ },
+ success:function (response) {
+ self.JSNLayoutCustomizer.renderContainer(response.containerPage);
+ self.visualDesign.clearElements();
+ if (response.dataField) {
+ var dataField = $.evalJSON(response.dataField);
+ self.visualDesign.setElements(dataField);
+ }
+ JSNVisualDesign.savePage();
+ $("#form-design-content #page-loading").hide();
+ $("#form-design-content .jsn-column-container ").show();
+ }
+ });
- self.checkPage();
- oldValuePage = $("#form-design-header").attr("data-value");
- }
+ self.checkPage();
+ oldValuePage = $("#form-design-header").attr("data-value");
+ }
- }
- }';
- $createPrototypeForm[ 'cancelEditPage' ] = 'cancelEditPage:function () {
- var editPageItem = $(".edit-page-item");
- editPageItem.find(".page-title").show();
- editPageItem.find(".page-edit-form").hide();
- editPageItem.removeClass("edit-page-item");
- this.checkPage();
+ }
+ }';
+ $createPrototypeForm[ 'cancelEditPage' ] = 'cancelEditPage:function () {
+ var editPageItem = $(".edit-page-item");
+ editPageItem.find(".page-title").show();
+ editPageItem.find(".page-edit-form").hide();
+ editPageItem.removeClass("edit-page-item");
+ this.checkPage();
- }';
- $createPrototypeForm[ 'saveEditPage' ] = 'saveEditPage:function (e) {
- var self = this;
- var inputTmpPage = $(".edit-page-item .page-input-tmp");
- if (inputTmpPage.val() != "") {
- $("ul.jsn-page-list li.page-items input").each(function () {
- if ($(this).attr("data-id") == $("#form-design-header").attr("data-value")) {
- $(this).val(inputTmpPage.val());
- $(this).prev().text(inputTmpPage.val());
- $("#form-design-header .page-title h1").text(inputTmpPage.val());
- }
- });
- JSNVisualDesign.savePage();
- self.cancelEditPage();
- self.checkPage();
- } else {
- $(".page-input-tmp").addClass("error");
- if (e) {
- e.stopPropagation();
- }
- }
- }';
- $createPrototypeForm[ 'loadDefaultPage' ] = 'loadDefaultPage:function (value) {
- var self = this;
- $("ul.jsn-page-list li.page-items").each(function () {
- if ($(this).attr("data-value") == value) {
- var dataValue = $(this).attr("data-value");
- var dataText = $(this).find("input").val();
- $("#form-design-header").attr("data-value", dataValue);
- $("#form-design-header .page-title h1").text(dataText);
- return false;
- }
- });
- self.loadPage("defaultPage");
+ }';
+ $createPrototypeForm[ 'saveEditPage' ] = 'saveEditPage:function (e) {
+ var self = this;
+ var inputTmpPage = $(".edit-page-item .page-input-tmp");
+ if (inputTmpPage.val() != "") {
+ $("ul.jsn-page-list li.page-items input").each(function () {
+ if ($(this).attr("data-id") == $("#form-design-header").attr("data-value")) {
+ $(this).val(inputTmpPage.val());
+ $(this).prev().text(inputTmpPage.val());
+ $("#form-design-header .page-title h1").text(inputTmpPage.val());
+ }
+ });
+ JSNVisualDesign.savePage();
+ self.cancelEditPage();
+ self.checkPage();
+ } else {
+ $(".page-input-tmp").addClass("error");
+ if (e) {
+ e.stopPropagation();
+ }
+ }
+ }';
+ $createPrototypeForm[ 'loadDefaultPage' ] = 'loadDefaultPage:function (value) {
+ var self = this;
+ $("ul.jsn-page-list li.page-items").each(function () {
+ if ($(this).attr("data-value") == value) {
+ var dataValue = $(this).attr("data-value");
+ var dataText = $(this).find("input").val();
+ $("#form-design-header").attr("data-value", dataValue);
+ $("#form-design-header .page-title h1").text(dataText);
+ return false;
+ }
+ });
+ self.loadPage("defaultPage");
- }';
- $createPrototypeForm[ 'nextpaginationPage' ] = 'nextpaginationPage:function () {
- var self = this;
- $("ul.jsn-page-list li.page-items").each(function () {
- if ($(this).attr("data-value") == $("#form-design-header").attr("data-value")) {
- var dataValue = $(this).next().attr("data-value");
- var dataText = $(this).next().find("input").val();
- $("#form-design-header").attr("data-value", dataValue);
- $("#form-design-header .page-title h1").text(dataText);
- return false;
- }
- });
- self.checkPage();
- self.loadPage();
- }';
- $createPrototypeForm[ 'prevpaginationPage' ] = 'prevpaginationPage:function () {
- var self = this;
- $("ul.jsn-page-list li.page-items").each(function () {
- if ($(this).attr("data-value") == $("#form-design-header").attr("data-value")) {
- var dataValue = $(this).prev().attr("data-value");
- var dataText = $(this).prev().find("input").val();
- $("#form-design-header").attr("data-value", dataValue);
- $("#form-design-header .page-title h1").text(dataText);
- }
- });
- self.checkPage();
- self.loadPage();
- }';
- $createPrototypeForm[ 'checkPage' ] = 'checkPage:function () {
- var self = this;
- $("#form-design-header .jsn-page-actions").show();
- var pageItems = $("ul.jsn-page-list li.page-items");
- if (pageItems.size() <= 1) {
- $("#form-design-header a.element-delete").hide();
- $(".form-actions .btn-toolbar .jsn-form-submit").removeClass("hide");
- } else {
- $("#form-design-header a.element-delete").show();
- $(".form-actions .btn-toolbar .jsn-form-submit").addClass("hide");
- }
- pageItems.each(function () {
- if ($(this).attr("data-value") == $("#form-design-header").attr("data-value")) {
- if ($(this).next().attr("data-value")) {
- $(".jsn-page-actions .next-page").removeAttr("disabled");
- $(".form-actions .btn-toolbar .jsn-form-next").removeClass("hide");
- } else {
- $(".jsn-page-actions .next-page").attr("disabled", "disabled");
- $(".form-actions .btn-toolbar .jsn-form-next").addClass("hide");
- }
- if ($(this).prev().attr("data-value")) {
- $(".jsn-page-actions .prev-page").removeAttr("disabled");
- $(".form-actions .btn-toolbar .jsn-form-prev").removeClass("hide");
- } else {
- $(".jsn-page-actions .prev-page").attr("disabled", "disabled");
- $(".form-actions .btn-toolbar .jsn-form-prev").addClass("hide");
- }
- if (!$(this).next().attr("data-value")) {
- $(".form-actions .btn-toolbar .jsn-form-submit").removeClass("hide");
- } else {
- $(".form-actions .btn-toolbar .jsn-form-submit").addClass("hide");
- }
- if ($("#jform_form_state_btn_reset_text").val() == "Yes") {
- $(".form-actions .btn-toolbar .jsn-form-reset").removeClass("hide");
- }
- }
- });
- }';
- $mainContent = array();
- $mainContent = apply_filters( 'wr_contactform_js_form_main_content', $mainContent );
- $createPrototypeForm = apply_filters( 'wr_contactform_js_form_add_proto_type_form', $createPrototypeForm );
- $javascript = '(function ($) {
- $(function () {
- var urlBase = "";
- var colorScheme;
- var siteUrl = "";
+ }';
+ $createPrototypeForm[ 'nextpaginationPage' ] = 'nextpaginationPage:function () {
+ var self = this;
+ $("ul.jsn-page-list li.page-items").each(function () {
+ if ($(this).attr("data-value") == $("#form-design-header").attr("data-value")) {
+ var dataValue = $(this).next().attr("data-value");
+ var dataText = $(this).next().find("input").val();
+ $("#form-design-header").attr("data-value", dataValue);
+ $("#form-design-header .page-title h1").text(dataText);
+ return false;
+ }
+ });
+ self.checkPage();
+ self.loadPage();
+ }';
+ $createPrototypeForm[ 'prevpaginationPage' ] = 'prevpaginationPage:function () {
+ var self = this;
+ $("ul.jsn-page-list li.page-items").each(function () {
+ if ($(this).attr("data-value") == $("#form-design-header").attr("data-value")) {
+ var dataValue = $(this).prev().attr("data-value");
+ var dataText = $(this).prev().find("input").val();
+ $("#form-design-header").attr("data-value", dataValue);
+ $("#form-design-header .page-title h1").text(dataText);
+ }
+ });
+ self.checkPage();
+ self.loadPage();
+ }';
+ $createPrototypeForm[ 'checkPage' ] = 'checkPage:function () {
+ var self = this;
+ $("#form-design-header .jsn-page-actions").show();
+ var pageItems = $("ul.jsn-page-list li.page-items");
+ if (pageItems.size() <= 1) {
+ $("#form-design-header a.element-delete").hide();
+ $(".form-actions .btn-toolbar .jsn-form-submit").removeClass("hide");
+ } else {
+ $("#form-design-header a.element-delete").show();
+ $(".form-actions .btn-toolbar .jsn-form-submit").addClass("hide");
+ }
+ pageItems.each(function () {
+ if ($(this).attr("data-value") == $("#form-design-header").attr("data-value")) {
+ if ($(this).next().attr("data-value")) {
+ $(".jsn-page-actions .next-page").removeAttr("disabled");
+ $(".form-actions .btn-toolbar .jsn-form-next").removeClass("hide");
+ } else {
+ $(".jsn-page-actions .next-page").attr("disabled", "disabled");
+ $(".form-actions .btn-toolbar .jsn-form-next").addClass("hide");
+ }
+ if ($(this).prev().attr("data-value")) {
+ $(".jsn-page-actions .prev-page").removeAttr("disabled");
+ $(".form-actions .btn-toolbar .jsn-form-prev").removeClass("hide");
+ } else {
+ $(".jsn-page-actions .prev-page").attr("disabled", "disabled");
+ $(".form-actions .btn-toolbar .jsn-form-prev").addClass("hide");
+ }
+ if (!$(this).next().attr("data-value")) {
+ $(".form-actions .btn-toolbar .jsn-form-submit").removeClass("hide");
+ } else {
+ $(".form-actions .btn-toolbar .jsn-form-submit").addClass("hide");
+ }
+ if ($("#jform_form_state_btn_reset_text").val() == "Yes") {
+ $(".form-actions .btn-toolbar .jsn-form-reset").removeClass("hide");
+ }
+ }
+ });
+ }';
+ $mainContent = array();
+ $mainContent = apply_filters( 'wr_contactform_js_form_main_content', $mainContent );
+ $createPrototypeForm = apply_filters( 'wr_contactform_js_form_add_proto_type_form', $createPrototypeForm );
+ $javascript = '(function ($) {
+ $(function () {
+ var urlBase = "";
+ var colorScheme;
+ var siteUrl = "";
- function JSNContactformFormView(params) {
- this.params = params;
- this.lang = params.language;
- this.formStyle = params.form_style;
- this.urlAction = params.urlAction;
- this.checkSubmitModal = params.checkSubmitModal;
- this.baseZeroClipBoard = params.baseZeroClipBoard;
- this.pageContent = params.pageContent;
- this.opentArticle = params.opentArticle;
- this.titleForm = params.titleForm;
- urlBase = params.urlBase;
- siteUrl = params.siteUrl;
- this.init();
- }
+ function JSNContactformFormView(params) {
+ this.params = params;
+ this.lang = params.language;
+ this.formStyle = params.form_style;
+ this.urlAction = params.urlAction;
+ this.checkSubmitModal = params.checkSubmitModal;
+ this.baseZeroClipBoard = params.baseZeroClipBoard;
+ this.pageContent = params.pageContent;
+ this.opentArticle = params.opentArticle;
+ this.titleForm = params.titleForm;
+ urlBase = params.urlBase;
+ siteUrl = params.siteUrl;
+ this.init();
+ }
- var oldValuePage = $("#form-design-header").attr("data-value");
- JSNContactformFormView.prototype = {
- ' . implode( ',', $createPrototypeForm ) . '
- }
- $("body").addClass("jsn-master");
- $("#wr_contactform_master").appendTo($("#wr_contactform_form_settings").parent().parent());
- $("#wr_contactform_form_settings").parents("#advanced-sortables").hide();
- $("#slugdiv").parent().remove();
- var params = {};
- params.language = $.evalJSON($("#wr_contactform_languages").val());
+ var oldValuePage = $("#form-design-header").attr("data-value");
+ JSNContactformFormView.prototype = {
+ ' . implode( ',', $createPrototypeForm ) . '
+ }
+ $("body").addClass("jsn-master");
+ $("#wr_contactform_master").appendTo($("#wr_contactform_form_settings").parent().parent());
+ $("#wr_contactform_form_settings").parents("#advanced-sortables").hide();
+ $("#slugdiv").parent().remove();
+ var params = {};
+ params.language = $.evalJSON($("#wr_contactform_languages").val());
- params.form_style = $.evalJSON($("#wr_contactform_formStyle").val());
- params.dataEmailSubmitter = $.evalJSON($("#wr_contactform_dataEmailSubmitter").val());
- params.urlBase = $("#wr_contactform_urlBase").val();
- params.siteUrl = $("#wr_contactform_urlBase").val();
- $("#post-body-content .wr-editor-wrapper").remove();
- $("#wp-admin-bar-view a.ab-item").html("View Form").show();
- $("#screen-meta-links").remove();
- $("#edit-slug-box").remove();
- ' . implode( '', $mainContent ) . '
- if ($("#jform_form_id").val()) {
- $("#titlediv .inside").append(
- $("
", {"class":"contactform-get-shortcode","id":"edit-slug-box"}).append(
- \'
Form short code: [wr_contactform id=\' + $("#jform_form_id").val() + \'] \' +
- \'
Copy to Clipboard\'
- )
- )
- var client = new ZeroClipboard( $("#jsn_contactform_copy_text"), {
- moviePath: params.urlBase+"/wp-content/plugins/wr-contactform/assets/3rd-party/zeroclipboard/ZeroClipboard.swf"
- } );
- client.on("load", function (client) {
- client.on("complete", function (client, args) {
- $("#jsn_contactform_copy_text").html("Done!");
- setTimeout(function(){
- $("#jsn_contactform_copy_text").html("Copy to Clipboard");
- },1800);
- });
- });
- client.on("noFlash", function (client) {
- $(".contactform-get-shortcode").hide();
- alert("Your browser has no Flash.");
- });
- client.on("wrongFlash", function (client, args) {
- $(".contactform-get-shortcode").hide();
- alert("Flash 10.0.0+ is required but you are running Flash " + args.flashVersion.replace(/,/g, "."));
- });
- }
- $(".wr-label-des-tipsy").tipsy({
- gravity:"w",
- fade:true
- });
+ params.form_style = $.evalJSON($("#wr_contactform_formStyle").val());
+ params.dataEmailSubmitter = $.evalJSON($("#wr_contactform_dataEmailSubmitter").val());
+ params.urlBase = $("#wr_contactform_urlBase").val();
+ params.siteUrl = $("#wr_contactform_urlBase").val();
+ $("#post-body-content .wr-editor-wrapper").remove();
+ $("#wp-admin-bar-view a.ab-item").html("View Form").show();
+ $("#screen-meta-links").remove();
+ $("#edit-slug-box").remove();
+ ' . implode( '', $mainContent ) . '
+ if ($("#jform_form_id").val()) {
+ $("#titlediv .inside").append(
+ $("
", {"class":"contactform-get-shortcode","id":"edit-slug-box"}).append(
+ \'
Form short code: [wr_contactform id=\' + $("#jform_form_id").val() + \'] \' +
+ \'
Copy to Clipboard\'
+ )
+ )
+ var client = new ZeroClipboard( $("#jsn_contactform_copy_text"), {
+ moviePath: params.urlBase+"/wp-content/plugins/wr-contactform/assets/3rd-party/zeroclipboard/ZeroClipboard.swf"
+ } );
+ client.on("load", function (client) {
+ client.on("complete", function (client, args) {
+ $("#jsn_contactform_copy_text").html("Done!");
+ setTimeout(function(){
+ $("#jsn_contactform_copy_text").html("Copy to Clipboard");
+ },1800);
+ });
+ });
+ client.on("noFlash", function (client) {
+ $(".contactform-get-shortcode").hide();
+ alert("Your browser has no Flash.");
+ });
+ client.on("wrongFlash", function (client, args) {
+ $(".contactform-get-shortcode").hide();
+ alert("Flash 10.0.0+ is required but you are running Flash " + args.flashVersion.replace(/,/g, "."));
+ });
+ }
+ $(".wr-label-des-tipsy").tipsy({
+ gravity:"w",
+ fade:true
+ });
- if (!$("#jform_form_id").val()) {
- $("#titlediv #title").val($("#jform_form_title").val());
- $("#title-prompt-text").text("");
- }
- new JSNContactformFormView(params);
+ if (!$("#jform_form_id").val()) {
+ $("#titlediv #title").val($("#jform_form_title").val());
+ $("#title-prompt-text").text("");
+ }
+ new JSNContactformFormView(params);
- // Reload iframe to update field list
- $("#wr_contactform_master .jsn-tabs a[href=#form-action]").click(function() {
- JSNVisualDesign.savePage();
- $("#wr-cf-send-to-email-iframe").attr("src", function(e, val) { return val; });
- $("#wr-cf-send-to-responder-iframe").attr("src", function(e, val) { return val; });
- });
+ // Reload iframe to update field list
+ $("#wr_contactform_master .jsn-tabs a[href=#form-action]").click(function() {
+ JSNVisualDesign.savePage();
+ $("#wr-cf-send-to-email-iframe").attr("src", function(e, val) { return val; });
+ $("#wr-cf-send-to-responder-iframe").attr("src", function(e, val) { return val; });
+ });
- // Email notification accordion
- $("#email .wr-cf-panel").each(function() {
- var thisPanel = this;
- $(thisPanel).find(".wr-cf-panel-heading").click(function() {
- if ($(thisPanel).hasClass("active")) {
- $(thisPanel).removeClass("active");
- $(thisPanel).find(".wr-cf-panel-body").slideUp();
- } else {
- $("#email .wr-cf-panel").removeClass("active");
- $("#email .wr-cf-panel .wr-cf-panel-body").slideUp();
- $(thisPanel).addClass("active");
- $(thisPanel).find(".wr-cf-panel-body").slideDown();
- }
- });
- });
- });
- })(jQuery);';
- echo '' . $javascript;
- exit();
- }
+ // Email notification accordion
+ $("#email .wr-cf-panel").each(function() {
+ var thisPanel = this;
+ $(thisPanel).find(".wr-cf-panel-heading").click(function() {
+ if ($(thisPanel).hasClass("active")) {
+ $(thisPanel).removeClass("active");
+ $(thisPanel).find(".wr-cf-panel-body").slideUp();
+ } else {
+ $("#email .wr-cf-panel").removeClass("active");
+ $("#email .wr-cf-panel .wr-cf-panel-body").slideUp();
+ $(thisPanel).addClass("active");
+ $(thisPanel).find(".wr-cf-panel-body").slideDown();
+ }
+ });
+ });
+ });
+ })(jQuery);';
+ echo '' . $javascript;
+ exit();
+ }
}
diff --git a/libraries/gadget/contactform-js-visualdesign-core.php b/libraries/gadget/contactform-js-visualdesign-core.php
index 3d3b54e..571bc4a 100644
--- a/libraries/gadget/contactform-js-visualdesign-core.php
+++ b/libraries/gadget/contactform-js-visualdesign-core.php
@@ -35,7 +35,7 @@ public function default_action() {
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
auth_redirect();
header( 'Content-Type: application/javascript' );
- $addParamsVisualDesign = array( 'newElement' => 'this.newElement = $(\'
\' + lang[\'WR_CONTACTFORM_ADD_FIELD\'] + \'\');' );
+ $addParamsVisualDesign = array( 'newElement' => 'this.newElement = $(\'
\' + lang[\'Add Field\'] + \'\');' );
/* Create Filter add params visual design */
$addParamsVisualDesign = apply_filters( 'wr_contactform_visualdesign_add_params', $addParamsVisualDesign );
$addBoxContent = array();
@@ -583,7 +583,7 @@ className:\'h6\',
increaseFontSize:{ visible:true },
decreaseFontSize:{ visible:true }
},
- html:\'
INITIAL_CONTENT\'
+ html:\'
INITIAL_CONTENT
\'
});
}';
$actionOpenOptionsBox[ 'checkLimitation' ] = 'JSNVisualDesign.checkLimitation();';
@@ -1163,19 +1163,19 @@ className:\'h6\',
}
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] = \'
\';
@@ -1256,13 +1256,13 @@ className:\'h6\',
field[val] = \'
\';
break;
case "vfirst":
- field[val] = \'
\';
+ field[val] = \'
\';
break;
case "vmiddle":
- field[val] = \'
\';
+ field[val] = \'
\';
break;
case "vlast":
- field[val] = \'
\';
+ field[val] = \'
\';
break;
}
});
@@ -1330,60 +1330,60 @@ className:\'h6\',
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\']
+ 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[\'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\']
+ 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[\'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\']
+ dayNames:[lang[\'Sunday\'],
+ lang[\'Monday\'],
+ lang[\'Tuesday\'],
+ lang[\'Wednesday\'],
+ lang[\'Thursday\'],
+ lang[\'Friday\'],
+ lang[\'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\']
+ dayNamesShort:[lang[\'Sun\'],
+ lang[\'Mon\'],
+ lang[\'Tue\'],
+ lang[\'Wed\'],
+ lang[\'Thu\'],
+ lang[\'Fri\'],
+ lang[\'Sat\']
],
- 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\']
+ dayNamesMin:[lang[\'Su\'],
+ lang[\'Mo\'],
+ lang[\'Tu\'],
+ lang[\'We\'],
+ lang[\'Th\'],
+ lang[\'Fr\'],
+ lang[\'Sa\']
],
- weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\']
+ weekHeader:lang[\'Wk\']
}).removeClass("jsn-input-xxlarge-fluid input-small input-medium").addClass("input-medium");
if (dateValue) {
$("#option-dateValue-text").datetimepicker(\'setDate\', dateValue);
@@ -1400,60 +1400,60 @@ className:\'h6\',
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\']
+ 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[\'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\']
+ 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[\'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\']
+ dayNames:[lang[\'Sunday\'],
+ lang[\'Monday\'],
+ lang[\'Tuesday\'],
+ lang[\'Wednesday\'],
+ lang[\'Thursday\'],
+ lang[\'Friday\'],
+ lang[\'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\']
+ dayNamesShort:[lang[\'Sun\'],
+ lang[\'Mon\'],
+ lang[\'Tue\'],
+ lang[\'Wed\'],
+ lang[\'Thu\'],
+ lang[\'Fri\'],
+ lang[\'Sat\']
],
- 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\']
+ dayNamesMin:[lang[\'Su\'],
+ lang[\'Mo\'],
+ lang[\'Tu\'],
+ lang[\'We\'],
+ lang[\'Th\'],
+ lang[\'Fr\'],
+ lang[\'Sa\']
],
- weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\']
+ weekHeader:lang[\'Wk\']
}).removeClass("jsn-input-xxlarge-fluid input-small input-medium").addClass("input-small");
if (dateValue) {
$("#option-dateValue-text").timepicker(\'setTime\', dateValue);
@@ -1478,60 +1478,60 @@ className:\'h6\',
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\']
+ 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[\'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\']
+ 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[\'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\']
+ dayNames:[lang[\'Sunday\'],
+ lang[\'Monday\'],
+ lang[\'Tuesday\'],
+ lang[\'Wednesday\'],
+ lang[\'Thursday\'],
+ lang[\'Friday\'],
+ lang[\'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\']
+ dayNamesShort:[lang[\'Sun\'],
+ lang[\'Mon\'],
+ lang[\'Tue\'],
+ lang[\'Wed\'],
+ lang[\'Thu\'],
+ lang[\'Fri\'],
+ lang[\'Sat\']
],
- 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\']
+ dayNamesMin:[lang[\'Su\'],
+ lang[\'Mo\'],
+ lang[\'Tu\'],
+ lang[\'We\'],
+ lang[\'Th\'],
+ lang[\'Fr\'],
+ lang[\'Sa\']
],
- weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\']
+ weekHeader:lang[\'Wk\']
}).removeClass("jsn-input-xxlarge-fluid input-small input-medium").addClass("input-small");
if (dateValue) {
$("#option-dateValue-text").datepicker(\'setDate\', dateValue);
@@ -1565,60 +1565,60 @@ className:\'h6\',
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\']
+ 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[\'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\']
+ 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[\'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\']
+ dayNames:[lang[\'Sunday\'],
+ lang[\'Monday\'],
+ lang[\'Tuesday\'],
+ lang[\'Wednesday\'],
+ lang[\'Thursday\'],
+ lang[\'Friday\'],
+ lang[\'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\']
+ dayNamesShort:[lang[\'Sun\'],
+ lang[\'Mon\'],
+ lang[\'Tue\'],
+ lang[\'Wed\'],
+ lang[\'Thu\'],
+ lang[\'Fri\'],
+ lang[\'Sat\']
],
- 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\']
+ dayNamesMin:[lang[\'Su\'],
+ lang[\'Mo\'],
+ lang[\'Tu\'],
+ lang[\'We\'],
+ lang[\'Th\'],
+ lang[\'Fr\'],
+ lang[\'Sa\']
],
- weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\']
+ weekHeader:lang[\'Wk\']
});
} else {
$(this).datepicker({
@@ -1628,60 +1628,60 @@ className:\'h6\',
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\']
+ 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[\'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\']
+ 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[\'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\']
+ dayNames:[lang[\'Sunday\'],
+ lang[\'Monday\'],
+ lang[\'Tuesday\'],
+ lang[\'Wednesday\'],
+ lang[\'Thursday\'],
+ lang[\'Friday\'],
+ lang[\'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\']
+ dayNamesShort:[lang[\'Sun\'],
+ lang[\'Mon\'],
+ lang[\'Tue\'],
+ lang[\'Wed\'],
+ lang[\'Thu\'],
+ lang[\'Fri\'],
+ lang[\'Sat\']
],
- 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\']
+ dayNamesMin:[lang[\'Su\'],
+ lang[\'Mo\'],
+ lang[\'Tu\'],
+ lang[\'We\'],
+ lang[\'Th\'],
+ lang[\'Fr\'],
+ lang[\'Sa\']
],
- weekHeader:lang[\'WR_CONTACTFORM_DATE_DAY_WEEK_HEADER\']
+ weekHeader:lang[\'Wk\']
});
}
$("button.ui-datepicker-trigger").addClass("btn btn-icon").html($("
", {
diff --git a/libraries/gadget/controls/address.php b/libraries/gadget/controls/address.php
index 3713b9e..6144f21 100644
--- a/libraries/gadget/controls/address.php
+++ b/libraries/gadget/controls/address.php
@@ -86,12 +86,12 @@ public static function register() {
'vstreetAddress' => array(
'field' => 'address',
'type' => 'checkbox',
- 'label' => __( 'STREET_ADDRESS', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Street Address', WR_CONTACTFORM_TEXTDOMAIN )
),
'vstreetAddress2' => array(
'field' => 'address',
'type' => 'checkbox',
- 'label' => __( 'ADDRESS_LINE_2', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Address Line 2', WR_CONTACTFORM_TEXTDOMAIN )
),
'vcity' => array(
'field' => 'address',
@@ -101,17 +101,17 @@ public static function register() {
'vstate' => array(
'field' => 'address',
'type' => 'checkbox',
- 'label' => __( 'STATE_PROVINCE_REGION', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'State/Province/Region', WR_CONTACTFORM_TEXTDOMAIN )
),
'vcode' => array(
'field' => 'address',
'type' => 'checkbox',
- 'label' => __( 'POSTAL_ZIP_CODE', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Postal/Zip code', WR_CONTACTFORM_TEXTDOMAIN )
),
'vcountry' => array(
'field' => 'address',
'type' => 'checkbox',
- 'label' => __( 'COUNTRY', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Country', WR_CONTACTFORM_TEXTDOMAIN )
),
'sortableField' => array(
'type' => 'hidden'
@@ -120,7 +120,7 @@ public static function register() {
),
),
),
- 'tmpl' => '
{{if vstreetAddress}}
{{/if}}{{if vstreetAddress2}}
{{/if}}{{if vcity || vstate}}
{{/if}} {{if vcode || vcountry}}
{{if vcode}}
{{/if}}{{if vcountry}}
{{/if}}
{{/if}}
'
+ 'tmpl' => '
{{if vstreetAddress}}
{{/if}}{{if vstreetAddress2}}
{{/if}}{{if vcity || vstate}}
{{/if}} {{if vcode || vcountry}}
{{if vcode}}
{{/if}}{{if vcountry}}
{{/if}}
{{/if}}
'
);
return 'JSNVisualDesign.register("' . $identify . '", ' . json_encode($options) . ');';
diff --git a/libraries/gadget/controls/checkboxes.php b/libraries/gadget/controls/checkboxes.php
index ceb4419..4e51240 100644
--- a/libraries/gadget/controls/checkboxes.php
+++ b/libraries/gadget/controls/checkboxes.php
@@ -114,7 +114,7 @@ public static function register() {
'allowOther' => array(
'type' => 'checkbox',
'field' => 'allowOther',
- 'label' => __( 'Allow user’s choice', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Allow user\'s choice', WR_CONTACTFORM_TEXTDOMAIN )
),
'labelOthers' => array(
'type' => '_text',
diff --git a/libraries/gadget/controls/choices.php b/libraries/gadget/controls/choices.php
index e736a26..6893200 100644
--- a/libraries/gadget/controls/choices.php
+++ b/libraries/gadget/controls/choices.php
@@ -113,7 +113,7 @@ public static function register() {
'allowOther' => array(
'type' => 'checkbox',
'field' => 'allowOther',
- 'label' => __( 'Allow user’s choice', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Allow user\'s choice', WR_CONTACTFORM_TEXTDOMAIN )
),
'labelOthers' => array(
'type' => '_text',
diff --git a/libraries/gadget/controls/dropdown.php b/libraries/gadget/controls/dropdown.php
index 7cd378b..60246f0 100644
--- a/libraries/gadget/controls/dropdown.php
+++ b/libraries/gadget/controls/dropdown.php
@@ -117,7 +117,7 @@ public static function register() {
'allowOther' => array(
'type' => 'checkbox',
'field' => 'allowOther',
- 'label' => __( 'Allow user’s choice', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Allow user\'s choice', WR_CONTACTFORM_TEXTDOMAIN )
),
'labelOthers' => array(
'type' => '_text',
diff --git a/libraries/gadget/controls/name.php b/libraries/gadget/controls/name.php
index e2d9a9d..7629ebe 100644
--- a/libraries/gadget/controls/name.php
+++ b/libraries/gadget/controls/name.php
@@ -139,22 +139,22 @@ public static function register() {
'vtitle' => array(
'field' => 'name',
'type' => 'checkbox',
- 'label' => __( 'TITLES', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Titles', WR_CONTACTFORM_TEXTDOMAIN )
),
'vfirst' => array(
'field' => 'name',
'type' => 'checkbox',
- 'label' => __( 'FIRST', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'First', WR_CONTACTFORM_TEXTDOMAIN )
),
'vmiddle' => array(
'field' => 'name',
'type' => 'checkbox',
- 'label' => __( 'MIDDLE', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Last', WR_CONTACTFORM_TEXTDOMAIN )
),
'vlast' => array(
'field' => 'name',
'type' => 'checkbox',
- 'label' => __( 'LAST', WR_CONTACTFORM_TEXTDOMAIN )
+ 'label' => __( 'Last', WR_CONTACTFORM_TEXTDOMAIN )
),
'sortableField' => array(
'type' => 'hidden'
@@ -163,7 +163,7 @@ public static function register() {
)
)
),
- 'tmpl' => '
'
+ 'tmpl' => '
'
);
return 'JSNVisualDesign.register("' . $identify . '", ' . json_encode($options) . ');';
diff --git a/libraries/gadget/tmpl/email-settings/default.php b/libraries/gadget/tmpl/email-settings/default.php
index 6232c10..e03f513 100644
--- a/libraries/gadget/tmpl/email-settings/default.php
+++ b/libraries/gadget/tmpl/email-settings/default.php
@@ -15,12 +15,12 @@
'No email field found',
'Select Field',
'Select Fields',
- 'WR_CONTACTFORM_PLACEHOLDER_EMAIL_FROM_0',
- 'WR_CONTACTFORM_PLACEHOLDER_EMAIL_REPLY_TO_0',
- 'WR_CONTACTFORM_PLACEHOLDER_EMAIL_SUBJECT_0',
- 'WR_CONTACTFORM_PLACEHOLDER_EMAIL_FROM_1',
- 'WR_CONTACTFORM_PLACEHOLDER_EMAIL_REPLY_TO_1',
- 'WR_CONTACTFORM_PLACEHOLDER_EMAIL_SUBJECT_1',
+ 'e.g. Customer Department',
+ 'e.g. support@yourdomain.com',
+ 'e.g. Thank you for contacting us',
+ 'Click the button on the right to select the form field identifying submitter name',
+ 'Click the button on the right to select the form field identifying submitter email',
+ 'e.g. Contact inquiry',
);
$languages = WR_Contactform_Helpers_Contactform::get_translated( $arrayTranslated );
?>
diff --git a/libraries/languages/wr-contactform-en_US.mo b/libraries/languages/wr-contactform-en_US.mo
index bfdf47d..9f5a9d1 100644
Binary files a/libraries/languages/wr-contactform-en_US.mo and b/libraries/languages/wr-contactform-en_US.mo differ
diff --git a/libraries/languages/wr-contactform-en_US.po b/libraries/languages/wr-contactform-en_US.po
index 2728229..f0a9cfa 100644
--- a/libraries/languages/wr-contactform-en_US.po
+++ b/libraries/languages/wr-contactform-en_US.po
@@ -493,7 +493,7 @@ msgstr "Select Field"
msgid "Select Email Field"
msgstr "Select Email Field"
-msgid "WR_CONTACTFORM_ADD_FIELD"
+msgid "Add Field"
msgstr "Add Field"
msgid "Captcha Integration"
@@ -601,8 +601,8 @@ msgstr "Form Style"
msgid "Select style to apply to the form."
msgstr "Select style to apply to the form."
-msgid "Allow user’s choice"
-msgstr "Allow user’s choice"
+msgid "Allow user's choice"
+msgstr "Allow user's choice"
msgid "Set the first item as placeholder"
msgstr "Set the first item as placeholder"
@@ -778,22 +778,22 @@ msgid "Access Configuration "
msgstr "Access Configuration"
# PLACEHOLDER form
-msgid "WR_CONTACTFORM_PLACEHOLDER_EMAIL_FROM_1"
+msgid "Click the button on the right to select the form field identifying submitter name"
msgstr "Click the button on the right to select the form field identifying submitter's name"
-msgid "WR_CONTACTFORM_PLACEHOLDER_EMAIL_REPLY_TO_1"
+msgid "Click the button on the right to select the form field identifying submitter email"
msgstr "Click the button on the right to select the form field identifying submitter's email"
-msgid "WR_CONTACTFORM_PLACEHOLDER_EMAIL_SUBJECT_1"
+msgid "e.g. Contact inquiry"
msgstr "e.g. Contact inquiry"
-msgid "WR_CONTACTFORM_PLACEHOLDER_EMAIL_FROM_0"
+msgid "e.g. Customer Department"
msgstr "e.g. Customer Department"
-msgid "WR_CONTACTFORM_PLACEHOLDER_EMAIL_REPLY_TO_0"
+msgid "e.g. support@yourdomain.com"
msgstr "e.g. support@yourdomain.com"
-msgid "WR_CONTACTFORM_PLACEHOLDER_EMAIL_SUBJECT_0"
+msgid "e.g. Thank you for contacting us"
msgstr "e.g. Thank you for contacting us"
msgid "Enter your email message"
@@ -1001,13 +1001,13 @@ msgstr "Vote on JED"
msgid "WR_GENERAL_KEEP_IN_TOUCH"
msgstr "Follow us"
-msgid "WR_GENERAL_UPGRADE_TO_PRO"
+msgid "Upgrade to pro"
msgstr "Upgrade to pro"
-msgid "WR_VIEW_UPDATE_AVAILALBE"
+msgid "Updates are available."
msgstr "Updates are available."
-msgid "WR_GENERAL_UPDATE_NOW"
+msgid "Update Now"
msgstr "Update Now"
# task view select form
@@ -1017,7 +1017,7 @@ msgstr "Form: "
msgid "WR_CONTACTFORM_MODULE_LIST_FORM_DES"
msgstr "WR ContactForm - Select Form"
-msgid "WR_CONTACTFORM_SELECT_FORM"
+msgid "Select Form"
msgstr "Select Form"
msgid "WR_CONTACTFORM_MODULE_DES"
@@ -1044,10 +1044,10 @@ msgstr "See all forms"
msgid "WR_CONTACTFORM_YOU_MUST_SELECT_SOME_FORM"
msgstr "You must select some form to edit"
-msgid "WR_CONTACTFORM_FIELD_TITLE_FORM_WARNING"
+msgid "Form is not defined"
msgstr "Form is not defined"
-msgid "WR_CONTACTFORM_FIELD_DES_FORM_WARNING"
+msgid "You must select some form. You can create one by clicking icon Plus on the right."
msgstr "You must select some form. You can create one by clicking icon 'Plus' on the right."
# configuration data
@@ -1096,10 +1096,10 @@ msgstr "Sample data is successfully installed"
msgid "WR_DATA_SAMPLE_INSTALL_SUCCESS_MESSAGE"
msgstr "Congratulations, now you can operate on sample Form"
-msgid "WR_GENERAL_UPGRADE_TO_PRO_UNLIMITED"
+msgid "Upgrade to PRO UNLIMITED"
msgstr "Upgrade to PRO UNLIMITED"
-msgid "WR_EXTFW_CONFIG_BACKUP_SUCCESS"
+msgid "Backup data successfully"
msgstr "Backup data successfully"
# About
@@ -1190,44 +1190,44 @@ msgstr "
Dedicated Helpdesk System is for developers who bought PRO UNLIMITED
msgid "WR_CONTACTFORM_HELP_BUY_PRO_STANDARD_EDITION"
msgstr "Buy PRO STANDARD edition"
-msgid "WR_CONTACTFORM_HELP_BUY_PRO_UNLIMITED_EDITION"
+msgid "Buy PRO UNLIMITED edition"
msgstr "Buy PRO UNLIMITED edition"
-msgid "WR_CONTACTFORM_HELP_UPGRADE_TO_PRO_UNLIMITED_EDITION"
+msgid "Upgrade to PRO UNLIMITED edition"
msgstr "Upgrade to PRO UNLIMITED edition"
-msgid "WR_CONTACTFORM_HELP_WATCH_QUICK_START_VIDEO"
+msgid "Watch Quick Start Video"
msgstr "Watch Quick Start Video"
# placeholder controls
-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 "Last"
msgstr "Middle"
-msgid "LAST"
+msgid "Last"
msgstr "Last"
-msgid "COUNTRY"
+msgid "Country"
msgstr "Country"
-msgid "TITLES"
+msgid "Titles"
msgstr "Titles"
# date time
@@ -1240,151 +1240,151 @@ 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"
# Container
@@ -1394,38 +1394,38 @@ msgstr "Move Up"
msgid "WR_CONTACTFORM_MOVE_DOWN_CONTAINER"
msgstr "Move Down"
-msgid "WR_CONTACTFORM_ADD_CONTAINER_COLUMN"
+msgid "Add Column"
msgstr "Add Column"
-msgid "WR_CONTACTFORM_DELETE_CONTAINER"
+msgid "Delete Container"
msgstr "Delete Container"
-msgid "WR_CONTACTFORM_DELETE_CONTAINER_COLUMN"
+msgid "Delete Column"
msgstr "Delete Column"
-msgid "WR_CONTACTFORM_CONFIRM_DELETE_CONTAINER"
+msgid "Are you sure you want to delete the whole row including all elements it contains?"
msgstr "Are you sure you want to delete the whole row including all elements it contains?"
-msgid "WR_CONTACTFORM_CONFIRM_DELETE_CONTAINER_COLUMN"
+msgid "Are you sure you want to delete the whole column including all elements it contains?"
msgstr "Are you sure you want to delete the whole column including all elements it contains?"
msgid "WR_CONTACTFORM_BUTTONS"
msgstr "Buttons"
-msgid "WR_CONTACTFORM_BUTTON_POSITION"
+msgid "Button Position"
msgstr "Button Position"
-msgid "WR_CONTACTFORM_ADD_CONTAINER"
+msgid "Add Container"
msgstr "Add Container"
# Custom Css
msgid "WR_CONTACTFORM_CUSTOM_CSS"
msgstr "CSS"
-msgid "WR_CONTACTFORM_SAVE_SUBMISSIONS"
+msgid "Save Submissions"
msgstr "Save Submissions"
-msgid "WR_CONTACTFORM_SAVE_SUBMISSIONS_DES"
+msgid "Select Yes if you want to save submissions to database for later utilization."
msgstr "Select 'Yes' if you want to save submissions to database for later utilization."
msgid "WR_CONTACTFORM_SHOW_FORM_TITLE"
@@ -1445,3 +1445,90 @@ msgstr "Show Submission Data Detail"
msgid "WR_CONTACTFORM_SHOW_SUBMISSION_DATA_DETAIL_DES"
msgstr "Show Submission Data Detail"
+
+msgid "Thank you for installing WR Contact Form from WooRockets Team! We are making new hi-quality themes and plugins for you ;) Follow us on Twitter or Subscribe to our email list and be the first to get updated."
+msgstr "Thank you for installing WR Contact Form from WooRockets Team! We are making new hi-quality themes and plugins for you ;) Follow us on Twitter or Subscribe to our email list and be the first to get updated."
+
+msgid "About WR Contact Form"
+msgstr "About WR Contact Form"
+
+msgid "You would never find any other easier WordPress Contact Form builder than WR ContactForm. This free user-oriented form creator with drag-and-drop interface makes the job easier than ever. You will no longer have to worry about writing code or learning any new skill"
+msgstr "You would never find any other easier WordPress Contact Form builder than WR ContactForm. This free user-oriented form creator with drag-and-drop interface makes the job easier than ever. You will no longer have to worry about writing code or learning any new skill"
+
+msgid "Current version"
+msgstr "Current version"
+
+msgid "Change log"
+msgstr "Change log"
+
+msgid "Follow us to get latest updates"
+msgstr "Follow us to get latest updates"
+
+msgid "Follow"
+msgstr "Follow"
+
+msgid "Join our mailing list"
+msgstr "Join our mailing list"
+
+msgid "Receive the latest updates about WR Contact Form as well as all the best news from WooRockets"
+msgstr "Receive the latest updates about WR Contact Form as well as all the best news from WooRockets"
+
+msgid "Documentation"
+msgstr "Documentation"
+
+msgid "Detailed construction of how to use WR Contact Form"
+msgstr "Detailed construction of how to use WR Contact Form"
+
+msgid "Hot Features"
+msgstr "Hot Features"
+
+msgid "Drag and drop"
+msgstr "Drag and drop"
+
+msgid "You can save a lot of time with intuitive drag and drop operations. This can be used in many processes when working with WR Contact Form."
+msgstr "You can save a lot of time with intuitive drag and drop operations. This can be used in many processes when working with WR Contact Form."
+
+msgid "Prevent Spam"
+msgstr "Prevent Spam"
+
+msgid "To protect your website from spam, the Captcha function should be used. The system will require users to fill in the CAPTCHA to protect forms from spam and abuse."
+msgstr "To protect your website from spam, the Captcha function should be used. The system will require users to fill in the CAPTCHA to protect forms from spam and abuse."
+
+msgid "Multiple forms"
+msgstr "Multiple forms"
+
+msgid "You can create as many forms as you want. In a single form you can also choose the most suitable fields for your form."
+msgstr "You can create as many forms as you want. In a single form you can also choose the most suitable fields for your form."
+
+msgid "GET INVOLVED"
+msgstr "GET INVOLVED"
+
+msgid "Rate WR Contact Form"
+msgstr "Rate WR Contact Form"
+
+msgid "Share your thoughts of WR Contact Form with other WordPress folks. Next versions of WR Contact Form will be improved basing on your opinions."
+msgstr "Share your thoughts of WR Contact Form with other WordPress folks. Next versions of WR Contact Form will be improved basing on your opinions."
+
+msgid "Submit your Website"
+msgstr "Submit your Website"
+
+msgid "Share your website using WR Contact Form with us. We can include it in our showcase collection and have it exposed to thousands of WooRockets's website visitors."
+msgstr "Share your website using WR Contact Form with us. We can include it in our showcase collection and have it exposed to thousands of WooRockets's website visitors."
+
+msgid "Review"
+msgstr "Review"
+
+msgid "Learn more from OUR BLOG"
+msgstr "Learn more from OUR BLOG"
+
+msgid "Follow our blog for latest news, tutorials & interviews about WooComerce & WordPress"
+msgstr "Follow our blog for latest news, tutorials & interviews about WooComerce & WordPress"
+
+msgid "SEE OUR OTHER AWESOMENESS"
+msgstr "SEE OUR OTHER AWESOMENESS"
+
+msgid "Freebies download"
+msgstr "Freebies download"
+
+msgid "Corsa theme"
+msgstr "Corsa theme"
diff --git a/main.php b/main.php
index 7cd9fc9..833846a 100644
--- a/main.php
+++ b/main.php
@@ -3,7 +3,7 @@
* Plugin Name: WR ContactForm
* Plugin URI: http://woorockets.com
* Description: Super easy form builder bringing to your Wordpress website contact form, survey and much more.
- * Version: 1.1.7
+ * Version: 1.1.8
* Author: WooRockets Team
* Author URI: http://woorockets.com
* License: GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html