Version Description
Download this release
Release Info
Developer | sswells |
Plugin | Formidable Forms – Form Builder for WordPress |
Version | 2.0rc9 |
Comparing to | |
See all releases |
Code changes from version 2.0rc8 to 2.0rc9
- classes/controllers/FrmAppController.php +1 -0
- classes/controllers/FrmEntriesController.php +2 -2
- classes/controllers/FrmFormsController.php +1 -1
- classes/helpers/FrmAppHelper.php +2 -1
- classes/helpers/FrmEntriesListHelper.php +3 -3
- classes/helpers/FrmFieldsHelper.php +5 -20
- classes/helpers/FrmFormActionsHelper.php +1 -5
- classes/helpers/FrmXMLHelper.php +5 -5
- classes/models/FrmDb.php +11 -3
- classes/models/FrmEntry.php +6 -2
- classes/models/FrmField.php +8 -5
- classes/models/FrmStyle.php +7 -7
- classes/views/frm-settings/license_box.php +2 -2
- classes/views/styles/_field-labels.php +1 -1
- classes/views/styles/show.php +1 -27
- css/_single_theme.css.php +6 -1
- css/custom_theme.css.php +4 -8
- css/frm_admin.css +8 -6
- formidable.php +1 -1
- images/styler/marker.png +0 -0
- images/styler/mask.png +0 -0
- images/styler/wheel.png +0 -0
- js/formidable.min.js +51 -50
- js/formidable_admin.js +23 -8
- languages/formidable-da_DK.mo +0 -0
- languages/formidable-da_DK.po +5968 -0
- readme.txt +1 -1
classes/controllers/FrmAppController.php
CHANGED
@@ -303,6 +303,7 @@ class FrmAppController {
|
|
303 |
'confirm' => __( 'Are you sure?', 'formidable' ),
|
304 |
'conf_delete' => __( 'Are you sure you want to delete this field and all data associated with it?', 'formidable' ),
|
305 |
'conf_delete_sec' => __( 'WARNING: This will delete all fields inside of the section as well.', 'formidable' ),
|
|
|
306 |
'default_unique' => $frm_settings->unique_msg,
|
307 |
'default_conf' => __( 'The entered values do not match', 'formidable' ),
|
308 |
'enter_email' => __( 'Enter Email', 'formidable' ),
|
303 |
'confirm' => __( 'Are you sure?', 'formidable' ),
|
304 |
'conf_delete' => __( 'Are you sure you want to delete this field and all data associated with it?', 'formidable' ),
|
305 |
'conf_delete_sec' => __( 'WARNING: This will delete all fields inside of the section as well.', 'formidable' ),
|
306 |
+
'conf_no_repeat' => __( 'Warning: If you have entries with multiple rows, all but the first row will be lost.', 'formidable' ),
|
307 |
'default_unique' => $frm_settings->unique_msg,
|
308 |
'default_conf' => __( 'The entered values do not match', 'formidable' ),
|
309 |
'enter_email' => __( 'Enter Email', 'formidable' ),
|
classes/controllers/FrmEntriesController.php
CHANGED
@@ -86,7 +86,7 @@ class FrmEntriesController {
|
|
86 |
}
|
87 |
|
88 |
if ( $form_col->type == 'form' && isset( $form_col->field_options['form_select'] ) && ! empty( $form_col->field_options['form_select'] ) ) {
|
89 |
-
|
90 |
|
91 |
if ( $sub_form_cols ) {
|
92 |
foreach ( $sub_form_cols as $k => $sub_form_col ) {
|
@@ -203,7 +203,7 @@ class FrmEntriesController {
|
|
203 |
public static function sortable_columns() {
|
204 |
$form_id = FrmEntriesHelper::get_current_form_id();
|
205 |
|
206 |
-
|
207 |
|
208 |
$columns = array(
|
209 |
$form_id .'_id' => 'id',
|
86 |
}
|
87 |
|
88 |
if ( $form_col->type == 'form' && isset( $form_col->field_options['form_select'] ) && ! empty( $form_col->field_options['form_select'] ) ) {
|
89 |
+
$sub_form_cols = FrmField::get_all_for_form( $form_col->field_options['form_select'] );
|
90 |
|
91 |
if ( $sub_form_cols ) {
|
92 |
foreach ( $sub_form_cols as $k => $sub_form_col ) {
|
203 |
public static function sortable_columns() {
|
204 |
$form_id = FrmEntriesHelper::get_current_form_id();
|
205 |
|
206 |
+
$fields = FrmField::get_all_for_form( $form_id );
|
207 |
|
208 |
$columns = array(
|
209 |
$form_id .'_id' => 'id',
|
classes/controllers/FrmFormsController.php
CHANGED
@@ -562,7 +562,7 @@ class FrmFormsController {
|
|
562 |
FrmFormsHelper::auto_add_end_section_fields( $form, $fields, $reset_fields );
|
563 |
|
564 |
if ( $reset_fields ) {
|
565 |
-
$fields = FrmField::get_all_for_form($form->id);
|
566 |
}
|
567 |
|
568 |
unset($end_section_values, $last_order, $open, $reset_fields);
|
562 |
FrmFormsHelper::auto_add_end_section_fields( $form, $fields, $reset_fields );
|
563 |
|
564 |
if ( $reset_fields ) {
|
565 |
+
$fields = FrmField::get_all_for_form( $form->id, '', 'exclude' );
|
566 |
}
|
567 |
|
568 |
unset($end_section_values, $last_order, $open, $reset_fields);
|
classes/helpers/FrmAppHelper.php
CHANGED
@@ -10,7 +10,7 @@ class FrmAppHelper {
|
|
10 |
/**
|
11 |
* @since 2.0
|
12 |
*/
|
13 |
-
public static $plug_version = '2.
|
14 |
|
15 |
/**
|
16 |
* @since 1.07.02
|
@@ -84,6 +84,7 @@ class FrmAppHelper {
|
|
84 |
* @since 2.0
|
85 |
*/
|
86 |
public static function update_message($features, $class = '') {
|
|
|
87 |
if ( ! self::pro_is_installed() ) {
|
88 |
include(self::plugin_path() .'/classes/views/shared/update_message.php');
|
89 |
}
|
10 |
/**
|
11 |
* @since 2.0
|
12 |
*/
|
13 |
+
public static $plug_version = '2.0rc9';
|
14 |
|
15 |
/**
|
16 |
* @since 1.07.02
|
84 |
* @since 2.0
|
85 |
*/
|
86 |
public static function update_message($features, $class = '') {
|
87 |
+
return; // hide the upgrade messages for now
|
88 |
if ( ! self::pro_is_installed() ) {
|
89 |
include(self::plugin_path() .'/classes/views/shared/update_message.php');
|
90 |
}
|
classes/helpers/FrmEntriesListHelper.php
CHANGED
@@ -29,14 +29,14 @@ class FrmEntriesListHelper extends FrmListHelper {
|
|
29 |
$s_query = FrmProEntriesHelper::get_search_str( $s_query, $s, $form_id, $fid);
|
30 |
}
|
31 |
|
32 |
-
$orderby = isset( $_REQUEST['orderby'] ) ?
|
33 |
if ( strpos($orderby, 'meta') !== false ) {
|
34 |
$order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) );
|
35 |
$orderby .= in_array( $order_field_type, array( 'number', 'scale') ) ? ' +0 ' : '';
|
36 |
}
|
37 |
|
38 |
-
$order = isset( $_REQUEST['order'] ) ? $_REQUEST['order'] : $default_order;
|
39 |
-
|
40 |
|
41 |
$page = $this->get_pagenum();
|
42 |
$start = (int) isset( $_REQUEST['start'] ) ? absint( $_REQUEST['start'] ) : ( ( $page - 1 ) * $per_page );
|
29 |
$s_query = FrmProEntriesHelper::get_search_str( $s_query, $s, $form_id, $fid);
|
30 |
}
|
31 |
|
32 |
+
$orderby = isset( $_REQUEST['orderby'] ) ? sanitize_title( $_REQUEST['orderby'] ) : $default_orderby;
|
33 |
if ( strpos($orderby, 'meta') !== false ) {
|
34 |
$order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) );
|
35 |
$orderby .= in_array( $order_field_type, array( 'number', 'scale') ) ? ' +0 ' : '';
|
36 |
}
|
37 |
|
38 |
+
$order = isset( $_REQUEST['order'] ) ? sanitize_title( $_REQUEST['order'] ) : $default_order;
|
39 |
+
$order = ' ORDER BY ' . $orderby . ' ' . $order;
|
40 |
|
41 |
$page = $this->get_pagenum();
|
42 |
$start = (int) isset( $_REQUEST['start'] ) ? absint( $_REQUEST['start'] ) : ( ( $page - 1 ) * $per_page );
|
classes/helpers/FrmFieldsHelper.php
CHANGED
@@ -23,17 +23,10 @@ class FrmFieldsHelper {
|
|
23 |
public static function pro_field_selection() {
|
24 |
return apply_filters('frm_pro_available_fields', array(
|
25 |
'end_divider' => array(
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
'divider' =>
|
30 |
-
'name' => __( 'Section', 'formidable' ),
|
31 |
-
'types' => array(
|
32 |
-
'' => __( 'Heading', 'formidable' ),
|
33 |
-
'slide' => __( 'Collapsible', 'formidable' ),
|
34 |
-
'repeat' => __( 'Repeatable', 'formidable' ),
|
35 |
-
),
|
36 |
-
),
|
37 |
'break' => __( 'Page Break', 'formidable' ),
|
38 |
'file' => __( 'File Upload', 'formidable' ),
|
39 |
'rte' => __( 'Rich Text', 'formidable' ),
|
@@ -43,15 +36,7 @@ class FrmFieldsHelper {
|
|
43 |
'time' => __( 'Time', 'formidable' ),
|
44 |
'image' => __( 'Image URL', 'formidable' ),
|
45 |
'scale' => __( 'Scale', 'formidable' ),
|
46 |
-
'data' =>
|
47 |
-
'name' => __( 'Dynamic Field', 'formidable' ),
|
48 |
-
'types' => array(
|
49 |
-
'select' => __( 'Dropdown', 'formidable' ),
|
50 |
-
'radio' => __( 'Radio Buttons', 'formidable' ),
|
51 |
-
'checkbox' => __( 'Checkboxes', 'formidable' ),
|
52 |
-
'data' => __( 'List', 'formidable' ),
|
53 |
-
),
|
54 |
-
),
|
55 |
'form' => __( 'Embed Form', 'formidable' ),
|
56 |
'hidden' => __( 'Hidden Field', 'formidable' ),
|
57 |
'user_id' => __( 'User ID (hidden)', 'formidable' ),
|
23 |
public static function pro_field_selection() {
|
24 |
return apply_filters('frm_pro_available_fields', array(
|
25 |
'end_divider' => array(
|
26 |
+
'name' => __( 'End Section', 'formidable' ),
|
27 |
+
'switch_from' => 'divider',
|
28 |
+
),
|
29 |
+
'divider' => __( 'Section', 'formidable' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
'break' => __( 'Page Break', 'formidable' ),
|
31 |
'file' => __( 'File Upload', 'formidable' ),
|
32 |
'rte' => __( 'Rich Text', 'formidable' ),
|
36 |
'time' => __( 'Time', 'formidable' ),
|
37 |
'image' => __( 'Image URL', 'formidable' ),
|
38 |
'scale' => __( 'Scale', 'formidable' ),
|
39 |
+
'data' => __( 'Dynamic Field', 'formidable' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
'form' => __( 'Embed Form', 'formidable' ),
|
41 |
'hidden' => __( 'Hidden Field', 'formidable' ),
|
42 |
'user_id' => __( 'User ID (hidden)', 'formidable' ),
|
classes/helpers/FrmFormActionsHelper.php
CHANGED
@@ -28,11 +28,7 @@ class FrmFormActionsHelper {
|
|
28 |
$args['menu_order'] = $form_id;
|
29 |
}
|
30 |
|
31 |
-
|
32 |
-
if ( false == $actions ) {
|
33 |
-
$actions = get_posts( $args );
|
34 |
-
wp_cache_set(serialize($args), $actions, 'frm_actions', 300);
|
35 |
-
}
|
36 |
|
37 |
if ( ! $actions ) {
|
38 |
return array();
|
28 |
$args['menu_order'] = $form_id;
|
29 |
}
|
30 |
|
31 |
+
$actions = FrmAppHelper::check_cache( serialize( $args ), 'frm_actions', $args, 'get_posts' );
|
|
|
|
|
|
|
|
|
32 |
|
33 |
if ( ! $actions ) {
|
34 |
return array();
|
classes/helpers/FrmXMLHelper.php
CHANGED
@@ -142,7 +142,7 @@ class FrmXMLHelper {
|
|
142 |
// Keep track of whether this specific form was updated or not
|
143 |
$imported['form_status'][$form_id] = 'updated';
|
144 |
|
145 |
-
|
146 |
$old_fields = array();
|
147 |
foreach ( $form_fields as $f ) {
|
148 |
$old_fields[$f->id] = $f;
|
@@ -762,6 +762,10 @@ class FrmXMLHelper {
|
|
762 |
// Format the email data
|
763 |
self::format_email_data( $atts, $notification );
|
764 |
|
|
|
|
|
|
|
|
|
765 |
// Setup the new notification
|
766 |
$new_notification = array();
|
767 |
self::setup_new_notification( $new_notification, $notification, $atts );
|
@@ -851,10 +855,6 @@ class FrmXMLHelper {
|
|
851 |
unset( $add_field );
|
852 |
}
|
853 |
|
854 |
-
if ( isset( $notification['twilio'] ) && $notification['twilio'] ) {
|
855 |
-
$new_notification['post_content'] = $notification['twilio'];
|
856 |
-
}
|
857 |
-
|
858 |
// Set reply to
|
859 |
$new_notification['post_content']['reply_to'] = $atts['reply_to'];
|
860 |
|
142 |
// Keep track of whether this specific form was updated or not
|
143 |
$imported['form_status'][$form_id] = 'updated';
|
144 |
|
145 |
+
$form_fields = FrmField::get_all_for_form( $form_id );
|
146 |
$old_fields = array();
|
147 |
foreach ( $form_fields as $f ) {
|
148 |
$old_fields[$f->id] = $f;
|
762 |
// Format the email data
|
763 |
self::format_email_data( $atts, $notification );
|
764 |
|
765 |
+
if ( isset( $notification['twilio'] ) && $notification['twilio'] ) {
|
766 |
+
do_action( 'frm_create_twilio_action', $atts, $notification );
|
767 |
+
}
|
768 |
+
|
769 |
// Setup the new notification
|
770 |
$new_notification = array();
|
771 |
self::setup_new_notification( $new_notification, $notification, $atts );
|
855 |
unset( $add_field );
|
856 |
}
|
857 |
|
|
|
|
|
|
|
|
|
858 |
// Set reply to
|
859 |
$new_notification['post_content']['reply_to'] = $atts['reply_to'];
|
860 |
|
classes/models/FrmDb.php
CHANGED
@@ -72,7 +72,7 @@ class FrmDb {
|
|
72 |
/* Create/Upgrade Fields Table */
|
73 |
$sql[] = 'CREATE TABLE '. $this->fields .' (
|
74 |
id int(11) NOT NULL auto_increment,
|
75 |
-
|
76 |
name text default NULL,
|
77 |
description text default NULL,
|
78 |
type text default NULL,
|
@@ -91,7 +91,7 @@ class FrmDb {
|
|
91 |
/* Create/Upgrade Forms Table */
|
92 |
$sql[] = 'CREATE TABLE '. $this->forms .' (
|
93 |
id int(11) NOT NULL auto_increment,
|
94 |
-
|
95 |
name varchar(255) default NULL,
|
96 |
description text default NULL,
|
97 |
parent_form_id int(11) default 0,
|
@@ -109,7 +109,7 @@ class FrmDb {
|
|
109 |
/* Create/Upgrade Items Table */
|
110 |
$sql[] = 'CREATE TABLE '. $this->entries .' (
|
111 |
id int(11) NOT NULL auto_increment,
|
112 |
-
|
113 |
name varchar(255) default NULL,
|
114 |
description text default NULL,
|
115 |
ip text default NULL,
|
@@ -467,6 +467,14 @@ class FrmDb {
|
|
467 |
}
|
468 |
unset($roles, $frm_roles);
|
469 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
do_action('frm_after_uninstall');
|
471 |
return true;
|
472 |
}
|
72 |
/* Create/Upgrade Fields Table */
|
73 |
$sql[] = 'CREATE TABLE '. $this->fields .' (
|
74 |
id int(11) NOT NULL auto_increment,
|
75 |
+
field_key varchar(100) default NULL,
|
76 |
name text default NULL,
|
77 |
description text default NULL,
|
78 |
type text default NULL,
|
91 |
/* Create/Upgrade Forms Table */
|
92 |
$sql[] = 'CREATE TABLE '. $this->forms .' (
|
93 |
id int(11) NOT NULL auto_increment,
|
94 |
+
form_key varchar(100) default NULL,
|
95 |
name varchar(255) default NULL,
|
96 |
description text default NULL,
|
97 |
parent_form_id int(11) default 0,
|
109 |
/* Create/Upgrade Items Table */
|
110 |
$sql[] = 'CREATE TABLE '. $this->entries .' (
|
111 |
id int(11) NOT NULL auto_increment,
|
112 |
+
item_key varchar(100) default NULL,
|
113 |
name varchar(255) default NULL,
|
114 |
description text default NULL,
|
115 |
ip text default NULL,
|
467 |
}
|
468 |
unset($roles, $frm_roles);
|
469 |
|
470 |
+
// delete actions, views, and styles
|
471 |
+
$post_ids = $wpdb->get_col( $wpdb->prepare( 'SELECT ID FROM ' . $wpdb->posts .' WHERE post_type in (%s, %s, %s)', FrmFormActionsController::$action_post_type, FrmStylesController::$post_type, 'frm_display' ) );
|
472 |
+
foreach( $post_ids as $post_id ) {
|
473 |
+
// Delete's each post.
|
474 |
+
wp_delete_post( $post_id, true );
|
475 |
+
}
|
476 |
+
unset( $post_ids );
|
477 |
+
|
478 |
do_action('frm_after_uninstall');
|
479 |
return true;
|
480 |
}
|
classes/models/FrmEntry.php
CHANGED
@@ -12,6 +12,10 @@ class FrmEntry {
|
|
12 |
|
13 |
$values = apply_filters('frm_pre_create_entry', $values);
|
14 |
|
|
|
|
|
|
|
|
|
15 |
$new_values = array(
|
16 |
'item_key' => FrmAppHelper::get_unique_key($values['item_key'], $wpdb->prefix .'frm_items', 'item_key'),
|
17 |
'name' => isset($values['name']) ? $values['name'] : $values['item_key'],
|
@@ -80,7 +84,7 @@ class FrmEntry {
|
|
80 |
}
|
81 |
|
82 |
/**
|
83 |
-
* check for duplicate entries created in the last
|
84 |
* @return boolean
|
85 |
*/
|
86 |
public static function is_duplicate($new_values, $values) {
|
@@ -89,7 +93,7 @@ class FrmEntry {
|
|
89 |
}
|
90 |
|
91 |
$check_val = $new_values;
|
92 |
-
|
93 |
|
94 |
unset($check_val['created_at'], $check_val['updated_at']);
|
95 |
unset($check_val['is_draft'], $check_val['id'], $check_val['item_key']);
|
12 |
|
13 |
$values = apply_filters('frm_pre_create_entry', $values);
|
14 |
|
15 |
+
if ( ! isset( $values['item_key'] ) ) {
|
16 |
+
$values['item_key'] = '';
|
17 |
+
}
|
18 |
+
|
19 |
$new_values = array(
|
20 |
'item_key' => FrmAppHelper::get_unique_key($values['item_key'], $wpdb->prefix .'frm_items', 'item_key'),
|
21 |
'name' => isset($values['name']) ? $values['name'] : $values['item_key'],
|
84 |
}
|
85 |
|
86 |
/**
|
87 |
+
* check for duplicate entries created in the last minute
|
88 |
* @return boolean
|
89 |
*/
|
90 |
public static function is_duplicate($new_values, $values) {
|
93 |
}
|
94 |
|
95 |
$check_val = $new_values;
|
96 |
+
$check_val['created_at >'] = date( 'Y-m-d H:i:s', ( strtotime( $new_values['created_at'] ) - 60 ) );
|
97 |
|
98 |
unset($check_val['created_at'], $check_val['updated_at']);
|
99 |
unset($check_val['is_draft'], $check_val['id'], $check_val['item_key']);
|
classes/models/FrmField.php
CHANGED
@@ -256,7 +256,7 @@ class FrmField{
|
|
256 |
return $results;
|
257 |
}
|
258 |
|
259 |
-
|
260 |
if ( ! (int) $form_id ) {
|
261 |
return array();
|
262 |
}
|
@@ -280,9 +280,12 @@ class FrmField{
|
|
280 |
}
|
281 |
|
282 |
self::$use_cache = false;
|
283 |
-
|
|
|
|
|
284 |
self::$use_cache = true;
|
285 |
-
|
|
|
286 |
|
287 |
if ( empty($limit) ) {
|
288 |
set_transient('frm_all_form_fields_'. $form_id . $inc_sub, $results, 60*60*6);
|
@@ -303,7 +306,7 @@ class FrmField{
|
|
303 |
}
|
304 |
|
305 |
if ( $type == 'all' ) {
|
306 |
-
$sub_fields = self::get_all_for_form($field->field_options['form_select']);
|
307 |
} else {
|
308 |
$sub_fields = self::get_all_types_in_form($field->form_id, $type);
|
309 |
}
|
@@ -391,7 +394,7 @@ class FrmField{
|
|
391 |
}
|
392 |
|
393 |
unset($form_id);
|
394 |
-
|
395 |
wp_cache_set($results->id, $results, 'frm_field');
|
396 |
wp_cache_set($results->field_key, $results, 'frm_field');
|
397 |
|
256 |
return $results;
|
257 |
}
|
258 |
|
259 |
+
public static function get_all_for_form( $form_id, $limit = '', $inc_sub = 'exclude' ) {
|
260 |
if ( ! (int) $form_id ) {
|
261 |
return array();
|
262 |
}
|
280 |
}
|
281 |
|
282 |
self::$use_cache = false;
|
283 |
+
|
284 |
+
// get the fields, but make sure to not get the subfields if set to exclude
|
285 |
+
$results = self::getAll( array( 'fi.form_id' => absint( $form_id ) ), 'field_order', $limit );
|
286 |
self::$use_cache = true;
|
287 |
+
|
288 |
+
self::include_sub_fields( $results, $inc_sub, 'all' );
|
289 |
|
290 |
if ( empty($limit) ) {
|
291 |
set_transient('frm_all_form_fields_'. $form_id . $inc_sub, $results, 60*60*6);
|
306 |
}
|
307 |
|
308 |
if ( $type == 'all' ) {
|
309 |
+
$sub_fields = self::get_all_for_form( $field->field_options['form_select'] );
|
310 |
} else {
|
311 |
$sub_fields = self::get_all_types_in_form($field->form_id, $type);
|
312 |
}
|
394 |
}
|
395 |
|
396 |
unset($form_id);
|
397 |
+
} else if ( $results ) {
|
398 |
wp_cache_set($results->id, $results, 'frm_field');
|
399 |
wp_cache_set($results->field_key, $results, 'frm_field');
|
400 |
|
classes/models/FrmStyle.php
CHANGED
@@ -203,13 +203,13 @@ class FrmStyle{
|
|
203 |
return $style;
|
204 |
}
|
205 |
|
206 |
-
public function get_all() {
|
207 |
$post_atts = array(
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
);
|
214 |
|
215 |
$temp_styles = FrmAppHelper::check_cache(serialize($post_atts), 'frm_styles', $post_atts, 'get_posts');
|
@@ -269,7 +269,7 @@ class FrmStyle{
|
|
269 |
|
270 |
public function get_default_style($styles = null) {
|
271 |
if ( ! isset($styles) ) {
|
272 |
-
|
273 |
}
|
274 |
|
275 |
foreach ( $styles as $style ) {
|
203 |
return $style;
|
204 |
}
|
205 |
|
206 |
+
public function get_all( $orderby = 'title', $order = 'ASC', $limit = 99 ) {
|
207 |
$post_atts = array(
|
208 |
+
'post_type' => FrmStylesController::$post_type,
|
209 |
+
'post_status' => 'publish',
|
210 |
+
'numberposts' => $limit,
|
211 |
+
'orderby' => $orderby,
|
212 |
+
'order' => $order,
|
213 |
);
|
214 |
|
215 |
$temp_styles = FrmAppHelper::check_cache(serialize($post_atts), 'frm_styles', $post_atts, 'get_posts');
|
269 |
|
270 |
public function get_default_style($styles = null) {
|
271 |
if ( ! isset($styles) ) {
|
272 |
+
$styles = $this->get_all( 'menu_order', 'DESC', 1 );
|
273 |
}
|
274 |
|
275 |
foreach ( $styles as $style ) {
|
classes/views/frm-settings/license_box.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
<?php if ( ! is_multisite() || is_super_admin() ) { ?>
|
3 |
<div class="postbox">
|
4 |
<div class="inside">
|
5 |
-
|
6 |
-
|
7 |
|
8 |
<p>Already signed up? <a href="http://formidablepro.com/knowledgebase/manually-install-formidable-pro/" target="_blank"><?php _e( 'Click here', 'formidable' ) ?></a> to get installation instructions and download the pro version.</p>
|
9 |
</div>
|
2 |
<?php if ( ! is_multisite() || is_super_admin() ) { ?>
|
3 |
<div class="postbox">
|
4 |
<div class="inside">
|
5 |
+
<p class="alignright"><?php printf( __( '%1$sClick here%2$s to get it now', 'formidable' ), '<a href="http://formidablepro.com">', '</a>' ) ?> »</p>
|
6 |
+
<p><?php _e( 'Ready to take your forms to the next level?<br/>Formidable Forms will help you create views, manage data, and get reports.', 'formidable' ) ?></p>
|
7 |
|
8 |
<p>Already signed up? <a href="http://formidablepro.com/knowledgebase/manually-install-formidable-pro/" target="_blank"><?php _e( 'Click here', 'formidable' ) ?></a> to get installation instructions and download the pro version.</p>
|
9 |
</div>
|
classes/views/styles/_field-labels.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
<div class="field-group clearfix clear">
|
18 |
<label><?php _e( 'Position', 'formidable' ) ?></label>
|
19 |
<select name="<?php echo esc_attr( $frm_style->get_field_name('position') ) ?>" id="frm_position">
|
20 |
-
<?php foreach ( array( 'none' => __( 'top', 'formidable' ), 'left' => __( 'left', 'formidable' ), 'right' => __( 'right', 'formidable' ) ) as $pos => $pos_label ) { ?>
|
21 |
<option value="<?php echo esc_attr( $pos ) ?>" <?php selected($style->post_content['position'], $pos) ?>><?php echo $pos_label ?></option>
|
22 |
<?php } ?>
|
23 |
</select>
|
17 |
<div class="field-group clearfix clear">
|
18 |
<label><?php _e( 'Position', 'formidable' ) ?></label>
|
19 |
<select name="<?php echo esc_attr( $frm_style->get_field_name('position') ) ?>" id="frm_position">
|
20 |
+
<?php foreach ( array( 'none' => __( 'top', 'formidable' ), 'left' => __( 'left', 'formidable' ), 'right' => __( 'right', 'formidable' ), 'no_label' => __( 'none', 'formidable' ) ) as $pos => $pos_label ) { ?>
|
21 |
<option value="<?php echo esc_attr( $pos ) ?>" <?php selected($style->post_content['position'], $pos) ?>><?php echo $pos_label ?></option>
|
22 |
<?php } ?>
|
23 |
</select>
|
classes/views/styles/show.php
CHANGED
@@ -4,33 +4,7 @@
|
|
4 |
|
5 |
<?php include(FrmAppHelper::plugin_path() .'/classes/views/shared/errors.php'); ?>
|
6 |
|
7 |
-
|
8 |
-
<span class="add-edit-menu-action">
|
9 |
-
<?php
|
10 |
-
if ( count( $styles ) < 2 && ! empty( $style->ID ) ) {
|
11 |
-
printf(__( 'Edit your style below, or %1$screate a new style%2$s.', 'formidable' ), '<a href="?page=formidable-styles&frm_action=new_style">', '</a>');
|
12 |
-
|
13 |
-
} else { ?>
|
14 |
-
<form method="get">
|
15 |
-
<input type="hidden" name="page" value="<?php echo esc_attr( $_GET['page'] ) ?>"/>
|
16 |
-
<input type="hidden" name="frm_action" value="edit" />
|
17 |
-
<label class="selected-menu"><?php _e( 'Select a style to edit:', 'formidable' ); ?></label>
|
18 |
-
<select name="id">
|
19 |
-
<option value=""><?php _e( '— Select —') ?></option>
|
20 |
-
<?php foreach ( $styles as $s ) { ?>
|
21 |
-
<option value="<?php echo esc_attr( $s->ID ) ?>" <?php selected($s->ID, $style->ID) ?>><?php echo esc_html( $s->post_title . (empty($s->menu_order) ? '' : ' ('. __( 'default', 'formidable' ) .')') ) ?></option>
|
22 |
-
<?php } ?>
|
23 |
-
</select>
|
24 |
-
<span class="submit-btn">
|
25 |
-
<input type="submit" class="button-secondary" value="<?php esc_attr_e( 'Select', 'formidable' ) ?>" />
|
26 |
-
</span>
|
27 |
-
</form>
|
28 |
-
<span class="add-new-menu-action"><?php printf(__( 'or %1$screate a new style%2$s.', 'formidable' ), '<a href="?page=formidable-styles&frm_action=new_style">', '</a>'); ?></span>
|
29 |
-
<?php
|
30 |
-
} ?>
|
31 |
-
|
32 |
-
</span>
|
33 |
-
</div><!-- /manage-menus -->
|
34 |
|
35 |
<form id="frm_styling_form" action="" name="frm_styling_form" method="post">
|
36 |
<input type="hidden" name="ID" value="<?php echo esc_attr( $style->ID ) ?>" />
|
4 |
|
5 |
<?php include(FrmAppHelper::plugin_path() .'/classes/views/shared/errors.php'); ?>
|
6 |
|
7 |
+
<?php do_action( 'frm_style_switcher', $style, $styles ) ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
<form id="frm_styling_form" action="" name="frm_styling_form" method="post">
|
10 |
<input type="hidden" name="ID" value="<?php echo esc_attr( $style->ID ) ?>" />
|
css/_single_theme.css.php
CHANGED
@@ -22,7 +22,7 @@ if ( isset($_GET['frm_style_setting']) || isset($_GET['flat']) ) {
|
|
22 |
}
|
23 |
|
24 |
$important = empty($important_style) ? '' : ' !important';
|
25 |
-
$label_margin = (int) $width +
|
26 |
|
27 |
$minus_icons = FrmStylesHelper::minus_icons();
|
28 |
$arrow_icons = FrmStylesHelper::arrow_icons();
|
@@ -119,6 +119,11 @@ if ( ! isset($collapse_icon) ) {
|
|
119 |
content:"\e<?php echo isset($minus_icons[$repeat_icon]) ? $minus_icons[$repeat_icon]['+'] : $minus_icons[1]['+'] ?>";
|
120 |
}
|
121 |
|
|
|
|
|
|
|
|
|
|
|
122 |
.<?php echo $style_class ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{
|
123 |
content:"\e<?php echo isset($arrow_icons[$collapse_icon]) ? $arrow_icons[$collapse_icon]['-'] : $arrow_icons[1]['-'] ?>";
|
124 |
}
|
22 |
}
|
23 |
|
24 |
$important = empty($important_style) ? '' : ' !important';
|
25 |
+
$label_margin = (int) $width + 10;
|
26 |
|
27 |
$minus_icons = FrmStylesHelper::minus_icons();
|
28 |
$arrow_icons = FrmStylesHelper::arrow_icons();
|
119 |
content:"\e<?php echo isset($minus_icons[$repeat_icon]) ? $minus_icons[$repeat_icon]['+'] : $minus_icons[1]['+'] ?>";
|
120 |
}
|
121 |
|
122 |
+
.<?php echo $style_class ?> .frm_icon_font.frm_minus_icon:before,
|
123 |
+
.<?php echo $style_class ?> .frm_icon_font.frm_plus_icon:before{
|
124 |
+
color:#<?php echo $submit_text_color . $important ?>;
|
125 |
+
}
|
126 |
+
|
127 |
.<?php echo $style_class ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{
|
128 |
content:"\e<?php echo isset($arrow_icons[$collapse_icon]) ? $arrow_icons[$collapse_icon]['-'] : $arrow_icons[1]['-'] ?>";
|
129 |
}
|
css/custom_theme.css.php
CHANGED
@@ -88,10 +88,6 @@ $defaults = $default_style->post_content;
|
|
88 |
margin-top:0px !important;
|
89 |
}
|
90 |
|
91 |
-
.with_frm_style .frm_section_heading.frm_hide_section .frm_description.frm_section_spacing{
|
92 |
-
display:none;
|
93 |
-
}
|
94 |
-
|
95 |
.with_frm_style .frm_hidden_container label.frm_primary_label,
|
96 |
.with_frm_style .frm_pos_hidden,
|
97 |
.frm_hidden_container label.frm_primary_label{
|
@@ -709,7 +705,7 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
|
|
709 |
-webkit-box-sizing:border-box;
|
710 |
-moz-box-sizing:border-box;
|
711 |
box-sizing:border-box;
|
712 |
-
max-width:
|
713 |
margin-right:0;
|
714 |
margin-left:0;
|
715 |
}
|
@@ -736,7 +732,7 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
|
|
736 |
.frm_form_field.frm_right_container input,
|
737 |
.frm_form_field.frm_right_container select,
|
738 |
.frm_form_field.frm_right_container textarea{
|
739 |
-
max-width:
|
740 |
}
|
741 |
|
742 |
.frm_form_field.frm_left_third,
|
@@ -876,8 +872,8 @@ table.frmcal-calendar .frmcal-today .frmcal_date{
|
|
876 |
border-right:none;
|
877 |
}
|
878 |
|
879 |
-
.frm_grid,
|
880 |
-
.frm_grid_odd{
|
881 |
border-top:none;
|
882 |
}
|
883 |
|
88 |
margin-top:0px !important;
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
91 |
.with_frm_style .frm_hidden_container label.frm_primary_label,
|
92 |
.with_frm_style .frm_pos_hidden,
|
93 |
.frm_hidden_container label.frm_primary_label{
|
705 |
-webkit-box-sizing:border-box;
|
706 |
-moz-box-sizing:border-box;
|
707 |
box-sizing:border-box;
|
708 |
+
max-width:29%;
|
709 |
margin-right:0;
|
710 |
margin-left:0;
|
711 |
}
|
732 |
.frm_form_field.frm_right_container input,
|
733 |
.frm_form_field.frm_right_container select,
|
734 |
.frm_form_field.frm_right_container textarea{
|
735 |
+
max-width:70%;
|
736 |
}
|
737 |
|
738 |
.frm_form_field.frm_left_third,
|
872 |
border-right:none;
|
873 |
}
|
874 |
|
875 |
+
.with_frm_style .frm_grid,
|
876 |
+
.with_frm_style .frm_grid_odd{
|
877 |
border-top:none;
|
878 |
}
|
879 |
|
css/frm_admin.css
CHANGED
@@ -137,7 +137,8 @@ input.frm_insert_in_template{
|
|
137 |
clear:both;
|
138 |
}
|
139 |
|
140 |
-
.frm_block
|
|
|
141 |
display:block;
|
142 |
}
|
143 |
|
@@ -1407,7 +1408,8 @@ a.frm_button:hover{
|
|
1407 |
}
|
1408 |
ul.start_divider{
|
1409 |
padding:6px 12px 0;
|
1410 |
-
border-
|
|
|
1411 |
min-height:100px;
|
1412 |
}
|
1413 |
|
@@ -1432,7 +1434,7 @@ ul.start_divider{
|
|
1432 |
color:#CCC;
|
1433 |
}
|
1434 |
|
1435 |
-
.frm_sorting li.ui-state-default.edit_field_type_break{border-bottom:1px
|
1436 |
.frm_sorting .divider_section_only > .frm_ipe_field_label{font-size:116%;}
|
1437 |
#frm_form_editor_container .edit_field_type_break .frm_primary_label.frm_ipe_field_label.button{
|
1438 |
width:150px;
|
@@ -1988,19 +1990,19 @@ iframe#dyncontent_ifr{min-height:150px;}
|
|
1988 |
height: 101px;
|
1989 |
}
|
1990 |
.farbtastic .wheel {
|
1991 |
-
background: url(../
|
1992 |
width: 195px;
|
1993 |
height: 195px;
|
1994 |
}
|
1995 |
.farbtastic .overlay {
|
1996 |
-
background: url(../
|
1997 |
}
|
1998 |
.farbtastic .marker {
|
1999 |
width: 17px;
|
2000 |
height: 17px;
|
2001 |
margin: -8px 0 0 -8px;
|
2002 |
overflow: hidden;
|
2003 |
-
background: url(../
|
2004 |
}
|
2005 |
|
2006 |
/* ---------------------------------------------------------------
|
137 |
clear:both;
|
138 |
}
|
139 |
|
140 |
+
.frm_block,
|
141 |
+
.frm_no_section_fields.frm_block{
|
142 |
display:block;
|
143 |
}
|
144 |
|
1408 |
}
|
1409 |
ul.start_divider{
|
1410 |
padding:6px 12px 0;
|
1411 |
+
border-left:1px solid #D7D7D7;
|
1412 |
+
border-bottom:1px solid #D7D7D7;
|
1413 |
min-height:100px;
|
1414 |
}
|
1415 |
|
1434 |
color:#CCC;
|
1435 |
}
|
1436 |
|
1437 |
+
.frm_sorting li.ui-state-default.edit_field_type_break{border-bottom:1px dashed #D7D7D7; padding-bottom:5px;}
|
1438 |
.frm_sorting .divider_section_only > .frm_ipe_field_label{font-size:116%;}
|
1439 |
#frm_form_editor_container .edit_field_type_break .frm_primary_label.frm_ipe_field_label.button{
|
1440 |
width:150px;
|
1990 |
height: 101px;
|
1991 |
}
|
1992 |
.farbtastic .wheel {
|
1993 |
+
background: url(../images/styler/wheel.png) no-repeat;
|
1994 |
width: 195px;
|
1995 |
height: 195px;
|
1996 |
}
|
1997 |
.farbtastic .overlay {
|
1998 |
+
background: url(../images/styler/mask.png) no-repeat;
|
1999 |
}
|
2000 |
.farbtastic .marker {
|
2001 |
width: 17px;
|
2002 |
height: 17px;
|
2003 |
margin: -8px 0 0 -8px;
|
2004 |
overflow: hidden;
|
2005 |
+
background: url(../images/styler/marker.png) no-repeat;
|
2006 |
}
|
2007 |
|
2008 |
/* ---------------------------------------------------------------
|
formidable.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Formidable
|
4 |
Description: Quickly and easily create drag-and-drop forms
|
5 |
-
Version: 2.
|
6 |
Plugin URI: http://formidablepro.com/
|
7 |
Author URI: http://strategy11.com
|
8 |
Author: Strategy11
|
2 |
/*
|
3 |
Plugin Name: Formidable
|
4 |
Description: Quickly and easily create drag-and-drop forms
|
5 |
+
Version: 2.0rc9
|
6 |
Plugin URI: http://formidablepro.com/
|
7 |
Author URI: http://strategy11.com
|
8 |
Author: Strategy11
|
images/styler/marker.png
ADDED
Binary file
|
images/styler/mask.png
ADDED
Binary file
|
images/styler/wheel.png
ADDED
Binary file
|
js/formidable.min.js
CHANGED
@@ -1,50 +1,51 @@
|
|
1 |
-
function frmFrontFormJS(){function
|
2 |
-
jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}function
|
3 |
-
e[f].className&&e[f].selected){
|
4 |
-
jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val(""))}function A(
|
5 |
-
g[
|
6 |
-
"frm_field_"+
|
7 |
-
|
8 |
-
|
9 |
-
0;g<e.length;g++)c=z(
|
10 |
-
{funcName:"getData",f:
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
"
|
20 |
-
|
21 |
-
(
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
jQuery(
|
36 |
-
|
37 |
-
|
38 |
-
frm_js.
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
"
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
function
|
48 |
-
function
|
49 |
-
function
|
50 |
-
function
|
|
1 |
+
function frmFrontFormJS(){function h(b){var a=jQuery(this),c=a.attr("type");"submit"!=c&&b.preventDefault();b=a.parents("form:first");var e=a="",f=this.name;if("frm_prev_page"==f||-1!==this.className.indexOf("frm_prev_page"))a=jQuery(b).find(".frm_next_page").attr("id").replace("frm_next_p_","");else if("frm_save_draft"==f||-1!==this.className.indexOf("frm_save_draft"))e=1;jQuery(".frm_next_page").val(a);jQuery(".frm_saving_draft").val(e);"submit"!=c&&b.trigger("submit")}function n(){jQuery(this).parent().children(".frm_toggle_container").slideToggle("fast");
|
2 |
+
jQuery(this).toggleClass("active").children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").toggleClass("ui-icon-triangle-1-s ui-icon-triangle-1-e")}function u(){this.className=this.className.replace("frm_transparent","");this.parentNode.getElementsByTagName("a")[0].className+=" frm_hidden"}function y(){var b=this.type,a=!1,c=!1;if("select-one"==b)c=!0,"frm_other_trigger"==this.options[this.selectedIndex].className&&(a=!0);else if("select-multiple"==b)for(var c=!0,e=this.options,a=!1,f=0;f<e.length;f++)if("frm_other_trigger"==
|
3 |
+
e[f].className&&e[f].selected){a=!0;break}c?(b=this.parentNode.getElementsByClassName("frm_other_input"),a?b[0].className=b[0].className.replace("frm_pos_none",""):(1>b[0].className.indexOf("frm_pos_none")&&(b[0].className+=" frm_pos_none"),b[0].value="")):"radio"==b?(jQuery(this).closest(".frm_radio").children(".frm_other_input").removeClass("frm_pos_none"),jQuery(this).closest(".frm_radio").siblings().children(".frm_other_input").addClass("frm_pos_none").val("")):"checkbox"==b&&(this.checked?jQuery(this).closest(".frm_checkbox").children(".frm_other_input").removeClass("frm_pos_none"):
|
4 |
+
jQuery(this).closest(".frm_checkbox").children(".frm_other_input").addClass("frm_pos_none").val(""))}function A(b){var a=this.name.replace("item_meta[","").split("]"),c=a[0];c&&(jQuery('input[name="item_meta['+c+'][form]"]').length&&(c=a[2].replace("[","")),q("und",c,null,jQuery(this)),M(b,c))}function q(b,a,c,e,f){if("undefined"!=typeof __FRMRULES){var g=__FRMRULES[a];if("undefined"!=typeof g){if("undefined"==typeof c||null===c)c="go";"persist"!=f&&(m=[]);f=[];for(var k=0,p=g.length;k<p;k++){var r=
|
5 |
+
g[k];if("undefined"!=typeof r)for(var l=0,h=r.Conditions.length;l<h;l++){var C=r.Conditions[l];C.HideField=r.Setting.FieldName;C.MatchType=r.MatchType;C.Show=r.Show;f.push(C)}}g=f.length;k=0;for(p=g;k<p;k++)f[k].FieldName==a?v(k,f[k],a,b,c,e):v(k,f[k],a,b,c),k==g-1&&D(c)}}}function v(b,a,c,e,f,g){"undefined"==typeof m[a.HideField]&&(m[a.HideField]=[]);a.inputName="item_meta["+a.FieldName+"]";a.hiddenName="item_meta["+a.HideField+"]";a.containerID="frm_field_"+a.FieldName+"_container";a.hideContainerID=
|
6 |
+
"frm_field_"+a.HideField+"_container";a.hideBy="#";var k=!1;if("undefined"!==typeof g&&null!==g){1<g.length&&(g=g.eq(0));if("undefined"===typeof g.attr("name"))return;a.inputName=g.attr("name").replace("[other]","").replace("[]","");var p=g.closest(".frm_repeat_sec");p.length&&(p=p.children(".frm_field_"+a.FieldName+"_container"),a.containerID=p.attr("id"),a.hideContainerID=a.containerID.replace(a.FieldName,a.HideField),a.hiddenName=a.inputName.replace("["+a.FieldName+"]","["+a.HideField+"]"))}else{k=
|
7 |
+
!0;g=jQuery('input[name^="'+a.inputName+'"], textarea[name^="'+a.inputName+'"], select[name^="'+a.inputName+'"]');if(1>g.length&&(g=jQuery("."+a.containerID+" input, ."+a.containerID+" textarea, ."+a.containerID+" select"),g.length)){v(b,a,c,e,f,g);return}1<g.length&&(g=g.eq(0))}null===document.getElementById(a.hideContainerID)&&(a.hideBy=".");if(a.FieldName!=c||"undefined"==typeof e||"und"==e)if(("radio"==a.Type||"data-radio"==a.Type)&&"radio"==g.attr("type"))e=jQuery('input[name="'+a.inputName+
|
8 |
+
'"]:checked').val(),"undefined"==typeof e&&(e="");else if("select"==a.Type||"time"==a.Type||"data-select"==a.Type||"checkbox"!=a.Type&&"data-checkbox"!=a.Type)e=g.val();"undefined"==typeof e&&(e=g.val());if("undefined"==typeof e){if(!0===k&&(c=jQuery("."+a.containerID+" input, ."+a.containerID+" select, ."+a.containerID+" textarea"),c.length)){c.each(function(){v(b,a,a.FieldName,e,f,jQuery(this))});return}e=""}c=[];if("checkbox"==a.Type||"data-checkbox"==a.Type)c=N(a.containerID,a.inputName),e=c.length?
|
9 |
+
c:"";m[a.HideField][b]=""===e?!1:{funcName:"getDataOpts",f:a,sel:e};if("checkbox"==a.Type||"data-checkbox"==a.Type&&"undefined"==typeof a.LinkedField)if(c=m[a.HideField][b]=!1,""!==e)for("!="==a.Condition&&(m[a.HideField][b]=!0),g=0;g<e.length;g++)c=z(a.Condition,a.Value,e[g]),"!="==a.Condition?!0===m[a.HideField][b]&&!1===c&&(m[a.HideField][b]=!1):!1===m[a.HideField][b]&&c&&(m[a.HideField][b]=!0);else c=z(a.Condition,a.Value,""),!1===m[a.HideField][b]&&c&&(m[a.HideField][b]=!0);else if("undefined"!=
|
10 |
+
typeof a.LinkedField&&0===a.Type.indexOf("data-")){if("undefined"==typeof a.DataType||"data"===a.DataType)""===e?w(a.hideContainerID,a.hideBy):"data-radio"==a.Type?m[a.HideField][b]="undefined"==typeof a.DataType?z(a.Condition,a.Value,e):{funcName:"getData",f:a,sel:e}:"data-checkbox"==a.Type||"data-select"==a.Type&&jQuery.isArray(e)?(w(a.hideContainerID,a.hideBy),m[a.HideField][b]=!0,G(a,e,1)):"data-select"==a.Type&&(m[a.HideField][b]={funcName:"getData",f:a,sel:e})}else"undefined"==typeof a.Value&&
|
11 |
+
0===a.Type.indexOf("data")?(a.Value=""===e?"1":e,m[a.HideField][b]=z(a.Condition,a.Value,e),a.Value=void 0):m[a.HideField][b]=z(a.Condition,a.Value,e);B(b,a,f)}function w(b,a){b="."===a?jQuery("."+b):jQuery(document.getElementById(b));b.fadeOut("slow");b.find(".frm_data_field_container").empty()}function B(b,a,c){if("all"==a.MatchType||!1===m[a.HideField][b])E.push({result:m[a.HideField][b],show:a.Show,match:a.MatchType,fname:a.FieldName,fkey:a.HideField,hideContainerID:a.hideContainerID,hideBy:a.hideBy});
|
12 |
+
else{var e="none";if("show"==a.Show){if(!0!==m[a.HideField][b]){H(m[a.HideField][b],a.FieldName,c);return}e=""}"."===a.hideBy?(b=jQuery("."+a.hideContainerID),b.length&&("none"===e?b.hide():b.show())):(b=document.getElementById(a.hideContainerID),null!==b&&(b.style.display=e))}}function D(b){jQuery.each(E,function(a,c){if("undefined"!=typeof c&&"undefined"!=typeof c.result){var e=jQuery(c.hideBy+c.hideContainerID),f=c.show;if(e.length){if("any"==c.match&&-1==jQuery.inArray(!0,m[c.fkey])||"all"==c.match&&
|
13 |
+
-1<jQuery.inArray(!1,m[c.fkey]))f="show"==c.show?"hide":"show";"show"==f?e.show():(e.filter(":hidden").hide(),e.hide());!1!==typeof c.result&&!0!==typeof c.result&&H(c.result,c.fname,b)}delete E[a]}})}function z(b,a,c){"undefined"==typeof c&&(c="");jQuery.isArray(c)&&-1<jQuery.inArray(a,c)&&(c=a);-1!=String(a).search(/^\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*$/)&&(a=parseFloat(a),c=parseFloat(c));return"-1"!=String(a).indexOf(""")&&z(b,a.replace(""",'"'),c)?!0:{"==":function(a,b){return a==
|
14 |
+
b},"!=":function(a,b){return a!=b},"<":function(a,b){return a>b},">":function(a,b){return a<b},LIKE:function(a,b){return b?-1!=b.indexOf(a):0},"not LIKE":function(a,b){return b?-1==b.indexOf(a):1}}[b](a,c)}function H(b,a,c){"getDataOpts"==b.funcName?O(b.f,b.sel,a,c):"getData"==b.funcName&&G(b.f,b.sel,0)}function G(b,a,c){var e=document.getElementById(b.hideContainerID),f=jQuery(e).find(".frm_data_field_container");if(0===f.length)return!0;c||f.html('<span class="frm-loading-img"></span>');jQuery.ajax({type:"POST",
|
15 |
+
url:frm_js.ajax_url,data:{action:"frm_fields_ajax_get_data",entry_id:a,field_id:b.LinkedField,current_field:b.HideField,hide_id:b.hideContainerID,nonce:frm_js.nonce},success:function(g){""!==g&&(e.style.display="");if(c)f.append(g);else{f.html(g);var k=f.children("input"),p=k.val();if(""===g||""===p)e.style.display="none";q(a,b.HideField,null,k)}return!0}})}function O(b,a,c,e){if(!("stop"==e&&-1<jQuery.inArray(b.HideField,F)&&"hidden"==b.parentField.attr("type"))){var f=jQuery('input[name^="'+b.hiddenName+
|
16 |
+
'"], select[name^="'+b.hiddenName+'"], textarea[name^="'+b.hiddenName+'"]'),g=[];f.each(function(){"radio"==this.type||"checkbox"==this.type?!0===this.checked&&g.push(jQuery(this).val()):g.push(jQuery(this).val())});if("select"!=b.DataType||"stop"!=e&&!jQuery("#"+b.hideContainerID+" .frm-loading-img").length||!(-1<jQuery.inArray(b.HideField,F))){0===g.length&&(g="");F.push(b.HideField);var k=document.getElementById(b.hideContainerID),p=jQuery(k).find(".frm_data_field_container");if(0===p.length&&
|
17 |
+
f.length)return q(g,b.HideField,"stop",f),!1;if(""!==b.Value&&!z(b.Condition,b.Value,a))return k.style.display="none",p.html(""),q("",b.HideField,"stop",f),!1;p.html('<span class="frm-loading-img" style="visibility:visible;display:inline;"></span>');var r=b.DataType;jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_fields_ajax_data_options",hide_field:c,entry_id:a,selected_field_id:b.LinkedField,field_id:b.HideField,hide_id:b.hideContainerID,nonce:frm_js.nonce},success:function(a){""===
|
18 |
+
a?(k.style.display="none",g=""):"all"!=b.MatchType&&(k.style.display="");p.html(a);var c=p.find("select, input, textarea");""!==a&&""!==g&&(jQuery.isArray(g)||(a=[],a.push(g),g=a),jQuery.each(g,function(a,b){if("undefined"!=typeof b&&""!==b)if("checkbox"==r||"radio"==r)1<c.length?c.filter('[value="'+b+'"]').attr("checked","checked"):c.val()==b&&c.attr("checked","checked");else if("select"==r){var e=c.children("option[value="+b+"]");e.length?e.prop("selected",!0):g.splice(a,1)}else c.val(b)}));c.hasClass("frm_chzn")&&
|
19 |
+
jQuery().chosen&&jQuery(".frm_chzn").chosen({allow_single_deselect:!0});q(g,b.HideField,"stop",c)}})}}}function M(b,a){if("undefined"!=typeof __FRMCALC){var c=__FRMCALC,e=c.fields[a];if("undefined"!=typeof e){e=e.total;if(b.frmTriggered&&b.frmTriggered==a)return!1;for(var f=[],g=0,k=0,p=e.length;k<p;k++){for(var r=c.calc[e[k]],l=r.calc,g=r.fields.length,h=0;h<g;h++){var m=r.fields[h],n=c.fields[m],t="input"+c.fieldKeys[m];"checkbox"==n.type||"select"==n.type?t=t+":checked,select"+c.fieldKeys[m]+" option:selected,"+
|
20 |
+
t+"[type=hidden]":"radio"==n.type||"scale"==n.type?t=t+":checked,"+t+"[type=hidden]":"textarea"==n.type&&(t=t+",textarea"+c.fieldKeys[m]);f[m]=P(t,m,n,c,f);"undefined"===typeof f[m]&&(f[m]=0);n="["+m+"]";n=n.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");l=l.replace(new RegExp(n,"g"),f[m])}r=r.calc_dec;l.indexOf(").toFixed(")&&(h=l.split(").toFixed("),I(h[1])&&(r=h[1],l=l.replace(").toFixed("+r,"")));l=parseFloat(eval(l));I(r)&&(l=l.toFixed(r));"undefined"===typeof l&&(l=0);jQuery(document.getElementById("field_"+
|
21 |
+
e[k])).val(l).trigger({type:"change",frmTriggered:e[k],selfTriggered:!0})}}}}function P(b,a,c,e,f){if("undefined"!==typeof f[a]&&0!==f[a])return f[a];jQuery(b).each(function(){"undefined"===typeof f[a]&&(f[a]=0);var b=jQuery(this).val();"date"==c.type&&(d=jQuery.datepicker.parseDate(e.date,b),null!==d&&(f[a]=Math.ceil(d/864E5)));""!==b&&(b=parseFloat(b.replace(/,/g,"").match(/-?[\d\.]+$/)));"undefined"===typeof b&&(b=0);f[a]+=b});return f[a]}function Q(b){jQuery(b).find('input[type="submit"], input[type="button"]').attr("disabled",
|
22 |
+
"disabled");jQuery(b).find(".frm_ajax_loading").addClass("frm_loading_now");var a="",c=0,e=0;jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:jQuery(b).serialize()+"&action=frm_entries_"+jQuery(b).find('input[name="frm_action"]').val()+"&nonce="+frm_js.nonce,success:function(f){f=f.replace(/^\s+|\s+$/g,"");0===f.indexOf("{")&&(f=jQuery.parseJSON(f));if(""===f||!f||"0"===f||"object"!=typeof f&&0===f.indexOf("<!DOCTYPE")){var g=document.getElementById("frm_loading");null!==g&&(f=jQuery(b).find("input[type=file]").val(),
|
23 |
+
"undefined"!=typeof f&&""!==f&&setTimeout(function(){jQuery(g).fadeIn("slow")},2E3));f=jQuery(b).find(".g-recaptcha");f.length&&(1>jQuery(b).find(".frm_next_page").length||1>jQuery(b).find(".frm_next_page").val())&&f.closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">');b.submit()}else if("object"!=typeof f){jQuery(b).find(".frm_ajax_loading").removeClass("frm_loading_now");a=jQuery(b).closest(document.getElementById("frm_form_"+jQuery(b).find('input[name="form_id"]').val()+
|
24 |
+
"_container"));c=a.offset().top;a.replaceWith(f);e=document.documentElement.scrollTop||document.body.scrollTop;c&&c>frm_js.offset&&e>c&&jQuery(window).scrollTop(c-frm_js.offset);if("function"==typeof frmThemeOverride_frmAfterSubmit){var k=jQuery(f).find('input[name="form_id"]').val(),p="";k&&(p=jQuery('input[name="frm_page_order_'+k+'"]').val());frmThemeOverride_frmAfterSubmit(k,p,f,b)}jQuery(b).find('input[name="id"]').length&&(f=jQuery(b).find('input[name="id"]').val(),jQuery(document.getElementById("frm_edit_"+
|
25 |
+
f)).find("a").addClass("frm_ajax_edited").click())}else{jQuery(b).find('input[type="submit"], input[type="button"]').removeAttr("disabled");jQuery(b).find(".frm_ajax_loading").removeClass("frm_loading_now");k=!0;jQuery(".form-field").removeClass("frm_blank_field");jQuery(".form-field .frm_error").replaceWith("");a="";var p=!1,h=null,l;for(l in f)if(h=jQuery(b).find(jQuery(document.getElementById("frm_field_"+l+"_container"))),h.length&&h.is(":visible"))k=!1,""===a&&(frmFrontForm.scrollMsg(l,b),a=
|
26 |
+
"#frm_field_"+l+"_container"),jQuery(b).find("#frm_field_"+l+"_container .g-recaptcha").length&&(p=!0,grecaptcha.reset()),h.addClass("frm_blank_field"),"function"==typeof frmThemeOverride_frmPlaceError?frmThemeOverride_frmPlaceError(l,f):h.append('<div class="frm_error">'+f[l]+"</div>");else if("redirect"==l){window.location=f[l];return}!0!==p&&jQuery(b).find(".g-recaptcha").closest(".frm_form_field").replaceWith('<input type="hidden" name="recaptcha_checked" value="'+frm_js.nonce+'">');k&&b.submit()}},
|
27 |
+
error:function(){jQuery(b).find('input[type="submit"], input[type="button"]').removeAttr("disabled");b.submit()}})}function R(){J(jQuery(this),"clear")}function S(){J(jQuery(this),"replace")}function J(b,a){var c=b.data("frmval").replace(/(\n|\r\n)/g,"\r");if(""===c||"undefined"==typeof c)return!1;var e=b.val().replace(/(\n|\r\n)/g,"\r");"replace"==a?""===e&&b.addClass("frm_default").val(c):e==c&&b.removeClass("frm_default").val("")}function T(){var b=jQuery(this),a=b.data("eid"),c=b.data("fid");
|
28 |
+
b.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:a,form_id:c,nonce:frm_js.nonce},success:function(a){b.replaceWith(a)}});return!1}function K(b){var a="string";if("number"==b.type)a="number";else if("checkbox"==b.type||"select"==b.type){var c=b.options.length;"select"==b.type&&""===b.options[0]&&(c="post_status"==b.field_options.post_field?3:c-1);1==c&&(a="boolean")}return a}function U(){var b=
|
29 |
+
jQuery(this),a=b.data("fid");b.wrap('<div class="frm_file_names frm_uploaded_files">');for(var c=b.get(0).files,e=0;e<c.length;e++)1==c.length?b.after(c[e].name+' <a href="#" class="frm_clear_file_link">'+frm_js.remove+"</a>"):b.after(c[e].name+"<br/>");b.hide();c=b.attr("name");c!="item_meta["+a+"][]"&&c.replace("item_meta[","").replace("[]","").split("][");b.closest(".frm_form_field").find(".frm_uploaded_files:last").after('<input name="'+c+'" data-fid="'+a+'"class="frm_transparent frm_multiple_file" multiple="multiple" type="file" />')}
|
30 |
+
function V(){L(jQuery(this).parent(".frm_uploaded_files"))}function W(){jQuery(this).parent(".frm_file_names").replaceWith("");return!1}function X(){var b="frm_section_"+jQuery(this).data("parent")+"-"+jQuery(this).data("key");L(jQuery(document.getElementById(b)));return!1}function Y(){var b=jQuery(this).data("parent"),a=0;0<jQuery(".frm_repeat_"+b).length&&(a=1+parseInt(jQuery(".frm_repeat_"+b+":last").attr("id").replace("frm_section_"+b+"-","")),"undefined"==typeof a&&(a=1));jQuery.ajax({type:"POST",
|
31 |
+
url:frm_js.ajax_url,dataType:"json",data:{action:"frm_add_form_row",field_id:b,i:a,nonce:frm_js.nonce},success:function(a){var e=a.html,f=jQuery(e).hide().fadeIn("slow");jQuery(".frm_repeat_"+b+":last").after(f);var g=["other"],k,h="reset";frmFrontForm.hideCondFields(JSON.stringify(a.logic.hide));jQuery(e).find("input, select, textarea").each(function(){"file"!=this.type&&(k=this.name.replace("item_meta[","").split("]")[2].replace("[",""),-1==jQuery.inArray(k,g)&&(g.push(k),q("und",k,null,jQuery(this),
|
32 |
+
h),h="persist"))});for(var f=0,m=a.logic.check.length;f<m;f++)-1==jQuery.inArray(a.logic.check[f],g)&&1>jQuery(e).find(".frm_field_"+a.logic.check[f]+"_container").length&&(q("und",a.logic.check[f],null,null,h),h="persist");0<jQuery(e).find(".star").length&&jQuery(".star").rating();0<jQuery(e).find(".frm_chzn").length&&jQuery().chosen&&jQuery(".frm_chzn").chosen({allow_single_deselect:!0})}});return!1}function L(b){b.fadeOut("slow",function(){b.remove()})}function I(b){return!jQuery.isArray(b)&&0<=
|
33 |
+
b-parseFloat(b)+1}function N(b,a){var c=[];if("undefined"==typeof document.querySelector)jQuery("#"+b+' input[type=checkbox]:checked, input[type=hidden][name^="'+a+'"]').each(function(){c.push(this.value)});else for(var e=document.querySelectorAll("#"+b+' input[type=checkbox], input[type=hidden][name^="'+a+'"]'),f=0;f<e.length;f++)("checkbox"==e[f].type&&e[f].checked||"hidden"==e[f].type)&&c.push(e[f].value);return c}var m=[],E=[],F=[];return{init:function(){jQuery(document).on("click",".frm_trigger",
|
34 |
+
n);var b=jQuery(".frm_blank_field");b.length&&b.closest(".frm_toggle_container").prev(".frm_trigger").click();jQuery.isFunction(jQuery.fn.placeholder)?jQuery(".frm-show-form input, .frm-show-form textarea").placeholder():jQuery(".frm-show-form input[onblur], .frm-show-form textarea[onblur]").each(function(){""===jQuery(this).val()&&jQuery(this).blur()});jQuery(document).on("focus",".frm_toggle_default",R);jQuery(document).on("blur",".frm_toggle_default",S);jQuery(".frm_toggle_default").blur();jQuery(document.getElementById("frm_resend_email")).click(T);
|
35 |
+
jQuery(document).on("change",".frm_multiple_file",U);jQuery(document).on("click",".frm_clear_file_link",W);jQuery(document).on("click",".frm_remove_link",V);jQuery(document).on("change",'.frm-show-form input[name^="item_meta"], .frm-show-form select[name^="item_meta"], .frm-show-form textarea[name^="item_meta"]',A);jQuery(document).on("click",'.frm-show-form input[type="submit"], .frm-show-form input[name="frm_prev_page"], .frm-show-form .frm_save_draft',h);jQuery(document).on("change",'.frm_other_container input[type="checkbox"], .frm_other_container input[type="radio"], .frm_other_container select',
|
36 |
+
y);jQuery(document).on("change","input[type=file].frm_transparent",u);jQuery(document).on("click",".frm_remove_form_row",X);jQuery(document).on("click",".frm_add_form_row",Y);jQuery(".frm_month_heading, .frm_year_heading").toggle(function(){jQuery(this).children(".ui-icon-triangle-1-e, .ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-s").removeClass("ui-icon-triangle-1-e");jQuery(this).next(".frm_toggle_container").fadeIn("slow")},function(){jQuery(this).children(".ui-icon-triangle-1-s, .ui-icon-triangle-1-e").addClass("ui-icon-triangle-1-e").removeClass("ui-icon-triangle-1-s");
|
37 |
+
jQuery(this).next(".frm_toggle_container").hide()})},submitForm:function(b){b.preventDefault();jQuery(this).find(".wp-editor-wrap").length&&"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave();Q(this)},scrollToID:function(b){b=jQuery(document.getElementBtId(b).offset());window.scrollTo(b.left,b.top)},scrollMsg:function(b,a){var c="";if(c="undefined"==typeof a?jQuery(document.getElementById("frm_form_"+b+"_container")).offset().top:jQuery(a).find(document.getElementById("frm_field_"+b+"_container")).offset().top){var c=
|
38 |
+
c-frm_js.offset,e=jQuery("html").css("margin-top"),f=jQuery("body").css("margin-top");if(e||f)c=c-parseInt(e)-parseInt(f);e=document.documentElement.scrollTop||document.body.scrollTop;c&&(!e||e>c)&&jQuery(window).scrollTop(c)}},hideCondFields:function(b){b=JSON.parse(b);for(var a=0,c=b.length;a<c;a++){var e=document.getElementById("frm_field_"+b[a]+"_container");null!==e?e.style.display="none":jQuery(".frm_field_"+b[a]+"_container").hide()}},checkDependent:function(b){b=JSON.parse(b);for(var a="reset",
|
39 |
+
c=0,e=b.length;c<e;c++)q("und",b[c],null,null,a),a="persist"},generateGoogleTable:function(b,a){var c=__FRMTABLES;if("undefined"!=typeof c)if("table"==a){var c=c.table[b],e=new google.visualization.DataTable,f=!1;jQuery.inArray("id",c.options.fields)&&(f=!0,e.addColumn("number",frm_js.id));for(var g=c.fields.length,k="string",h=0,m=g;h<m;h++){var l=c.fields[h],k=K(l);e.addColumn(k,l.name)}h=!1;c.options.edit_link&&(h=!0,e.addColumn("string",c.options.edit_link));m=!1;c.options.delete_link&&(m=!0,
|
40 |
+
e.addColumn("string",c.options.delete_link));l=0;if(null!==c.entries){var n=c.entries.length;e.addRows(n);for(var q=0,u=0;u<n;u++){var l=0,t=c.entries[u];f&&(e.setCell(q,l,t.id),l++);for(var v=0,w=g;v<w;v++){var x=c.fields[v],k=K(x),x=t.metas[x.id];"number"!=k||null!==x&&""!==x?"boolean"==k&&(x=null===x||"false"==x||!1===x?"false":"true"):x=0;e.setCell(q,l,x);l++}h&&("undefined"!==typeof t.editLink?e.setCell(q,l,'<a href="'+t.editLink+'">'+c.options.edit_link+"</a>"):e.setCell(q,l,""),l++);m&&("undefined"!==
|
41 |
+
typeof t.deleteLink?e.setCell(q,l,'<a href="'+t.deleteLink+'" class="frm_delete_link" onclick="return confirm('+c.options.confirm+')">'+c.options.delete_link+"</a>"):e.setCell(q,l,""));q++}}else for(e.addRows(1),h=l=0,m=g;h<m;h++)0<l?e.setCell(0,l,""):e.setCell(0,l,c.options.no_entries),l++;(new google.visualization.Table(document.getElementById("frm_google_table_"+c.options.form_id))).draw(e,c.graphOpts)}else{c=c[a][b];e=new google.visualization.DataTable;f=!1;g=c.rows.length;if(0<g)if("table"==
|
42 |
+
c.type)for(f=!0,e.addRows(c.rows[g-1][0]+1),k=0;k<g;k++)e.setCell(c.rows[k]);else if("undefined"!=typeof c.rows[0].tooltip){f=!0;e.addColumn({type:"string",role:"tooltip"});for(k=0;k<g;k++)l=c.rows[k].tooltip,c.rows[k].tooltip=null,c.rows[k].push(l);e.addRows(c.rows)}g=c.cols.length;if(f){if(0<g)for(f=0;f<g;f++)k=c.cols[f],e.addColumn(k.type,k.name)}else{e=[[]];for(f=0;f<g;f++)e[0].push(c.cols[f].name);e=e.concat(c.rows);e=google.visualization.arrayToDataTable(e)}f=c.type.charAt(0).toUpperCase()+
|
43 |
+
c.type.slice(1)+"Chart";(new google.visualization[f](document.getElementById("chart_"+c.graph_id))).draw(e,c.options)}},removeUsedTimes:function(b,a){var c=jQuery(b).parents("form:first").find('input[name="id"]');jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"json",data:{action:"frm_fields_ajax_time_options",time_field:a,date_field:b.id,entry_id:c?c.val():"",date:jQuery(b).val(),nonce:frm_js.nonce},success:function(b){var c=jQuery(document.getElementById(a));c.find("option").removeAttr("disabled");
|
44 |
+
if(b&&""!==b)for(var g in b)c.find('option[value="'+g+'"]').attr("disabled","disabled")}})},escapeHtml:function(b){return b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},invisible:function(b){jQuery(b).css("visibility","hidden")},visible:function(b){jQuery(b).css("visibility","visible")}}}var frmFrontForm=frmFrontFormJS();jQuery(document).ready(function(h){frmFrontForm.init()});
|
45 |
+
function frmEditEntry(h,n,u,y,A,q){var v=jQuery(document.getElementById("frm_edit_"+h)),w=v.html(),B=jQuery(document.getElementById(n+h)),D=B.html();B.html('<span class="frm-loading-img" id="'+n+h+'"></span><div class="frm_orig_content" style="display:none">'+D+"</div>");jQuery.ajax({type:"POST",url:frm_js.ajax_url,dataType:"html",data:{action:"frm_entries_edit_entry_ajax",post_id:u,entry_id:h,id:y,nonce:frm_js.nonce},success:function(z){B.children(".frm-loading-img").replaceWith(z);v.replaceWith('<span id="frm_edit_'+
|
46 |
+
h+'"><a onclick="frmCancelEdit('+h+",'"+n+"','"+frmFrontForm.escapeHtml(w)+"',"+u+","+y+",'"+q+'\')" class="'+q+'">'+A+"</a></span>")}})}
|
47 |
+
function frmCancelEdit(h,n,u,y,A,q){var v=jQuery(document.getElementById("frm_edit_"+h)),w=v.find("a"),B=w.html();w.hasClass("frm_ajax_edited")||(w=jQuery(document.getElementById(n+h)),w.children(".frm_forms").replaceWith(""),w.children(".frm_orig_content").fadeIn("slow").removeClass("frm_orig_content"));v.replaceWith('<a id="frm_edit_'+h+'" class="frm_edit_link '+q+'" href="javascript:frmEditEntry('+h+",'"+n+"',"+y+","+A+",'"+frmFrontForm.escapeHtml(B)+"','"+q+"')\">"+u+"</a>")}
|
48 |
+
function frmUpdateField(h,n,u,y,A){jQuery(document.getElementById("frm_update_field_"+h+"_"+n)).html('<span class="frm-loading-img"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_update_field_ajax",entry_id:h,field_id:n,value:u,nonce:frm_js.nonce},success:function(){""===y.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById("frm_update_field_"+h+"_"+n+"_"+A)).fadeOut("slow"):jQuery(document.getElementById("frm_update_field_"+h+"_"+n+"_"+A)).replaceWith(y)}})}
|
49 |
+
function frmDeleteEntry(h,n){jQuery(document.getElementById("frm_delete_"+h)).replaceWith('<span class="frm-loading-img" id="frm_delete_'+h+'"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_destroy",entry:h,nonce:frm_js.nonce},success:function(u){"success"==u.replace(/^\s+|\s+$/g,"")?jQuery(document.getElementById(n+h)).fadeOut("slow"):jQuery(document.getElementById("frm_delete_"+h)).replaceWith(u)}})}
|
50 |
+
function frmOnSubmit(h){console.warn("DEPRECATED: function frmOnSubmit in v2.0 use frmFrontForm.submitForm");frmFrontForm.submitForm(h,this)}
|
51 |
+
function frm_resend_email(h,n){console.warn("DEPRECATED: function frm_resend_email in v2.0");$link=jQuery(document.getElementById("frm_resend_email"));$link.append('<span class="spinner" style="display:inline"></span>');jQuery.ajax({type:"POST",url:frm_js.ajax_url,data:{action:"frm_entries_send_email",entry_id:h,form_id:n,nonce:frm_js.nonce},success:function(h){$link.replaceWith(h)}})};
|
js/formidable_admin.js
CHANGED
@@ -766,15 +766,19 @@ function frmAdminBuildJS(){
|
|
766 |
|
767 |
if(main_form_id == prev_form){
|
768 |
//create form
|
769 |
-
toggleFormid(field_id, '', main_form_id);
|
770 |
}else{
|
771 |
-
toggleFormid(field_id, prev_form, main_form_id);
|
772 |
}
|
773 |
}else{
|
774 |
-
|
775 |
-
|
|
|
776 |
|
777 |
-
|
|
|
|
|
|
|
778 |
}
|
779 |
}
|
780 |
|
@@ -795,11 +799,11 @@ function frmAdminBuildJS(){
|
|
795 |
$thisField.find('.frm_'+ addRemove +'_form_row .frm_repeat_label').text(obj.value);
|
796 |
}
|
797 |
|
798 |
-
function toggleFormid(field_id, form_id, main_form_id){
|
799 |
// change form ids of all fields in section
|
800 |
var children = fieldsInSection(field_id);
|
801 |
jQuery.ajax({type:'POST',url:ajaxurl,
|
802 |
-
data:{action:'frm_toggle_repeat', form_id:form_id, parent_form_id:main_form_id, children:children, nonce:frmGlobal.nonce},
|
803 |
success:function(id){
|
804 |
//return form id to hidden field
|
805 |
jQuery('input[name="field_options[form_select_'+field_id+']"]').val(id);
|
@@ -1642,8 +1646,10 @@ function frmAdminBuildJS(){
|
|
1642 |
var value = this.value;
|
1643 |
if(value == 'none'){
|
1644 |
value='top';
|
|
|
|
|
1645 |
}
|
1646 |
-
jQuery('.frm_pos_container').removeClass('frm_top_container frm_left_container frm_right_container').addClass('frm_'+value+'_container');
|
1647 |
}
|
1648 |
|
1649 |
function collapseAllSections(){
|
@@ -1865,6 +1871,15 @@ function frmAdminBuildJS(){
|
|
1865 |
}
|
1866 |
|
1867 |
setupSortable('ul.frm_sorting');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1868 |
jQuery('.field_type_list > li').draggable({
|
1869 |
connectToSortable:'#new_fields',cursor:'move',
|
1870 |
helper:'clone',revert:'invalid',delay:10,
|
766 |
|
767 |
if(main_form_id == prev_form){
|
768 |
//create form
|
769 |
+
toggleFormid(field_id, '', main_form_id, 1);
|
770 |
}else{
|
771 |
+
toggleFormid(field_id, prev_form, main_form_id, 1);
|
772 |
}
|
773 |
}else{
|
774 |
+
if(confirm(frm_admin_js.conf_no_repeat)){
|
775 |
+
jQuery('#frm_field_id_'+field_id+' .show_repeat_sec').fadeOut('slow');
|
776 |
+
jQuery(this).closest('li.frm_field_box').removeClass('repeat_section').addClass('no_repeat_section');
|
777 |
|
778 |
+
toggleFormid(field_id, main_form_id, main_form_id, 0);
|
779 |
+
}else{
|
780 |
+
this.checked = true;
|
781 |
+
}
|
782 |
}
|
783 |
}
|
784 |
|
799 |
$thisField.find('.frm_'+ addRemove +'_form_row .frm_repeat_label').text(obj.value);
|
800 |
}
|
801 |
|
802 |
+
function toggleFormid(field_id, form_id, main_form_id, checked){
|
803 |
// change form ids of all fields in section
|
804 |
var children = fieldsInSection(field_id);
|
805 |
jQuery.ajax({type:'POST',url:ajaxurl,
|
806 |
+
data:{action:'frm_toggle_repeat', form_id:form_id, parent_form_id:main_form_id, checked:checked, field_id:field_id, children:children, nonce:frmGlobal.nonce},
|
807 |
success:function(id){
|
808 |
//return form id to hidden field
|
809 |
jQuery('input[name="field_options[form_select_'+field_id+']"]').val(id);
|
1646 |
var value = this.value;
|
1647 |
if(value == 'none'){
|
1648 |
value='top';
|
1649 |
+
} else if ( value == 'no_label' ) {
|
1650 |
+
value = 'none';
|
1651 |
}
|
1652 |
+
jQuery('.frm_pos_container').removeClass('frm_top_container frm_left_container frm_right_container frm_none_container').addClass('frm_'+value+'_container');
|
1653 |
}
|
1654 |
|
1655 |
function collapseAllSections(){
|
1871 |
}
|
1872 |
|
1873 |
setupSortable('ul.frm_sorting');
|
1874 |
+
|
1875 |
+
// Show message if section has no fields inside
|
1876 |
+
var frm_sorting = document.getElementsByClassName('start_divider frm_sorting');
|
1877 |
+
for ( i = 0; i < frm_sorting.length ; i++) {
|
1878 |
+
if ( frm_sorting[i].children.length < 2 ) {
|
1879 |
+
frm_sorting[i].parentNode.getElementsByClassName('frm_no_section_fields')[0].className = 'frm_no_section_fields frm_block';
|
1880 |
+
}
|
1881 |
+
}
|
1882 |
+
|
1883 |
jQuery('.field_type_list > li').draggable({
|
1884 |
connectToSortable:'#new_fields',cursor:'move',
|
1885 |
helper:'clone',revert:'invalid',delay:10,
|
languages/formidable-da_DK.mo
ADDED
Binary file
|
languages/formidable-da_DK.po
ADDED
@@ -0,0 +1,5968 @@
|
|
|
|
|
|
|
|
|
|
|
|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