@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | <div class="submitbox"> |
6 | 6 | <div id="minor-publishing" class="frm_remove_border"> |
7 | 7 | <div class="misc-pub-section"> |
8 | - <?php do_action('frm_show_entry_publish_box', $entry); ?> |
|
8 | + <?php do_action( 'frm_show_entry_publish_box', $entry ); ?> |
|
9 | 9 | <div class="clear"></div> |
10 | 10 | </div> |
11 | 11 | <div id="misc-publishing-actions"> |
12 | - <?php include(dirname(__FILE__) .'/_sidebar-shared-pub.php'); ?> |
|
12 | + <?php include( dirname( __FILE__ ) . '/_sidebar-shared-pub.php' ); ?> |
|
13 | 13 | <div class="misc-pub-section"> |
14 | 14 | <span class="dashicons dashicons-format-aside wp-media-buttons-icon"></span> |
15 | 15 | <a href="#" onclick="window.print();return false;"><?php _e( 'Print', 'formidable' ) ?></a> |
@@ -17,22 +17,22 @@ discard block |
||
17 | 17 | </div> |
18 | 18 | </div> |
19 | 19 | <div id="major-publishing-actions"> |
20 | - <?php if ( current_user_can('frm_delete_entries') ) { ?> |
|
20 | + <?php if ( current_user_can( 'frm_delete_entries' ) ) { ?> |
|
21 | 21 | <div id="delete-action"> |
22 | - <a href="<?php echo esc_url( admin_url('admin.php?page=formidable-entries&frm_action=destroy&id='. $id .'&form='. $entry->form_id) ) ?>" class="submitdelete deletion" onclick="return confirm('<?php _e( 'Are you sure you want to delete that entry?', 'formidable' ) ?>');" title="<?php esc_attr_e( 'Delete' ) ?>"><?php _e( 'Delete' ) ?></a> |
|
23 | - <?php if ( ! empty($entry->post_id) ) { ?> |
|
24 | - <a href="<?php echo esc_url( admin_url('admin.php?page=formidable-entries&frm_action=destroy&id='. $id .'&form='. $entry->form_id .'&keep_post=1') ) ?>" class="submitdelete deletion frm_delete_wo_post" onclick="return confirm('<?php esc_attr_e( 'Are you sure you want to delete this entry?', 'formidable' ) ?>);" title="<?php esc_attr_e( 'Delete entry but leave the post', 'formidable' ) ?>"><?php _e( 'Delete without Post', 'formidable' ) ?></a> |
|
22 | + <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-entries&frm_action=destroy&id=' . $id . '&form=' . $entry->form_id ) ) ?>" class="submitdelete deletion" onclick="return confirm('<?php _e( 'Are you sure you want to delete that entry?', 'formidable' ) ?>');" title="<?php esc_attr_e( 'Delete' ) ?>"><?php _e( 'Delete' ) ?></a> |
|
23 | + <?php if ( ! empty( $entry->post_id ) ) { ?> |
|
24 | + <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-entries&frm_action=destroy&id=' . $id . '&form=' . $entry->form_id . '&keep_post=1' ) ) ?>" class="submitdelete deletion frm_delete_wo_post" onclick="return confirm('<?php esc_attr_e( 'Are you sure you want to delete this entry?', 'formidable' ) ?>);" title="<?php esc_attr_e( 'Delete entry but leave the post', 'formidable' ) ?>"><?php _e( 'Delete without Post', 'formidable' ) ?></a> |
|
25 | 25 | <?php } ?> |
26 | 26 | </div> |
27 | 27 | <?php } ?> |
28 | 28 | |
29 | - <?php do_action('frm_entry_major_pub', $entry); ?> |
|
29 | + <?php do_action( 'frm_entry_major_pub', $entry ); ?> |
|
30 | 30 | <div class="clear"></div> |
31 | 31 | </div> |
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | </div> |
35 | -<?php do_action('frm_show_entry_sidebar', $entry); |
|
36 | -FrmEntriesController::entry_sidebar($entry); |
|
35 | +<?php do_action( 'frm_show_entry_sidebar', $entry ); |
|
36 | +FrmEntriesController::entry_sidebar( $entry ); |
|
37 | 37 | ?> |
38 | 38 | </div> |
@@ -4,18 +4,18 @@ discard block |
||
4 | 4 | <meta charset="<?php bloginfo( 'charset' ); ?>" /> |
5 | 5 | <title><?php bloginfo('name'); ?></title> |
6 | 6 | <?php |
7 | - wp_admin_css( 'global' ); |
|
8 | - wp_admin_css(); |
|
9 | - wp_admin_css( 'colors' ); |
|
10 | - wp_admin_css( 'ie' ); |
|
7 | + wp_admin_css( 'global' ); |
|
8 | + wp_admin_css(); |
|
9 | + wp_admin_css( 'colors' ); |
|
10 | + wp_admin_css( 'ie' ); |
|
11 | 11 | if ( is_multisite() ) { |
12 | - wp_admin_css( 'ms' ); |
|
12 | + wp_admin_css( 'ms' ); |
|
13 | 13 | } |
14 | 14 | |
15 | - do_action('admin_print_styles'); |
|
16 | - do_action('admin_print_scripts'); |
|
15 | + do_action('admin_print_styles'); |
|
16 | + do_action('admin_print_scripts'); |
|
17 | 17 | |
18 | - ?> |
|
18 | + ?> |
|
19 | 19 | </head> |
20 | 20 | <body class="wp-admin no-js wp-core-ui frm_field_opts_popup <?php echo esc_attr( apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class ); ?>"> |
21 | 21 | <div class="frm_med_padding"> |
@@ -29,21 +29,21 @@ discard block |
||
29 | 29 | <?php |
30 | 30 | $other_array = array(); |
31 | 31 | foreach ( $field->options as $fkey => $fopt ) { |
32 | - //If it is an other option, don't include it |
|
33 | - if ( $fkey && strpos( $fkey, 'other') !== false ) { |
|
34 | - continue; |
|
35 | - } |
|
32 | + //If it is an other option, don't include it |
|
33 | + if ( $fkey && strpos( $fkey, 'other') !== false ) { |
|
34 | + continue; |
|
35 | + } |
|
36 | 36 | if ( is_array( $fopt ) ) { |
37 | - $label = (isset($fopt['label'])) ? $fopt['label'] : reset($fopt); |
|
38 | - $value = (isset($fopt['value'])) ? $fopt['value'] : $label; |
|
37 | + $label = (isset($fopt['label'])) ? $fopt['label'] : reset($fopt); |
|
38 | + $value = (isset($fopt['value'])) ? $fopt['value'] : $label; |
|
39 | 39 | if ( $label != $value && FrmField::is_option_true( $field, 'separate_value' ) ) { |
40 | - echo "$label|$value\n"; |
|
40 | + echo "$label|$value\n"; |
|
41 | 41 | } else { |
42 | - echo $label ."\n"; |
|
43 | - } |
|
42 | + echo $label ."\n"; |
|
43 | + } |
|
44 | 44 | } else { |
45 | - echo $fopt ."\n"; |
|
46 | - } |
|
45 | + echo $fopt ."\n"; |
|
46 | + } |
|
47 | 47 | } ?> |
48 | 48 | </textarea> |
49 | 49 |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <html <?php language_attributes(); ?>> |
3 | 3 | <head> |
4 | 4 | <meta charset="<?php bloginfo( 'charset' ); ?>" /> |
5 | - <title><?php bloginfo('name'); ?></title> |
|
5 | + <title><?php bloginfo( 'name' ); ?></title> |
|
6 | 6 | <?php |
7 | 7 | wp_admin_css( 'global' ); |
8 | 8 | wp_admin_css(); |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | wp_admin_css( 'ms' ); |
13 | 13 | } |
14 | 14 | |
15 | - do_action('admin_print_styles'); |
|
16 | - do_action('admin_print_scripts'); |
|
15 | + do_action( 'admin_print_styles' ); |
|
16 | + do_action( 'admin_print_scripts' ); |
|
17 | 17 | |
18 | 18 | ?> |
19 | 19 | </head> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | <p class="howto"><?php _e( 'Edit or add field options (one per line)', 'formidable' ) ?></p> |
23 | 23 | <ul class="frm_prepop"> |
24 | 24 | <?php foreach ( $prepop as $label => $pop ) { ?> |
25 | - <li><a href="javascript:void(0)" onclick='frmPrePop(<?php echo str_replace("'", '‘', json_encode($pop)) ?>); return false;'><?php echo esc_html( $label ) ?></a></li> |
|
25 | + <li><a href="javascript:void(0)" onclick='frmPrePop(<?php echo str_replace( "'", '‘', json_encode( $pop ) ) ?>); return false;'><?php echo esc_html( $label ) ?></a></li> |
|
26 | 26 | <?php } ?> |
27 | 27 | </ul> |
28 | 28 | <textarea name="frm_bulk_options" id="frm_bulk_options"> |
@@ -30,19 +30,19 @@ discard block |
||
30 | 30 | $other_array = array(); |
31 | 31 | foreach ( $field->options as $fkey => $fopt ) { |
32 | 32 | //If it is an other option, don't include it |
33 | - if ( $fkey && strpos( $fkey, 'other') !== false ) { |
|
33 | + if ( $fkey && strpos( $fkey, 'other' ) !== false ) { |
|
34 | 34 | continue; |
35 | 35 | } |
36 | 36 | if ( is_array( $fopt ) ) { |
37 | - $label = (isset($fopt['label'])) ? $fopt['label'] : reset($fopt); |
|
38 | - $value = (isset($fopt['value'])) ? $fopt['value'] : $label; |
|
37 | + $label = ( isset( $fopt['label'] ) ) ? $fopt['label'] : reset( $fopt ); |
|
38 | + $value = ( isset( $fopt['value'] ) ) ? $fopt['value'] : $label; |
|
39 | 39 | if ( $label != $value && FrmField::is_option_true( $field, 'separate_value' ) ) { |
40 | 40 | echo "$label|$value\n"; |
41 | 41 | } else { |
42 | - echo $label ."\n"; |
|
42 | + echo $label . "\n"; |
|
43 | 43 | } |
44 | 44 | } else { |
45 | - echo $fopt ."\n"; |
|
45 | + echo $fopt . "\n"; |
|
46 | 46 | } |
47 | 47 | } ?> |
48 | 48 | </textarea> |
@@ -3,48 +3,48 @@ discard block |
||
3 | 3 | <?php } else if ( $field['type'] == 'textarea' ) { ?> |
4 | 4 | <textarea name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php |
5 | 5 | if ( $field['max'] ) { |
6 | - echo 'rows="'. esc_attr( $field['max'] ) .'" '; |
|
6 | + echo 'rows="'. esc_attr( $field['max'] ) .'" '; |
|
7 | 7 | } |
8 | 8 | do_action('frm_field_input_html', $field); |
9 | 9 | ?>><?php echo FrmAppHelper::esc_textarea($field['value']) ?></textarea> |
10 | 10 | <?php |
11 | 11 | |
12 | 12 | } else if ( $field['type'] == 'radio' ) { |
13 | - $read_only = false; |
|
13 | + $read_only = false; |
|
14 | 14 | if ( FrmField::is_read_only( $field ) && ! FrmAppHelper::is_admin() ) { |
15 | - $read_only = true; ?> |
|
15 | + $read_only = true; ?> |
|
16 | 16 | <input type="hidden" value="<?php echo esc_attr( $field['value'] ) ?>" name="<?php echo esc_attr( $field_name ) ?>" /> |
17 | 17 | <?php |
18 | - } |
|
18 | + } |
|
19 | 19 | |
20 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
20 | + if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
21 | 21 | do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) ); |
22 | - } else if ( is_array($field['options']) ) { |
|
23 | - foreach ( $field['options'] as $opt_key => $opt ) { |
|
22 | + } else if ( is_array($field['options']) ) { |
|
23 | + foreach ( $field['options'] as $opt_key => $opt ) { |
|
24 | 24 | if ( isset( $atts ) && isset( $atts['opt'] ) && ( $atts['opt'] != $opt_key ) ) { |
25 | - continue; |
|
26 | - } |
|
25 | + continue; |
|
26 | + } |
|
27 | 27 | |
28 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
29 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); ?> |
|
28 | + $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
29 | + $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); ?> |
|
30 | 30 | <div class="<?php echo esc_attr( apply_filters( 'frm_radio_class', 'frm_radio', $field, $field_val ) ) ?>"><?php |
31 | 31 | |
32 | 32 | if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
33 | 33 | ?><label for="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>"><?php |
34 | - } |
|
35 | - $checked = FrmAppHelper::check_selected($field['value'], $field_val) ? 'checked="checked" ' : ' '; |
|
34 | + } |
|
35 | + $checked = FrmAppHelper::check_selected($field['value'], $field_val) ? 'checked="checked" ' : ' '; |
|
36 | 36 | |
37 | - $other_opt = false; |
|
38 | - $other_args = FrmFieldsHelper::prepare_other_input( compact( 'field_name', 'opt_key', 'field' ), $other_opt, $checked ); |
|
39 | - ?> |
|
37 | + $other_opt = false; |
|
38 | + $other_args = FrmFieldsHelper::prepare_other_input( compact( 'field_name', 'opt_key', 'field' ), $other_opt, $checked ); |
|
39 | + ?> |
|
40 | 40 | <input type="radio" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id . '-' . $opt_key ) ?>" value="<?php echo esc_attr( $field_val ) ?>" <?php |
41 | - echo $checked; |
|
42 | - do_action('frm_field_input_html', $field); |
|
41 | + echo $checked; |
|
42 | + do_action('frm_field_input_html', $field); |
|
43 | 43 | ?>/><?php |
44 | 44 | |
45 | 45 | if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
46 | - echo ' '. $opt .'</label>'; |
|
47 | - } |
|
46 | + echo ' '. $opt .'</label>'; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | FrmFieldsHelper::include_other_input( array( |
50 | 50 | 'other_opt' => $other_opt, 'read_only' => $read_only, |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | 'html_id' => $html_id, 'opt_key' => $opt_key, |
54 | 54 | ) ); |
55 | 55 | |
56 | - unset( $other_opt, $other_args ); |
|
56 | + unset( $other_opt, $other_args ); |
|
57 | 57 | ?></div> |
58 | 58 | <?php |
59 | - } |
|
60 | - } |
|
59 | + } |
|
60 | + } |
|
61 | 61 | } else if ( $field['type'] == 'select' ) { |
62 | - $read_only = false; |
|
63 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
62 | + $read_only = false; |
|
63 | + if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
64 | 64 | echo FrmFieldsHelper::dropdown_categories( array( 'name' => $field_name, 'field' => $field ) ); |
65 | 65 | } else { |
66 | 66 | if ( FrmField::is_read_only( $field ) && ! FrmAppHelper::is_admin() ) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | ?> |
94 | 94 | <option value="<?php echo esc_attr($field_val) ?>" <?php echo $selected ? ' selected="selected"' : ''; ?><?php echo ( FrmFieldsHelper::is_other_opt( $opt_key ) ) ? ' class="frm_other_trigger"' : '';?>><?php echo ($opt == '') ? ' ' : $opt; ?></option> |
95 | 95 | <?php |
96 | - } ?> |
|
96 | + } ?> |
|
97 | 97 | </select> |
98 | 98 | <?php |
99 | 99 | FrmFieldsHelper::include_other_input( array( |
@@ -102,52 +102,52 @@ discard block |
||
102 | 102 | 'value' => $other_args['value'], 'field' => $field, |
103 | 103 | 'html_id' => $html_id, 'opt_key' => false, |
104 | 104 | ) ); |
105 | - } |
|
105 | + } |
|
106 | 106 | } else if ( $field['type'] == 'checkbox' ) { |
107 | - $checked_values = $field['value']; |
|
108 | - $read_only = false; |
|
107 | + $checked_values = $field['value']; |
|
108 | + $read_only = false; |
|
109 | 109 | |
110 | 110 | if ( FrmField::is_read_only( $field ) && ! FrmAppHelper::is_admin() ) { |
111 | - $read_only = true; |
|
112 | - if ( $checked_values ) { |
|
113 | - foreach ( (array) $checked_values as $checked_value ) { ?> |
|
111 | + $read_only = true; |
|
112 | + if ( $checked_values ) { |
|
113 | + foreach ( (array) $checked_values as $checked_value ) { ?> |
|
114 | 114 | <input type="hidden" value="<?php echo esc_attr( $checked_value ) ?>" name="<?php echo esc_attr( $field_name ) ?>[]" /> |
115 | 115 | <?php |
116 | - } |
|
117 | - } else { ?> |
|
116 | + } |
|
117 | + } else { ?> |
|
118 | 118 | <input type="hidden" value="" name="<?php echo esc_attr( $field_name ) ?>[]" /> |
119 | 119 | <?php |
120 | - } |
|
121 | - } |
|
120 | + } |
|
121 | + } |
|
122 | 122 | |
123 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
123 | + if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
124 | 124 | do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) ); |
125 | - } else if ( $field['options'] ) { |
|
126 | - foreach ( $field['options'] as $opt_key => $opt ) { |
|
127 | - if ( isset($atts) && isset($atts['opt']) && ($atts['opt'] != $opt_key) ) { |
|
128 | - continue; |
|
129 | - } |
|
130 | - |
|
131 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
132 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
133 | - $checked = FrmAppHelper::check_selected($checked_values, $field_val) ? ' checked="checked"' : ''; |
|
134 | - |
|
135 | - // Check if other opt, and get values for other field if needed |
|
136 | - $other_opt = false; |
|
125 | + } else if ( $field['options'] ) { |
|
126 | + foreach ( $field['options'] as $opt_key => $opt ) { |
|
127 | + if ( isset($atts) && isset($atts['opt']) && ($atts['opt'] != $opt_key) ) { |
|
128 | + continue; |
|
129 | + } |
|
130 | + |
|
131 | + $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
132 | + $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
133 | + $checked = FrmAppHelper::check_selected($checked_values, $field_val) ? ' checked="checked"' : ''; |
|
134 | + |
|
135 | + // Check if other opt, and get values for other field if needed |
|
136 | + $other_opt = false; |
|
137 | 137 | $other_args = FrmFieldsHelper::prepare_other_input( compact( 'field', 'field_name', 'opt_key' ), $other_opt, $checked ); |
138 | 138 | |
139 | - ?> |
|
139 | + ?> |
|
140 | 140 | <div class="<?php echo esc_attr( apply_filters( 'frm_checkbox_class', 'frm_checkbox', $field, $field_val ) ) ?>" id="frm_checkbox_<?php echo esc_attr( $field['id'] ) ?>-<?php echo esc_attr( $opt_key ) ?>"><?php |
141 | 141 | |
142 | - if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
|
143 | - ?><label for="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>"><?php |
|
144 | - } |
|
142 | + if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
|
143 | + ?><label for="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>"><?php |
|
144 | + } |
|
145 | 145 | |
146 | - ?><input type="checkbox" name="<?php echo esc_attr( $field_name ) ?>[<?php echo ( $other_opt ? esc_attr( $opt_key ) : '' ) ?>]" id="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>" value="<?php echo esc_attr( $field_val ) ?>" <?php echo $checked ?> <?php do_action('frm_field_input_html', $field) ?> /><?php |
|
146 | + ?><input type="checkbox" name="<?php echo esc_attr( $field_name ) ?>[<?php echo ( $other_opt ? esc_attr( $opt_key ) : '' ) ?>]" id="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>" value="<?php echo esc_attr( $field_val ) ?>" <?php echo $checked ?> <?php do_action('frm_field_input_html', $field) ?> /><?php |
|
147 | 147 | |
148 | - if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
|
149 | - echo ' '. $opt .'</label>'; |
|
150 | - } |
|
148 | + if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
|
149 | + echo ' '. $opt .'</label>'; |
|
150 | + } |
|
151 | 151 | |
152 | 152 | FrmFieldsHelper::include_other_input( array( |
153 | 153 | 'other_opt' => $other_opt, 'read_only' => $read_only, |
@@ -156,17 +156,17 @@ discard block |
||
156 | 156 | 'html_id' => $html_id, 'opt_key' => $opt_key, |
157 | 157 | ) ); |
158 | 158 | |
159 | - unset( $other_opt, $other_args, $checked ); |
|
159 | + unset( $other_opt, $other_args, $checked ); |
|
160 | 160 | |
161 | - ?></div> |
|
161 | + ?></div> |
|
162 | 162 | <?php |
163 | - } |
|
164 | - } |
|
163 | + } |
|
164 | + } |
|
165 | 165 | } else if ( $field['type'] == 'captcha' && ! FrmAppHelper::is_admin() ) { |
166 | - $frm_settings = FrmAppHelper::get_settings(); |
|
167 | - if ( ! empty($frm_settings->pubkey) ) { |
|
168 | - FrmFieldsHelper::display_recaptcha($field); |
|
169 | - } |
|
166 | + $frm_settings = FrmAppHelper::get_settings(); |
|
167 | + if ( ! empty($frm_settings->pubkey) ) { |
|
168 | + FrmFieldsHelper::display_recaptcha($field); |
|
169 | + } |
|
170 | 170 | } else { |
171 | - do_action('frm_form_fields', $field, $field_name, compact('errors', 'html_id')); |
|
171 | + do_action('frm_form_fields', $field, $field_name, compact('errors', 'html_id')); |
|
172 | 172 | } |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php if ( in_array( $field['type'], array( 'email', 'url', 'text' ) ) ) { ?> |
2 | -<input type="<?php echo ( $frm_settings->use_html || $field['type'] == 'password' ) ? $field['type'] : 'text'; ?>" id="<?php echo esc_attr( $html_id ) ?>" name="<?php echo esc_attr( $field_name ) ?>" value="<?php echo esc_attr( $field['value'] ) ?>" <?php do_action('frm_field_input_html', $field) ?>/> |
|
2 | +<input type="<?php echo ( $frm_settings->use_html || $field['type'] == 'password' ) ? $field['type'] : 'text'; ?>" id="<?php echo esc_attr( $html_id ) ?>" name="<?php echo esc_attr( $field_name ) ?>" value="<?php echo esc_attr( $field['value'] ) ?>" <?php do_action( 'frm_field_input_html', $field ) ?>/> |
|
3 | 3 | <?php } else if ( $field['type'] == 'textarea' ) { ?> |
4 | 4 | <textarea name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php |
5 | 5 | if ( $field['max'] ) { |
6 | - echo 'rows="'. esc_attr( $field['max'] ) .'" '; |
|
6 | + echo 'rows="' . esc_attr( $field['max'] ) . '" '; |
|
7 | 7 | } |
8 | -do_action('frm_field_input_html', $field); |
|
9 | -?>><?php echo FrmAppHelper::esc_textarea($field['value']) ?></textarea> |
|
8 | +do_action( 'frm_field_input_html', $field ); |
|
9 | +?>><?php echo FrmAppHelper::esc_textarea( $field['value'] ) ?></textarea> |
|
10 | 10 | <?php |
11 | 11 | |
12 | 12 | } else if ( $field['type'] == 'radio' ) { |
@@ -17,33 +17,33 @@ discard block |
||
17 | 17 | <?php |
18 | 18 | } |
19 | 19 | |
20 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
20 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
21 | 21 | do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) ); |
22 | - } else if ( is_array($field['options']) ) { |
|
22 | + } else if ( is_array( $field['options'] ) ) { |
|
23 | 23 | foreach ( $field['options'] as $opt_key => $opt ) { |
24 | 24 | if ( isset( $atts ) && isset( $atts['opt'] ) && ( $atts['opt'] != $opt_key ) ) { |
25 | 25 | continue; |
26 | 26 | } |
27 | 27 | |
28 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
29 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); ?> |
|
28 | + $field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field ); |
|
29 | + $opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field ); ?> |
|
30 | 30 | <div class="<?php echo esc_attr( apply_filters( 'frm_radio_class', 'frm_radio', $field, $field_val ) ) ?>"><?php |
31 | 31 | |
32 | 32 | if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
33 | 33 | ?><label for="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>"><?php |
34 | 34 | } |
35 | - $checked = FrmAppHelper::check_selected($field['value'], $field_val) ? 'checked="checked" ' : ' '; |
|
35 | + $checked = FrmAppHelper::check_selected( $field['value'], $field_val ) ? 'checked="checked" ' : ' '; |
|
36 | 36 | |
37 | 37 | $other_opt = false; |
38 | 38 | $other_args = FrmFieldsHelper::prepare_other_input( compact( 'field_name', 'opt_key', 'field' ), $other_opt, $checked ); |
39 | 39 | ?> |
40 | 40 | <input type="radio" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id . '-' . $opt_key ) ?>" value="<?php echo esc_attr( $field_val ) ?>" <?php |
41 | 41 | echo $checked; |
42 | - do_action('frm_field_input_html', $field); |
|
42 | + do_action( 'frm_field_input_html', $field ); |
|
43 | 43 | ?>/><?php |
44 | 44 | |
45 | 45 | if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
46 | - echo ' '. $opt .'</label>'; |
|
46 | + echo ' ' . $opt . '</label>'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | FrmFieldsHelper::include_other_input( array( |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | } else if ( $field['type'] == 'select' ) { |
62 | 62 | $read_only = false; |
63 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
63 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
64 | 64 | echo FrmFieldsHelper::dropdown_categories( array( 'name' => $field_name, 'field' => $field ) ); |
65 | 65 | } else { |
66 | 66 | if ( FrmField::is_read_only( $field ) && ! FrmAppHelper::is_admin() ) { |
@@ -71,12 +71,12 @@ discard block |
||
71 | 71 | <input type="hidden" value="<?php echo esc_attr( $selected_value ) ?>" name="<?php echo esc_attr( $field_name ) ?>[]" /> <?php |
72 | 72 | } |
73 | 73 | } else { ?> |
74 | - <input type="hidden" value="<?php echo esc_attr($field['value']) ?>" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" /> <?php |
|
74 | + <input type="hidden" value="<?php echo esc_attr( $field['value'] ) ?>" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" /> <?php |
|
75 | 75 | } ?> |
76 | - <select disabled="disabled" <?php do_action('frm_field_input_html', $field) ?>> <?php |
|
76 | + <select disabled="disabled" <?php do_action( 'frm_field_input_html', $field ) ?>> <?php |
|
77 | 77 | |
78 | 78 | } else { ?> |
79 | -<select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php do_action('frm_field_input_html', $field) ?>> |
|
79 | +<select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php do_action( 'frm_field_input_html', $field ) ?>> |
|
80 | 80 | <?php } |
81 | 81 | |
82 | 82 | $other_opt = $other_checked = false; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } |
92 | 92 | } |
93 | 93 | ?> |
94 | - <option value="<?php echo esc_attr($field_val) ?>" <?php echo $selected ? ' selected="selected"' : ''; ?><?php echo ( FrmFieldsHelper::is_other_opt( $opt_key ) ) ? ' class="frm_other_trigger"' : '';?>><?php echo ($opt == '') ? ' ' : $opt; ?></option> |
|
94 | + <option value="<?php echo esc_attr( $field_val ) ?>" <?php echo $selected ? ' selected="selected"' : ''; ?><?php echo ( FrmFieldsHelper::is_other_opt( $opt_key ) ) ? ' class="frm_other_trigger"' : ''; ?>><?php echo ( $opt == '' ) ? ' ' : $opt; ?></option> |
|
95 | 95 | <?php |
96 | 96 | } ?> |
97 | 97 | </select> |
@@ -120,17 +120,17 @@ discard block |
||
120 | 120 | } |
121 | 121 | } |
122 | 122 | |
123 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
123 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
124 | 124 | do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) ); |
125 | 125 | } else if ( $field['options'] ) { |
126 | 126 | foreach ( $field['options'] as $opt_key => $opt ) { |
127 | - if ( isset($atts) && isset($atts['opt']) && ($atts['opt'] != $opt_key) ) { |
|
127 | + if ( isset( $atts ) && isset( $atts['opt'] ) && ( $atts['opt'] != $opt_key ) ) { |
|
128 | 128 | continue; |
129 | 129 | } |
130 | 130 | |
131 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
132 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
133 | - $checked = FrmAppHelper::check_selected($checked_values, $field_val) ? ' checked="checked"' : ''; |
|
131 | + $field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field ); |
|
132 | + $opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field ); |
|
133 | + $checked = FrmAppHelper::check_selected( $checked_values, $field_val ) ? ' checked="checked"' : ''; |
|
134 | 134 | |
135 | 135 | // Check if other opt, and get values for other field if needed |
136 | 136 | $other_opt = false; |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | ?><label for="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>"><?php |
144 | 144 | } |
145 | 145 | |
146 | - ?><input type="checkbox" name="<?php echo esc_attr( $field_name ) ?>[<?php echo ( $other_opt ? esc_attr( $opt_key ) : '' ) ?>]" id="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>" value="<?php echo esc_attr( $field_val ) ?>" <?php echo $checked ?> <?php do_action('frm_field_input_html', $field) ?> /><?php |
|
146 | + ?><input type="checkbox" name="<?php echo esc_attr( $field_name ) ?>[<?php echo ( $other_opt ? esc_attr( $opt_key ) : '' ) ?>]" id="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>" value="<?php echo esc_attr( $field_val ) ?>" <?php echo $checked ?> <?php do_action( 'frm_field_input_html', $field ) ?> /><?php |
|
147 | 147 | |
148 | 148 | if ( ! isset( $atts ) || ! isset( $atts['label'] ) || $atts['label'] ) { |
149 | - echo ' '. $opt .'</label>'; |
|
149 | + echo ' ' . $opt . '</label>'; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | FrmFieldsHelper::include_other_input( array( |
@@ -164,9 +164,9 @@ discard block |
||
164 | 164 | } |
165 | 165 | } else if ( $field['type'] == 'captcha' && ! FrmAppHelper::is_admin() ) { |
166 | 166 | $frm_settings = FrmAppHelper::get_settings(); |
167 | - if ( ! empty($frm_settings->pubkey) ) { |
|
168 | - FrmFieldsHelper::display_recaptcha($field); |
|
167 | + if ( ! empty( $frm_settings->pubkey ) ) { |
|
168 | + FrmFieldsHelper::display_recaptcha( $field ); |
|
169 | 169 | } |
170 | 170 | } else { |
171 | - do_action('frm_form_fields', $field, $field_name, compact('errors', 'html_id')); |
|
171 | + do_action( 'frm_form_fields', $field, $field_name, compact( 'errors', 'html_id' ) ); |
|
172 | 172 | } |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | if ( ! is_array($field['options']) ) { |
3 | - return; |
|
3 | + return; |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | foreach ( $field['options'] as $opt_key => $opt ) { |
7 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
8 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
7 | + $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
8 | + $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
9 | 9 | |
10 | - // Get string for Other text field, if needed |
|
10 | + // Get string for Other text field, if needed |
|
11 | 11 | $other_val = FrmFieldsHelper::get_other_val( compact( 'opt_key', 'field' ) ); |
12 | 12 | |
13 | - $checked = ( $other_val || isset($field['value']) && (( ! is_array($field['value']) && $field['value'] == $field_val ) || (is_array($field['value']) && in_array($field_val, $field['value']) ) ) ) ? ' checked="checked"':''; |
|
13 | + $checked = ( $other_val || isset($field['value']) && (( ! is_array($field['value']) && $field['value'] == $field_val ) || (is_array($field['value']) && in_array($field_val, $field['value']) ) ) ) ? ' checked="checked"':''; |
|
14 | 14 | |
15 | 15 | if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) { |
16 | - include(FrmAppHelper::plugin_path() .'/pro/classes/views/frmpro-fields/other-option.php'); |
|
17 | - } else { |
|
18 | - include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/single-option.php'); |
|
19 | - } |
|
16 | + include(FrmAppHelper::plugin_path() .'/pro/classes/views/frmpro-fields/other-option.php'); |
|
17 | + } else { |
|
18 | + include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/single-option.php'); |
|
19 | + } |
|
20 | 20 | |
21 | - unset($checked, $other_val); |
|
21 | + unset($checked, $other_val); |
|
22 | 22 | } |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | -if ( ! is_array($field['options']) ) { |
|
2 | +if ( ! is_array( $field['options'] ) ) { |
|
3 | 3 | return; |
4 | 4 | } |
5 | 5 | |
6 | 6 | foreach ( $field['options'] as $opt_key => $opt ) { |
7 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
8 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
7 | + $field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field ); |
|
8 | + $opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field ); |
|
9 | 9 | |
10 | 10 | // Get string for Other text field, if needed |
11 | 11 | $other_val = FrmFieldsHelper::get_other_val( compact( 'opt_key', 'field' ) ); |
12 | 12 | |
13 | - $checked = ( $other_val || isset($field['value']) && (( ! is_array($field['value']) && $field['value'] == $field_val ) || (is_array($field['value']) && in_array($field_val, $field['value']) ) ) ) ? ' checked="checked"':''; |
|
13 | + $checked = ( $other_val || isset( $field['value'] ) && ( ( ! is_array( $field['value'] ) && $field['value'] == $field_val ) || ( is_array( $field['value'] ) && in_array( $field_val, $field['value'] ) ) ) ) ? ' checked="checked"' : ''; |
|
14 | 14 | |
15 | 15 | if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) { |
16 | - include(FrmAppHelper::plugin_path() .'/pro/classes/views/frmpro-fields/other-option.php'); |
|
16 | + include( FrmAppHelper::plugin_path() . '/pro/classes/views/frmpro-fields/other-option.php' ); |
|
17 | 17 | } else { |
18 | - include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/single-option.php'); |
|
18 | + include( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/single-option.php' ); |
|
19 | 19 | } |
20 | 20 | |
21 | - unset($checked, $other_val); |
|
21 | + unset( $checked, $other_val ); |
|
22 | 22 | } |
@@ -2,39 +2,39 @@ discard block |
||
2 | 2 | <input type="text" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" value="<?php echo esc_attr( $field['default_value'] ); ?>" <?php echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; ?> class="dyn_default_value" /> |
3 | 3 | <?php } else if ( $field['type'] == 'textarea' ) { ?> |
4 | 4 | <textarea name="<?php echo esc_attr( $field_name ) ?>" <?php |
5 | - echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; |
|
6 | - ?> rows="<?php echo esc_attr( $field['max'] ); ?>" id="<?php echo esc_attr( $html_id ) ?>" class="dyn_default_value"><?php echo FrmAppHelper::esc_textarea(force_balance_tags($field['default_value'])); ?></textarea> |
|
5 | + echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; |
|
6 | + ?> rows="<?php echo esc_attr( $field['max'] ); ?>" id="<?php echo esc_attr( $html_id ) ?>" class="dyn_default_value"><?php echo FrmAppHelper::esc_textarea(force_balance_tags($field['default_value'])); ?></textarea> |
|
7 | 7 | |
8 | 8 | <?php |
9 | 9 | |
10 | 10 | } else if ( $field['type'] == 'radio' || $field['type'] == 'checkbox' ) { |
11 | - $field['default_value'] = maybe_unserialize($field['default_value']); |
|
12 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
11 | + $field['default_value'] = maybe_unserialize($field['default_value']); |
|
12 | + if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
13 | 13 | do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) ); |
14 | - } else { |
|
15 | - do_action('frm_add_multiple_opts_labels', $field); ?> |
|
14 | + } else { |
|
15 | + do_action('frm_add_multiple_opts_labels', $field); ?> |
|
16 | 16 | <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo (count($field['options']) > 10) ? ' frm_field_opts_list' : ''; ?>"> |
17 | 17 | <?php include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/radio.php'); ?> |
18 | 18 | </ul> |
19 | 19 | <?php |
20 | - } |
|
20 | + } |
|
21 | 21 | } else if ( $field['type'] == 'select' ) { |
22 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
22 | + if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
23 | 23 | echo FrmFieldsHelper::dropdown_categories( array( 'name' => $field_name, 'field' => $field ) ); |
24 | - } else { ?> |
|
24 | + } else { ?> |
|
25 | 25 | <select name="<?php echo esc_attr( $field_name ) . ( FrmField::is_option_true( $field, 'multiple' ) ? '[]' : '' ); ?>" <?php |
26 | 26 | echo FrmField::is_option_true( $field, 'size' ) ? 'class="auto_width"' : ''; |
27 | 27 | echo FrmField::is_option_true( $field, 'multiple' ) ? ' multiple="multiple"' : ''; ?> > |
28 | 28 | <?php foreach ( $field['options'] as $opt_key => $opt ) { |
29 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
30 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
29 | + $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
30 | + $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
31 | 31 | $selected = ( $field['default_value'] == $field_val || FrmFieldsHelper::get_other_val( array( 'opt_key', 'field' ) ) ) ? ' selected="selected"' : ''; ?> |
32 | 32 | <option value="<?php echo esc_attr( $field_val ) ?>"<?php echo $selected ?>><?php echo esc_html( $opt ) ?> </option> |
33 | 33 | <?php } ?> |
34 | 34 | </select> |
35 | 35 | <?php } |
36 | 36 | |
37 | - if ( $display['default_blank'] ) { ?> |
|
37 | + if ( $display['default_blank'] ) { ?> |
|
38 | 38 | <span id="frm_clear_on_focus_<?php echo esc_attr( $field['id'] ) ?>" class="frm_clear_on_focus frm-show-click"> |
39 | 39 | <?php FrmFieldsHelper::show_default_blank_js( $field['default_blank'] ); ?> |
40 | 40 | </span> |
@@ -49,17 +49,17 @@ discard block |
||
49 | 49 | <?php FrmFieldsHelper::show_single_option($field); ?> |
50 | 50 | </ul> |
51 | 51 | <?php |
52 | - } ?> |
|
52 | + } ?> |
|
53 | 53 | </div> |
54 | 54 | <?php |
55 | 55 | } else if ( $field['type'] == 'captcha' ) { |
56 | 56 | if ( empty($frm_settings->pubkey) ) { ?> |
57 | 57 | <div class="howto frm_no_captcha_text"><?php printf(__( 'Your captcha will not appear on your form until you %1$sset up%2$s the Site and Private Keys', 'formidable' ), '<a href="?page=formidable-settings">', '</a>') ?></div> |
58 | 58 | <?php |
59 | - } ?> |
|
59 | + } ?> |
|
60 | 60 | <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/recaptcha.png' ) ?>" class="recaptcha_placeholder" alt="reCaptcha"/> |
61 | 61 | <input type="hidden" name="<?php echo esc_attr( $field_name ) ?>" value="1" /> |
62 | 62 | <?php |
63 | 63 | } else { |
64 | - do_action( 'frm_display_added_fields', $field ); |
|
64 | + do_action( 'frm_display_added_fields', $field ); |
|
65 | 65 | } |
@@ -1,33 +1,33 @@ discard block |
||
1 | 1 | <?php if ( in_array( $display['type'], array( 'text', 'website', 'email', 'url' ) ) ) { ?> |
2 | - <input type="text" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" value="<?php echo esc_attr( $field['default_value'] ); ?>" <?php echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; ?> class="dyn_default_value" /> |
|
2 | + <input type="text" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" value="<?php echo esc_attr( $field['default_value'] ); ?>" <?php echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:' . $field['size'] . ( is_numeric( $field['size'] ) ? 'px' : '' ) . ';"' ) : ''; ?> class="dyn_default_value" /> |
|
3 | 3 | <?php } else if ( $field['type'] == 'textarea' ) { ?> |
4 | 4 | <textarea name="<?php echo esc_attr( $field_name ) ?>" <?php |
5 | - echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; |
|
6 | - ?> rows="<?php echo esc_attr( $field['max'] ); ?>" id="<?php echo esc_attr( $html_id ) ?>" class="dyn_default_value"><?php echo FrmAppHelper::esc_textarea(force_balance_tags($field['default_value'])); ?></textarea> |
|
5 | + echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:' . $field['size'] . ( is_numeric( $field['size'] ) ? 'px' : '' ) . ';"' ) : ''; |
|
6 | + ?> rows="<?php echo esc_attr( $field['max'] ); ?>" id="<?php echo esc_attr( $html_id ) ?>" class="dyn_default_value"><?php echo FrmAppHelper::esc_textarea( force_balance_tags( $field['default_value'] ) ); ?></textarea> |
|
7 | 7 | |
8 | 8 | <?php |
9 | 9 | |
10 | 10 | } else if ( $field['type'] == 'radio' || $field['type'] == 'checkbox' ) { |
11 | - $field['default_value'] = maybe_unserialize($field['default_value']); |
|
12 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
11 | + $field['default_value'] = maybe_unserialize( $field['default_value'] ); |
|
12 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
13 | 13 | do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) ); |
14 | 14 | } else { |
15 | - do_action('frm_add_multiple_opts_labels', $field); ?> |
|
16 | - <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo (count($field['options']) > 10) ? ' frm_field_opts_list' : ''; ?>"> |
|
17 | - <?php include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/radio.php'); ?> |
|
15 | + do_action( 'frm_add_multiple_opts_labels', $field ); ?> |
|
16 | + <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo ( count( $field['options'] ) > 10 ) ? ' frm_field_opts_list' : ''; ?>"> |
|
17 | + <?php include( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/radio.php' ); ?> |
|
18 | 18 | </ul> |
19 | 19 | <?php |
20 | 20 | } |
21 | 21 | } else if ( $field['type'] == 'select' ) { |
22 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
22 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
23 | 23 | echo FrmFieldsHelper::dropdown_categories( array( 'name' => $field_name, 'field' => $field ) ); |
24 | 24 | } else { ?> |
25 | 25 | <select name="<?php echo esc_attr( $field_name ) . ( FrmField::is_option_true( $field, 'multiple' ) ? '[]' : '' ); ?>" <?php |
26 | 26 | echo FrmField::is_option_true( $field, 'size' ) ? 'class="auto_width"' : ''; |
27 | 27 | echo FrmField::is_option_true( $field, 'multiple' ) ? ' multiple="multiple"' : ''; ?> > |
28 | 28 | <?php foreach ( $field['options'] as $opt_key => $opt ) { |
29 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
30 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
29 | + $field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field ); |
|
30 | + $opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field ); |
|
31 | 31 | $selected = ( $field['default_value'] == $field_val || FrmFieldsHelper::get_other_val( array( 'opt_key', 'field' ) ) ) ? ' selected="selected"' : ''; ?> |
32 | 32 | <option value="<?php echo esc_attr( $field_val ) ?>"<?php echo $selected ?>><?php echo esc_html( $opt ) ?> </option> |
33 | 33 | <?php } ?> |
@@ -44,17 +44,17 @@ discard block |
||
44 | 44 | <?php |
45 | 45 | |
46 | 46 | if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) { ?> |
47 | - <?php do_action('frm_add_multiple_opts_labels', $field); ?> |
|
48 | - <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts<?php echo ( count($field['options']) > 10 ) ? ' frm_field_opts_list' : ''; ?>"> |
|
49 | - <?php FrmFieldsHelper::show_single_option($field); ?> |
|
47 | + <?php do_action( 'frm_add_multiple_opts_labels', $field ); ?> |
|
48 | + <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts<?php echo ( count( $field['options'] ) > 10 ) ? ' frm_field_opts_list' : ''; ?>"> |
|
49 | + <?php FrmFieldsHelper::show_single_option( $field ); ?> |
|
50 | 50 | </ul> |
51 | 51 | <?php |
52 | 52 | } ?> |
53 | 53 | </div> |
54 | 54 | <?php |
55 | 55 | } else if ( $field['type'] == 'captcha' ) { |
56 | - if ( empty($frm_settings->pubkey) ) { ?> |
|
57 | - <div class="howto frm_no_captcha_text"><?php printf(__( 'Your captcha will not appear on your form until you %1$sset up%2$s the Site and Private Keys', 'formidable' ), '<a href="?page=formidable-settings">', '</a>') ?></div> |
|
56 | + if ( empty( $frm_settings->pubkey ) ) { ?> |
|
57 | + <div class="howto frm_no_captcha_text"><?php printf( __( 'Your captcha will not appear on your form until you %1$sset up%2$s the Site and Private Keys', 'formidable' ), '<a href="?page=formidable-settings">', '</a>' ) ?></div> |
|
58 | 58 | <?php |
59 | 59 | } ?> |
60 | 60 | <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/recaptcha.png' ) ?>" class="recaptcha_placeholder" alt="reCaptcha"/> |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <li id="frm_delete_field_<?php echo esc_attr( $field['id'] ); ?>-<?php echo esc_attr( $opt_key ) ?>_container" class="frm_single_option"> |
2 | 2 | <a href="javascript:void(0)" class="frm_single_visible_hover frm_icon_font frm_delete_icon" data-fid="<?php echo esc_attr( $field['id'] ); ?>"> </a> |
3 | 3 | <?php if ( $field['type'] != 'select' ) { ?> |
4 | - <input type="<?php echo esc_attr( $field['type'] ) ?>" name="<?php echo esc_attr( $field_name ) ?><?php echo ( $field['type'] == 'checkbox' ) ? '[]' : ''; ?>" value="<?php echo esc_attr($field_val) ?>"<?php echo isset( $checked ) ? $checked : ''; ?>/> |
|
4 | + <input type="<?php echo esc_attr( $field['type'] ) ?>" name="<?php echo esc_attr( $field_name ) ?><?php echo ( $field['type'] == 'checkbox' ) ? '[]' : ''; ?>" value="<?php echo esc_attr( $field_val ) ?>"<?php echo isset( $checked ) ? $checked : ''; ?>/> |
|
5 | 5 | <?php } ?> |
6 | - <label class="frm_ipe_field_option field_<?php echo esc_attr( $field['id'] ) ?>_option <?php echo $field['separate_value'] ? 'frm_with_key' : ''; ?>" id="<?php echo esc_attr( $html_id . '-' . $opt_key ) ?>"><?php echo ($opt == '') ? __( '(Blank)', 'formidable' ) : $opt ?></label> |
|
6 | + <label class="frm_ipe_field_option field_<?php echo esc_attr( $field['id'] ) ?>_option <?php echo $field['separate_value'] ? 'frm_with_key' : ''; ?>" id="<?php echo esc_attr( $html_id . '-' . $opt_key ) ?>"><?php echo ( $opt == '' ) ? __( '(Blank)', 'formidable' ) : $opt ?></label> |
|
7 | 7 | <span class="frm_option_key field_<?php echo esc_attr( $field['id'] ) ?>_option_key<?php echo $field['separate_value'] ? '' : ' frm_hidden'; ?>"> |
8 | 8 | <label class="frm-show-click frm_ipe_field_option_key" id="field_key_<?php echo esc_attr( $field['id'] . '-' . $opt_key ) ?>"><?php echo ( $field_val == '' ) ? esc_html__( '(Blank)', 'formidable' ) : $field_val ?></label> |
9 | 9 | </span> |
10 | 10 | </li> |
11 | 11 | <?php |
12 | -unset($field_val, $opt, $opt_key); |
|
12 | +unset( $field_val, $opt, $opt_key ); |
@@ -1,16 +1,16 @@ discard block |
||
1 | -<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('post_excerpt', '') ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" /> |
|
2 | -<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('ID', '') ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" /> |
|
1 | +<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'post_excerpt', '' ) ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" /> |
|
2 | +<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'ID', '' ) ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" /> |
|
3 | 3 | |
4 | 4 | <table class="form-table"> |
5 | 5 | <tr> |
6 | 6 | <th> |
7 | - <label <?php FrmAppHelper::maybe_add_tooltip('action_title') ?>><?php _e( 'Label', 'formidable' ) ?></label> |
|
7 | + <label <?php FrmAppHelper::maybe_add_tooltip( 'action_title' ) ?>><?php _e( 'Label', 'formidable' ) ?></label> |
|
8 | 8 | </th> |
9 | - <td><input type="text" name="<?php echo esc_attr( $action_control->get_field_name('post_title', '') ) ?>" value="<?php echo esc_attr($form_action->post_title); ?>" class="large-text <?php FrmAppHelper::maybe_add_tooltip('action_title', 'open') ?>" id="<?php echo esc_attr( $action_control->get_field_id('action_post_title') ) ?>" /> |
|
9 | + <td><input type="text" name="<?php echo esc_attr( $action_control->get_field_name( 'post_title', '' ) ) ?>" value="<?php echo esc_attr( $form_action->post_title ); ?>" class="large-text <?php FrmAppHelper::maybe_add_tooltip( 'action_title', 'open' ) ?>" id="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ) ?>" /> |
|
10 | 10 | </td> |
11 | 11 | </tr> |
12 | 12 | </table> |
13 | -<?php $action_control->form($form_action, compact('form', 'action_key', 'values')); ?> |
|
13 | +<?php $action_control->form( $form_action, compact( 'form', 'action_key', 'values' ) ); ?> |
|
14 | 14 | |
15 | 15 | <table class="form-table frm-no-margin"> |
16 | 16 | <tr><td> |
@@ -25,18 +25,18 @@ discard block |
||
25 | 25 | |
26 | 26 | if ( count( $action_control->action_options['event'] ) == 1 || $action_control->action_options['force_event'] ) { |
27 | 27 | foreach ( $action_control->action_options['event'] as $e ) { ?> |
28 | - <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('event') ) ?>[]" value="<?php echo esc_attr( $e ) ?>" /> |
|
28 | + <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ) ?>[]" value="<?php echo esc_attr( $e ) ?>" /> |
|
29 | 29 | <?php |
30 | 30 | } |
31 | 31 | } else { |
32 | 32 | ?> |
33 | 33 | <p><label class="frm_left_label"><?php _e( 'Trigger this action after', 'formidable' ) ?></label> |
34 | - <select name="<?php echo esc_attr( $action_control->get_field_name('event') ) ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id('event') ) ?>"> |
|
34 | + <select name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ) ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id( 'event' ) ) ?>"> |
|
35 | 35 | <?php |
36 | 36 | |
37 | 37 | $event_labels = FrmFormAction::trigger_labels(); |
38 | 38 | foreach ( $action_control->action_options['event'] as $event ) { ?> |
39 | - <option value="<?php echo esc_attr( $event ) ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event; ?></option> |
|
39 | + <option value="<?php echo esc_attr( $event ) ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo isset( $event_labels[$event] ) ? $event_labels[$event] : $event; ?></option> |
|
40 | 40 | <?php |
41 | 41 | } |
42 | 42 | ?> </select> |
@@ -47,6 +47,6 @@ discard block |
||
47 | 47 | do_action( 'frm_additional_action_settings', $form_action, compact( 'form', 'action_control', 'action_key', 'values' ) ); |
48 | 48 | |
49 | 49 | ?> |
50 | - <span class="alignright frm_action_id <?php echo empty( $form_action->ID ) ? 'frm_hidden' : ''; ?>"><?php printf( __( 'Action ID: %1$s', 'formidable' ), $form_action->ID); ?></span> |
|
50 | + <span class="alignright frm_action_id <?php echo empty( $form_action->ID ) ? 'frm_hidden' : ''; ?>"><?php printf( __( 'Action ID: %1$s', 'formidable' ), $form_action->ID ); ?></span> |
|
51 | 51 | </td></tr> |
52 | 52 | </table> |
@@ -6,11 +6,11 @@ |
||
6 | 6 | </td> |
7 | 7 | <td class="frm_bcc_cc_container"> |
8 | 8 | <a href="javascript:void(0)" class="button frm_email_buttons frm_bcc_button <?php |
9 | - echo ( ! empty($form_action->post_content['bcc']) ? 'frm_hidden' : '' ); |
|
10 | - ?>" data-emailrow="bcc"><?php _e( 'BCC', 'formidable' ) ?></a> |
|
9 | + echo ( ! empty($form_action->post_content['bcc']) ? 'frm_hidden' : '' ); |
|
10 | + ?>" data-emailrow="bcc"><?php _e( 'BCC', 'formidable' ) ?></a> |
|
11 | 11 | <a href="javascript:void(0)" class="button frm_email_buttons frm_cc_button <?php |
12 | - echo ( ! empty($form_action->post_content['cc']) ? 'frm_hidden' : '' ); |
|
13 | - ?>" data-emailrow="cc"><?php _e( 'CC', 'formidable' ) ?></a> |
|
12 | + echo ( ! empty($form_action->post_content['cc']) ? 'frm_hidden' : '' ); |
|
13 | + ?>" data-emailrow="cc"><?php _e( 'CC', 'formidable' ) ?></a> |
|
14 | 14 | </td> |
15 | 15 | </tr> |
16 | 16 | <tr id="frm_cc_row" class="<?php echo empty( $form_action->post_content['cc'] ) ? 'frm_hidden' : ''; ?>" > |
@@ -1,63 +1,63 @@ |
||
1 | 1 | <table class="form-table frm-no-margin"> |
2 | 2 | <tr> |
3 | - <th><label <?php FrmAppHelper::maybe_add_tooltip('email_to') ?>><?php _e( 'To', 'formidable' ) ?></label> |
|
3 | + <th><label <?php FrmAppHelper::maybe_add_tooltip( 'email_to' ) ?>><?php _e( 'To', 'formidable' ) ?></label> |
|
4 | 4 | </th> |
5 | - <td><input type="text" name="<?php echo esc_attr( $this->get_field_name('email_to') ) ?>" value="<?php echo esc_attr( $form_action->post_content['email_to'] ); ?>" class="frm_not_email_to frm_email_blur large-text <?php FrmAppHelper::maybe_add_tooltip('email_to', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('email_to') ) ?>" /> |
|
5 | + <td><input type="text" name="<?php echo esc_attr( $this->get_field_name( 'email_to' ) ) ?>" value="<?php echo esc_attr( $form_action->post_content['email_to'] ); ?>" class="frm_not_email_to frm_email_blur large-text <?php FrmAppHelper::maybe_add_tooltip( 'email_to', 'open' ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'email_to' ) ) ?>" /> |
|
6 | 6 | </td> |
7 | 7 | <td class="frm_bcc_cc_container"> |
8 | 8 | <a href="javascript:void(0)" class="button frm_email_buttons frm_bcc_button <?php |
9 | - echo ( ! empty($form_action->post_content['bcc']) ? 'frm_hidden' : '' ); |
|
9 | + echo ( ! empty( $form_action->post_content['bcc'] ) ? 'frm_hidden' : '' ); |
|
10 | 10 | ?>" data-emailrow="bcc"><?php _e( 'BCC', 'formidable' ) ?></a> |
11 | 11 | <a href="javascript:void(0)" class="button frm_email_buttons frm_cc_button <?php |
12 | - echo ( ! empty($form_action->post_content['cc']) ? 'frm_hidden' : '' ); |
|
12 | + echo ( ! empty( $form_action->post_content['cc'] ) ? 'frm_hidden' : '' ); |
|
13 | 13 | ?>" data-emailrow="cc"><?php _e( 'CC', 'formidable' ) ?></a> |
14 | 14 | </td> |
15 | 15 | </tr> |
16 | -<tr id="frm_cc_row" class="<?php echo empty( $form_action->post_content['cc'] ) ? 'frm_hidden' : ''; ?>" > |
|
17 | - <th><label <?php FrmAppHelper::maybe_add_tooltip('cc') ?>><?php _e( 'CC', 'formidable' ) ?></label> |
|
16 | +<tr id="frm_cc_row" class="<?php echo empty( $form_action->post_content['cc'] ) ? 'frm_hidden' : ''; ?>" > |
|
17 | + <th><label <?php FrmAppHelper::maybe_add_tooltip( 'cc' ) ?>><?php _e( 'CC', 'formidable' ) ?></label> |
|
18 | 18 | </th> |
19 | 19 | <td class="frm_right_addon"> |
20 | - <input type="text" name="<?php echo esc_attr( $this->get_field_name('cc') ) ?>" value="<?php echo esc_attr( $form_action->post_content['cc'] ); ?>" class="frm_not_email_to large-text <?php FrmAppHelper::maybe_add_tooltip('cc', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('cc') ) ?>" /> |
|
20 | + <input type="text" name="<?php echo esc_attr( $this->get_field_name( 'cc' ) ) ?>" value="<?php echo esc_attr( $form_action->post_content['cc'] ); ?>" class="frm_not_email_to large-text <?php FrmAppHelper::maybe_add_tooltip( 'cc', 'open' ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'cc' ) ) ?>" /> |
|
21 | 21 | <a href="javascript:void(0)" class="frm_icon_font frm_remove_field frm_cancel1_icon" data-emailrow="cc"></a> |
22 | 22 | </td> |
23 | 23 | <td></td> |
24 | 24 | </tr> |
25 | -<tr id="frm_bcc_row" class="<?php echo empty( $form_action->post_content['bcc'] ) ? 'frm_hidden' : ''; ?>" > |
|
26 | - <th><label <?php FrmAppHelper::maybe_add_tooltip('bcc') ?>><?php _e( 'BCC', 'formidable' ) ?></label> |
|
25 | +<tr id="frm_bcc_row" class="<?php echo empty( $form_action->post_content['bcc'] ) ? 'frm_hidden' : ''; ?>" > |
|
26 | + <th><label <?php FrmAppHelper::maybe_add_tooltip( 'bcc' ) ?>><?php _e( 'BCC', 'formidable' ) ?></label> |
|
27 | 27 | </th> |
28 | 28 | <td class="frm_right_addon"> |
29 | - <input type="text" name="<?php echo esc_attr( $this->get_field_name('bcc') ) ?>" value="<?php echo esc_attr( $form_action->post_content['bcc'] ); ?>" class="frm_not_email_to large-text <?php FrmAppHelper::maybe_add_tooltip('bcc', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('bcc') ) ?>" /> |
|
29 | + <input type="text" name="<?php echo esc_attr( $this->get_field_name( 'bcc' ) ) ?>" value="<?php echo esc_attr( $form_action->post_content['bcc'] ); ?>" class="frm_not_email_to large-text <?php FrmAppHelper::maybe_add_tooltip( 'bcc', 'open' ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'bcc' ) ) ?>" /> |
|
30 | 30 | <a href="javascript:void(0)" class="frm_icon_font frm_remove_field frm_cancel1_icon" data-emailrow="bcc"></a> |
31 | 31 | </td> |
32 | 32 | <td></td> |
33 | 33 | </tr> |
34 | -<tr id="frm_reply_to_row" class="<?php echo empty( $form_action->post_content['reply_to'] ) ? 'frm_hidden' : ''; ?>"> |
|
35 | - <th><label <?php FrmAppHelper::maybe_add_tooltip('reply_to') ?>><?php _e( 'Reply to', 'formidable' ) ?></label> |
|
34 | +<tr id="frm_reply_to_row" class="<?php echo empty( $form_action->post_content['reply_to'] ) ? 'frm_hidden' : ''; ?>"> |
|
35 | + <th><label <?php FrmAppHelper::maybe_add_tooltip( 'reply_to' ) ?>><?php _e( 'Reply to', 'formidable' ) ?></label> |
|
36 | 36 | </th> |
37 | 37 | <td class="frm_right_addon"> |
38 | - <input type="text" name="<?php echo esc_attr( $this->get_field_name('reply_to') ) ?>" value="<?php echo esc_attr( $form_action->post_content['reply_to'] ); ?>" class="frm_not_email_to large-text <?php FrmAppHelper::maybe_add_tooltip('reply_to', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('reply_to') ) ?>" /> |
|
38 | + <input type="text" name="<?php echo esc_attr( $this->get_field_name( 'reply_to' ) ) ?>" value="<?php echo esc_attr( $form_action->post_content['reply_to'] ); ?>" class="frm_not_email_to large-text <?php FrmAppHelper::maybe_add_tooltip( 'reply_to', 'open' ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'reply_to' ) ) ?>" /> |
|
39 | 39 | <a href="javascript:void(0)" class="frm_icon_font frm_remove_field frm_cancel1_icon" data-emailrow="reply_to"></a> |
40 | 40 | </td> |
41 | 41 | <td></td> |
42 | 42 | </tr> |
43 | 43 | <tr> |
44 | - <th><label <?php FrmAppHelper::maybe_add_tooltip('from') ?>><?php _e( 'From', 'formidable' ) ?></label></th> |
|
45 | - <td><input type="text" name="<?php echo esc_attr( $this->get_field_name('from') ) ?>" value="<?php echo esc_attr( $form_action->post_content['from'] ); ?>" class="frm_not_email_to frm_email_blur large-text <?php FrmAppHelper::maybe_add_tooltip('from', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('from') ) ?>" /> |
|
44 | + <th><label <?php FrmAppHelper::maybe_add_tooltip( 'from' ) ?>><?php _e( 'From', 'formidable' ) ?></label></th> |
|
45 | + <td><input type="text" name="<?php echo esc_attr( $this->get_field_name( 'from' ) ) ?>" value="<?php echo esc_attr( $form_action->post_content['from'] ); ?>" class="frm_not_email_to frm_email_blur large-text <?php FrmAppHelper::maybe_add_tooltip( 'from', 'open' ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'from' ) ) ?>" /> |
|
46 | 46 | </td> |
47 | - <td><a href="javascript:void(0)" class="button frm_email_buttons frm_reply_to_button <?php echo ( ! empty( $form_action->post_content['reply_to'] ) ? 'frm_hidden' : '' ) ?>" data-emailrow="reply_to"><?php _e( 'Reply To', 'formidable' ) ?></a></td> |
|
47 | + <td><a href="javascript:void(0)" class="button frm_email_buttons frm_reply_to_button <?php echo ( ! empty( $form_action->post_content['reply_to'] ) ? 'frm_hidden' : '' ) ?>" data-emailrow="reply_to"><?php _e( 'Reply To', 'formidable' ) ?></a></td> |
|
48 | 48 | </tr> |
49 | 49 | <tr> |
50 | 50 | <td colspan="3" class="frm_no_top_padding"> |
51 | - <p><label <?php FrmAppHelper::maybe_add_tooltip('email_subject', '', $form->name) ?>><?php _e( 'Subject', 'formidable' ) ?></label><br/> |
|
52 | - <input type="text" name="<?php echo esc_attr( $this->get_field_name('email_subject') ) ?>" class="frm_not_email_subject large-text <?php FrmAppHelper::maybe_add_tooltip('email_subject', 'open', $form->name) ?>" id="<?php echo esc_attr( $this->get_field_id('email_subject') ) ?>" size="55" value="<?php echo esc_attr( $form_action->post_content['email_subject'] ); ?>" /></p> |
|
51 | + <p><label <?php FrmAppHelper::maybe_add_tooltip( 'email_subject', '', $form->name ) ?>><?php _e( 'Subject', 'formidable' ) ?></label><br/> |
|
52 | + <input type="text" name="<?php echo esc_attr( $this->get_field_name( 'email_subject' ) ) ?>" class="frm_not_email_subject large-text <?php FrmAppHelper::maybe_add_tooltip( 'email_subject', 'open', $form->name ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'email_subject' ) ) ?>" size="55" value="<?php echo esc_attr( $form_action->post_content['email_subject'] ); ?>" /></p> |
|
53 | 53 | |
54 | 54 | <p><label><?php _e( 'Message', 'formidable' ) ?> </label><br/> |
55 | - <textarea name="<?php echo esc_attr( $this->get_field_name('email_message') ) ?>" class="frm_not_email_message large-text" id="<?php echo esc_attr( $this->get_field_id('email_message') ) ?>" cols="50" rows="5"><?php echo FrmAppHelper::esc_textarea($form_action->post_content['email_message']) ?></textarea></p> |
|
55 | + <textarea name="<?php echo esc_attr( $this->get_field_name( 'email_message' ) ) ?>" class="frm_not_email_message large-text" id="<?php echo esc_attr( $this->get_field_id( 'email_message' ) ) ?>" cols="50" rows="5"><?php echo FrmAppHelper::esc_textarea( $form_action->post_content['email_message'] ) ?></textarea></p> |
|
56 | 56 | |
57 | 57 | <h4><?php _e( 'Options', 'formidable' ) ?> </h4> |
58 | - <label for="<?php echo esc_attr( $this->get_field_id('inc_user_info') ) ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name('inc_user_info') ) ?>" class="frm_not_inc_user_info" id="<?php echo esc_attr( $this->get_field_id('inc_user_info') ) ?>" value="1" <?php checked( $form_action->post_content['inc_user_info'], 1 ); ?> /> <?php _e( 'Append IP Address, Browser, and Referring URL to message', 'formidable' ) ?></label> |
|
58 | + <label for="<?php echo esc_attr( $this->get_field_id( 'inc_user_info' ) ) ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'inc_user_info' ) ) ?>" class="frm_not_inc_user_info" id="<?php echo esc_attr( $this->get_field_id( 'inc_user_info' ) ) ?>" value="1" <?php checked( $form_action->post_content['inc_user_info'], 1 ); ?> /> <?php _e( 'Append IP Address, Browser, and Referring URL to message', 'formidable' ) ?></label> |
|
59 | 59 | |
60 | - <p><label for="<?php echo esc_attr( $this->get_field_id('plain_text') ) ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name('plain_text') ) ?>" id="<?php echo esc_attr( $this->get_field_id('plain_text') ) ?>" value="1" <?php checked( $form_action->post_content['plain_text'], 1 ); ?> /> <?php _e( 'Send Emails in Plain Text', 'formidable' ) ?></label></p> |
|
60 | + <p><label for="<?php echo esc_attr( $this->get_field_id( 'plain_text' ) ) ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'plain_text' ) ) ?>" id="<?php echo esc_attr( $this->get_field_id( 'plain_text' ) ) ?>" value="1" <?php checked( $form_action->post_content['plain_text'], 1 ); ?> /> <?php _e( 'Send Emails in Plain Text', 'formidable' ) ?></label></p> |
|
61 | 61 | </td> |
62 | 62 | </tr> |
63 | 63 | </table> |
@@ -3,7 +3,7 @@ |
||
3 | 3 | class FrmDefPostAction extends FrmFormAction { |
4 | 4 | public function __construct() { |
5 | 5 | $action_ops = FrmFormAction::default_action_opts(); |
6 | - $action_ops['classes'] = 'ab-icon frm_dashicon_font dashicons-before'; |
|
6 | + $action_ops['classes'] = 'ab-icon frm_dashicon_font dashicons-before'; |
|
7 | 7 | |
8 | 8 | parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops ); |
9 | 9 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | // add register action |
13 | 13 | class FrmDefRegAction extends FrmFormAction { |
14 | 14 | public function __construct() { |
15 | - $action_ops = FrmFormAction::default_action_opts('frm_register_icon'); |
|
15 | + $action_ops = FrmFormAction::default_action_opts( 'frm_register_icon' ); |
|
16 | 16 | parent::__construct( 'register', __( 'Register User', 'formidable' ), $action_ops ); |
17 | 17 | } |
18 | 18 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | // add paypal action |
21 | 21 | class FrmDefPayPalAction extends FrmFormAction { |
22 | 22 | public function __construct() { |
23 | - $action_ops = FrmFormAction::default_action_opts('frm_paypal_icon'); |
|
23 | + $action_ops = FrmFormAction::default_action_opts( 'frm_paypal_icon' ); |
|
24 | 24 | parent::__construct( 'paypal', __( 'Collect Payment', 'formidable' ), $action_ops ); |
25 | 25 | } |
26 | 26 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | // add aweber action |
29 | 29 | class FrmDefAweberAction extends FrmFormAction { |
30 | 30 | public function __construct() { |
31 | - $action_ops = FrmFormAction::default_action_opts('frm_aweber_icon'); |
|
31 | + $action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon' ); |
|
32 | 32 | parent::__construct( 'aweber', __( 'Aweber', 'formidable' ), $action_ops ); |
33 | 33 | } |
34 | 34 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | // add mailchimp action |
37 | 37 | class FrmDefMlcmpAction extends FrmFormAction { |
38 | 38 | public function __construct() { |
39 | - $action_ops = FrmFormAction::default_action_opts('frm_mailchimp_icon'); |
|
39 | + $action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon' ); |
|
40 | 40 | parent::__construct( 'mailchimp', __( 'MailChimp', 'formidable' ), $action_ops ); |
41 | 41 | } |
42 | 42 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // add twilio action |
45 | 45 | class FrmDefTwilioAction extends FrmFormAction { |
46 | 46 | public function __construct() { |
47 | - $action_ops = FrmFormAction::default_action_opts('frm_sms_icon'); |
|
47 | + $action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon' ); |
|
48 | 48 | parent::__construct( 'twilio', __( 'Twilio', 'formidable' ), $action_ops ); |
49 | 49 | } |
50 | 50 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | // add highrise action |
53 | 53 | class FrmDefHrsAction extends FrmFormAction { |
54 | 54 | public function __construct() { |
55 | - $action_ops = FrmFormAction::default_action_opts('frm_highrise_icon'); |
|
55 | + $action_ops = FrmFormAction::default_action_opts( 'frm_highrise_icon' ); |
|
56 | 56 | parent::__construct( 'highrise', __( 'Highrise', 'formidable' ), $action_ops ); |
57 | 57 | } |
58 | 58 | } |