Completed
Push — master ( a88860...030e64 )
by Stephanie
02:42
created
classes/views/shared/mb_adv_info.php 2 patches
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -42,51 +42,51 @@  discard block
 block discarded – undo
42 42
 
43 43
 				if ( $f->type == 'data' ) {
44 44
 					//get all fields from linked form
45
-                    if ( isset($f->field_options['form_select']) && is_numeric($f->field_options['form_select']) ) {
45
+					if ( isset($f->field_options['form_select']) && is_numeric($f->field_options['form_select']) ) {
46 46
 						$linked_form = FrmDb::get_var( $wpdb->prefix . 'frm_fields', array( 'id' => $f->field_options['form_select'] ), 'form_id' );
47
-                        if ( ! in_array( $linked_form, $linked_forms ) ) {
48
-                            $linked_forms[] = $linked_form;
47
+						if ( ! in_array( $linked_form, $linked_forms ) ) {
48
+							$linked_forms[] = $linked_form;
49 49
 							$linked_fields = FrmField::getAll( array( 'fi.type not' => FrmField::no_save_fields(), 'fi.form_id' => $linked_form ) );
50
-                            $ldfe = '';
50
+							$ldfe = '';
51 51
 							if ( $linked_fields ) {
52 52
 								foreach ( $linked_fields as $linked_field ) {
53
-                                    FrmAppHelper::insert_opt_html( array( 'id' => $f->id . ' show=' . $linked_field->id, 'key' => $f->field_key . ' show=' . $linked_field->field_key, 'name' => $linked_field->name, 'type' => $linked_field->type ) );
54
-
55
-                                    $ldfe = $linked_field->id;
56
-                                    unset($linked_field);
57
-                                }
58
-                            }
59
-                        }
60
-                    }
61
-                    $dfe = $f->id;
62
-        	    }
63
-                unset($f);
64
-                }
65
-            } ?>
53
+									FrmAppHelper::insert_opt_html( array( 'id' => $f->id . ' show=' . $linked_field->id, 'key' => $f->field_key . ' show=' . $linked_field->field_key, 'name' => $linked_field->name, 'type' => $linked_field->type ) );
54
+
55
+									$ldfe = $linked_field->id;
56
+									unset($linked_field);
57
+								}
58
+							}
59
+						}
60
+					}
61
+					$dfe = $f->id;
62
+				}
63
+				unset($f);
64
+				}
65
+			} ?>
66 66
         </ul>
67 67
 
68 68
         <?php esc_html_e( 'Helpers', 'formidable' ) ?>:
69 69
         <ul class="frm_code_list">
70 70
         <?php
71
-        $col = 'one';
71
+		$col = 'one';
72 72
 		foreach ( $entry_shortcodes as $skey => $sname ) {
73 73
 			if ( empty( $skey ) ) {
74
-                 $col = 'one';
75
-                 echo '<li class="clear frm_block"></li>';
76
-                 continue;
77
-            }
78
-        ?>
74
+				 $col = 'one';
75
+				 echo '<li class="clear frm_block"></li>';
76
+				 continue;
77
+			}
78
+		?>
79 79
         <li class="frm_col_<?php echo esc_attr( $col ) ?>">
80 80
             <a href="javascript:void(0)" class="frmbutton button <?php
81 81
 			echo ( in_array( $skey, array( 'siteurl', 'sitename', 'entry_count' ) ) ) ? 'show_before_content show_after_content' : '';
82
-            echo ( strpos( $skey, 'default-' ) === 0 ) ? 'hide_frm_not_email_subject' : '';
83
-            ?> frm_insert_code" data-code="<?php echo esc_attr( $skey ) ?>"><?php echo esc_html( $sname ) ?></a>
82
+			echo ( strpos( $skey, 'default-' ) === 0 ) ? 'hide_frm_not_email_subject' : '';
83
+			?> frm_insert_code" data-code="<?php echo esc_attr( $skey ) ?>"><?php echo esc_html( $sname ) ?></a>
84 84
         </li>
85 85
         <?php
86
-            $col = ( $col == 'one' ) ? 'two' : 'one';
87
-            unset($skey, $sname);
88
-        }
89
-        ?>
86
+			$col = ( $col == 'one' ) ? 'two' : 'one';
87
+			unset($skey, $sname);
88
+		}
89
+		?>
90 90
         </ul>
91 91
 	</div>
92 92
 
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
 	    <ul class="alignleft"><li><?php esc_html_e( 'Fields from your form', 'formidable' ) ?>:</li></ul>
100 100
 	    <ul class="frm_code_list frm_full_width">
101 101
 		    <?php if ( ! empty( $fields ) ) {
102
-		        foreach ( $fields as $f ) {
102
+				foreach ( $fields as $f ) {
103 103
 					if ( FrmField::is_no_save_field( $f->type ) || ( $f->type == 'data' && ( ! isset( $f->field_options['data_type'] ) || $f->field_options['data_type'] == 'data' || $f->field_options['data_type'] == '' ) ) ) {
104
-                        continue;
105
-                }
106
-            ?>
104
+						continue;
105
+				}
106
+			?>
107 107
                 <li>
108 108
                     <a href="javascript:void(0)" class="frmids alignright frm_insert_code" data-code="if <?php echo esc_attr( $f->id ) ?>]<?php esc_attr_e( 'Conditional text here', 'formidable' ) ?>[/if <?php echo esc_attr( $f->id ) ?>">[if <?php echo (int) $f->id ?>]</a>
109 109
                 	<a href="javascript:void(0)" class="frmkeys alignright frm_insert_code" data-code="if <?php echo esc_attr( $f->field_key ) ?>]something[/if <?php echo esc_attr( $f->field_key ) ?>">[if <?php echo FrmAppHelper::truncate($f->field_key, 10) ?>]</a>
@@ -111,30 +111,30 @@  discard block
 block discarded – undo
111 111
                 </li>
112 112
                 <?php
113 113
 
114
-                    if ( $f->type == 'user_id' ) {
115
-                        $uid = $f;
116
-                    } else if ( $f->type == 'file' ) {
117
-                        $file = $f;
118
-                    }
119
-        		    unset($f);
120
-		        }
121
-		    } ?>
114
+					if ( $f->type == 'user_id' ) {
115
+						$uid = $f;
116
+					} else if ( $f->type == 'file' ) {
117
+						$file = $f;
118
+					}
119
+					unset($f);
120
+				}
121
+			} ?>
122 122
         </ul>
123 123
 
124 124
         <p class="howto"><?php esc_html_e( 'Click a button below to insert sample logic into your view', 'formidable' ) ?></p>
125 125
         <ul class="frm_code_list">
126 126
         <?php
127
-        $col = 'one';
127
+		$col = 'one';
128 128
 		foreach ( $cond_shortcodes as $skey => $sname ) {
129
-	    ?>
129
+		?>
130 130
 	    <li class="frm_col_<?php echo esc_attr( $col ) ?>">
131 131
 	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="if x <?php echo esc_attr($skey) ?>][/if x"><?php echo esc_html( $sname ) ?></a>
132 132
 	    </li>
133 133
 	    <?php
134
-	        $col = ( $col == 'one' ) ? 'two' : 'one';
135
-	        unset($skey, $sname);
136
-	    }
137
-        ?>
134
+			$col = ( $col == 'one' ) ? 'two' : 'one';
135
+			unset($skey, $sname);
136
+		}
137
+		?>
138 138
         </ul>
139 139
 	</div>
140 140
 	<?php } ?>
@@ -142,19 +142,19 @@  discard block
 block discarded – undo
142 142
 	<div id="frm-adv-info-tab" class="tabs-panel">
143 143
 		<ul class="frm_code_list">
144 144
         <?php
145
-        $col = 'one';
145
+		$col = 'one';
146 146
 		foreach ( $adv_shortcodes as $skey => $sname ) {
147
-	    ?>
147
+		?>
148 148
 	    <li class="frm_col_<?php echo esc_attr( $col ) ?>">
149 149
 			<a href="javascript:void(0)" class="frmbutton button frm_insert_code <?php echo is_array( $sname ) ? 'frm_help' : ''; ?>" data-code="x <?php echo esc_attr( $skey ) ?>" <?php echo is_array( $sname ) ? 'title="' . esc_attr( $sname['title'] ) . '"' : ''; ?>>
150 150
 				<?php echo is_array( $sname ) ? $sname['label'] : $sname; ?>
151 151
 			</a>
152 152
 	    </li>
153 153
 	    <?php
154
-	        $col = ($col == 'one') ? 'two' : 'one';
155
-	        unset($skey, $sname);
156
-	    }
157
-        ?>
154
+			$col = ($col == 'one') ? 'two' : 'one';
155
+			unset($skey, $sname);
156
+		}
157
+		?>
158 158
         <?php if ( isset($file) ) { ?>
159 159
         <li class="frm_col_<?php echo esc_attr( $col ) ?>">
160 160
 	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr($file->id) ?> show_image=1"><?php esc_html_e( 'Show image', 'formidable' ) ?></a>
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
         <div class="clear"></div>
172 172
         <?php
173 173
 
174
-        if ( isset($uid) && ! empty($user_fields) ) {
175
-            $col = 'one'; ?>
174
+		if ( isset($uid) && ! empty($user_fields) ) {
175
+			$col = 'one'; ?>
176 176
         <p class="howto"><?php esc_html_e( 'Insert user information', 'formidable' ); ?></p>
177 177
         <ul class="frm_code_list">
178 178
         <?php foreach ( $user_fields as $uk => $uf ) { ?>
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
 				<a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr( $uid->id . ' show="' . $uk . '"' ) ?>"><?php echo esc_html( $uf ) ?></a>
181 181
     	    </li>
182 182
         <?php
183
-            $col = ($col == 'one') ? 'two' : 'one';
184
-            unset($uf, $uk);
185
-        }
186
-        unset($uid); ?>
183
+			$col = ($col == 'one') ? 'two' : 'one';
184
+			unset($uf, $uk);
185
+		}
186
+		unset($uid); ?>
187 187
         </ul>
188 188
         <?php }
189 189
 
190
-        if ( isset($repeat_field) ) { ?>
190
+		if ( isset($repeat_field) ) { ?>
191 191
         <div class="clear"></div>
192 192
         <p class="howto"><?php esc_html_e( 'Repeating field options', 'formidable' ) ?></p>
193 193
             <ul class="frm_code_list">
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
         	    </li>
197 197
             </ul>
198 198
         <?php
199
-        }
199
+		}
200 200
 
201
-        if ( isset($dfe) ) { ?>
201
+		if ( isset($dfe) ) { ?>
202 202
 
203 203
         <div class="clear"></div>
204 204
         <p class="howto"><?php esc_html_e( 'Dynamic field options', 'formidable' ); ?></p>
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
 	</div>
218 218
 
219 219
     <?php
220
-    if ( $settings_tab ) {
220
+	if ( $settings_tab ) {
221 221
 		include( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/mb_html_tab.php' );
222
-    }
223
-    ?>
222
+	}
223
+	?>
224 224
 </div>
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 				if ( $f->type == 'data' ) {
44 44
 					//get all fields from linked form
45
-                    if ( isset($f->field_options['form_select']) && is_numeric($f->field_options['form_select']) ) {
45
+                    if ( isset( $f->field_options['form_select'] ) && is_numeric( $f->field_options['form_select'] ) ) {
46 46
 						$linked_form = FrmDb::get_var( $wpdb->prefix . 'frm_fields', array( 'id' => $f->field_options['form_select'] ), 'form_id' );
47 47
                         if ( ! in_array( $linked_form, $linked_forms ) ) {
48 48
                             $linked_forms[] = $linked_form;
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
                                     FrmAppHelper::insert_opt_html( array( 'id' => $f->id . ' show=' . $linked_field->id, 'key' => $f->field_key . ' show=' . $linked_field->field_key, 'name' => $linked_field->name, 'type' => $linked_field->type ) );
54 54
 
55 55
                                     $ldfe = $linked_field->id;
56
-                                    unset($linked_field);
56
+                                    unset( $linked_field );
57 57
                                 }
58 58
                             }
59 59
                         }
60 60
                     }
61 61
                     $dfe = $f->id;
62 62
         	    }
63
-                unset($f);
63
+                unset( $f );
64 64
                 }
65 65
             } ?>
66 66
         </ul>
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         </li>
85 85
         <?php
86 86
             $col = ( $col == 'one' ) ? 'two' : 'one';
87
-            unset($skey, $sname);
87
+            unset( $skey, $sname );
88 88
         }
89 89
         ?>
90 90
         </ul>
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
             ?>
107 107
                 <li>
108 108
                     <a href="javascript:void(0)" class="frmids alignright frm_insert_code" data-code="if <?php echo esc_attr( $f->id ) ?>]<?php esc_attr_e( 'Conditional text here', 'formidable' ) ?>[/if <?php echo esc_attr( $f->id ) ?>">[if <?php echo (int) $f->id ?>]</a>
109
-                	<a href="javascript:void(0)" class="frmkeys alignright frm_insert_code" data-code="if <?php echo esc_attr( $f->field_key ) ?>]something[/if <?php echo esc_attr( $f->field_key ) ?>">[if <?php echo FrmAppHelper::truncate($f->field_key, 10) ?>]</a>
110
-                	<a href="javascript:void(0)" class="frm_insert_code" data-code="<?php echo esc_attr($f->id) ?>"><?php echo FrmAppHelper::truncate($f->name, 60) ?></a>
109
+                	<a href="javascript:void(0)" class="frmkeys alignright frm_insert_code" data-code="if <?php echo esc_attr( $f->field_key ) ?>]something[/if <?php echo esc_attr( $f->field_key ) ?>">[if <?php echo FrmAppHelper::truncate( $f->field_key, 10 ) ?>]</a>
110
+                	<a href="javascript:void(0)" class="frm_insert_code" data-code="<?php echo esc_attr( $f->id ) ?>"><?php echo FrmAppHelper::truncate( $f->name, 60 ) ?></a>
111 111
                 </li>
112 112
                 <?php
113 113
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                     } else if ( $f->type == 'file' ) {
117 117
                         $file = $f;
118 118
                     }
119
-        		    unset($f);
119
+        		    unset( $f );
120 120
 		        }
121 121
 		    } ?>
122 122
         </ul>
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
 		foreach ( $cond_shortcodes as $skey => $sname ) {
129 129
 	    ?>
130 130
 	    <li class="frm_col_<?php echo esc_attr( $col ) ?>">
131
-	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="if x <?php echo esc_attr($skey) ?>][/if x"><?php echo esc_html( $sname ) ?></a>
131
+	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="if x <?php echo esc_attr( $skey ) ?>][/if x"><?php echo esc_html( $sname ) ?></a>
132 132
 	    </li>
133 133
 	    <?php
134 134
 	        $col = ( $col == 'one' ) ? 'two' : 'one';
135
-	        unset($skey, $sname);
135
+	        unset( $skey, $sname );
136 136
 	    }
137 137
         ?>
138 138
         </ul>
@@ -151,19 +151,19 @@  discard block
 block discarded – undo
151 151
 			</a>
152 152
 	    </li>
153 153
 	    <?php
154
-	        $col = ($col == 'one') ? 'two' : 'one';
155
-	        unset($skey, $sname);
154
+	        $col = ( $col == 'one' ) ? 'two' : 'one';
155
+	        unset( $skey, $sname );
156 156
 	    }
157 157
         ?>
158
-        <?php if ( isset($file) ) { ?>
158
+        <?php if ( isset( $file ) ) { ?>
159 159
         <li class="frm_col_<?php echo esc_attr( $col ) ?>">
160
-	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr($file->id) ?> show_image=1"><?php esc_html_e( 'Show image', 'formidable' ) ?></a>
160
+	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr( $file->id ) ?> show_image=1"><?php esc_html_e( 'Show image', 'formidable' ) ?></a>
161 161
 	    </li>
162 162
 	    <li class="frm_col_<?php echo esc_attr( $col = ( $col == 'one' ? 'two' : 'one' ) ) ?>">
163
-	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr($file->id) ?> show=id"><?php esc_html_e( 'Image ID', 'formidable' ) ?></a>
163
+	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr( $file->id ) ?> show=id"><?php esc_html_e( 'Image ID', 'formidable' ) ?></a>
164 164
 	    </li>
165 165
 	    <li class="frm_col_<?php echo esc_attr( $col = ( $col == 'one' ? 'two' : 'one' ) ) ?>">
166
-	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr($file->id) ?> show_filename=1"><?php esc_html_e( 'Image Name', 'formidable' ) ?></a>
166
+	        <a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr( $file->id ) ?> show_filename=1"><?php esc_html_e( 'Image Name', 'formidable' ) ?></a>
167 167
 	    </li>
168 168
 	    <?php } ?>
169 169
         </ul>
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         <div class="clear"></div>
172 172
         <?php
173 173
 
174
-        if ( isset($uid) && ! empty($user_fields) ) {
174
+        if ( isset( $uid ) && ! empty( $user_fields ) ) {
175 175
             $col = 'one'; ?>
176 176
         <p class="howto"><?php esc_html_e( 'Insert user information', 'formidable' ); ?></p>
177 177
         <ul class="frm_code_list">
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
 				<a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr( $uid->id . ' show="' . $uk . '"' ) ?>"><?php echo esc_html( $uf ) ?></a>
181 181
     	    </li>
182 182
         <?php
183
-            $col = ($col == 'one') ? 'two' : 'one';
184
-            unset($uf, $uk);
183
+            $col = ( $col == 'one' ) ? 'two' : 'one';
184
+            unset( $uf, $uk );
185 185
         }
186
-        unset($uid); ?>
186
+        unset( $uid ); ?>
187 187
         </ul>
188 188
         <?php }
189 189
 
190
-        if ( isset($repeat_field) ) { ?>
190
+        if ( isset( $repeat_field ) ) { ?>
191 191
         <div class="clear"></div>
192 192
         <p class="howto"><?php esc_html_e( 'Repeating field options', 'formidable' ) ?></p>
193 193
             <ul class="frm_code_list">
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         <?php
199 199
         }
200 200
 
201
-        if ( isset($dfe) ) { ?>
201
+        if ( isset( $dfe ) ) { ?>
202 202
 
203 203
         <div class="clear"></div>
204 204
         <p class="howto"><?php esc_html_e( 'Dynamic field options', 'formidable' ); ?></p>
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         	    <li class="frm_col_one">
207 207
 					<a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr( $dfe . ' show="created-at"' ) ?>"><?php esc_html_e( 'Creation Date', 'formidable' ); ?></a>
208 208
         	    </li>
209
-        	    <?php if ( isset($ldfe) ) { ?>
209
+        	    <?php if ( isset( $ldfe ) ) { ?>
210 210
         	    <li class="frm_col_two">
211 211
 					<a href="javascript:void(0)" class="frmbutton button frm_insert_code" data-code="<?php echo esc_attr( $dfe . ' show="' . $ldfe . '"' ) ?>"><?php esc_html_e( 'Field From Entry', 'formidable' ); ?></a>
212 212
         	    </li>
Please login to merge, or discard this patch.
classes/views/frm-forms/settings.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                             <option value="message" <?php selected($values['success_action'], 'message') ?>><?php esc_html_e( 'Show Message', 'formidable' )?></option>
68 68
                             <?php if ( FrmAppHelper::pro_is_installed() ) { ?>
69 69
                                 <option value="redirect" <?php selected($values['success_action'], 'redirect');
70
-                                ?>><?php esc_html_e( 'Redirect to URL', 'formidable' ) ?></option>
70
+								?>><?php esc_html_e( 'Redirect to URL', 'formidable' ) ?></option>
71 71
                                 <option value="page" <?php selected($values['success_action'], 'page');
72 72
 								?>><?php esc_html_e( 'Show Page Content', 'formidable' ) ?></option>
73 73
                             <?php } else { ?>
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 								<?php esc_html_e( '(Premium feature)', 'formidable' ); ?>
78 78
 							</option>
79 79
 							<option value="page" disabled="disabled" <?php selected($values['success_action'], 'page');
80
-                            ?>>
80
+							?>>
81 81
 								<?php esc_html_e( 'Show Page Content', 'formidable' ); ?>
82 82
 								<?php esc_html_e( '(Premium feature)', 'formidable' ); ?>
83 83
 							</option>
@@ -197,17 +197,17 @@  discard block
 block discarded – undo
197 197
                 <ul class="frm_actions_list">
198 198
                 <?php
199 199
 
200
-                //For each add-on, add an li, class, and javascript function. If active, add an additional class.
201
-                foreach ( $action_controls as $action_control ) {
202
-                    ?>
200
+				//For each add-on, add an li, class, and javascript function. If active, add an additional class.
201
+				foreach ( $action_controls as $action_control ) {
202
+					?>
203 203
                     <li><a href="javascript:void(0)" class="frm_<?php echo esc_attr( $action_control->id_base ) ?>_action frm_bstooltip <?php
204
-                    echo ( isset($action_control->action_options['active']) && $action_control->action_options['active']) ? 'frm_active_action ' : 'frm_inactive_action ';
205
-                    echo esc_attr( $action_control->action_options['classes'] );
206
-                    ?>" title="<?php echo esc_attr($action_control->action_options['tooltip']) ?>" data-limit="<?php echo isset($action_control->action_options['limit']) ? esc_attr( $action_control->action_options['limit'] ) : '99' ?>" data-actiontype="<?php echo esc_attr($action_control->id_base) ?>"></a></li>
204
+					echo ( isset($action_control->action_options['active']) && $action_control->action_options['active']) ? 'frm_active_action ' : 'frm_inactive_action ';
205
+					echo esc_attr( $action_control->action_options['classes'] );
206
+					?>" title="<?php echo esc_attr($action_control->action_options['tooltip']) ?>" data-limit="<?php echo isset($action_control->action_options['limit']) ? esc_attr( $action_control->action_options['limit'] ) : '99' ?>" data-actiontype="<?php echo esc_attr($action_control->id_base) ?>"></a></li>
207 207
 <?php
208
-                    unset($actions_icon);
209
-                }
210
-                ?>
208
+					unset($actions_icon);
209
+				}
210
+				?>
211 211
                 </ul>
212 212
             </div>
213 213
             <div class="frm_no_actions">
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
                                 <p><label><?php echo esc_html( $field['name'] ) ?></label>
240 240
                                 <textarea name="field_options[custom_html_<?php echo esc_attr( $field['id'] ) ?>]" rows="7" id="custom_html_<?php echo esc_attr( $field['id'] ) ?>" class="field_custom_html frm_long_input"><?php echo FrmAppHelper::esc_textarea($field['custom_html']) ?></textarea></p>
241 241
                             <?php }
242
-                            unset($field);
243
-                        }
244
-                    } ?>
242
+							unset($field);
243
+						}
244
+					} ?>
245 245
                 </div>
246 246
 
247 247
                 <p><label><?php esc_html_e( 'After Fields', 'formidable' ) ?></label>
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 				call_user_func( array( $section['class'], $section['function'] ), $values );
264 264
 			} else {
265 265
 				call_user_func( ( isset( $section['function'] ) ? $section['function'] : $section ), $values );
266
-            } ?>
266
+			} ?>
267 267
             </div>
268 268
         <?php } ?>
269 269
 
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             <?php } ?>
50 50
         </ul>
51 51
         </div>
52
-        <div class="advanced_settings tabs-panel <?php echo ($a == 'advanced_settings') ? 'frm_block' : 'frm_hidden' ?>">
52
+        <div class="advanced_settings tabs-panel <?php echo ( $a == 'advanced_settings' ) ? 'frm_block' : 'frm_hidden' ?>">
53 53
 			<?php FrmTipsHelper::pro_tip( 'get_form_settings_tip', 'p' ); ?>
54 54
 
55 55
 			<h3 class="frm_first_h3"><?php esc_html_e( 'On Submit', 'formidable' ); ?>
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
                 <tr>
65 65
                     <td class="frm_175_width">
66 66
                         <select name="options[success_action]" id="success_action">
67
-                            <option value="message" <?php selected($values['success_action'], 'message') ?>><?php esc_html_e( 'Show Message', 'formidable' )?></option>
67
+                            <option value="message" <?php selected( $values['success_action'], 'message' ) ?>><?php esc_html_e( 'Show Message', 'formidable' )?></option>
68 68
                             <?php if ( FrmAppHelper::pro_is_installed() ) { ?>
69
-                                <option value="redirect" <?php selected($values['success_action'], 'redirect');
69
+                                <option value="redirect" <?php selected( $values['success_action'], 'redirect' );
70 70
                                 ?>><?php esc_html_e( 'Redirect to URL', 'formidable' ) ?></option>
71
-                                <option value="page" <?php selected($values['success_action'], 'page');
71
+                                <option value="page" <?php selected( $values['success_action'], 'page' );
72 72
 								?>><?php esc_html_e( 'Show Page Content', 'formidable' ) ?></option>
73 73
                             <?php } else { ?>
74
-                            <option value="redirect" disabled="disabled" <?php selected($values['success_action'], 'redirect');
74
+                            <option value="redirect" disabled="disabled" <?php selected( $values['success_action'], 'redirect' );
75 75
 							?>>
76 76
 								<?php esc_html_e( 'Redirect to URL', 'formidable' ); ?>
77 77
 								<?php esc_html_e( '(Premium feature)', 'formidable' ); ?>
78 78
 							</option>
79
-							<option value="page" disabled="disabled" <?php selected($values['success_action'], 'page');
79
+							<option value="page" disabled="disabled" <?php selected( $values['success_action'], 'page' );
80 80
                             ?>>
81 81
 								<?php esc_html_e( 'Show Page Content', 'formidable' ); ?>
82 82
 								<?php esc_html_e( '(Premium feature)', 'formidable' ); ?>
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                         </select>
86 86
                     </td>
87 87
                     <td>
88
-                        <span class="success_action_redirect_box success_action_box<?php echo ($values['success_action'] == 'redirect') ? '' : ' frm_hidden'; ?>">
88
+                        <span class="success_action_redirect_box success_action_box<?php echo ( $values['success_action'] == 'redirect' ) ? '' : ' frm_hidden'; ?>">
89 89
                             <input type="text" name="options[success_url]" id="success_url" value="<?php
90 90
 							if ( isset( $values['success_url'] ) ) {
91 91
 								echo esc_attr( $values['success_url'] );
@@ -93,23 +93,23 @@  discard block
 block discarded – undo
93 93
                         </span>
94 94
 
95 95
 						<?php if ( FrmAppHelper::pro_is_installed() ) { ?>
96
-                        <span class="success_action_page_box success_action_box<?php echo ($values['success_action'] == 'page') ? '' : ' frm_hidden'; ?>">
96
+                        <span class="success_action_page_box success_action_box<?php echo ( $values['success_action'] == 'page' ) ? '' : ' frm_hidden'; ?>">
97 97
                             <label><?php esc_html_e( 'Use Content from Page', 'formidable' ) ?></label>
98 98
                             <?php FrmAppHelper::wp_pages_dropdown( 'options[success_page_id]', $values['success_page_id'] ) ?>
99 99
                         </span>
100 100
                         <?php } ?>
101 101
                     </td>
102 102
                 </tr>
103
-                <tr class="frm_show_form_opt success_action_message_box success_action_box<?php echo ($values['success_action'] == 'message') ? '' : ' frm_hidden'; ?>">
103
+                <tr class="frm_show_form_opt success_action_message_box success_action_box<?php echo ( $values['success_action'] == 'message' ) ? '' : ' frm_hidden'; ?>">
104 104
                     <td colspan="2">
105 105
 						<label for="show_form"><input type="checkbox" name="options[show_form]" id="show_form" value="1" <?php checked( $values['show_form'], 1 ) ?> /> <?php esc_html_e( 'Show the form with the confirmation message', 'formidable' ) ?></label>
106 106
                     </td>
107 107
                 </tr>
108 108
                 <tr>
109
-                    <td colspan="2"><label for="no_save"><input type="checkbox" name="options[no_save]" id="no_save" value="1" <?php checked($values['no_save'], 1); ?> /> <?php esc_html_e( 'Do not store entries submitted from this form', 'formidable' ) ?></label>
109
+                    <td colspan="2"><label for="no_save"><input type="checkbox" name="options[no_save]" id="no_save" value="1" <?php checked( $values['no_save'], 1 ); ?> /> <?php esc_html_e( 'Do not store entries submitted from this form', 'formidable' ) ?></label>
110 110
                     </td>
111 111
                 </tr>
112
-                <?php if ( function_exists( 'akismet_http_post') ) { ?>
112
+                <?php if ( function_exists( 'akismet_http_post' ) ) { ?>
113 113
                 <tr>
114 114
                     <td colspan="2"><?php esc_html_e( 'Use Akismet to check entries for spam for', 'formidable' ) ?>
115 115
                         <select name="options[akismet]">
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
 						<span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Recommended for long forms.', 'formidable' ) ?>" ></span>
136 136
                     </td>
137 137
                 </tr>
138
-                <?php do_action('frm_add_form_ajax_options', $values); ?>
138
+                <?php do_action( 'frm_add_form_ajax_options', $values ); ?>
139 139
             </table>
140 140
 
141 141
             <!--Permissions Section-->
142
-	        <?php do_action('frm_add_form_perm_options', $values); ?>
142
+	        <?php do_action( 'frm_add_form_perm_options', $values ); ?>
143 143
 
144 144
             <!--Styling & Buttons Section-->
145 145
 			<h3><?php esc_html_e( 'Styling & Buttons', 'formidable' ) ?>
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 </tr>
161 161
                 <tr>
162 162
                     <td><label><?php esc_html_e( 'Submit Button Text', 'formidable' ) ?></label></td>
163
-                    <td><input type="text" name="options[submit_value]" value="<?php echo esc_attr($values['submit_value']); ?>" /></td>
163
+                    <td><input type="text" name="options[submit_value]" value="<?php echo esc_attr( $values['submit_value'] ); ?>" /></td>
164 164
                 </tr>
165 165
 				<?php do_action( 'frm_add_form_button_options', $values ); ?>
166 166
             </table>
@@ -170,27 +170,27 @@  discard block
 block discarded – undo
170 170
 				<span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Set up your confirmation messages.', 'formidable' ) ?>" ></span>
171 171
 			</h3>
172 172
             <table class="form-table">
173
-                <tr class="success_action_message_box success_action_box<?php echo ($values['success_action'] == 'message') ? '' : ' frm_hidden'; ?>">
173
+                <tr class="success_action_message_box success_action_box<?php echo ( $values['success_action'] == 'message' ) ? '' : ' frm_hidden'; ?>">
174 174
                     <td>
175 175
                         <div><?php esc_html_e( 'On Submit', 'formidable' ) ?></div>
176
-                        <textarea id="success_msg" name="options[success_msg]" cols="50" rows="2" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea($values['success_msg']); ?></textarea>
176
+                        <textarea id="success_msg" name="options[success_msg]" cols="50" rows="2" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea( $values['success_msg'] ); ?></textarea>
177 177
                     </td>
178 178
                 </tr>
179
-                <?php do_action('frm_add_form_msg_options', $values); ?>
179
+                <?php do_action( 'frm_add_form_msg_options', $values ); ?>
180 180
             </table>
181 181
 
182 182
 			<!--Misc Section-->
183 183
 			<?php if ( has_action( 'frm_additional_form_options' ) ) { ?>
184 184
 				<h3><?php esc_html_e( 'Miscellaneous', 'formidable' ); ?></h3>
185 185
 				<table class="form-table">
186
-					<?php do_action('frm_additional_form_options', $values); ?>
186
+					<?php do_action( 'frm_additional_form_options', $values ); ?>
187 187
 				</table>
188 188
 				<?php } ?>
189 189
 
190 190
 		</div>
191 191
 
192 192
 
193
-        <div id="frm_notification_settings" class="frm_email_settings email_settings tabs-panel widgets-holder-wrap <?php echo ($a == 'email_settings') ? ' frm_block' : ' frm_hidden'; ?>">
193
+        <div id="frm_notification_settings" class="frm_email_settings email_settings tabs-panel widgets-holder-wrap <?php echo ( $a == 'email_settings' ) ? ' frm_block' : ' frm_hidden'; ?>">
194 194
 			<?php FrmTipsHelper::pro_tip( 'get_form_action_tip', 'p' ); ?>
195 195
             <div id="frm_email_addon_menu" class="manage-menus">
196 196
                 <h3><?php esc_html_e( 'Add New Action', 'formidable' ) ?></h3>
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
                 foreach ( $action_controls as $action_control ) {
202 202
                     ?>
203 203
                     <li><a href="javascript:void(0)" class="frm_<?php echo esc_attr( $action_control->id_base ) ?>_action frm_bstooltip <?php
204
-                    echo ( isset($action_control->action_options['active']) && $action_control->action_options['active']) ? 'frm_active_action ' : 'frm_inactive_action ';
204
+                    echo ( isset( $action_control->action_options['active'] ) && $action_control->action_options['active'] ) ? 'frm_active_action ' : 'frm_inactive_action ';
205 205
                     echo esc_attr( $action_control->action_options['classes'] );
206
-                    ?>" title="<?php echo esc_attr($action_control->action_options['tooltip']) ?>" data-limit="<?php echo isset($action_control->action_options['limit']) ? esc_attr( $action_control->action_options['limit'] ) : '99' ?>" data-actiontype="<?php echo esc_attr($action_control->id_base) ?>"></a></li>
206
+                    ?>" title="<?php echo esc_attr( $action_control->action_options['tooltip'] ) ?>" data-limit="<?php echo isset( $action_control->action_options['limit'] ) ? esc_attr( $action_control->action_options['limit'] ) : '99' ?>" data-actiontype="<?php echo esc_attr( $action_control->id_base ) ?>"></a></li>
207 207
 <?php
208
-                    unset($actions_icon);
208
+                    unset( $actions_icon );
209 209
                 }
210 210
                 ?>
211 211
                 </ul>
@@ -217,19 +217,19 @@  discard block
 block discarded – undo
217 217
                     <?php esc_html_e( 'Click an action to add it to this form', 'formidable' ) ?>
218 218
                 </div>
219 219
             </div>
220
-            <?php FrmFormActionsController::list_actions($form, $values); ?>
220
+            <?php FrmFormActionsController::list_actions( $form, $values ); ?>
221 221
         </div>
222 222
 
223
-        <div id="html_settings" class="tabs-panel <?php echo ($a == 'html_settings') ? ' frm_block' : ' frm_hidden'; ?>">
223
+        <div id="html_settings" class="tabs-panel <?php echo ( $a == 'html_settings' ) ? ' frm_block' : ' frm_hidden'; ?>">
224 224
 
225 225
             <div class="frm_field_html_box frm_top_container">
226 226
                 <p><label><?php esc_html_e( 'Form Classes', 'formidable' ) ?></label>
227
-                    <input type="text" name="options[form_class]" value="<?php echo esc_attr($values['form_class']) ?>" />
227
+                    <input type="text" name="options[form_class]" value="<?php echo esc_attr( $values['form_class'] ) ?>" />
228 228
                 </p>
229 229
                 <div class="clear"></div>
230 230
 
231 231
                 <p><label><?php esc_html_e( 'Before Fields', 'formidable' ) ?></label>
232
-                <textarea name="options[before_html]" rows="4" id="before_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea($values['before_html']) ?></textarea></p>
232
+                <textarea name="options[before_html]" rows="4" id="before_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea( $values['before_html'] ) ?></textarea></p>
233 233
 
234 234
                 <div id="add_html_fields">
235 235
                     <?php
@@ -237,18 +237,18 @@  discard block
 block discarded – undo
237 237
 						foreach ( $values['fields'] as $field ) {
238 238
 							if ( apply_filters( 'frm_show_custom_html', true, $field['type'] ) ) { ?>
239 239
                                 <p><label><?php echo esc_html( $field['name'] ) ?></label>
240
-                                <textarea name="field_options[custom_html_<?php echo esc_attr( $field['id'] ) ?>]" rows="7" id="custom_html_<?php echo esc_attr( $field['id'] ) ?>" class="field_custom_html frm_long_input"><?php echo FrmAppHelper::esc_textarea($field['custom_html']) ?></textarea></p>
240
+                                <textarea name="field_options[custom_html_<?php echo esc_attr( $field['id'] ) ?>]" rows="7" id="custom_html_<?php echo esc_attr( $field['id'] ) ?>" class="field_custom_html frm_long_input"><?php echo FrmAppHelper::esc_textarea( $field['custom_html'] ) ?></textarea></p>
241 241
                             <?php }
242
-                            unset($field);
242
+                            unset( $field );
243 243
                         }
244 244
                     } ?>
245 245
                 </div>
246 246
 
247 247
                 <p><label><?php esc_html_e( 'After Fields', 'formidable' ) ?></label>
248
-                <textarea name="options[after_html]" rows="3" id="after_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea($values['after_html']) ?></textarea></p>
248
+                <textarea name="options[after_html]" rows="3" id="after_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea( $values['after_html'] ) ?></textarea></p>
249 249
 
250 250
                 <p><label><?php esc_html_e( 'Submit Button', 'formidable' ) ?></label>
251
-                <textarea name="options[submit_html]" rows="3" id="submit_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea($values['submit_html']) ?></textarea></p>
251
+                <textarea name="options[submit_html]" rows="3" id="submit_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea( $values['submit_html'] ) ?></textarea></p>
252 252
             </div>
253 253
         </div>
254 254
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             </div>
268 268
         <?php } ?>
269 269
 
270
-        <?php do_action('frm_add_form_option_section', $values); ?>
270
+        <?php do_action( 'frm_add_form_option_section', $values ); ?>
271 271
         <div class="clear"></div>
272 272
         </div>
273 273
         </div>
Please login to merge, or discard this patch.
classes/views/frm-forms/edit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <div class="wrap">
2
-    <h2><?php echo ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build', 'formidable' )); ?>
2
+    <h2><?php echo ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build', 'formidable' ) ); ?>
3 3
         <a href="?page=formidable&amp;frm_action=new" class="add-new-h2"><?php esc_html_e( 'Add New', 'formidable' ); ?></a>
4 4
     </h2>
5 5
 
Please login to merge, or discard this patch.
classes/views/frm-forms/shortcode_opts.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! empty($form_id) ) {
2
+if ( ! empty( $form_id ) ) {
3 3
 ?>
4 4
     <h4 class="frm_left_label"><?php esc_html_e( 'Select a form:', 'formidable' ); ?></h4>
5 5
 	<?php FrmFormsHelper::forms_dropdown( 'frmsc_' . $shortcode . '_' . $form_id ); ?>
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 <?php
8 8
 }
9 9
 
10
-if ( ! empty($opts) ) { ?>
10
+if ( ! empty( $opts ) ) { ?>
11 11
     <h4><?php esc_html_e( 'Options', 'formidable' ); ?></h4>
12 12
     <ul>
13 13
 <?php
Please login to merge, or discard this patch.
classes/views/frm-forms/add_field_links.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
                 	</ul>
66 66
                 </li>
67 67
 <?php
68
-                } else {
69
-                    $field_label = $field_type;
70
-                    ?>
68
+				} else {
69
+					$field_label = $field_type;
70
+					?>
71 71
 					<li class="frmbutton button <?php echo esc_attr( $col_class . ' ' . $no_allow_class . ' frm_t' . $field_key ) ?>" id="<?php echo esc_attr( $field_key ) ?>">
72 72
 						<?php echo apply_filters( 'frmpro_field_links', $field_label, $id, $field_key ) ?>
73 73
 					</li>
74 74
                     <?php
75
-                }
75
+				}
76 76
 
77
-                $col_class = empty($col_class) ? 'frm_col_one' : '';
78
-                unset($field_key, $field_type, $field_label);
79
-            } ?>
77
+				$col_class = empty($col_class) ? 'frm_col_one' : '';
78
+				unset($field_key, $field_type, $field_label);
79
+			} ?>
80 80
             </ul>
81 81
             <div class="clear"></div>
82 82
         </div>
@@ -87,33 +87,33 @@  discard block
 block discarded – undo
87 87
 			<?php esc_html_e( '2. This box will activate and you can click to insert classes.', 'formidable' ) ?></p>
88 88
     	    <ul class="frm_code_list">
89 89
     	    <?php $classes = array(
90
-                    'frm_first'     => array(
91
-                        'label' => __( 'First', 'formidable' ),
92
-                        'title' => __( 'Add this to the first field in each row along with a width. ie frm_first frm_third', 'formidable' ),
93
-                    ),
94
-                    'frm_half'      => __( '1/2', 'formidable' ),
95
-                    'frm_third'     => __( '1/3', 'formidable' ),
96
-                    'frm_two_thirds' => __( '2/3', 'formidable' ),
97
-    	            'frm_fourth'    => __( '1/4', 'formidable' ),
90
+					'frm_first'     => array(
91
+						'label' => __( 'First', 'formidable' ),
92
+						'title' => __( 'Add this to the first field in each row along with a width. ie frm_first frm_third', 'formidable' ),
93
+					),
94
+					'frm_half'      => __( '1/2', 'formidable' ),
95
+					'frm_third'     => __( '1/3', 'formidable' ),
96
+					'frm_two_thirds' => __( '2/3', 'formidable' ),
97
+					'frm_fourth'    => __( '1/4', 'formidable' ),
98 98
 					'frm_three_fourths' => __( '3/4', 'formidable' ),
99
-                    'frm_fifth'     => __( '1/5', 'formidable' ),
99
+					'frm_fifth'     => __( '1/5', 'formidable' ),
100 100
 					'frm_two_fifths' => __( '2/5', 'formidable' ),
101
-                    'frm_sixth'     => __( '1/6', 'formidable' ),
102
-                    'frm_seventh'   => __( '1/7', 'formidable' ),
101
+					'frm_sixth'     => __( '1/6', 'formidable' ),
102
+					'frm_seventh'   => __( '1/7', 'formidable' ),
103 103
 					'frm_eighth'    => __( '1/8', 'formidable' ),
104 104
 					'frm_alignright' => __( 'Right', 'formidable' ),
105
-    	            'frm_inline'    => array(
106
-                        'label' => __( 'Inline', 'formidable' ),
105
+					'frm_inline'    => array(
106
+						'label' => __( 'Inline', 'formidable' ),
107 107
 						'title' => __( 'Align fields in a row without a specific width.', 'formidable' ),
108
-                    ),
108
+					),
109 109
 
110
-    	            'frm_full' => array(
111
-                        'label' => __( '100% width', 'formidable' ),
110
+					'frm_full' => array(
111
+						'label' => __( '100% width', 'formidable' ),
112 112
 						'title' => __( 'Force the field to fill the full space with 100% width.', 'formidable' ),
113
-                    ),
114
-    	            'frm_grid_first' => __( 'First Grid Row', 'formidable' ),
115
-    	            'frm_grid' => __( 'Even Grid Row', 'formidable' ),
116
-    	            'frm_grid_odd' => __( 'Odd Grid Row', 'formidable' ),
113
+					),
114
+					'frm_grid_first' => __( 'First Grid Row', 'formidable' ),
115
+					'frm_grid' => __( 'Even Grid Row', 'formidable' ),
116
+					'frm_grid_odd' => __( 'Odd Grid Row', 'formidable' ),
117 117
 					'frm_two_col' => array( 'label' => __( '2 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into two columns.', 'formidable' ) ),
118 118
 					'frm_three_col' => array( 'label' => __( '3 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into three columns.', 'formidable' ) ),
119 119
 					'frm_four_col' => array( 'label' => __( '4 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into four columns.', 'formidable' ) ),
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 					'frm_scroll_box' => array( 'label' => __( 'Scroll Box', 'formidable' ), 'title' => __( 'If you have many checkbox or radio button options, you may add this class to allow your user to easily scroll through the options.', 'formidable' ) ),
122 122
 					'frm_text_block' => array( 'label' => __( 'Align Option Text', 'formidable' ), 'title' => __( 'If you have a large amount of text in a checkbox or radio button field, use this class to align all the text in a block.', 'formidable' ) ),
123 123
 					'frm_capitalize' => array( 'label' => __( 'Capitalize', 'formidable' ), 'title' => __( 'Automatically capitalize the first letter in each word.', 'formidable' ) ),
124
-    	        );
124
+				);
125 125
 
126 126
 $classes = apply_filters( 'frm_layout_classes', $classes );
127 127
 $col = 'one';
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
 	} ?>>
139 139
 <?php
140 140
 	if ( empty( $d ) ) {
141
-    	echo $c;
141
+		echo $c;
142 142
 	} else if ( ! is_array( $d ) ) {
143
-    	echo $d;
143
+		echo $d;
144 144
 	} else if ( isset( $d['label'] ) ) {
145
-    	echo $d['label'];
145
+		echo $d['label'];
146 146
 	}
147 147
 ?>
148 148
                     </a>
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         <ul id="category-tabs" class="category-tabs frm-category-tabs">
18 18
     		<li class="tabs" ><a href="#frm-insert-fields" id="frm_insert_fields_tab"><?php esc_html_e( 'Fields', 'formidable' ); ?></a></li>
19 19
     		<li class="hide-if-no-js"><a href="#frm-layout-classes" id="frm_layout_classes_tab" class="frm_help" title="<?php esc_attr_e( 'Open the Field Options and click on the CSS Layout Classes option to enable this tab', 'formidable' ) ?>"><?php esc_html_e( 'Layout', 'formidable' ); ?></a></li>
20
-<?php do_action('frm_extra_form_instruction_tabs'); ?>
20
+<?php do_action( 'frm_extra_form_instruction_tabs' ); ?>
21 21
     	</ul>
22 22
 
23 23
     	<div id="frm-insert-fields" class="tabs-panel">
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
                     <?php
75 75
                 }
76 76
 
77
-                $col_class = empty($col_class) ? 'frm_col_one' : '';
78
-                unset($field_key, $field_type, $field_label);
77
+                $col_class = empty( $col_class ) ? 'frm_col_one' : '';
78
+                unset( $field_key, $field_type, $field_label );
79 79
             } ?>
80 80
             </ul>
81 81
             <div class="clear"></div>
82 82
         </div>
83
-    	<?php do_action('frm_extra_form_instructions'); ?>
83
+    	<?php do_action( 'frm_extra_form_instructions' ); ?>
84 84
 
85 85
     	<div id="frm-layout-classes" class="tabs-panel">
86 86
 			<p class="howto"><?php esc_html_e( '1. Click inside the "CSS layout classes" field option in any field.', 'formidable' ) ?><br/>
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
                     <a href="javascript:void(0);" class="frmbutton frm_insert_code button show_frm_classes<?php
133 133
 	if ( ! empty( $title ) ) {
134 134
 		echo ' frm_help';
135
-	} ?>" data-code="<?php echo esc_attr($c) ?>" <?php
135
+	} ?>" data-code="<?php echo esc_attr( $c ) ?>" <?php
136 136
 	if ( ! empty( $title ) ) {
137
-		?>title="<?php echo esc_attr($title); ?>"<?php
137
+		?>title="<?php echo esc_attr( $title ); ?>"<?php
138 138
 	} ?>>
139 139
 <?php
140 140
 	if ( empty( $d ) ) {
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
 
160 160
     <div class="submitbox" id="major-publishing-actions">
161 161
         <div id="delete-action">
162
-            <?php echo FrmFormsHelper::delete_trash_link($id, $values['status']); ?>
162
+            <?php echo FrmFormsHelper::delete_trash_link( $id, $values['status'] ); ?>
163 163
         </div>
164 164
 
165 165
         <div id="publishing-action">
166 166
             <form method="post" id="frm_js_build_form">
167 167
             <span class="spinner"></span>
168 168
 		    <input type="hidden" id="frm_compact_fields" name="frm_compact_fields" value="" />
169
-    	    <input type="button" value="<?php echo esc_attr($button) ?>" class="frm_submit_form frm_submit_<?php echo ( isset($values['ajax_load']) && $values['ajax_load'] ) ? '': 'no_'; ?>ajax button-primary button-large" id="frm_submit_side" />
169
+    	    <input type="button" value="<?php echo esc_attr( $button ) ?>" class="frm_submit_form frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-primary button-large" id="frm_submit_side" />
170 170
     	    </form>
171 171
 		</div>
172 172
         <div class="clear"></div>
Please login to merge, or discard this patch.
classes/views/frm-forms/add_field.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $display = apply_filters('frm_display_field_options', array(
4
-    'type' => $field['type'], 'field_data' => $field,
5
-    'required' => true, 'unique' => false, 'read_only' => false,
6
-    'description' => true, 'options' => true, 'label_position' => true,
7
-    'invalid' => false, 'size' => false, 'clear_on_focus' => false,
8
-    'default_blank' => true, 'css' => true, 'conf_field' => false,
4
+	'type' => $field['type'], 'field_data' => $field,
5
+	'required' => true, 'unique' => false, 'read_only' => false,
6
+	'description' => true, 'options' => true, 'label_position' => true,
7
+	'invalid' => false, 'size' => false, 'clear_on_focus' => false,
8
+	'default_blank' => true, 'css' => true, 'conf_field' => false,
9 9
 	'max' => true, 'captcha_size' => false,
10 10
 ));
11 11
 
@@ -25,19 +25,19 @@  discard block
 block discarded – undo
25 25
 $frm_settings = FrmAppHelper::get_settings();
26 26
 
27 27
 if ( ! isset( $frm_all_field_selection ) ) {
28
-    if ( isset($frm_field_selection) && isset($pro_field_selection) ) {
29
-        $frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection);
30
-    } else {
28
+	if ( isset($frm_field_selection) && isset($pro_field_selection) ) {
29
+		$frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection);
30
+	} else {
31 31
 		$pro_field_selection = FrmField::pro_field_selection();
32 32
 		$frm_all_field_selection = array_merge( FrmField::field_selection(), $pro_field_selection );
33
-    }
33
+	}
34 34
 }
35 35
 
36 36
 $disabled_fields = FrmAppHelper::pro_is_installed() ? array() : $pro_field_selection;
37 37
 
38 38
 
39 39
 if ( ! isset( $ajax ) ) {
40
-    $li_classes .= ' ui-state-default widgets-holder-wrap'; ?>
40
+	$li_classes .= ' ui-state-default widgets-holder-wrap'; ?>
41 41
 <li id="frm_field_id_<?php echo esc_attr( $field['id'] ); ?>" class="<?php echo esc_attr( $li_classes ) ?>" data-fid="<?php echo esc_attr( $field['id'] ) ?>" data-formid="<?php echo ( 'divider' == $field['type'] ) ? esc_attr( $field['form_select'] ) : esc_attr( $field['form_id'] ); ?>" data-ftype="<?php echo esc_attr( $display['type'] ) ?>">
42 42
 <?php
43 43
 }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     </span>
60 60
     <?php }
61 61
 
62
-    ?>
62
+	?>
63 63
     <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button': ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label>
64 64
 
65 65
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 if ( in_array( $field['type'], array( 'select', 'radio', 'checkbox' ) ) ) { ?>
107 107
     <div class="frm-show-click frm_small_top_margin"><?php
108 108
 
109
-    if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) {
109
+	if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) {
110 110
 		echo '<p class="howto">' . FrmFieldsHelper::get_term_link( $field['taxonomy'] ) . '</p>';
111 111
 	} else if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) {
112 112
 ?>
@@ -118,16 +118,16 @@  discard block
 block discarded – undo
118 118
 				<a href="javascript:void(0);" id="other_button_<?php echo esc_attr( $field['id'] ); ?>" data-opttype="other" data-ftype="<?php echo esc_attr( $field['type'] ) ?>" class="button frm_cb_button frm_add_opt<?php echo ( in_array( $field['type'], array( 'radio', 'select' ) ) && $field['other'] == true ? ' frm_hidden' : '' ); ?>"><?php esc_html_e( 'Add "Other"', 'formidable' ) ?></a>
119 119
                 <input type="hidden" value="<?php echo esc_attr( $field['other'] ); ?>" id="other_input_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[other_<?php echo esc_attr( $field['id'] ); ?>]">
120 120
             <?php
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
 			<a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=frm_import_choices&field_id=' . $field['id'] . '&TB_iframe=1' ) ) ?>" title="<?php echo esc_attr( FrmAppHelper::truncate( strip_tags( str_replace( '"', '&quot;', $field['name'] ) ), 20 ) . ' ' . __( 'Field Choices', 'formidable' ) ); ?>" class="thickbox frm_orange">
125 125
 				<?php esc_html_e( 'Bulk Edit Options', 'formidable' ); ?>
126 126
 			</a>
127 127
             <?php } ?>
128 128
         </div>
129 129
 <?php
130
-    }
130
+	}
131 131
 ?>
132 132
     </div>
133 133
 <?php
@@ -166,33 +166,33 @@  discard block
 block discarded – undo
166 166
 						<?php esc_html_e( 'Required', 'formidable' ); ?>
167 167
 					</label>
168 168
                 <?php
169
-                }
169
+				}
170 170
 
171 171
 				if ( $display['unique'] ) {
172
-                    if ( ! isset( $field['unique'] ) ) {
173
-                        $field['unique'] = false;
174
-                    }
175
-                ?>
172
+					if ( ! isset( $field['unique'] ) ) {
173
+						$field['unique'] = false;
174
+					}
175
+				?>
176 176
                 <label for="frm_uniq_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Unique: Do not allow the same response multiple times. For example, if one user enters \'Joe\', then no one else will be allowed to enter the same name.', 'formidable' ) ?>"><input type="checkbox" name="field_options[unique_<?php echo esc_attr( $field['id'] ) ?>]" id="frm_uniq_field_<?php echo esc_attr( $field['id'] ) ?>" value="1" <?php checked( $field['unique'], 1 ); ?> class="frm_mark_unique" />
177 177
 					<?php esc_html_e( 'Unique', 'formidable' ); ?>
178 178
 				</label>
179 179
                 <?php
180
-                }
180
+				}
181 181
 
182 182
 				if ( $display['read_only'] ) {
183
-                    if ( ! isset( $field['read_only'] ) ) {
184
-                        $field['read_only'] = false;
183
+					if ( ! isset( $field['read_only'] ) ) {
184
+						$field['read_only'] = false;
185 185
 					}
186
-                ?>
186
+				?>
187 187
 				<label for="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Read Only: Show this field but do not allow the field value to be edited from the front-end.', 'formidable' ) ?>" >
188 188
 					<input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ) ?>]" value="1" <?php checked( $field['read_only'], 1 ) ?>/>
189 189
 					<?php esc_html_e( 'Read Only', 'formidable' ); ?>
190 190
 				</label>
191 191
                 <?php }
192 192
 
193
-                do_action('frm_field_options_form_top', $field, $display, $values);
193
+				do_action('frm_field_options_form_top', $field, $display, $values);
194 194
 
195
-                ?>
195
+				?>
196 196
                 <?php
197 197
 				if ( $display['required'] ) { ?>
198 198
                 <div class="frm_required_details<?php echo esc_attr( $field['id'] . ( $field['required'] ? '' : ' frm_hidden' ) ); ?>">
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 				do_action( 'frm_' . $field['type'] . '_field_options_form', $field, $display, $values );
287 287
 				do_action( 'frm_field_options_form', $field, $display, $values );
288 288
 
289
-                if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?>
289
+				if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?>
290 290
 					<tr class="frm_validation_msg <?php echo ($display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>">
291 291
 					<td colspan="2">
292 292
                     <div class="menu-settings">
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                             <input type="text" name="field_options[blank_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['blank'] ); ?>" />
300 300
                         </p>
301 301
                         <?php
302
-                        }
302
+						}
303 303
 
304 304
 						if ( $display['invalid'] ) { ?>
305 305
                             <p><label><?php esc_html_e( 'Invalid Format', 'formidable' ) ?></label>
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                             <input type="text" name="field_options[unique_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['unique_msg'] ); ?>" />
315 315
                         </p>
316 316
                         <?php
317
-                        }
317
+						}
318 318
 
319 319
 						if ( $display['conf_field'] ) { ?>
320 320
                         <p class="frm_conf_details<?php echo esc_attr( $field['id'] . ( $field['conf_field'] ? '' : ' frm_hidden' ) ); ?>">
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
                             <input type="text" name="field_options[conf_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_msg'] ); ?>" />
323 323
                         </p>
324 324
                         <?php
325
-                        } ?>
325
+						} ?>
326 326
                     </div>
327 327
                     </div>
328 328
                     </td>
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$display = apply_filters('frm_display_field_options', array(
3
+$display = apply_filters( 'frm_display_field_options', array(
4 4
     'type' => $field['type'], 'field_data' => $field,
5 5
     'required' => true, 'unique' => false, 'read_only' => false,
6 6
     'description' => true, 'options' => true, 'label_position' => true,
7 7
     'invalid' => false, 'size' => false, 'clear_on_focus' => false,
8 8
     'default_blank' => true, 'css' => true, 'conf_field' => false,
9 9
 	'max' => true, 'captcha_size' => false,
10
-));
10
+) );
11 11
 
12 12
 $li_classes = 'form-field edit_form_item frm_field_box frm_top_container frm_not_divider edit_field_type_' . $display['type'];
13
-$li_classes = apply_filters('frm_build_field_class', $li_classes, $field );
13
+$li_classes = apply_filters( 'frm_build_field_class', $li_classes, $field );
14 14
 
15 15
 if ( isset( $values ) && isset( $values['ajax_load'] ) && $values['ajax_load'] && isset( $count ) && $count > 10 && ! in_array( $field['type'], array( 'divider', 'end_divider' ) ) ) {
16 16
 ?>
17 17
 <li id="frm_field_id_<?php echo esc_attr( $field['id'] ); ?>" class="<?php echo esc_attr( $li_classes ) ?> frm_field_loading" data-fid="<?php echo esc_attr( $field['id'] ) ?>" data-formid="<?php echo esc_attr( 'divider' == $field['type'] ? $field['form_select'] : $field['form_id'] ); ?>" data-ftype="<?php echo esc_attr( $display['type'] ) ?>">
18 18
 <img src="<?php echo FrmAppHelper::plugin_url() ?>/images/ajax_loader.gif" alt="<?php esc_attr_e( 'Loading', 'formidable' ) ?>" />
19
-<span class="frm_hidden_fdata frm_hidden"><?php echo htmlspecialchars(json_encode($field)) ?></span>
19
+<span class="frm_hidden_fdata frm_hidden"><?php echo htmlspecialchars( json_encode( $field ) ) ?></span>
20 20
 </li>
21 21
 <?php
22 22
    return;
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 $frm_settings = FrmAppHelper::get_settings();
26 26
 
27 27
 if ( ! isset( $frm_all_field_selection ) ) {
28
-    if ( isset($frm_field_selection) && isset($pro_field_selection) ) {
29
-        $frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection);
28
+    if ( isset( $frm_field_selection ) && isset( $pro_field_selection ) ) {
29
+        $frm_all_field_selection = array_merge( $frm_field_selection, $pro_field_selection );
30 30
     } else {
31 31
 		$pro_field_selection = FrmField::pro_field_selection();
32 32
 		$frm_all_field_selection = array_merge( FrmField::field_selection(), $pro_field_selection );
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     <a href="javascript:void(0);" class="frm_bstooltip alignright frm-show-hover frm-move frm-hover-icon frm_icon_font frm_move_icon" title="<?php esc_attr_e( 'Move Field', 'formidable' ) ?>"> </a>
52 52
     <a href="#" class="frm_bstooltip alignright frm-show-hover frm-hover-icon frm_icon_font frm_delete_icon frm_delete_field" title="<?php esc_attr_e( 'Delete Field', 'formidable' ) ?>"> </a>
53 53
     <a href="#" class="frm_bstooltip alignright frm-show-hover frm-hover-icon frm_icon_font frm_duplicate_icon" title="<?php ( $field['type'] == 'divider' ) ? esc_attr_e( 'Duplicate Section', 'formidable' ) : esc_attr_e( 'Duplicate Field', 'formidable' ) ?>"> </a>
54
-    <input type="hidden" name="frm_fields_submitted[]" value="<?php echo esc_attr($field['id']) ?>" />
55
-    <?php do_action('frm_extra_field_actions', $field['id']); ?>
54
+    <input type="hidden" name="frm_fields_submitted[]" value="<?php echo esc_attr( $field['id'] ) ?>" />
55
+    <?php do_action( 'frm_extra_field_actions', $field['id'] ); ?>
56 56
     <?php if ( $display['required'] ) { ?>
57 57
     <span id="require_field_<?php echo esc_attr( $field['id'] ); ?>">
58 58
 		<a href="javascript:void(0);" class="frm_req_field frm_action_icon frm_required_icon frm_icon_font alignleft frm_required<?php echo (int) $field['required'] ?>" id="req_field_<?php echo esc_attr( $field['id'] ); ?>" title="Click to Mark as <?php echo FrmField::is_required( $field ) ? 'not ' : ''; ?>Required"></a>
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     <?php }
61 61
 
62 62
     ?>
63
-    <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button': ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label>
63
+    <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button' : ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label>
64 64
 
65 65
 
66 66
 <div id="field_<?php echo esc_attr( $field['id'] ) ?>_inner_container" class="frm_inner_field_container">
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 </div>
79 79
 <?php
80 80
 if ( $display['description'] ) { ?>
81
-    <div class="frm_ipe_field_desc description <?php echo ($field['description'] == '') ? 'frm-show-click' : '' ?>" id="field_description_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ($field['description'] == '') ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['description'] ); ?></div>
81
+    <div class="frm_ipe_field_desc description <?php echo ( $field['description'] == '' ) ? 'frm-show-click' : '' ?>" id="field_description_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['description'] == '' ) ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['description'] ); ?></div>
82 82
     <input type="hidden" name="field_options[description_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['description'] ); ?>" />
83 83
 
84 84
 <?php } ?>
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 		<div class="frm_form_fields">
91 91
 			<input type="text" id="conf_field_<?php echo esc_attr( $field['field_key'] ) ?>" name="field_options[conf_input_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_input'] ); ?>" class="dyn_default_value" />
92 92
 		</div>
93
-    	<div id="conf_field_description_<?php echo esc_attr( $field['id'] ) ?>" class="frm_ipe_field_conf_desc description <?php echo ($field['conf_desc'] == '') ? 'frm-show-click' : '' ?>"><?php
94
-			echo ($field['conf_desc'] == '') ? __( '(Click to add description)', 'formidable' ) : force_balance_tags($field['conf_desc']); ?></div>
93
+    	<div id="conf_field_description_<?php echo esc_attr( $field['id'] ) ?>" class="frm_ipe_field_conf_desc description <?php echo ( $field['conf_desc'] == '' ) ? 'frm-show-click' : '' ?>"><?php
94
+			echo ( $field['conf_desc'] == '' ) ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['conf_desc'] ); ?></div>
95 95
     	<input type="hidden" name="field_options[conf_desc_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_desc'] ); ?>" />
96 96
 </div>
97 97
 	<?php if ( $display['clear_on_focus'] ) { ?>
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 if ( in_array( $field['type'], array( 'select', 'radio', 'checkbox' ) ) ) { ?>
107 107
     <div class="frm-show-click frm_small_top_margin"><?php
108 108
 
109
-    if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) {
109
+    if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) {
110 110
 		echo '<p class="howto">' . FrmFieldsHelper::get_term_link( $field['taxonomy'] ) . '</p>';
111 111
 	} else if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) {
112 112
 ?>
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             <?php
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
 			<a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=frm_import_choices&field_id=' . $field['id'] . '&TB_iframe=1' ) ) ?>" title="<?php echo esc_attr( FrmAppHelper::truncate( strip_tags( str_replace( '"', '&quot;', $field['name'] ) ), 20 ) . ' ' . __( 'Field Choices', 'formidable' ) ); ?>" class="thickbox frm_orange">
125 125
 				<?php esc_html_e( 'Bulk Edit Options', 'formidable' ); ?>
126 126
 			</a>
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 <?php
134 134
 }
135 135
 
136
-do_action('frm_before_field_options', $field);
136
+do_action( 'frm_before_field_options', $field );
137 137
 
138 138
 if ( $display['options'] ) { ?>
139 139
     <div class="widget">
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
         </div>
148 148
     	<div class="widget-inside">
149 149
             <table class="form-table frm_clear_none">
150
-                <?php $field_types = FrmFieldsHelper::get_field_types($field['type']); ?>
150
+                <?php $field_types = FrmFieldsHelper::get_field_types( $field['type'] ); ?>
151 151
 				<tr><td class="frm_150_width"><label><?php esc_html_e( 'Field Type', 'formidable' ) ?></label></td>
152 152
                     <td>
153
-                <select <?php if ( count($field_types) == 1 ) { ?>disabled="disabled"<?php } else { ?>name="field_options[type_<?php echo esc_attr( $field['id'] ) ?>]"<?php } ?>>
153
+                <select <?php if ( count( $field_types ) == 1 ) { ?>disabled="disabled"<?php } else { ?>name="field_options[type_<?php echo esc_attr( $field['id'] ) ?>]"<?php } ?>>
154 154
                     <?php
155 155
 					foreach ( $field_types as $fkey => $ftype ) { ?>
156
-                        <option value="<?php echo esc_attr( $fkey ) ?>" <?php echo ( $fkey == $field['type'] ) ? ' selected="selected"' : ''; ?> <?php echo array_key_exists($fkey, $disabled_fields ) ? 'disabled="disabled"' : '';  ?>><?php echo is_array($ftype) ? $ftype['name'] : $ftype ?> </option>
156
+                        <option value="<?php echo esc_attr( $fkey ) ?>" <?php echo ( $fkey == $field['type'] ) ? ' selected="selected"' : ''; ?> <?php echo array_key_exists( $fkey, $disabled_fields ) ? 'disabled="disabled"' : ''; ?>><?php echo is_array( $ftype ) ? $ftype['name'] : $ftype ?> </option>
157 157
                     <?php
158 158
 						unset( $fkey, $ftype );
159 159
 					} ?>
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 				</label>
191 191
                 <?php }
192 192
 
193
-                do_action('frm_field_options_form_top', $field, $display, $values);
193
+                do_action( 'frm_field_options_form_top', $field, $display, $values );
194 194
 
195 195
                 ?>
196 196
                 <?php
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 						<td class="frm_150_width"><label><?php esc_html_e( 'Label Position', 'formidable' ) ?></label></td>
230 230
 						<td>
231 231
 							<select name="field_options[label_<?php echo esc_attr( $field['id'] ) ?>]">
232
-								<option value=""<?php selected($field['label'], ''); ?>>
232
+								<option value=""<?php selected( $field['label'], '' ); ?>>
233 233
 									<?php esc_html_e( 'Default', 'formidable' ) ?>
234 234
 								</option>
235 235
 								<?php foreach ( FrmStylesHelper::get_sigle_label_postitions() as $pos => $pos_label ) { ?>
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 				do_action( 'frm_field_options_form', $field, $display, $values );
288 288
 
289 289
                 if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?>
290
-					<tr class="frm_validation_msg <?php echo ($display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>">
290
+					<tr class="frm_validation_msg <?php echo ( $display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>">
291 291
 					<td colspan="2">
292 292
                     <div class="menu-settings">
293 293
                     <h3 class="frm_no_bg"><?php esc_html_e( 'Validation', 'formidable' ) ?></h3>
@@ -351,4 +351,4 @@  discard block
 block discarded – undo
351 351
 <?php
352 352
 }
353 353
 
354
-unset($display);
354
+unset( $display );
Please login to merge, or discard this patch.
classes/views/frm-forms/_publish_box.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
             <?php } ?>
13 13
             <div id="preview-action">
14 14
                 <?php
15
-                if ( ! isset($hide_preview) || ! $hide_preview ) {
15
+				if ( ! isset($hide_preview) || ! $hide_preview ) {
16 16
 
17
-                    if ( isset($values['form_key']) ) {
18
-                        $frm_settings = FrmAppHelper::get_settings();
19
-                        if ( empty($frm_settings->preview_page_id) ) { ?>
17
+					if ( isset($values['form_key']) ) {
18
+						$frm_settings = FrmAppHelper::get_settings();
19
+						if ( empty($frm_settings->preview_page_id) ) { ?>
20 20
                     <a href="<?php echo esc_url( FrmFormsHelper::get_direct_link($values['form_key']) ); ?>" class="preview button" target="wp-frm-preview-<?php echo esc_attr( $id ) ?>"><?php esc_html_e( 'Preview', 'formidable' ) ?></a>
21 21
                 <?php
22
-                        } else {
23
-                ?>
22
+						} else {
23
+				?>
24 24
                     <div class="preview dropdown">
25 25
                         <a href="#" id="frm-previewDrop" class="frm-dropdown-toggle button" data-toggle="dropdown"><?php esc_html_e( 'Preview', 'formidable' ) ?> <b class="caret"></b></a>
26 26
 
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
                     	</ul>
31 31
                     </div>
32 32
                 <?php   }
33
-                    }
34
-                } ?>
33
+					}
34
+				} ?>
35 35
             </div>
36 36
             <?php if ( 'draft' == $values['status'] ) { ?>
37 37
             <div class="clear"></div>
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@  discard block
 block discarded – undo
6 6
         <div id="minor-publishing-actions">
7 7
             <?php if ( 'draft' == $values['status'] ) { ?>
8 8
             <div id="save-action">
9
-        	    <input type="button" value="<?php esc_html_e( 'Save Draft', 'formidable' ); ?>" class="frm_submit_form frm_submit_<?php echo ( isset($values['ajax_load']) && $values['ajax_load'] ) ? '': 'no_'; ?>ajax button-secondary button-large" id="save-post" />
9
+        	    <input type="button" value="<?php esc_html_e( 'Save Draft', 'formidable' ); ?>" class="frm_submit_form frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-secondary button-large" id="save-post" />
10 10
         	    <span class="spinner"></span>
11 11
             </div>
12 12
             <?php } ?>
13 13
             <div id="preview-action">
14 14
                 <?php
15
-                if ( ! isset($hide_preview) || ! $hide_preview ) {
15
+                if ( ! isset( $hide_preview ) || ! $hide_preview ) {
16 16
 
17
-                    if ( isset($values['form_key']) ) {
17
+                    if ( isset( $values['form_key'] ) ) {
18 18
                         $frm_settings = FrmAppHelper::get_settings();
19
-                        if ( empty($frm_settings->preview_page_id) ) { ?>
20
-                    <a href="<?php echo esc_url( FrmFormsHelper::get_direct_link($values['form_key']) ); ?>" class="preview button" target="wp-frm-preview-<?php echo esc_attr( $id ) ?>"><?php esc_html_e( 'Preview', 'formidable' ) ?></a>
19
+                        if ( empty( $frm_settings->preview_page_id ) ) { ?>
20
+                    <a href="<?php echo esc_url( FrmFormsHelper::get_direct_link( $values['form_key'] ) ); ?>" class="preview button" target="wp-frm-preview-<?php echo esc_attr( $id ) ?>"><?php esc_html_e( 'Preview', 'formidable' ) ?></a>
21 21
                 <?php
22 22
                         } else {
23 23
                 ?>
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
                         <a href="#" id="frm-previewDrop" class="frm-dropdown-toggle button" data-toggle="dropdown"><?php esc_html_e( 'Preview', 'formidable' ) ?> <b class="caret"></b></a>
26 26
 
27 27
                         <ul class="frm-dropdown-menu pull-right" role="menu" aria-labelledby="frm-previewDrop">
28
-                            <li><a href="<?php echo esc_url( FrmFormsHelper::get_direct_link($values['form_key']) ); ?>" target="_blank"><?php esc_html_e( 'On Blank Page', 'formidable' ) ?></a></li>
29
-                            <li><a href="<?php echo esc_url( add_query_arg('form', $values['form_key'], get_permalink( $frm_settings->preview_page_id )) ) ?>" target="_blank"><?php esc_html_e( 'In Theme', 'formidable' ) ?></a></li>
28
+                            <li><a href="<?php echo esc_url( FrmFormsHelper::get_direct_link( $values['form_key'] ) ); ?>" target="_blank"><?php esc_html_e( 'On Blank Page', 'formidable' ) ?></a></li>
29
+                            <li><a href="<?php echo esc_url( add_query_arg( 'form', $values['form_key'], get_permalink( $frm_settings->preview_page_id ) ) ) ?>" target="_blank"><?php esc_html_e( 'In Theme', 'formidable' ) ?></a></li>
30 30
                     	</ul>
31 31
                     </div>
32 32
                 <?php   }
@@ -62,24 +62,24 @@  discard block
 block discarded – undo
62 62
 
63 63
 
64 64
             <div class="misc-pub-section misc-pub-post-status"><label for="post_status"><?php esc_html_e( 'Status', 'formidable' ); ?>:</label>
65
-                <span id="form-status-display"><?php echo FrmFormsHelper::status_nice_name($values['status']); ?></span>
65
+                <span id="form-status-display"><?php echo FrmFormsHelper::status_nice_name( $values['status'] ); ?></span>
66 66
 				<?php if ( 'draft' != $values['status'] && ( ! isset( $_GET['frm_action'] ) || 'settings' != FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) ) ) { ?>
67 67
                 <a href="#post_status" class="edit-form-status hide-if-no-js" data-slidedown="form-status-select"><span aria-hidden="true"><?php esc_html_e( 'Edit' ) ?></span> <span class="screen-reader-text"><?php esc_html_e( 'Edit status' ) ?></span></a>
68 68
 
69 69
                 <div id="form-status-select" class="frm_hidden">
70 70
                     <select name="frm_change_status" id="form_change_status">
71
-                        <option value="published" <?php selected($values['status'], 'published') ?>><?php esc_html_e( 'Published' ); ?></option>
72
-                        <option value="draft" <?php selected($values['status'], 'draft') ?>><?php esc_html_e( 'Draft' ) ?></option>
71
+                        <option value="published" <?php selected( $values['status'], 'published' ) ?>><?php esc_html_e( 'Published' ); ?></option>
72
+                        <option value="draft" <?php selected( $values['status'], 'draft' ) ?>><?php esc_html_e( 'Draft' ) ?></option>
73 73
                     </select>
74
-                    <a href="#post_status" class="save-form-status hide-if-no-js button"><?php esc_html_e( 'OK') ?></a>
75
-                    <a href="#post_status" class="cancel-form-status hide-if-no-js button-cancel" data-slideup="form-status-select"><?php esc_html_e( 'Cancel') ?></a>
74
+                    <a href="#post_status" class="save-form-status hide-if-no-js button"><?php esc_html_e( 'OK' ) ?></a>
75
+                    <a href="#post_status" class="cancel-form-status hide-if-no-js button-cancel" data-slideup="form-status-select"><?php esc_html_e( 'Cancel' ) ?></a>
76 76
                 </div>
77 77
                 <?php } ?>
78 78
             </div><!-- .misc-pub-section -->
79 79
 
80
-            <?php if ( has_action('frm_settings_buttons') ) { ?>
80
+            <?php if ( has_action( 'frm_settings_buttons' ) ) { ?>
81 81
             <div class="misc-pub-section">
82
-                <?php do_action('frm_settings_buttons', $values); ?>
82
+                <?php do_action( 'frm_settings_buttons', $values ); ?>
83 83
                 <div class="clear"></div>
84 84
             </div>
85 85
             <?php } ?>
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     <div id="major-publishing-actions">
92 92
         <div id="delete-action">
93
-            <?php echo FrmFormsHelper::delete_trash_link($id, $values['status']); ?>
93
+            <?php echo FrmFormsHelper::delete_trash_link( $id, $values['status'] ); ?>
94 94
         </div>
95 95
 
96 96
 		<div id="publishing-action">
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 			<?php if ( 'settings' == FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) ) { ?>
99 99
 			<input type="button" value="<?php esc_attr_e( 'Update', 'formidable' ); ?>" class="frm_submit_form frm_submit_settings_btn button-primary button-large" id="frm_submit_side_top" />
100 100
             <?php } else { ?>
101
-    	    <input type="button" value="<?php echo isset($button) ? esc_attr($button) : __( 'Update', 'formidable' ); ?>" class="frm_submit_form frm_submit_<?php echo ( isset($values['ajax_load']) && $values['ajax_load'] ) ? '': 'no_'; ?>ajax button-primary button-large" id="frm_submit_side_top" />
101
+    	    <input type="button" value="<?php echo isset( $button ) ? esc_attr( $button ) : __( 'Update', 'formidable' ); ?>" class="frm_submit_form frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-primary button-large" id="frm_submit_side_top" />
102 102
     	    <?php } ?>
103 103
 		</div>
104 104
 
Please login to merge, or discard this patch.
classes/views/frm-entries/show.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,44 +14,44 @@
 block discarded – undo
14 14
                     <div class="inside">
15 15
                         <table class="form-table"><tbody>
16 16
                         <?php
17
-                        $first_h3 = 'frm_first_h3';
18
-                        foreach ( $fields as $field ) {
17
+						$first_h3 = 'frm_first_h3';
18
+						foreach ( $fields as $field ) {
19 19
 							if ( in_array( $field->type, array( 'captcha', 'html', 'end_divider', 'form' ) ) ) {
20
-                                continue;
21
-                            }
20
+								continue;
21
+							}
22 22
 
23
-                            if ( in_array($field->type, array( 'break', 'divider' ) ) ) {
24
-                            ?>
23
+							if ( in_array($field->type, array( 'break', 'divider' ) ) ) {
24
+							?>
25 25
                         </tbody></table>
26 26
                         <br/><h3 class="<?php echo esc_attr( $first_h3 ) ?>"><?php echo esc_html( $field->name ) ?></h3>
27 27
                         <table class="form-table"><tbody>
28 28
                         <?php
29
-                                $first_h3 = '';
30
-                            } else {
31
-                        ?>
29
+								$first_h3 = '';
30
+							} else {
31
+						?>
32 32
                         <tr>
33 33
                             <th scope="row"><?php echo esc_html( $field->name ) ?>:</th>
34 34
                             <td>
35 35
                             <?php
36 36
 							$embedded_field_id = ( $entry->form_id != $field->form_id ) ? 'form' . $field->form_id : 0;
37
-                            $atts = array(
38
-                                'type' => $field->type, 'post_id' => $entry->post_id,
39
-                                'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id,
40
-                                'embedded_field_id' => $embedded_field_id,
41
-                            );
37
+							$atts = array(
38
+								'type' => $field->type, 'post_id' => $entry->post_id,
39
+								'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id,
40
+								'embedded_field_id' => $embedded_field_id,
41
+							);
42 42
 							$display_value = FrmEntriesHelper::prepare_display_value( $entry, $field, $atts );
43 43
 							echo $display_value;
44 44
 
45
-                            if ( is_email($display_value) && ! in_array($display_value, $to_emails) ) {
46
-                                $to_emails[] = $display_value;
47
-                            }
48
-                            ?>
45
+							if ( is_email($display_value) && ! in_array($display_value, $to_emails) ) {
46
+								$to_emails[] = $display_value;
47
+							}
48
+							?>
49 49
                             </td>
50 50
                         </tr>
51 51
                         <?php }
52
-                        }
52
+						}
53 53
 
54
-                        ?>
54
+						?>
55 55
 
56 56
                         <?php if ( $entry->parent_item_id ) { ?>
57 57
                         <tr><th><?php esc_html_e( 'Parent Entry ID', 'formidable' ); ?>:</th>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <div id="form_show_entry_page" class="wrap">
2 2
     <h2 class="frm_no_print"><?php esc_html_e( 'View Entry', 'formidable' ); ?>
3
-        <?php do_action('frm_entry_inside_h2', $entry->form_id); ?>
3
+        <?php do_action( 'frm_entry_inside_h2', $entry->form_id ); ?>
4 4
     </h2>
5 5
 
6 6
     <div class="frm_forms">
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
         <div id="poststuff">
9 9
             <div id="post-body" class="metabox-holder columns-2">
10 10
             <div id="post-body-content">
11
-                <?php FrmAppController::get_form_nav($entry->form_id, true); ?>
11
+                <?php FrmAppController::get_form_nav( $entry->form_id, true ); ?>
12 12
                 <div class="postbox">
13 13
                     <h3 class="hndle"><span><?php esc_html_e( 'Entry', 'formidable' ); ?></span></h3>
14 14
                     <div class="inside">
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
                                 continue;
21 21
                             }
22 22
 
23
-                            if ( in_array($field->type, array( 'break', 'divider' ) ) ) {
23
+                            if ( in_array( $field->type, array( 'break', 'divider' ) ) ) {
24 24
                             ?>
25 25
                         </tbody></table>
26 26
                         <br/><h3 class="<?php echo esc_attr( $first_h3 ) ?>"><?php echo esc_html( $field->name ) ?></h3>
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 							$display_value = FrmEntriesHelper::prepare_display_value( $entry, $field, $atts );
43 43
 							echo $display_value;
44 44
 
45
-                            if ( is_email($display_value) && ! in_array($display_value, $to_emails) ) {
45
+                            if ( is_email( $display_value ) && ! in_array( $display_value, $to_emails ) ) {
46 46
                                 $to_emails[] = $display_value;
47 47
                             }
48 48
                             ?>
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
                         </td></tr>
60 60
                         <?php } ?>
61 61
                         </tbody></table>
62
-                        <?php do_action('frm_show_entry', $entry); ?>
62
+                        <?php do_action( 'frm_show_entry', $entry ); ?>
63 63
                     </div>
64 64
                 </div>
65 65
 
66
-                <?php do_action('frm_after_show_entry', $entry); ?>
66
+                <?php do_action( 'frm_after_show_entry', $entry ); ?>
67 67
 
68 68
             </div>
69 69
 			<?php require( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/sidebar-show.php' ); ?>
Please login to merge, or discard this patch.
classes/views/frm-entries/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <div id="form_entries_page" class="wrap">
2 2
 	<h1><?php esc_html_e( 'Entries', 'formidable' ); ?>
3
-        <?php do_action('frm_entry_inside_h2', $form); ?>
3
+        <?php do_action( 'frm_entry_inside_h2', $form ); ?>
4 4
 	</h1>
5 5
 
6 6
 	<?php require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
         <div id="poststuff">
10 10
             <div id="post-body" class="metabox-holder columns-2">
11 11
             <div id="post-body-content">
12
-                <?php FrmAppController::get_form_nav($form, true, 'hide'); ?>
12
+                <?php FrmAppController::get_form_nav( $form, true, 'hide' ); ?>
13 13
             </div>
14 14
             <div id="postbox-container-1" class="postbox-container">
15 15
                 <input type="hidden" name="page" value="formidable-entries" />
Please login to merge, or discard this patch.