Version Description
- Increased WP version requirement to 5.0.
- New: Fields can now be dragged beside each other and grid layouts will be automatically applied.
- New: Added the option to quickly set layouts for a full row of fields at once.
- New: Fields can now be multiselected using the command, control, and shift keys. Selected field groups can be merged into rows and deleted in batches.
- New: Added additional formatting to calculations to avoid issues with comparisons getting stripped when spaces are left out.
- New: Permissions are now updated right away when a formidable license is activated to avoid issues with certain pro features not being available right away.
- Fix: Updated styling rules for repeater button icons to avoid issues with file upload icons getting styled as well.
- Fix: The confirmation pop up title was displaying as inline when trying to delete a section.
- Fix: Updated styling for new fields that are about to be dropped into a form.
Download this release
Release Info
Developer | formidableforms |
Plugin | Formidable Forms – Form Builder for WordPress |
Version | 5.0 |
Comparing to | |
See all releases |
Code changes from version 4.11.05 to 5.0
- classes/controllers/FrmAddonsController.php +3 -4
- classes/controllers/FrmAppController.php +1 -0
- classes/controllers/FrmFieldsController.php +13 -4
- classes/controllers/FrmHooksController.php +1 -0
- classes/helpers/FrmAppHelper.php +22 -8
- classes/helpers/FrmEntriesHelper.php +1 -1
- classes/helpers/FrmFieldGridHelper.php +274 -0
- classes/helpers/FrmFormsHelper.php +2 -2
- classes/models/FrmAddon.php +30 -0
- classes/models/FrmEntry.php +1 -1
- classes/models/FrmForm.php +34 -5
- classes/models/FrmPluginSearch.php +363 -0
- classes/views/frm-forms/add_field.php +25 -14
- classes/views/frm-forms/edit.php +11 -0
- classes/views/frm-forms/form.php +7 -1
- css/custom_theme.css.php +1 -1
- css/font_icons.css +10 -0
- css/frm_admin.css +282 -20
- formidable.php +1 -1
- images/icons.svg +6 -0
- js/formidable_admin.js +1630 -219
- js/formidable_admin_global.js +9 -1
- js/plugin-search.js +77 -0
- languages/formidable.pot +261 -206
- readme.txt +13 -9
classes/controllers/FrmAddonsController.php
CHANGED
@@ -11,16 +11,15 @@ class FrmAddonsController {
|
|
11 |
}
|
12 |
|
13 |
$label = __( 'Add-Ons', 'formidable' );
|
14 |
-
|
15 |
-
|
16 |
-
}
|
17 |
add_submenu_page( 'formidable', 'Formidable | ' . __( 'Add-Ons', 'formidable' ), $label, 'frm_view_forms', 'formidable-addons', 'FrmAddonsController::list_addons' );
|
18 |
|
19 |
if ( ! FrmAppHelper::pro_is_installed() ) {
|
20 |
add_submenu_page(
|
21 |
'formidable',
|
22 |
'Formidable | ' . __( 'Upgrade', 'formidable' ),
|
23 |
-
'<span
|
24 |
'frm_view_forms',
|
25 |
'formidable-pro-upgrade',
|
26 |
'FrmAddonsController::upgrade_to_pro'
|
11 |
}
|
12 |
|
13 |
$label = __( 'Add-Ons', 'formidable' );
|
14 |
+
$label = '<span style="color:#fe5a1d">' . $label . '</span>';
|
15 |
+
|
|
|
16 |
add_submenu_page( 'formidable', 'Formidable | ' . __( 'Add-Ons', 'formidable' ), $label, 'frm_view_forms', 'formidable-addons', 'FrmAddonsController::list_addons' );
|
17 |
|
18 |
if ( ! FrmAppHelper::pro_is_installed() ) {
|
19 |
add_submenu_page(
|
20 |
'formidable',
|
21 |
'Formidable | ' . __( 'Upgrade', 'formidable' ),
|
22 |
+
'<span class="frm-upgrade-submenu">' . __( 'Upgrade', 'formidable' ) . '</span>',
|
23 |
'frm_view_forms',
|
24 |
'formidable-pro-upgrade',
|
25 |
'FrmAddonsController::upgrade_to_pro'
|
classes/controllers/FrmAppController.php
CHANGED
@@ -440,6 +440,7 @@ class FrmAppController {
|
|
440 |
'jquery-ui-sortable',
|
441 |
'bootstrap_tooltip',
|
442 |
'bootstrap-multiselect',
|
|
|
443 |
);
|
444 |
|
445 |
if ( FrmAppHelper::is_admin_page( 'formidable-styles' ) || FrmAppHelper::is_admin_page( 'formidable-styles2' ) ) {
|
440 |
'jquery-ui-sortable',
|
441 |
'bootstrap_tooltip',
|
442 |
'bootstrap-multiselect',
|
443 |
+
'wp-i18n',
|
444 |
);
|
445 |
|
446 |
if ( FrmAppHelper::is_admin_page( 'formidable-styles' ) || FrmAppHelper::is_admin_page( 'formidable-styles2' ) ) {
|
classes/controllers/FrmFieldsController.php
CHANGED
@@ -196,13 +196,22 @@ class FrmFieldsController {
|
|
196 |
$classes = isset( $field['classes'] ) ? $field['classes'] : '';
|
197 |
|
198 |
// Exclude alignright for now since we aren't using widths.
|
199 |
-
$classes
|
200 |
-
|
|
|
|
|
201 |
$classes = '';
|
202 |
}
|
203 |
|
204 |
-
$li_classes .= ' frm_form_field frmstart '
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
$li_classes = apply_filters( 'frm_build_field_class', $li_classes, $field );
|
207 |
}
|
208 |
|
196 |
$classes = isset( $field['classes'] ) ? $field['classes'] : '';
|
197 |
|
198 |
// Exclude alignright for now since we aren't using widths.
|
199 |
+
$classes = str_replace( ' frm_alignright ', ' ', $classes );
|
200 |
+
$classes = trim( $classes );
|
201 |
+
|
202 |
+
if ( 'frm_alignright' === $classes ) {
|
203 |
$classes = '';
|
204 |
}
|
205 |
|
206 |
+
$li_classes .= ' frm_form_field frmstart ';
|
207 |
+
|
208 |
+
if ( $classes ) {
|
209 |
+
$li_classes .= $classes . ' ';
|
210 |
+
}
|
211 |
+
|
212 |
+
$li_classes .= 'frmend';
|
213 |
+
|
214 |
+
if ( $field ) {
|
215 |
$li_classes = apply_filters( 'frm_build_field_class', $li_classes, $field );
|
216 |
}
|
217 |
|
classes/controllers/FrmHooksController.php
CHANGED
@@ -157,6 +157,7 @@ class FrmHooksController {
|
|
157 |
|
158 |
FrmSMTPController::load_hooks();
|
159 |
FrmWelcomeController::load_hooks();
|
|
|
160 |
}
|
161 |
|
162 |
public static function load_ajax_hooks() {
|
157 |
|
158 |
FrmSMTPController::load_hooks();
|
159 |
FrmWelcomeController::load_hooks();
|
160 |
+
new FrmPluginSearch();
|
161 |
}
|
162 |
|
163 |
public static function load_ajax_hooks() {
|
classes/helpers/FrmAppHelper.php
CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
|
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
-
public static $plug_version = '
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
@@ -1224,6 +1224,14 @@ class FrmAppHelper {
|
|
1224 |
}
|
1225 |
}
|
1226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1227 |
public static function frm_capabilities( $type = 'auto' ) {
|
1228 |
$cap = array(
|
1229 |
'frm_view_forms' => __( 'View Forms', 'formidable' ),
|
@@ -1234,16 +1242,22 @@ class FrmAppHelper {
|
|
1234 |
'frm_delete_entries' => __( 'Delete Entries from Admin Area', 'formidable' ),
|
1235 |
);
|
1236 |
|
1237 |
-
if ( ! self::pro_is_installed() && 'pro'
|
1238 |
return $cap;
|
1239 |
}
|
1240 |
|
1241 |
-
$
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1245 |
|
1246 |
-
return $cap;
|
1247 |
}
|
1248 |
|
1249 |
/**
|
@@ -1530,7 +1544,7 @@ class FrmAppHelper {
|
|
1530 |
}
|
1531 |
|
1532 |
public static function get_user_id_param( $user_id ) {
|
1533 |
-
if ( ! $user_id ||
|
1534 |
return $user_id;
|
1535 |
}
|
1536 |
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
+
public static $plug_version = '5.0';
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
1224 |
}
|
1225 |
}
|
1226 |
|
1227 |
+
/**
|
1228 |
+
* Gets the list of capabilities.
|
1229 |
+
*
|
1230 |
+
* @since 5.0 Parameter `$type` supports `pro_only` value.
|
1231 |
+
*
|
1232 |
+
* @param string $type Supports `auto`, `pro`, or `pro_only`.
|
1233 |
+
* @return array
|
1234 |
+
*/
|
1235 |
public static function frm_capabilities( $type = 'auto' ) {
|
1236 |
$cap = array(
|
1237 |
'frm_view_forms' => __( 'View Forms', 'formidable' ),
|
1242 |
'frm_delete_entries' => __( 'Delete Entries from Admin Area', 'formidable' ),
|
1243 |
);
|
1244 |
|
1245 |
+
if ( ! self::pro_is_installed() && 'pro' !== $type && 'pro_only' !== $type ) {
|
1246 |
return $cap;
|
1247 |
}
|
1248 |
|
1249 |
+
$pro_cap = array(
|
1250 |
+
'frm_create_entries' => __( 'Add Entries from Admin Area', 'formidable' ),
|
1251 |
+
'frm_edit_entries' => __( 'Edit Entries from Admin Area', 'formidable' ),
|
1252 |
+
'frm_view_reports' => __( 'View Reports', 'formidable' ),
|
1253 |
+
'frm_edit_displays' => __( 'Add/Edit Views', 'formidable' ),
|
1254 |
+
);
|
1255 |
+
|
1256 |
+
if ( 'pro_only' === $type ) {
|
1257 |
+
return $pro_cap;
|
1258 |
+
}
|
1259 |
|
1260 |
+
return $cap + $pro_cap;
|
1261 |
}
|
1262 |
|
1263 |
/**
|
1544 |
}
|
1545 |
|
1546 |
public static function get_user_id_param( $user_id ) {
|
1547 |
+
if ( ! $user_id || is_numeric( $user_id ) ) {
|
1548 |
return $user_id;
|
1549 |
}
|
1550 |
|
classes/helpers/FrmEntriesHelper.php
CHANGED
@@ -385,7 +385,7 @@ class FrmEntriesHelper {
|
|
385 |
*/
|
386 |
public static function maybe_set_other_validation( $field, &$value, &$args ) {
|
387 |
$args['other'] = false;
|
388 |
-
if ( ! $value ||
|
389 |
return;
|
390 |
}
|
391 |
|
385 |
*/
|
386 |
public static function maybe_set_other_validation( $field, &$value, &$args ) {
|
387 |
$args['other'] = false;
|
388 |
+
if ( ! $value || ! FrmAppHelper::pro_is_installed() ) {
|
389 |
return;
|
390 |
}
|
391 |
|
classes/helpers/FrmFieldGridHelper.php
ADDED
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
|
6 |
+
class FrmFieldGridHelper {
|
7 |
+
|
8 |
+
private $parent_li;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @var int
|
12 |
+
*/
|
13 |
+
private $current_list_size;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var int
|
17 |
+
*/
|
18 |
+
private $current_field_count;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $field_layout_class;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var int
|
27 |
+
*/
|
28 |
+
private $active_field_size;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @var bool $is_frm_first flagged while calling get_field_layout_class, true if classes contain frm_first class.
|
32 |
+
*/
|
33 |
+
private $is_frm_first;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var stdClass
|
37 |
+
*/
|
38 |
+
private $field;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @var FrmFieldGridHelper $section_helper
|
42 |
+
*/
|
43 |
+
private $section_helper;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @var bool $nested
|
47 |
+
*/
|
48 |
+
private $nested;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @var int $section_size
|
52 |
+
*/
|
53 |
+
private $section_size;
|
54 |
+
|
55 |
+
private $section_is_open = false;
|
56 |
+
|
57 |
+
public function __construct( $nested = false ) {
|
58 |
+
$this->parent_li = false;
|
59 |
+
$this->current_list_size = 0;
|
60 |
+
$this->current_field_count = 0;
|
61 |
+
$this->nested = $nested;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @param stdClass $field
|
66 |
+
*/
|
67 |
+
public function set_field( $field ) {
|
68 |
+
$this->field = $field;
|
69 |
+
|
70 |
+
if ( ! empty( $this->section_helper ) && 'end_divider' !== $field->type ) {
|
71 |
+
$this->section_helper->set_field( $field );
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( 'end_divider' === $field->type ) {
|
76 |
+
$this->field_layout_class = '';
|
77 |
+
$this->active_field_size = $this->section_size;
|
78 |
+
$this->section_is_open = false;
|
79 |
+
$this->maybe_close_section_helper();
|
80 |
+
} else {
|
81 |
+
$this->field_layout_class = $this->get_field_layout_class();
|
82 |
+
$this->active_field_size = $this->get_size_of_class( $this->field_layout_class );
|
83 |
+
}
|
84 |
+
|
85 |
+
if ( 'divider' === $field->type && empty( $this->nested ) ) {
|
86 |
+
$this->section_size = $this->active_field_size;
|
87 |
+
$this->active_field_size = 0;
|
88 |
+
$this->section_helper = new self( true );
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
private function maybe_close_section_helper() {
|
93 |
+
if ( empty( $this->section_helper ) ) {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
$this->section_helper->force_close_field_wrapper();
|
97 |
+
$this->section_helper = null;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @return string
|
102 |
+
*/
|
103 |
+
public function get_field_layout_class() {
|
104 |
+
$field = FrmFieldsHelper::setup_edit_vars( $this->field );
|
105 |
+
|
106 |
+
if ( empty( $field['classes'] ) ) {
|
107 |
+
return '';
|
108 |
+
}
|
109 |
+
|
110 |
+
$split = explode( ' ', $field['classes'] );
|
111 |
+
$this->is_frm_first = in_array( 'frm_first', $split, true );
|
112 |
+
$classes = self::get_grid_classes();
|
113 |
+
|
114 |
+
foreach ( $classes as $class ) {
|
115 |
+
if ( in_array( $class, $split, true ) ) {
|
116 |
+
return $class;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
return '';
|
121 |
+
}
|
122 |
+
|
123 |
+
public function maybe_begin_field_wrapper() {
|
124 |
+
if ( $this->should_first_close_the_active_field_wrapper() ) {
|
125 |
+
$this->close_field_wrapper();
|
126 |
+
}
|
127 |
+
|
128 |
+
if ( false === $this->parent_li && 'end_divider' !== $this->field->type ) {
|
129 |
+
$this->begin_field_wrapper();
|
130 |
+
}
|
131 |
+
|
132 |
+
if ( ! empty( $this->section_helper ) && $this->section_is_open ) {
|
133 |
+
$this->section_helper->maybe_begin_field_wrapper();
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* @return bool
|
139 |
+
*/
|
140 |
+
private function should_first_close_the_active_field_wrapper() {
|
141 |
+
if ( false === $this->parent_li || ! empty( $this->section_helper ) ) {
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
if ( 'end_divider' === $this->field->type ) {
|
145 |
+
return false;
|
146 |
+
}
|
147 |
+
return ! $this->can_support_current_layout() || $this->is_frm_first;
|
148 |
+
}
|
149 |
+
|
150 |
+
private function begin_field_wrapper() {
|
151 |
+
echo '<li class="frm_field_box"><ul class="frm_grid_container frm_sorting">';
|
152 |
+
$this->parent_li = true;
|
153 |
+
$this->current_list_size = 0;
|
154 |
+
$this->current_field_count = 0;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* @param string $class
|
159 |
+
* @return int
|
160 |
+
*/
|
161 |
+
private static function get_size_of_class( $class ) {
|
162 |
+
switch ( $class ) {
|
163 |
+
case 'frm_half':
|
164 |
+
return 6;
|
165 |
+
case 'frm_third':
|
166 |
+
return 4;
|
167 |
+
case 'frm_two_thirds':
|
168 |
+
return 8;
|
169 |
+
case 'frm_fourth':
|
170 |
+
return 3;
|
171 |
+
case 'frm_three_fourths':
|
172 |
+
return 9;
|
173 |
+
case 'frm_sixth':
|
174 |
+
return 2;
|
175 |
+
}
|
176 |
+
|
177 |
+
if ( 0 === strpos( $class, 'frm' ) ) {
|
178 |
+
$substr = substr( $class, 3 );
|
179 |
+
if ( is_numeric( $substr ) ) {
|
180 |
+
return (int) $substr;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
// Anything missing a layout class should be a full width row.
|
185 |
+
return 12;
|
186 |
+
}
|
187 |
+
|
188 |
+
public function sync_list_size() {
|
189 |
+
if ( ! isset( $this->field ) ) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
|
193 |
+
if ( 'divider' === $this->field->type ) {
|
194 |
+
$this->section_is_open = true;
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( ! empty( $this->section_helper ) ) {
|
198 |
+
$this->section_helper->sync_list_size();
|
199 |
+
if ( 'end_divider' === $this->field->type ) {
|
200 |
+
$this->maybe_close_section_helper();
|
201 |
+
}
|
202 |
+
return;
|
203 |
+
}
|
204 |
+
|
205 |
+
if ( false !== $this->parent_li ) {
|
206 |
+
$this->current_field_count ++;
|
207 |
+
$this->current_list_size += $this->active_field_size;
|
208 |
+
if ( 12 === $this->current_list_size ) {
|
209 |
+
$this->close_field_wrapper();
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* It is possible that there was still space for another field so the wrapper could still be open after looping the fields.
|
216 |
+
* If it is, make sure it's closed now.
|
217 |
+
*/
|
218 |
+
public function force_close_field_wrapper() {
|
219 |
+
if ( false !== $this->parent_li ) {
|
220 |
+
$this->close_field_wrapper();
|
221 |
+
}
|
222 |
+
}
|
223 |
+
|
224 |
+
private function close_field_wrapper() {
|
225 |
+
$this->maybe_close_section_helper();
|
226 |
+
echo '</ul></li>';
|
227 |
+
$this->parent_li = false;
|
228 |
+
$this->current_list_size = 0;
|
229 |
+
$this->current_field_count = 0;
|
230 |
+
}
|
231 |
+
|
232 |
+
private function can_support_current_layout() {
|
233 |
+
if ( 'end_divider' === $this->field->type ) {
|
234 |
+
return true;
|
235 |
+
}
|
236 |
+
return $this->can_support_an_additional_layout( $this->field_layout_class );
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* @param string $class
|
241 |
+
* @return bool
|
242 |
+
*/
|
243 |
+
private function can_support_an_additional_layout( $class ) {
|
244 |
+
$size = $this->get_size_of_class( $class );
|
245 |
+
return $this->current_list_size + $size <= 12;
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* @return array<string>
|
250 |
+
*/
|
251 |
+
private static function get_grid_classes() {
|
252 |
+
return array(
|
253 |
+
'frm_full',
|
254 |
+
'frm_half',
|
255 |
+
'frm_third',
|
256 |
+
'frm_two_thirds',
|
257 |
+
'frm_fourth',
|
258 |
+
'frm_three_fourths',
|
259 |
+
'frm_sixth',
|
260 |
+
'frm1',
|
261 |
+
'frm2',
|
262 |
+
'frm3',
|
263 |
+
'frm4',
|
264 |
+
'frm5',
|
265 |
+
'frm6',
|
266 |
+
'frm7',
|
267 |
+
'frm8',
|
268 |
+
'frm9',
|
269 |
+
'frm10',
|
270 |
+
'frm11',
|
271 |
+
'frm12',
|
272 |
+
);
|
273 |
+
}
|
274 |
+
}
|
classes/helpers/FrmFormsHelper.php
CHANGED
@@ -75,7 +75,7 @@ class FrmFormsHelper {
|
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
-
* @param string|object $selected - The label for the placeholder, or the form object.
|
79 |
*/
|
80 |
public static function form_switcher( $selected = false ) {
|
81 |
$where = apply_filters( 'frm_forms_dropdown', array(), '' );
|
@@ -751,7 +751,7 @@ BEFORE_HTML;
|
|
751 |
}
|
752 |
|
753 |
public static function submit_button_label( $submit ) {
|
754 |
-
if ( ! $submit
|
755 |
$frm_settings = FrmAppHelper::get_settings();
|
756 |
$submit = $frm_settings->submit_value;
|
757 |
}
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
+
* @param string|object|false $selected - The label for the placeholder, or the form object.
|
79 |
*/
|
80 |
public static function form_switcher( $selected = false ) {
|
81 |
$where = apply_filters( 'frm_forms_dropdown', array(), '' );
|
751 |
}
|
752 |
|
753 |
public static function submit_button_label( $submit ) {
|
754 |
+
if ( ! $submit ) {
|
755 |
$frm_settings = FrmAppHelper::get_settings();
|
756 |
$submit = $frm_settings->submit_value;
|
757 |
}
|
classes/models/FrmAddon.php
CHANGED
@@ -238,6 +238,36 @@ class FrmAddon {
|
|
238 |
update_option( $this->option_name . 'active', $is_active );
|
239 |
$this->delete_cache();
|
240 |
FrmAppHelper::save_combined_js();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
}
|
242 |
|
243 |
/**
|
238 |
update_option( $this->option_name . 'active', $is_active );
|
239 |
$this->delete_cache();
|
240 |
FrmAppHelper::save_combined_js();
|
241 |
+
$this->update_pro_capabilities();
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Updates roles capabilities after pro license is active.
|
246 |
+
*
|
247 |
+
* @since 5.0
|
248 |
+
*/
|
249 |
+
protected function update_pro_capabilities() {
|
250 |
+
global $wp_roles;
|
251 |
+
|
252 |
+
$caps = FrmAppHelper::frm_capabilities( 'pro_only' );
|
253 |
+
$roles = get_editable_roles();
|
254 |
+
$settings = new FrmSettings();
|
255 |
+
foreach ( $caps as $cap => $cap_desc ) {
|
256 |
+
$cap_roles = (array) ( isset( $settings->$cap ) ? $settings->$cap : 'administrator' );
|
257 |
+
|
258 |
+
// Make sure administrators always have permissions.
|
259 |
+
if ( ! in_array( 'administrator', $cap_roles ) ) {
|
260 |
+
array_push( $cap_roles, 'administrator' );
|
261 |
+
}
|
262 |
+
|
263 |
+
foreach ( $roles as $role => $details ) {
|
264 |
+
if ( in_array( $role, $cap_roles ) ) {
|
265 |
+
$wp_roles->add_cap( $role, $cap );
|
266 |
+
} else {
|
267 |
+
$wp_roles->remove_cap( $role, $cap );
|
268 |
+
}
|
269 |
+
}
|
270 |
+
}
|
271 |
}
|
272 |
|
273 |
/**
|
classes/models/FrmEntry.php
CHANGED
@@ -65,7 +65,7 @@ class FrmEntry {
|
|
65 |
global $wpdb;
|
66 |
$entry_exists = FrmDb::get_col( $wpdb->prefix . 'frm_items', $check_val, 'id', array( 'order_by' => 'created_at DESC' ) );
|
67 |
|
68 |
-
if ( ! $entry_exists ||
|
69 |
return false;
|
70 |
}
|
71 |
|
65 |
global $wpdb;
|
66 |
$entry_exists = FrmDb::get_col( $wpdb->prefix . 'frm_items', $check_val, 'id', array( 'order_by' => 'created_at DESC' ) );
|
67 |
|
68 |
+
if ( ! $entry_exists || ! isset( $values['item_meta'] ) ) {
|
69 |
return false;
|
70 |
}
|
71 |
|
classes/models/FrmForm.php
CHANGED
@@ -267,11 +267,7 @@ class FrmForm {
|
|
267 |
private static function sanitize_field_opt( $opt, &$value ) {
|
268 |
if ( is_string( $value ) ) {
|
269 |
if ( $opt === 'calc' ) {
|
270 |
-
$
|
271 |
-
$temp = array( '< = ', ' > =' );
|
272 |
-
$value = str_replace( $allow, $temp, $value );
|
273 |
-
$value = strip_tags( $value );
|
274 |
-
$value = str_replace( $temp, $allow, $value );
|
275 |
} else {
|
276 |
$value = FrmAppHelper::kses( $value, 'all' );
|
277 |
}
|
@@ -279,6 +275,39 @@ class FrmForm {
|
|
279 |
}
|
280 |
}
|
281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
/**
|
283 |
* Updating the settings page
|
284 |
*/
|
267 |
private static function sanitize_field_opt( $opt, &$value ) {
|
268 |
if ( is_string( $value ) ) {
|
269 |
if ( $opt === 'calc' ) {
|
270 |
+
$value = self::sanitize_calc( $value );
|
|
|
|
|
|
|
|
|
271 |
} else {
|
272 |
$value = FrmAppHelper::kses( $value, 'all' );
|
273 |
}
|
275 |
}
|
276 |
}
|
277 |
|
278 |
+
/**
|
279 |
+
* @param string $value
|
280 |
+
* @return string
|
281 |
+
*/
|
282 |
+
private static function sanitize_calc( $value ) {
|
283 |
+
if ( false !== strpos( $value, '<' ) ) {
|
284 |
+
$value = self::normalize_calc_spaces( $value );
|
285 |
+
}
|
286 |
+
$allow = array( '<= ', ' >=' ); // Allow <= and >=
|
287 |
+
$temp = array( '< = ', ' > =' );
|
288 |
+
$value = str_replace( $allow, $temp, $value );
|
289 |
+
$value = strip_tags( $value );
|
290 |
+
$value = str_replace( $temp, $allow, $value );
|
291 |
+
return $value;
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* Format a comparison like 5<10 to 5 < 10. Also works on 5< 10, 5 <10, 5<=10 variations.
|
296 |
+
* This is to avoid an issue with unspaced calculations being recognized as HTML that gets removed when strip_tags is called.
|
297 |
+
*
|
298 |
+
* @param string $calc
|
299 |
+
* @return string
|
300 |
+
*/
|
301 |
+
private static function normalize_calc_spaces( $calc ) {
|
302 |
+
// Check for a pattern with 5 parts
|
303 |
+
// $1 \d the first comparison digit.
|
304 |
+
// $2 a space (optional).
|
305 |
+
// $3 an equals sign (optional) that follows the < operator for <= comparisons.
|
306 |
+
// $4 another space (optional).
|
307 |
+
// $5 \d the second comparison digit.
|
308 |
+
return preg_replace( '/(\d)( ){0,1}<(=){0,1}( ){0,1}(\d)/', '$1 <$3 $5', $calc );
|
309 |
+
}
|
310 |
+
|
311 |
/**
|
312 |
* Updating the settings page
|
313 |
*/
|
classes/models/FrmPluginSearch.php
ADDED
@@ -0,0 +1,363 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
|
6 |
+
class FrmPluginSearch {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* PSH slug name.
|
10 |
+
*
|
11 |
+
* @var string
|
12 |
+
*/
|
13 |
+
public static $slug = 'frm-plugin-search';
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Option name that holds dismissed suggestions.
|
17 |
+
*
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
protected static $dismissed_opt = 'frm_dismissed_hints';
|
21 |
+
|
22 |
+
public function __construct() {
|
23 |
+
add_action( 'current_screen', array( $this, 'start' ) );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Add actions and filters only if this is the plugin installation screen and it's the first page.
|
28 |
+
*
|
29 |
+
* @param object $screen WP Screen object.
|
30 |
+
*
|
31 |
+
* @since 4.12
|
32 |
+
*/
|
33 |
+
public function start( $screen ) {
|
34 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
35 |
+
if ( 'plugin-install' === $screen->base && ( ! isset( $_GET['paged'] ) || 1 === intval( $_GET['paged'] ) ) ) {
|
36 |
+
add_filter( 'plugins_api_result', array( $this, 'inject_suggestion' ), 10, 3 );
|
37 |
+
add_filter( 'self_admin_url', array( $this, 'plugin_details' ) );
|
38 |
+
add_filter( 'plugin_install_action_links', array( $this, 'insert_related_links' ), 10, 2 );
|
39 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'load_plugins_search_script' ) );
|
40 |
+
$this->maybe_dismiss();
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Intercept the plugins API response and add in an appropriate card.
|
46 |
+
*
|
47 |
+
* @param object $result Plugin search results.
|
48 |
+
* @param string $action unused.
|
49 |
+
* @param object $args Search args.
|
50 |
+
*/
|
51 |
+
public function inject_suggestion( $result, $action, $args ) {
|
52 |
+
// Looks like a search query; it's matching time.
|
53 |
+
if ( empty( $args->search ) ) {
|
54 |
+
return $result;
|
55 |
+
}
|
56 |
+
|
57 |
+
$addon_list = $this->get_addons();
|
58 |
+
|
59 |
+
// Lowercase, trim, remove punctuation/special chars, decode url, remove 'formidable'.
|
60 |
+
$normalized_term = $this->search_to_array( $args->search );
|
61 |
+
if ( empty( $normalized_term ) ) {
|
62 |
+
// Don't add anything extra.
|
63 |
+
return $result;
|
64 |
+
}
|
65 |
+
|
66 |
+
$matching_addon = $this->matching_addon( $addon_list, $normalized_term );
|
67 |
+
|
68 |
+
if ( empty( $matching_addon ) || ! $this->should_display_hint( $matching_addon ) ) {
|
69 |
+
return $result;
|
70 |
+
}
|
71 |
+
|
72 |
+
$inject = (array) $this->get_plugin_data();
|
73 |
+
$overrides = array(
|
74 |
+
'plugin-search' => true, // Helps to determine if that an injected card.
|
75 |
+
'name' => sprintf(
|
76 |
+
/* translators: Formidable addon name */
|
77 |
+
esc_html_x( 'Formidable %s', 'Formidable Addon Name', 'formidable' ),
|
78 |
+
$addon_list[ $matching_addon ]['name']
|
79 |
+
),
|
80 |
+
'addon' => $addon_list[ $matching_addon ]['slug'],
|
81 |
+
'short_description' => $addon_list[ $matching_addon ]['excerpt'],
|
82 |
+
'slug' => self::$slug,
|
83 |
+
'version' => $addon_list[ $matching_addon ]['version'],
|
84 |
+
);
|
85 |
+
|
86 |
+
// Splice in the base addon data.
|
87 |
+
$inject = array_merge( $inject, $addon_list[ $matching_addon ], $overrides );
|
88 |
+
|
89 |
+
// Add it to the top of the list.
|
90 |
+
array_unshift( $result->plugins, $inject );
|
91 |
+
|
92 |
+
return $result;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Search for any addons that match the searched terms.
|
97 |
+
*
|
98 |
+
* @since 4.12
|
99 |
+
*
|
100 |
+
* @return int
|
101 |
+
*/
|
102 |
+
private function matching_addon( $addon_list, $normalized_term ) {
|
103 |
+
$matching_addon = null;
|
104 |
+
|
105 |
+
// Try to match a passed search term with addon's search terms.
|
106 |
+
foreach ( $addon_list as $addon_id => $addon_opts ) {
|
107 |
+
if ( ! is_array( $addon_opts ) || empty( $addon_opts['excerpt'] ) ) {
|
108 |
+
continue;
|
109 |
+
}
|
110 |
+
|
111 |
+
/*
|
112 |
+
* Does the site's current plan support the feature?
|
113 |
+
*/
|
114 |
+
$is_supported_by_plan = ! empty( $addon_opts['url'] );
|
115 |
+
|
116 |
+
if ( ! isset( $addon_opts['search_terms'] ) ) {
|
117 |
+
$addon_opts['search_terms'] = '';
|
118 |
+
}
|
119 |
+
|
120 |
+
$addon_terms = $this->search_to_array( $addon_opts['search_terms'] . ', ' . $addon_opts['name'] );
|
121 |
+
|
122 |
+
$matches = ! empty( array_intersect( $addon_terms, $normalized_term ) );
|
123 |
+
|
124 |
+
if ( $matches && $is_supported_by_plan ) {
|
125 |
+
$matching_addon = $addon_id;
|
126 |
+
break;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
return $matching_addon;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* @since 4.12
|
135 |
+
*
|
136 |
+
* @return array
|
137 |
+
*/
|
138 |
+
private function get_addons() {
|
139 |
+
$api = new FrmFormApi();
|
140 |
+
return $api->get_api_info();
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Get the plugin repo's data to populate the fields with.
|
145 |
+
*
|
146 |
+
* @return array|mixed|object|WP_Error
|
147 |
+
*/
|
148 |
+
private function get_plugin_data() {
|
149 |
+
$data = get_transient( 'formidable_plugin_data' );
|
150 |
+
|
151 |
+
if ( false !== $data && ! is_wp_error( $data ) ) {
|
152 |
+
return $data;
|
153 |
+
}
|
154 |
+
|
155 |
+
include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
156 |
+
$data = plugins_api(
|
157 |
+
'plugin_information',
|
158 |
+
array(
|
159 |
+
'slug' => 'formidable',
|
160 |
+
'is_ssl' => is_ssl(),
|
161 |
+
'fields' => array(
|
162 |
+
'banners' => true,
|
163 |
+
'reviews' => true,
|
164 |
+
'active_installs' => true,
|
165 |
+
'versions' => false,
|
166 |
+
'sections' => false,
|
167 |
+
),
|
168 |
+
)
|
169 |
+
);
|
170 |
+
set_transient( 'formidable_plugin_data', $data, DAY_IN_SECONDS );
|
171 |
+
|
172 |
+
return $data;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Modify URL used to fetch to plugin information so it pulls Formidable plugin page.
|
177 |
+
*
|
178 |
+
* @param string $url URL to load in dialog pulling the plugin page from wporg.
|
179 |
+
*
|
180 |
+
* @since 4.12
|
181 |
+
*
|
182 |
+
* @return string The URL with 'formidable' instead of 'frm-plugin-search'.
|
183 |
+
*/
|
184 |
+
public function plugin_details( $url ) {
|
185 |
+
return false !== stripos( $url, 'tab=plugin-information&plugin=' . self::$slug )
|
186 |
+
? 'plugin-install.php?tab=plugin-information&plugin=formidable&TB_iframe=true&width=600&height=550'
|
187 |
+
: $url;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* @since 4.12
|
192 |
+
*/
|
193 |
+
private function maybe_dismiss() {
|
194 |
+
$addon = FrmAppHelper::get_param( 'frm-dismiss', '', 'get', 'absint' );
|
195 |
+
if ( ! empty( $addon ) ) {
|
196 |
+
$this->add_to_dismissed_hints( $addon );
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Returns a list of previously dismissed hints.
|
202 |
+
*
|
203 |
+
* @since 4.12
|
204 |
+
*
|
205 |
+
* @return array List of dismissed hints.
|
206 |
+
*/
|
207 |
+
protected function get_dismissed_hints() {
|
208 |
+
$dismissed_hints = get_option( self::$dismissed_opt );
|
209 |
+
return ! empty( $dismissed_hints ) && is_array( $dismissed_hints ) ? $dismissed_hints : array();
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Save the hint in the list of dismissed hints.
|
214 |
+
*
|
215 |
+
* @since 4.12
|
216 |
+
*
|
217 |
+
* @param string $hint The hint id, which is a Formidable addon slug.
|
218 |
+
*
|
219 |
+
* @return bool Whether the card was added to the list and hence dismissed.
|
220 |
+
*/
|
221 |
+
protected function add_to_dismissed_hints( $hint ) {
|
222 |
+
$hints = array_merge( $this->get_dismissed_hints(), array( $hint ) );
|
223 |
+
return update_option( self::$dismissed_opt, $hints, 'no' );
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Checks that the addon slug passed should be displayed.
|
228 |
+
*
|
229 |
+
* A feature hint will be displayed if it has not been dismissed before or if 2 or fewer other hints have been dismissed.
|
230 |
+
*
|
231 |
+
* @since 7.2.1
|
232 |
+
*
|
233 |
+
* @param string $hint The hint id, which is a Formidable addon slug.
|
234 |
+
*
|
235 |
+
* @return bool True if $hint should be displayed.
|
236 |
+
*/
|
237 |
+
protected function should_display_hint( $hint ) {
|
238 |
+
$dismissed_hints = $this->get_dismissed_hints();
|
239 |
+
|
240 |
+
// If more than 3 hints have been dismissed, then show no more.
|
241 |
+
if ( 3 < count( $dismissed_hints ) ) {
|
242 |
+
return false;
|
243 |
+
}
|
244 |
+
|
245 |
+
return ! in_array( $hint, $dismissed_hints, true );
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Take a raw search query and return something a bit more standardized and
|
250 |
+
* easy to work with.
|
251 |
+
*
|
252 |
+
* @param string $term The raw search term.
|
253 |
+
* @return string A simplified/sanitized version.
|
254 |
+
*/
|
255 |
+
private function sanitize_search_term( $term ) {
|
256 |
+
$term = strtolower( urldecode( $term ) );
|
257 |
+
|
258 |
+
// remove non-alpha/space chars.
|
259 |
+
$term = preg_replace( '/[^a-z ]/', '', $term );
|
260 |
+
|
261 |
+
// remove strings that don't help matches.
|
262 |
+
$term = trim( str_replace( array( 'formidable', 'free', 'wordpress', 'wp ', 'plugin' ), '', $term ) );
|
263 |
+
|
264 |
+
return $term;
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* @since 4.12
|
269 |
+
*
|
270 |
+
* @return array
|
271 |
+
*/
|
272 |
+
private function search_to_array( $terms ) {
|
273 |
+
$terms = $this->sanitize_search_term( $terms );
|
274 |
+
return array_filter( explode( ',', $terms ) );
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Put some more appropriate links on our custom result cards.
|
279 |
+
*
|
280 |
+
* @param array $links Related links.
|
281 |
+
* @param array $plugin Plugin result information.
|
282 |
+
*/
|
283 |
+
public function insert_related_links( $links, $plugin ) {
|
284 |
+
if ( self::$slug !== $plugin['slug'] ) {
|
285 |
+
return $links;
|
286 |
+
}
|
287 |
+
|
288 |
+
// By the time this filter is applied, self_admin_url was already applied and we don't need it anymore.
|
289 |
+
remove_filter( 'self_admin_url', array( $this, 'plugin_details' ) );
|
290 |
+
|
291 |
+
$links = array();
|
292 |
+
$is_installed = $this->is_installed( $plugin['plugin'] );
|
293 |
+
$is_active = is_plugin_active( $plugin['plugin'] );
|
294 |
+
$has_access = ! empty( $plugin['url'] );
|
295 |
+
|
296 |
+
// Plugin installed, active, feature not enabled; prompt to enable.
|
297 |
+
if ( ! $is_active && $is_installed ) {
|
298 |
+
if ( current_user_can( 'activate_plugins' ) ) {
|
299 |
+
$activate_url = add_query_arg(
|
300 |
+
array(
|
301 |
+
'action' => 'activate',
|
302 |
+
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin['plugin'] ),
|
303 |
+
'plugin' => $plugin['plugin'],
|
304 |
+
),
|
305 |
+
admin_url( 'plugins.php' )
|
306 |
+
);
|
307 |
+
$links['frm_get_started'] = '<a href="' . esc_url( $activate_url ) . '" class="button activate-now" aria-label="Activate ' . esc_attr( $plugin['name'] ) . '">' . __( 'Activate', 'formidable' ) . '</a>';
|
308 |
+
}
|
309 |
+
} elseif ( ! $is_active && isset( $plugin['url'] ) ) {
|
310 |
+
// Go to the add-ons page to install.
|
311 |
+
$links[] = '<a
|
312 |
+
class="button-secondary"
|
313 |
+
href="' . esc_url( admin_url( 'admin.php?page=formidable-addons' ) ) . '"
|
314 |
+
>' . __( 'Install Now', 'formidable' ) . '</a>';
|
315 |
+
|
316 |
+
} elseif ( ! empty( $plugin['link'] ) ) {
|
317 |
+
// Add link pointing to a relevant doc page in formidable.com.
|
318 |
+
$links[] = '<a
|
319 |
+
class="button-primary frm-plugin-search__learn-more"
|
320 |
+
href="' . esc_url( FrmAppHelper::admin_upgrade_link( 'plugin-learn-more', $plugin['link'] ) ) . '"
|
321 |
+
target="_blank"
|
322 |
+
data-addon="' . esc_attr( $plugin['addon'] ) . '"
|
323 |
+
>' . esc_html__( 'Learn more', 'formidable' ) . '</a>';
|
324 |
+
}
|
325 |
+
|
326 |
+
// Dismiss link.
|
327 |
+
$dismiss = add_query_arg( array( 'frm-dismiss' => $plugin['id'] ) );
|
328 |
+
$links[] = '<a
|
329 |
+
href="' . $dismiss . '"
|
330 |
+
class="frm-plugin-search__dismiss"
|
331 |
+
data-addon="' . esc_attr( $plugin['addon'] ) . '"
|
332 |
+
>' . esc_html__( 'Hide this suggestion', 'formidable' ) . '</a>';
|
333 |
+
|
334 |
+
return $links;
|
335 |
+
}
|
336 |
+
|
337 |
+
protected function is_installed( $plugin ) {
|
338 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
339 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
340 |
+
}
|
341 |
+
|
342 |
+
$all_plugins = get_plugins();
|
343 |
+
|
344 |
+
return isset( $all_plugins[ $plugin ] );
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Load the search scripts and CSS for PSH.
|
349 |
+
*/
|
350 |
+
public function load_plugins_search_script() {
|
351 |
+
wp_enqueue_script( self::$slug, FrmAppHelper::plugin_url() . '/js/plugin-search.js', array(), FrmAppHelper::plugin_version(), true );
|
352 |
+
wp_localize_script(
|
353 |
+
self::$slug,
|
354 |
+
'frmPlugSearch',
|
355 |
+
array(
|
356 |
+
'legend' => esc_html__(
|
357 |
+
'This suggestion was made by Formidable Forms, the form builder and application plugin already installed on your site.',
|
358 |
+
'formidable'
|
359 |
+
),
|
360 |
+
)
|
361 |
+
);
|
362 |
+
}
|
363 |
+
}
|
classes/views/frm-forms/add_field.php
CHANGED
@@ -13,24 +13,36 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
13 |
<div id="field_<?php echo esc_attr( $field['id'] ); ?>_inner_container" class="frm_inner_field_container">
|
14 |
<div class="frm-field-action-icons frm-show-hover">
|
15 |
|
|
|
|
|
|
|
|
|
16 |
<?php if ( $field['type'] === 'divider' ) { ?>
|
17 |
<a href="#" class="frm-collapse-section frm-hover-icon frm_icon_font frm_arrowdown6_icon" title="<?php esc_attr_e( 'Expand/Collapse Section', 'formidable' ); ?>"></a>
|
18 |
<?php } ?>
|
19 |
|
20 |
-
<a href="#" class="frm_bstooltip frm-move frm-hover-icon" title="<?php esc_attr_e( 'Move Field', 'formidable' ); ?>">
|
21 |
-
<?php FrmAppHelper::icon_by_class( 'frm_icon_font
|
22 |
-
</a>
|
23 |
-
<a href="#" class="frm_bstooltip frm-hover-icon frm_delete_field" title="<?php esc_attr_e( 'Delete Field', 'formidable' ); ?>">
|
24 |
-
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_delete_icon' ); ?>
|
25 |
-
</a>
|
26 |
-
|
27 |
-
<a href="#" class="frm_bstooltip frm-hover-icon frm_clone_field" title="<?php ( $field['type'] === 'divider' ) ? esc_attr_e( 'Duplicate Section', 'formidable' ) : esc_attr_e( 'Duplicate Field', 'formidable' ); ?>">
|
28 |
-
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_clone_icon' ); ?>
|
29 |
</a>
|
30 |
|
31 |
-
<div class="
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
</div>
|
|
|
34 |
</div>
|
35 |
|
36 |
<label class="frm_primary_label" id="field_label_<?php echo esc_attr( $field['id'] ); ?>">
|
@@ -75,10 +87,9 @@ if ( 'divider' === $field['type'] ) {
|
|
75 |
?>
|
76 |
</div>
|
77 |
<div class="frm_no_section_fields">
|
78 |
-
|
79 |
-
<p class="howto"><?php esc_html_e( 'Your section has no fields. Drag fields here to add them to this section.', 'formidable' ); ?></p>
|
80 |
</div>
|
81 |
-
<ul class="start_divider frm_sorting">
|
82 |
<?php
|
83 |
} elseif ( 'end_divider' === $field['type'] ) {
|
84 |
?>
|
13 |
<div id="field_<?php echo esc_attr( $field['id'] ); ?>_inner_container" class="frm_inner_field_container">
|
14 |
<div class="frm-field-action-icons frm-show-hover">
|
15 |
|
16 |
+
<div class="frm-sub-label frm-field-id">
|
17 |
+
(ID <?php echo esc_html( $field['id'] ); ?>)
|
18 |
+
</div>
|
19 |
+
|
20 |
<?php if ( $field['type'] === 'divider' ) { ?>
|
21 |
<a href="#" class="frm-collapse-section frm-hover-icon frm_icon_font frm_arrowdown6_icon" title="<?php esc_attr_e( 'Expand/Collapse Section', 'formidable' ); ?>"></a>
|
22 |
<?php } ?>
|
23 |
|
24 |
+
<a href="#" class="frm_bstooltip frm-move frm-hover-icon" title="<?php esc_attr_e( 'Move Field', 'formidable' ); ?>" data-container="body">
|
25 |
+
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_thick_move_icon' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
</a>
|
27 |
|
28 |
+
<div class="dropdown">
|
29 |
+
<a href="#" class="frm_bstooltip frm-hover-icon frm-dropdown-toggle dropdown-toggle" title="<?php esc_attr_e( 'More Options', 'formidable' ); ?>" data-toggle="dropdown" data-container="body">
|
30 |
+
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_thick_more_vert_icon' ); ?>
|
31 |
+
</a>
|
32 |
+
<ul class="frm-dropdown-menu" role="menu">
|
33 |
+
<li class="frm_dropdown_li frm_delete_field" href="#">
|
34 |
+
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_delete_icon' ); ?> <?php esc_html_e( 'Delete', 'formidable' ); ?>
|
35 |
+
</li>
|
36 |
+
<li class="frm_dropdown_li frm_clone_field" href="#">
|
37 |
+
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_clone_icon' ); ?> <?php esc_html_e( 'Duplicate', 'formidable' ); ?>
|
38 |
+
</li>
|
39 |
+
<hr>
|
40 |
+
<li class="frm_dropdown_li frm_select_field">
|
41 |
+
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_settings_icon' ); ?> <?php esc_html_e( 'Field settings', 'formidable' ); ?>
|
42 |
+
</li>
|
43 |
+
</ul>
|
44 |
</div>
|
45 |
+
|
46 |
</div>
|
47 |
|
48 |
<label class="frm_primary_label" id="field_label_<?php echo esc_attr( $field['id'] ); ?>">
|
87 |
?>
|
88 |
</div>
|
89 |
<div class="frm_no_section_fields">
|
90 |
+
<p class="howto"><?php esc_html_e( 'Add Fields Here', 'formidable' ); ?></p>
|
|
|
91 |
</div>
|
92 |
+
<ul class="start_divider frm_sorting frm_grid_container">
|
93 |
<?php
|
94 |
} elseif ( 'end_divider' === $field['type'] ) {
|
95 |
?>
|
classes/views/frm-forms/edit.php
CHANGED
@@ -39,3 +39,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
39 |
</div>
|
40 |
</div>
|
41 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
</div>
|
40 |
</div>
|
41 |
</div>
|
42 |
+
<div class="frm_hidden">
|
43 |
+
<svg id="frm_break_field_group_svg" class="frmsvg">
|
44 |
+
<use xlink:href="#frm_break_field_group_icon"></use>
|
45 |
+
</svg>
|
46 |
+
<svg id="frm_gear_svg" class="frmsvg">
|
47 |
+
<use xlink:href="#frm_gear_icon"></use>
|
48 |
+
</svg>
|
49 |
+
<svg id="frm_trash_svg" class="frmsvg">
|
50 |
+
<use xlink:href="#frm_trash_icon"></use>
|
51 |
+
</svg>
|
52 |
+
</div>
|
classes/views/frm-forms/form.php
CHANGED
@@ -26,13 +26,19 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
26 |
|
27 |
<ul id="frm-show-fields" class="frm_sorting inside">
|
28 |
<?php
|
29 |
-
if (
|
|
|
30 |
$values['count'] = 0;
|
31 |
foreach ( $values['fields'] as $field ) {
|
32 |
$values['count']++;
|
|
|
|
|
33 |
FrmFieldsController::load_single_field( $field, $values );
|
|
|
34 |
unset( $field );
|
35 |
}
|
|
|
|
|
36 |
}
|
37 |
?>
|
38 |
</ul>
|
26 |
|
27 |
<ul id="frm-show-fields" class="frm_sorting inside">
|
28 |
<?php
|
29 |
+
if ( ! empty( $values['fields'] ) ) {
|
30 |
+
$grid_helper = new FrmFieldGridHelper();
|
31 |
$values['count'] = 0;
|
32 |
foreach ( $values['fields'] as $field ) {
|
33 |
$values['count']++;
|
34 |
+
$grid_helper->set_field( $field );
|
35 |
+
$grid_helper->maybe_begin_field_wrapper();
|
36 |
FrmFieldsController::load_single_field( $field, $values );
|
37 |
+
$grid_helper->sync_list_size();
|
38 |
unset( $field );
|
39 |
}
|
40 |
+
$grid_helper->force_close_field_wrapper();
|
41 |
+
unset( $grid_helper );
|
42 |
}
|
43 |
?>
|
44 |
</ul>
|
css/custom_theme.css.php
CHANGED
@@ -1432,7 +1432,7 @@ select.frm_loading_lookup{
|
|
1432 |
display:block;
|
1433 |
}
|
1434 |
|
1435 |
-
.with_frm_style .frm_repeat_sec .frm_form_field .frm_icon_font::before {
|
1436 |
color:<?php echo esc_html( $defaults['repeat_icon_color'] . $important ); ?>;
|
1437 |
color:var(--repeat-icon-color)<?php echo esc_html( $important ); ?>;
|
1438 |
}
|
1432 |
display:block;
|
1433 |
}
|
1434 |
|
1435 |
+
.with_frm_style .frm_repeat_sec .frm_form_field.frm_repeat_buttons .frm_icon_font::before {
|
1436 |
color:<?php echo esc_html( $defaults['repeat_icon_color'] . $important ); ?>;
|
1437 |
color:var(--repeat-icon-color)<?php echo esc_html( $important ); ?>;
|
1438 |
}
|
css/font_icons.css
CHANGED
@@ -7,6 +7,16 @@
|
|
7 |
font-style: normal;
|
8 |
}
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
.frmfont,
|
11 |
.frm_icon_font,
|
12 |
.frm_dashicon_font{
|
7 |
font-style: normal;
|
8 |
}
|
9 |
|
10 |
+
.frm-submenu-highlight {
|
11 |
+
background: #F15A24;
|
12 |
+
}
|
13 |
+
|
14 |
+
.frm-submenu-highlight a span {
|
15 |
+
color: #fff;
|
16 |
+
font-weight: 600;
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
.frmfont,
|
21 |
.frm_icon_font,
|
22 |
.frm_dashicon_font{
|
css/frm_admin.css
CHANGED
@@ -3201,6 +3201,18 @@ input[type="checkbox"] {
|
|
3201 |
clear: both;
|
3202 |
}
|
3203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3204 |
.frm_form_settings #op-popup, /* 1Password */
|
3205 |
.frm_form_settings com-1password-op-button,
|
3206 |
.frm_conf_below .frm_conf_field_container .frm_primary_label,
|
@@ -3620,6 +3632,7 @@ label input[type="checkbox"], label input[type="radio"] {
|
|
3620 |
.frm_field_box {
|
3621 |
padding: 5px;
|
3622 |
min-height: 20px;
|
|
|
3623 |
}
|
3624 |
|
3625 |
.frm_indent_opt, td.frm_indent_opt {
|
@@ -3636,12 +3649,28 @@ label input[type="checkbox"], label input[type="radio"] {
|
|
3636 |
|
3637 |
.frm_single_option.ui-sortable-placeholder,
|
3638 |
li.sortable-placeholder {
|
3639 |
-
width: calc(100% - 5px) !important;
|
3640 |
-
height: 0 !important;
|
3641 |
border: none;
|
3642 |
-
box-shadow: 2px -10px 0 1px var(--primary-color);
|
3643 |
margin: 0;
|
3644 |
visibility: visible !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3645 |
}
|
3646 |
|
3647 |
.edit_field_type_divider + li.sortable-placeholder {
|
@@ -3698,6 +3727,10 @@ li.ui-state-default.edit_field_type_divider .frm-show-hover {
|
|
3698 |
transition: opacity .15s ease-in-out;
|
3699 |
}
|
3700 |
|
|
|
|
|
|
|
|
|
3701 |
.frm_sortable_field_opts {
|
3702 |
margin-top: 5px;
|
3703 |
}
|
@@ -3762,6 +3795,10 @@ li.ui-state-default.selected.edit_field_type_divider .divider_section_only .frm-
|
|
3762 |
opacity: 100;
|
3763 |
}
|
3764 |
|
|
|
|
|
|
|
|
|
3765 |
.frm_sorting span.ui-icon {
|
3766 |
width: 16px;
|
3767 |
}
|
@@ -5200,15 +5237,40 @@ a.frm_action_icon:hover {
|
|
5200 |
content: '\e606';
|
5201 |
}
|
5202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5203 |
.frm-field-action-icons a {
|
5204 |
-
margin-left: 15px;
|
5205 |
-
float: right;
|
5206 |
font-size: 16px;
|
5207 |
width: 17px;
|
5208 |
}
|
5209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5210 |
.frm-field-action-icons a .frmsvg {
|
5211 |
-
color:
|
5212 |
font-size: 17px;
|
5213 |
width: 17px;
|
5214 |
height: 17px;
|
@@ -5429,12 +5491,52 @@ span.howto {
|
|
5429 |
min-height: 350px;
|
5430 |
padding: 10px 0 35px;
|
5431 |
margin: 0;
|
|
|
5432 |
}
|
5433 |
|
5434 |
.frm-has-fields #frm-show-fields {
|
5435 |
min-height: 50px;
|
5436 |
}
|
5437 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5438 |
.frm_sorting .no_repeat_section li.ui-state-default.edit_field_type_end_divider {
|
5439 |
display: none !important;
|
5440 |
}
|
@@ -5449,7 +5551,7 @@ span.howto {
|
|
5449 |
background-color: transparent;
|
5450 |
background-image: none;
|
5451 |
padding: 5px;
|
5452 |
-
margin:
|
5453 |
box-shadow: none;
|
5454 |
display: block;
|
5455 |
text-align: inherit !important;
|
@@ -5470,10 +5572,6 @@ span.howto {
|
|
5470 |
font-style: normal;
|
5471 |
}
|
5472 |
|
5473 |
-
.repeat_section .start_divider li:only-child {
|
5474 |
-
margin-top: 50px;
|
5475 |
-
}
|
5476 |
-
|
5477 |
.show_repeat_sec {
|
5478 |
display: none;
|
5479 |
}
|
@@ -5855,7 +5953,6 @@ tr.frm_options_heading td {
|
|
5855 |
padding: 20px 0 0;
|
5856 |
width: calc( 100% - 20px );
|
5857 |
height: 121px;
|
5858 |
-
border-color: var(--grey-border);
|
5859 |
transition: all 0.4s linear;
|
5860 |
}
|
5861 |
|
@@ -6635,6 +6732,16 @@ ul .frm_col_two {
|
|
6635 |
font-size: 15px;
|
6636 |
}
|
6637 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6638 |
.frm_code_list.frm-full-hover a span {
|
6639 |
color: var(--grey);
|
6640 |
float: right;
|
@@ -6836,6 +6943,10 @@ input[disabled],
|
|
6836 |
color: var(--dark-grey);
|
6837 |
}
|
6838 |
|
|
|
|
|
|
|
|
|
6839 |
/* Icon while dragging */
|
6840 |
.frmbutton.ui-draggable-dragging,
|
6841 |
.frmbutton.ui-draggable-dragging a {
|
@@ -6847,12 +6958,13 @@ input[disabled],
|
|
6847 |
.frmbutton.ui-draggable-dragging a {
|
6848 |
text-decoration: none;
|
6849 |
height: 25px !important;
|
6850 |
-
|
6851 |
text-align: center;
|
6852 |
display: block !important;
|
6853 |
background-color: var(--primary-hover) !important;
|
6854 |
-
border-radius:
|
6855 |
padding: 5px 20px !important;
|
|
|
6856 |
}
|
6857 |
|
6858 |
.frmbutton.ui-draggable-dragging:not(.ui-sortable-helper) a {
|
@@ -6868,11 +6980,13 @@ input[disabled],
|
|
6868 |
|
6869 |
#frm-show-fields .frmbutton.ui-sortable-helper i,
|
6870 |
.frmbutton.ui-sortable-helper span,
|
6871 |
-
.frmbutton.ui-draggable-dragging i
|
|
|
6872 |
color: #fff !important;
|
6873 |
}
|
6874 |
|
6875 |
-
.frmbutton.ui-draggable-dragging:not(.ui-sortable-helper) i
|
|
|
6876 |
color: var(--dark-grey) !important;
|
6877 |
}
|
6878 |
|
@@ -7495,10 +7609,9 @@ button.frm_choose_image_box,
|
|
7495 |
margin-right: 46%;
|
7496 |
}
|
7497 |
|
7498 |
-
.rtl .frm-field-action-icons
|
7499 |
-
|
7500 |
-
|
7501 |
-
margin-left: 0;
|
7502 |
}
|
7503 |
|
7504 |
.rtl #frm_upgrade_modal .dismiss i,
|
@@ -8069,3 +8182,152 @@ Responsive Design
|
|
8069 |
max-width: 843px;
|
8070 |
border-radius: 10px;
|
8071 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3201 |
clear: both;
|
3202 |
}
|
3203 |
|
3204 |
+
.frm_inner_field_container > label {
|
3205 |
+
text-overflow: ellipsis;
|
3206 |
+
overflow: hidden;
|
3207 |
+
white-space: nowrap;
|
3208 |
+
}
|
3209 |
+
|
3210 |
+
.frm_field_box:not(.edit_field_type_divider):hover > .frm_inner_field_container > label,
|
3211 |
+
.frm_field_box .divider_section_only:hover > .frm_inner_field_container > label,
|
3212 |
+
li.ui-state-default.selected > .frm_inner_field_container > label {
|
3213 |
+
max-width: calc(100% - 100px);
|
3214 |
+
}
|
3215 |
+
|
3216 |
.frm_form_settings #op-popup, /* 1Password */
|
3217 |
.frm_form_settings com-1password-op-button,
|
3218 |
.frm_conf_below .frm_conf_field_container .frm_primary_label,
|
3632 |
.frm_field_box {
|
3633 |
padding: 5px;
|
3634 |
min-height: 20px;
|
3635 |
+
margin: 10px 0;
|
3636 |
}
|
3637 |
|
3638 |
.frm_indent_opt, td.frm_indent_opt {
|
3649 |
|
3650 |
.frm_single_option.ui-sortable-placeholder,
|
3651 |
li.sortable-placeholder {
|
|
|
|
|
3652 |
border: none;
|
|
|
3653 |
margin: 0;
|
3654 |
visibility: visible !important;
|
3655 |
+
box-shadow: 2px -10px 0 1px var(--primary-color);
|
3656 |
+
}
|
3657 |
+
|
3658 |
+
#frm_form_editor_container > ul > .frm_single_option.ui-sortable-placeholder,
|
3659 |
+
#frm_form_editor_container > ul > li.sortable-placeholder {
|
3660 |
+
width: calc(100% - 5px) !important;
|
3661 |
+
height: 0 !important;
|
3662 |
+
}
|
3663 |
+
|
3664 |
+
#frm_form_editor_container > ul > li > ul {
|
3665 |
+
position: relative;
|
3666 |
+
}
|
3667 |
+
|
3668 |
+
#frm_form_editor_container > ul > li > ul > .frm_single_option.ui-sortable-placeholder,
|
3669 |
+
#frm_form_editor_container > ul > li > ul > li.sortable-placeholder,
|
3670 |
+
#frm_form_editor_container ul.start_divider > li > ul > li.sortable-placeholder {
|
3671 |
+
position: absolute;
|
3672 |
+
top: 20px;
|
3673 |
+
bottom: 0;
|
3674 |
}
|
3675 |
|
3676 |
.edit_field_type_divider + li.sortable-placeholder {
|
3727 |
transition: opacity .15s ease-in-out;
|
3728 |
}
|
3729 |
|
3730 |
+
#frm-show-fields .frm-field-settings-open .frm-show-hover {
|
3731 |
+
opacity: 1;
|
3732 |
+
}
|
3733 |
+
|
3734 |
.frm_sortable_field_opts {
|
3735 |
margin-top: 5px;
|
3736 |
}
|
3795 |
opacity: 100;
|
3796 |
}
|
3797 |
|
3798 |
+
li.frm_field_box > ul.frm_grid_container {
|
3799 |
+
position: relative;
|
3800 |
+
}
|
3801 |
+
|
3802 |
.frm_sorting span.ui-icon {
|
3803 |
width: 16px;
|
3804 |
}
|
5237 |
content: '\e606';
|
5238 |
}
|
5239 |
|
5240 |
+
.frm-field-action-icons {
|
5241 |
+
text-align: right;
|
5242 |
+
position: absolute;
|
5243 |
+
top: 2px;
|
5244 |
+
right: 2px;
|
5245 |
+
max-width: 100%;
|
5246 |
+
}
|
5247 |
+
|
5248 |
+
.frm-field-action-icons .frm-field-id {
|
5249 |
+
display: inline-block;
|
5250 |
+
overflow: hidden;
|
5251 |
+
text-overflow: ellipsis;
|
5252 |
+
white-space: nowrap;
|
5253 |
+
width: 65px;
|
5254 |
+
max-width: calc( 100% - 50px );
|
5255 |
+
position: relative;
|
5256 |
+
top: 2px;
|
5257 |
+
}
|
5258 |
+
|
5259 |
.frm-field-action-icons a {
|
|
|
|
|
5260 |
font-size: 16px;
|
5261 |
width: 17px;
|
5262 |
}
|
5263 |
|
5264 |
+
.frm-field-action-icons a:hover {
|
5265 |
+
text-decoration: none;
|
5266 |
+
}
|
5267 |
+
|
5268 |
+
.frm-field-action-icons .dropdown {
|
5269 |
+
display: inline-block;
|
5270 |
+
}
|
5271 |
+
|
5272 |
.frm-field-action-icons a .frmsvg {
|
5273 |
+
color: #9EA9B8 !important;
|
5274 |
font-size: 17px;
|
5275 |
width: 17px;
|
5276 |
height: 17px;
|
5491 |
min-height: 350px;
|
5492 |
padding: 10px 0 35px;
|
5493 |
margin: 0;
|
5494 |
+
position: relative;
|
5495 |
}
|
5496 |
|
5497 |
.frm-has-fields #frm-show-fields {
|
5498 |
min-height: 50px;
|
5499 |
}
|
5500 |
|
5501 |
+
#frm-show-fields .frm6 .frm-dropdown-menu {
|
5502 |
+
max-width: unset;
|
5503 |
+
min-width: 160px;
|
5504 |
+
}
|
5505 |
+
|
5506 |
+
#frm_builder_page #frm_field_group_controls {
|
5507 |
+
position: absolute;
|
5508 |
+
background: rgba(65, 153, 253, 0.07);
|
5509 |
+
padding: 5px;
|
5510 |
+
border-radius: 4px 4px 0 0;
|
5511 |
+
text-align: right;
|
5512 |
+
box-sizing: border-box;
|
5513 |
+
right: 0;
|
5514 |
+
top: -28px;
|
5515 |
+
height: 28px;
|
5516 |
+
z-index: 3; /* section dividers use z-index: 2; position above that to avoid it taking over hover control. */
|
5517 |
+
}
|
5518 |
+
|
5519 |
+
#frm_builder_page #frm_field_group_controls > span:first-child {
|
5520 |
+
margin-right: 5px;
|
5521 |
+
}
|
5522 |
+
|
5523 |
+
#frm_builder_page #frm_field_group_controls svg {
|
5524 |
+
pointer-events: none;
|
5525 |
+
}
|
5526 |
+
|
5527 |
+
#frm_field_group_controls {
|
5528 |
+
visibility: hidden;
|
5529 |
+
}
|
5530 |
+
|
5531 |
+
.frm-field-group-hover-target #frm_field_group_controls {
|
5532 |
+
visibility: visible;
|
5533 |
+
}
|
5534 |
+
|
5535 |
+
.frm-field-group-hover-target,
|
5536 |
+
.frm-has-open-field-group-popup {
|
5537 |
+
background: rgba(65, 153, 253, 0.07);
|
5538 |
+
}
|
5539 |
+
|
5540 |
.frm_sorting .no_repeat_section li.ui-state-default.edit_field_type_end_divider {
|
5541 |
display: none !important;
|
5542 |
}
|
5551 |
background-color: transparent;
|
5552 |
background-image: none;
|
5553 |
padding: 5px;
|
5554 |
+
margin: 0;
|
5555 |
box-shadow: none;
|
5556 |
display: block;
|
5557 |
text-align: inherit !important;
|
5572 |
font-style: normal;
|
5573 |
}
|
5574 |
|
|
|
|
|
|
|
|
|
5575 |
.show_repeat_sec {
|
5576 |
display: none;
|
5577 |
}
|
5953 |
padding: 20px 0 0;
|
5954 |
width: calc( 100% - 20px );
|
5955 |
height: 121px;
|
|
|
5956 |
transition: all 0.4s linear;
|
5957 |
}
|
5958 |
|
6732 |
font-size: 15px;
|
6733 |
}
|
6734 |
|
6735 |
+
.frm-field-action-icons .frm-dropdown-menu .frm_dropdown_li {
|
6736 |
+
padding: 5px 10px;
|
6737 |
+
color: rgba(40, 47, 54, 0.85);
|
6738 |
+
cursor: pointer;
|
6739 |
+
}
|
6740 |
+
|
6741 |
+
.frm-field-action-icons .frm-dropdown-menu .frm_dropdown_li:hover {
|
6742 |
+
background: #F6F7FB;
|
6743 |
+
}
|
6744 |
+
|
6745 |
.frm_code_list.frm-full-hover a span {
|
6746 |
color: var(--grey);
|
6747 |
float: right;
|
6943 |
color: var(--dark-grey);
|
6944 |
}
|
6945 |
|
6946 |
+
.frmbutton.ui-draggable-dragging {
|
6947 |
+
width: auto !important;
|
6948 |
+
}
|
6949 |
+
|
6950 |
/* Icon while dragging */
|
6951 |
.frmbutton.ui-draggable-dragging,
|
6952 |
.frmbutton.ui-draggable-dragging a {
|
6958 |
.frmbutton.ui-draggable-dragging a {
|
6959 |
text-decoration: none;
|
6960 |
height: 25px !important;
|
6961 |
+
width: 180px;
|
6962 |
text-align: center;
|
6963 |
display: block !important;
|
6964 |
background-color: var(--primary-hover) !important;
|
6965 |
+
border-radius: 35px !important;
|
6966 |
padding: 5px 20px !important;
|
6967 |
+
color: #fff !important;
|
6968 |
}
|
6969 |
|
6970 |
.frmbutton.ui-draggable-dragging:not(.ui-sortable-helper) a {
|
6980 |
|
6981 |
#frm-show-fields .frmbutton.ui-sortable-helper i,
|
6982 |
.frmbutton.ui-sortable-helper span,
|
6983 |
+
.frmbutton.ui-draggable-dragging i,
|
6984 |
+
.frmbutton.ui-draggable-dragging .frmsvg {
|
6985 |
color: #fff !important;
|
6986 |
}
|
6987 |
|
6988 |
+
.frmbutton.ui-draggable-dragging:not(.ui-sortable-helper) i,
|
6989 |
+
.frmbutton.ui-draggable-dragging:not(.ui-sortable-helper) .frmsvg {
|
6990 |
color: var(--dark-grey) !important;
|
6991 |
}
|
6992 |
|
7609 |
margin-right: 46%;
|
7610 |
}
|
7611 |
|
7612 |
+
.rtl .frm-field-action-icons {
|
7613 |
+
right: unset;
|
7614 |
+
left: 2px;
|
|
|
7615 |
}
|
7616 |
|
7617 |
.rtl #frm_upgrade_modal .dismiss i,
|
8182 |
max-width: 843px;
|
8183 |
border-radius: 10px;
|
8184 |
}
|
8185 |
+
|
8186 |
+
#frm_field_group_popup {
|
8187 |
+
position: absolute;
|
8188 |
+
top: 0;
|
8189 |
+
right: 0;
|
8190 |
+
width: 366px;
|
8191 |
+
height: 231px;
|
8192 |
+
border-radius: 8px;
|
8193 |
+
background: #fff;
|
8194 |
+
box-shadow: 0px 20px 48px rgba(40, 47, 54, 0.15);
|
8195 |
+
z-index: 3;
|
8196 |
+
box-sizing: border-box;
|
8197 |
+
padding: 24px 0;
|
8198 |
+
text-align: left;
|
8199 |
+
}
|
8200 |
+
|
8201 |
+
.rtl #frm_field_group_popup {
|
8202 |
+
text-align: right;
|
8203 |
+
}
|
8204 |
+
|
8205 |
+
.frm-merge-fields-into-row #frm_field_group_popup {
|
8206 |
+
top: unset;
|
8207 |
+
bottom: 50px;
|
8208 |
+
height: 196px;
|
8209 |
+
}
|
8210 |
+
|
8211 |
+
.frm-merge-fields-into-row #frm_field_group_popup .frm-break-field-group {
|
8212 |
+
display: none;
|
8213 |
+
}
|
8214 |
+
|
8215 |
+
.frm-merge-fields-into-row > a {
|
8216 |
+
color: rgba(40, 47, 54, 0.85);
|
8217 |
+
position: relative;
|
8218 |
+
top: 2px;
|
8219 |
+
}
|
8220 |
+
|
8221 |
+
.frm-row-layout-title {
|
8222 |
+
font-weight: 600;
|
8223 |
+
font-size: 11px;
|
8224 |
+
line-height: 15px;
|
8225 |
+
text-transform: uppercase;
|
8226 |
+
color: rgba(40, 47, 54, 0.45);
|
8227 |
+
margin-bottom: 40px;
|
8228 |
+
}
|
8229 |
+
|
8230 |
+
.frm-row-layout-option {
|
8231 |
+
background: #F6F7FB;
|
8232 |
+
box-sizing: border-box;
|
8233 |
+
border-radius: 2px;
|
8234 |
+
padding: 18px 11px;
|
8235 |
+
}
|
8236 |
+
|
8237 |
+
#frm_field_group_popup .frm-row-layout-option .frm_grid_container {
|
8238 |
+
grid-gap: 0 5%;
|
8239 |
+
grid-template-columns: repeat(12, auto);
|
8240 |
+
}
|
8241 |
+
|
8242 |
+
#frm_field_group_popup .frm-row-layout-option {
|
8243 |
+
cursor: pointer;
|
8244 |
+
}
|
8245 |
+
|
8246 |
+
#frm_field_group_popup .frm-row-layout-option.frm-active-row-layout,
|
8247 |
+
#frm_field_group_popup .frm-row-layout-option:hover {
|
8248 |
+
outline: 1px solid #4199FD;
|
8249 |
+
}
|
8250 |
+
|
8251 |
+
.frm-custom-field-group-layout,
|
8252 |
+
.frm-break-field-group {
|
8253 |
+
padding: 5px 15px;
|
8254 |
+
cursor: pointer;
|
8255 |
+
font-size: 14px;
|
8256 |
+
line-height: 19px;
|
8257 |
+
color: rgba(40, 47, 54, 0.85);
|
8258 |
+
}
|
8259 |
+
|
8260 |
+
.frm-custom-field-group-layout:hover,
|
8261 |
+
.frm-break-field-group:hover {
|
8262 |
+
background-color: #f5f5f5f5;
|
8263 |
+
}
|
8264 |
+
|
8265 |
+
.frm-custom-field-group-layout svg,
|
8266 |
+
.frm-break-field-group svg {
|
8267 |
+
margin-right: 5px;
|
8268 |
+
}
|
8269 |
+
|
8270 |
+
.frm-selected-field-group {
|
8271 |
+
background: rgba(65, 153, 253, 0.07);
|
8272 |
+
position: relative;
|
8273 |
+
}
|
8274 |
+
|
8275 |
+
#frm_field_multiselect_popup {
|
8276 |
+
background: white;
|
8277 |
+
height: 48px;
|
8278 |
+
position: fixed;
|
8279 |
+
border-radius: 4px;
|
8280 |
+
box-shadow: 0px 8px 24px rgba(40, 47, 54, 0.15);
|
8281 |
+
color: rgba(40, 47, 54, 0.85);
|
8282 |
+
font-size: 13px;
|
8283 |
+
right: 30px;
|
8284 |
+
bottom: 10px;
|
8285 |
+
}
|
8286 |
+
|
8287 |
+
#frm_field_multiselect_popup > div {
|
8288 |
+
display: inline-block;
|
8289 |
+
line-height: 48px;
|
8290 |
+
vertical-align: top;
|
8291 |
+
}
|
8292 |
+
|
8293 |
+
#frm_field_multiselect_popup.frm-unmergable > .frm-merge-fields-into-row,
|
8294 |
+
#frm_field_multiselect_popup.frm-unmergable > .frm-multiselect-popup-separator {
|
8295 |
+
display: none;
|
8296 |
+
}
|
8297 |
+
|
8298 |
+
#frm_field_multiselect_popup > div:not(.frm-multiselect-popup-separator) {
|
8299 |
+
padding: 0 20px;
|
8300 |
+
cursor: pointer;
|
8301 |
+
}
|
8302 |
+
|
8303 |
+
#frm_field_multiselect_popup > div:not(.frm-multiselect-popup-separator):hover {
|
8304 |
+
background: #f5f5f5f5;
|
8305 |
+
}
|
8306 |
+
|
8307 |
+
.frm-builder-popup-heading {
|
8308 |
+
font-weight: 600;
|
8309 |
+
font-size: 12px;
|
8310 |
+
line-height: 15px;
|
8311 |
+
text-transform: uppercase;
|
8312 |
+
color: rgba(40, 47, 54, 0.45);
|
8313 |
+
}
|
8314 |
+
|
8315 |
+
.frm-builder-popup-subheading {
|
8316 |
+
font-size: 12px;
|
8317 |
+
line-height: 16px;
|
8318 |
+
color: rgba(40, 47, 54, 0.45);
|
8319 |
+
}
|
8320 |
+
|
8321 |
+
.frm-multiselect-popup-separator {
|
8322 |
+
height: 36px;
|
8323 |
+
width: 1px;
|
8324 |
+
position: relative;
|
8325 |
+
top: 6px;
|
8326 |
+
background: #C4C4C4;
|
8327 |
+
}
|
8328 |
+
|
8329 |
+
|
8330 |
+
.frm-sortable-helper,
|
8331 |
+
.frm-multiselect-key-is-down li.form-field:not(.edit_field_type_divider) {
|
8332 |
+
pointer-events: none;
|
8333 |
+
}
|
formidable.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Formidable Forms
|
4 |
Description: Quickly and easily create drag-and-drop forms
|
5 |
-
Version:
|
6 |
Plugin URI: https://formidableforms.com/
|
7 |
Author URI: https://formidableforms.com/
|
8 |
Author: Strategy11
|
2 |
/*
|
3 |
Plugin Name: Formidable Forms
|
4 |
Description: Quickly and easily create drag-and-drop forms
|
5 |
+
Version: 5.0
|
6 |
Plugin URI: https://formidableforms.com/
|
7 |
Author URI: https://formidableforms.com/
|
8 |
Author: Strategy11
|
images/icons.svg
CHANGED
@@ -933,5 +933,11 @@
|
|
933 |
<symbol id="frm_case_icon" viewBox="0 0 24 24"><path d="M15 6.5a1 1 0 01-1-1V4h-4v1.5a1 1 0 01-2 0V4c0-1.1.9-2 2-2h4a2 2 0 012 2v1.5c0 .6-.4 1-1 1zM18 12.5v1c0 .3-.3.7-.8.7a.8.8 0 01-.7-.8v-.9h-9v1c0 .3-.3.7-.8.7a.8.8 0 01-.7-.8v-.9H0v6.7C0 20.8 1.2 22 2.7 22h18.5c1.6 0 2.8-1.2 2.8-2.8v-6.7h-6zM21.3 5H2.7A2.7 2.7 0 000 7.8V11h6V9.8c0-.5.3-.8.8-.8.4 0 .7.3.7.8V11h9V9.8c0-.5.3-.8.8-.8.4 0 .7.3.7.8V11h6V7.7C24 6.2 22.8 5 21.3 5z" fill="currentColor"></path></symbol>
|
934 |
<symbol id="frm_smile_icon" viewBox="0 0 24 24"><path d="M12 0a12 12 0 100 24 12 12 0 000-24zM5 9c0-1.1.9-2 2-2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2zm12.7 9a8 8 0 01-11.4 0 1 1 0 011.4-1.5 6 6 0 008.6 0 1 1 0 011.4 1.4zm-.7-7a2 2 0 01-2-2c0-1.1.9-2 2-2a2 2 0 010 4z" fill="currentColor"></path></symbol>
|
935 |
<symbol id="frm_user_name_icon" viewBox="0 0 24 24" fill="none"><path d="M3 21L21 21C22.1046 21 23 20.1046 23 19L23 16.75L23 13.5625L23 12.5L23 11.4375L23 8.25L23 6C23 4.89543 22.1046 4 21 4L15.1429 4L8.85714 4L3 4C1.89543 4 0.999998 4.89543 0.999998 6L0.999997 19C0.999997 20.1046 1.89543 21 3 21Z" stroke="#282F36" stroke-opacity="0.45" stroke-width="1.5"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.9313 9.93864C11.9313 11.5916 10.5987 12.8773 8.99262 12.8773C7.34168 12.8773 6.05398 11.5896 6.05398 9.93864C6.05398 8.33253 7.33964 7 8.99262 7C10.6008 7 11.9313 8.33049 11.9313 9.93864ZM10.1619 9.93864C10.1619 9.32165 9.60961 8.76932 8.99262 8.76932C8.33687 8.76932 7.8233 9.31757 7.8233 9.93864C7.8233 10.5984 8.33283 11.108 8.99262 11.108C9.61369 11.108 10.1619 10.5944 10.1619 9.93864ZM4 17.4699C4 15.4783 5.58561 13.8466 7.6233 13.8466H10.3619C12.3552 13.8466 13.9852 15.4766 13.9852 17.4699C13.9852 17.9734 13.5453 18.3546 13.1006 18.3546C12.605 18.3546 12.2159 17.9655 12.2159 17.4699C12.2159 16.4678 11.3641 15.6159 10.3619 15.6159H7.6233C6.5811 15.6159 5.76932 16.4651 5.76932 17.4699C5.76932 17.9734 5.32934 18.3546 4.88466 18.3546C4.38908 18.3546 4 17.9655 4 17.4699Z" fill="#282F36" fill-opacity="0.45"/><line x1="15.75" y1="9.25" x2="19.25" y2="9.25" stroke="#282F36" stroke-opacity="0.45" stroke-width="1.5" stroke-linecap="round"/><line x1="15.75" y1="12.25" x2="19.25" y2="12.25" stroke="#282F36" stroke-opacity="0.45" stroke-width="1.5" stroke-linecap="round"/></symbol>
|
|
|
|
|
|
|
|
|
|
|
|
|
936 |
</defs>
|
937 |
</svg>
|
933 |
<symbol id="frm_case_icon" viewBox="0 0 24 24"><path d="M15 6.5a1 1 0 01-1-1V4h-4v1.5a1 1 0 01-2 0V4c0-1.1.9-2 2-2h4a2 2 0 012 2v1.5c0 .6-.4 1-1 1zM18 12.5v1c0 .3-.3.7-.8.7a.8.8 0 01-.7-.8v-.9h-9v1c0 .3-.3.7-.8.7a.8.8 0 01-.7-.8v-.9H0v6.7C0 20.8 1.2 22 2.7 22h18.5c1.6 0 2.8-1.2 2.8-2.8v-6.7h-6zM21.3 5H2.7A2.7 2.7 0 000 7.8V11h6V9.8c0-.5.3-.8.8-.8.4 0 .7.3.7.8V11h9V9.8c0-.5.3-.8.8-.8.4 0 .7.3.7.8V11h6V7.7C24 6.2 22.8 5 21.3 5z" fill="currentColor"></path></symbol>
|
934 |
<symbol id="frm_smile_icon" viewBox="0 0 24 24"><path d="M12 0a12 12 0 100 24 12 12 0 000-24zM5 9c0-1.1.9-2 2-2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2zm12.7 9a8 8 0 01-11.4 0 1 1 0 011.4-1.5 6 6 0 008.6 0 1 1 0 011.4 1.4zm-.7-7a2 2 0 01-2-2c0-1.1.9-2 2-2a2 2 0 010 4z" fill="currentColor"></path></symbol>
|
935 |
<symbol id="frm_user_name_icon" viewBox="0 0 24 24" fill="none"><path d="M3 21L21 21C22.1046 21 23 20.1046 23 19L23 16.75L23 13.5625L23 12.5L23 11.4375L23 8.25L23 6C23 4.89543 22.1046 4 21 4L15.1429 4L8.85714 4L3 4C1.89543 4 0.999998 4.89543 0.999998 6L0.999997 19C0.999997 20.1046 1.89543 21 3 21Z" stroke="#282F36" stroke-opacity="0.45" stroke-width="1.5"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.9313 9.93864C11.9313 11.5916 10.5987 12.8773 8.99262 12.8773C7.34168 12.8773 6.05398 11.5896 6.05398 9.93864C6.05398 8.33253 7.33964 7 8.99262 7C10.6008 7 11.9313 8.33049 11.9313 9.93864ZM10.1619 9.93864C10.1619 9.32165 9.60961 8.76932 8.99262 8.76932C8.33687 8.76932 7.8233 9.31757 7.8233 9.93864C7.8233 10.5984 8.33283 11.108 8.99262 11.108C9.61369 11.108 10.1619 10.5944 10.1619 9.93864ZM4 17.4699C4 15.4783 5.58561 13.8466 7.6233 13.8466H10.3619C12.3552 13.8466 13.9852 15.4766 13.9852 17.4699C13.9852 17.9734 13.5453 18.3546 13.1006 18.3546C12.605 18.3546 12.2159 17.9655 12.2159 17.4699C12.2159 16.4678 11.3641 15.6159 10.3619 15.6159H7.6233C6.5811 15.6159 5.76932 16.4651 5.76932 17.4699C5.76932 17.9734 5.32934 18.3546 4.88466 18.3546C4.38908 18.3546 4 17.9655 4 17.4699Z" fill="#282F36" fill-opacity="0.45"/><line x1="15.75" y1="9.25" x2="19.25" y2="9.25" stroke="#282F36" stroke-opacity="0.45" stroke-width="1.5" stroke-linecap="round"/><line x1="15.75" y1="12.25" x2="19.25" y2="12.25" stroke="#282F36" stroke-opacity="0.45" stroke-width="1.5" stroke-linecap="round"/></symbol>
|
936 |
+
<symbol id="frm_field_group_layout_icon" viewBox="0 0 18 16" fill="none"><rect width="4.667" height="16" rx="1" fill="#9EA9B8"/><rect x="6.666" width="4.667" height="16" rx="1" fill="#9EA9B8"/><rect x="13.334" width="4.667" height="16" rx="1" fill="#9EA9B8"/></symbol>
|
937 |
+
<symbol id="frm_break_field_group_icon" viewBox="0 0 20 20" fill="none"><path d="M16.667 3.5h-13.5c-.92 0-1.667.746-1.667 1.667v1.5c0 .92.746 1.666 1.667 1.666h13.5c.92 0 1.666-.746 1.666-1.666v-1.5c0-.92-.746-1.667-1.666-1.667zM16.667 11.5h-13.5c-.92 0-1.667.746-1.667 1.667v1.5c0 .92.746 1.666 1.667 1.666h13.5c.92 0 1.666-.746 1.666-1.666v-1.5c0-.92-.746-1.667-1.666-1.667z" stroke="#484E54" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
938 |
+
<symbol id="frm_gear_icon" viewBox="0 0 20 20" fill="none"><path d="M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z" stroke="#484E54" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.167 12.5a1.375 1.375 0 00.275 1.516l.05.05a1.666 1.666 0 01-1.179 2.847 1.666 1.666 0 01-1.179-.488l-.05-.05a1.375 1.375 0 00-1.517-.275 1.374 1.374 0 00-.833 1.258v.142a1.667 1.667 0 01-3.333 0v-.075a1.375 1.375 0 00-.9-1.259 1.375 1.375 0 00-1.517.275l-.05.05a1.666 1.666 0 11-2.358-2.358l.05-.05a1.375 1.375 0 00.275-1.517 1.376 1.376 0 00-1.259-.833h-.141a1.667 1.667 0 010-3.333h.075a1.375 1.375 0 001.258-.9 1.375 1.375 0 00-.275-1.517l-.05-.05a1.667 1.667 0 112.358-2.358l.05.05a1.375 1.375 0 001.517.275h.067a1.375 1.375 0 00.833-1.259V2.5a1.667 1.667 0 013.333 0v.075a1.375 1.375 0 00.834 1.258 1.375 1.375 0 001.516-.275l.05-.05a1.667 1.667 0 112.359 2.358l-.05.05a1.376 1.376 0 00-.275 1.517V7.5a1.375 1.375 0 001.258.833h.142a1.667 1.667 0 110 3.333h-.075a1.376 1.376 0 00-1.259.834v0z" stroke="#484E54" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
939 |
+
<symbol id="frm_trash_icon" viewBox="0 0 20 20" fill="none"><path d="M2.5 5h15M6.667 5V3.334a1.667 1.667 0 011.667-1.667h3.333a1.667 1.667 0 011.667 1.667V5m2.5 0v11.667a1.667 1.667 0 01-1.667 1.667H5.834a1.667 1.667 0 01-1.667-1.667V5h11.667z" stroke="#484E54" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
940 |
+
<symbol id="frm_thick_move_icon" viewBox="0 0 20 20"><path d="M4.166 7.5l-2.5 2.5 2.5 2.5M7.5 4.167l2.5-2.5 2.5 2.5M12.5 15.833l-2.5 2.5-2.5-2.5M15.834 7.5l2.5 2.5-2.5 2.5M1.666 10h16.667M10 1.667v16.667" stroke="#9EA9B8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
941 |
+
<symbol id="frm_thick_more_vert_icon" viewBox="0 0 20 20"><path d="M10 10.834a.833.833 0 100-1.667.833.833 0 000 1.667zM10 5a.833.833 0 100-1.667A.833.833 0 0010 5zM10 16.667A.833.833 0 1010 15a.833.833 0 000 1.667z" fill="#9EA9B8" stroke="#9EA9B8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
942 |
</defs>
|
943 |
</svg>
|
js/formidable_admin.js
CHANGED
@@ -326,7 +326,8 @@ function frmAdminBuildJS() {
|
|
326 |
thisFormId = 0,
|
327 |
autoId = 0,
|
328 |
optionMap = {},
|
329 |
-
lastNewActionIdReturned = 0
|
|
|
330 |
|
331 |
if ( thisForm !== null ) {
|
332 |
thisFormId = thisForm.value;
|
@@ -391,7 +392,7 @@ function frmAdminBuildJS() {
|
|
391 |
$confirmMessage.empty();
|
392 |
|
393 |
if ( caution ) {
|
394 |
-
frmCaution = document.createElement( '
|
395 |
frmCaution.classList.add( 'frm-caution' );
|
396 |
frmCaution.appendChild( document.createTextNode( caution ) );
|
397 |
$confirmMessage.append( frmCaution );
|
@@ -791,12 +792,14 @@ function frmAdminBuildJS() {
|
|
791 |
|
792 |
/* Form Builder */
|
793 |
function setupSortable( sort ) {
|
794 |
-
var startSort
|
795 |
-
container = jQuery( '#post-body-content' );
|
796 |
|
797 |
-
|
|
|
|
|
|
|
798 |
connectWith: 'ul.frm_sorting',
|
799 |
-
items: '
|
800 |
placeholder: 'sortable-placeholder',
|
801 |
axis: 'y',
|
802 |
cancel: '.widget,.frm_field_opts_list,input,textarea,select,.edit_field_type_end_divider,.frm_sortable_field_opts,.frm_noallow',
|
@@ -839,6 +842,11 @@ function frmAdminBuildJS() {
|
|
839 |
}
|
840 |
},
|
841 |
start: function( event, ui ) {
|
|
|
|
|
|
|
|
|
|
|
842 |
if ( ui.item[0].offsetHeight > 120 ) {
|
843 |
jQuery( sort ).sortable( 'refreshPositions' );
|
844 |
}
|
@@ -846,10 +854,11 @@ function frmAdminBuildJS() {
|
|
846 |
// If a page if collapsed, expand it before dragging since only the page break will move.
|
847 |
toggleCollapsePage( jQuery( ui.item[0]) );
|
848 |
}
|
|
|
849 |
},
|
850 |
helper: function( e, li ) {
|
851 |
copyHelper = li.clone().insertAfter( li );
|
852 |
-
return li.clone();
|
853 |
},
|
854 |
beforeStop: function( event, ui ) {
|
855 |
// If this was dropped at the beginning of a collpased page, open it.
|
@@ -858,27 +867,60 @@ function frmAdminBuildJS() {
|
|
858 |
toggleCollapsePage( jQuery( previous ) );
|
859 |
}
|
860 |
},
|
861 |
-
stop: function() {
|
862 |
-
var moving
|
|
|
|
|
|
|
863 |
copyHelper && copyHelper.remove();
|
|
|
864 |
if ( cancelSort ) {
|
865 |
moving.sortable( 'cancel' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
} else {
|
867 |
-
|
868 |
}
|
869 |
-
|
|
|
870 |
},
|
871 |
-
sort: function( event ) {
|
|
|
|
|
872 |
container.scrollTop( function( i, v ) {
|
|
|
|
|
873 |
if ( startSort === false ) {
|
874 |
startSort = event.clientY;
|
875 |
return v;
|
876 |
}
|
877 |
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
if ( relativePos > ( h - 50 ) && moved > 5 ) {
|
883 |
// scrolling down
|
884 |
return v + y * 0.1;
|
@@ -887,6 +929,27 @@ function frmAdminBuildJS() {
|
|
887 |
return v - Math.abs( y * 0.1 );
|
888 |
}
|
889 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
890 |
}
|
891 |
};
|
892 |
|
@@ -895,6 +958,278 @@ function frmAdminBuildJS() {
|
|
895 |
setupFieldOptionSorting( jQuery( '#frm_builder_page' ) );
|
896 |
}
|
897 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
898 |
function setupFieldOptionSorting( sort ) {
|
899 |
var opts = {
|
900 |
items: '.frm_sortable_field_opts li',
|
@@ -962,10 +1297,16 @@ function frmAdminBuildJS() {
|
|
962 |
* @param {object} currentItem
|
963 |
*/
|
964 |
function updateFieldAfterMovingBetweenSections( currentItem ) {
|
965 |
-
var fieldId
|
966 |
-
|
967 |
-
|
968 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
969 |
|
970 |
jQuery.ajax({
|
971 |
type: 'POST', url: ajaxurl,
|
@@ -996,7 +1337,7 @@ function frmAdminBuildJS() {
|
|
996 |
* @param {object} opts
|
997 |
*/
|
998 |
function insertNewFieldByDragging( selectedItem, fieldButton ) {
|
999 |
-
var fieldType, addBtn, currentItem, section, formId, sectionId, loadingID, hasBreak;
|
1000 |
|
1001 |
fieldType = fieldButton.attr( 'id' );
|
1002 |
|
@@ -1006,13 +1347,19 @@ function frmAdminBuildJS() {
|
|
1006 |
disableSummaryBtnBeforeAJAX( addBtn, fieldButton );
|
1007 |
}
|
1008 |
|
1009 |
-
|
|
|
|
|
|
|
1010 |
section = getSectionForFieldPlacement( currentItem );
|
1011 |
formId = getFormIdForFieldPlacement( section );
|
1012 |
sectionId = getSectionIdForFieldPlacement( section );
|
1013 |
|
1014 |
loadingID = fieldType.replace( '|', '-' ) + '_' + getAutoId();
|
1015 |
-
|
|
|
|
|
|
|
1016 |
|
1017 |
hasBreak = 0;
|
1018 |
if ( 'summary' === fieldType ) {
|
@@ -1031,11 +1378,22 @@ function frmAdminBuildJS() {
|
|
1031 |
has_break: hasBreak
|
1032 |
},
|
1033 |
success: function( msg ) {
|
|
|
1034 |
document.getElementById( 'frm_form_editor_container' ).classList.add( 'frm-has-fields' );
|
1035 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1036 |
updateFieldOrder();
|
1037 |
-
|
1038 |
afterAddField( msg, false );
|
|
|
|
|
|
|
|
|
1039 |
},
|
1040 |
error: function( jqXHR, textStatus, errorThrown ) {
|
1041 |
maybeReenableSummaryBtnAfterAJAX( fieldType, addBtn, fieldButton, errorThrown );
|
@@ -1054,23 +1412,107 @@ function frmAdminBuildJS() {
|
|
1054 |
return ++autoId;
|
1055 |
}
|
1056 |
|
1057 |
-
// don't allow page break, embed form,
|
|
|
|
|
|
|
|
|
1058 |
function allowDrop( ui ) {
|
1059 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1060 |
return true;
|
1061 |
}
|
1062 |
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1066 |
return false;
|
1067 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1068 |
return true;
|
1069 |
}
|
1070 |
|
|
|
|
|
|
|
|
|
|
|
1071 |
// moving an existing field
|
1072 |
-
return !
|
1073 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1074 |
}
|
1075 |
|
1076 |
function loadFields( fieldId ) {
|
@@ -1170,7 +1612,7 @@ function frmAdminBuildJS() {
|
|
1170 |
},
|
1171 |
success: function( msg ) {
|
1172 |
document.getElementById( 'frm_form_editor_container' ).classList.add( 'frm-has-fields' );
|
1173 |
-
$newFields.append( msg );
|
1174 |
afterAddField( msg, true );
|
1175 |
},
|
1176 |
error: function( jqXHR, textStatus, errorThrown ) {
|
@@ -1237,15 +1679,19 @@ function frmAdminBuildJS() {
|
|
1237 |
}
|
1238 |
|
1239 |
function duplicateField() {
|
1240 |
-
|
1241 |
-
var thisField = jQuery( this ).closest( 'li' );
|
1242 |
-
var fieldId = thisField.data( 'fid' );
|
1243 |
-
var children = fieldsInSection( fieldId );
|
1244 |
|
1245 |
-
|
|
|
|
|
1246 |
return false;
|
1247 |
}
|
1248 |
|
|
|
|
|
|
|
|
|
|
|
1249 |
jQuery.ajax({
|
1250 |
type: 'POST',
|
1251 |
url: ajaxurl,
|
@@ -1257,7 +1703,12 @@ function frmAdminBuildJS() {
|
|
1257 |
nonce: frmGlobal.nonce
|
1258 |
},
|
1259 |
success: function( msg ) {
|
1260 |
-
|
|
|
|
|
|
|
|
|
|
|
1261 |
updateFieldOrder();
|
1262 |
afterAddField( msg, false );
|
1263 |
}
|
@@ -1265,14 +1716,123 @@ function frmAdminBuildJS() {
|
|
1265 |
return false;
|
1266 |
}
|
1267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1268 |
function afterAddField( msg, addFocus ) {
|
1269 |
var regex = /id="(\S+)"/,
|
1270 |
match = regex.exec( msg ),
|
1271 |
field = document.getElementById( match[1]),
|
1272 |
-
section = '#' + match[1] + '.edit_field_type_divider ul.frm_sorting',
|
1273 |
$thisSection = jQuery( section ),
|
1274 |
type = field.getAttribute( 'data-type' ),
|
1275 |
-
toggled = false
|
|
|
1276 |
|
1277 |
setupSortable( section );
|
1278 |
|
@@ -1290,7 +1850,7 @@ function frmAdminBuildJS() {
|
|
1290 |
if ( $thisSection.length ) {
|
1291 |
$thisSection.parent( '.frm_field_box' ).children( '.frm_no_section_fields' ).addClass( 'frm_block' );
|
1292 |
} else {
|
1293 |
-
|
1294 |
if ( $parentSection.length ) {
|
1295 |
toggleOneSectionHolder( $parentSection );
|
1296 |
toggled = true;
|
@@ -1332,14 +1892,17 @@ function frmAdminBuildJS() {
|
|
1332 |
initiateMultiselect();
|
1333 |
}
|
1334 |
|
1335 |
-
function clearSettingsBox() {
|
1336 |
jQuery( '#new_fields .frm-single-settings' ).addClass( 'frm_hidden' );
|
1337 |
jQuery( '#frm-options-panel > .frm-single-settings' ).removeClass( 'frm_hidden' );
|
1338 |
-
deselectFields();
|
1339 |
}
|
1340 |
|
1341 |
-
function deselectFields() {
|
1342 |
jQuery( 'li.ui-state-default.selected' ).removeClass( 'selected' );
|
|
|
|
|
|
|
1343 |
}
|
1344 |
|
1345 |
function scrollToField( field ) {
|
@@ -2113,198 +2676,992 @@ function frmAdminBuildJS() {
|
|
2113 |
}
|
2114 |
}
|
2115 |
|
2116 |
-
function removeImageSizeClasses( field ) {
|
2117 |
-
field.classList.remove( 'frm_image_size_', 'frm_image_size_small', 'frm_image_size_medium', 'frm_image_size_large', 'frm_image_size_xlarge' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2118 |
}
|
2119 |
|
2120 |
-
function
|
2121 |
-
|
|
|
|
|
2122 |
}
|
2123 |
|
2124 |
-
function
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2128 |
|
2129 |
-
|
|
|
|
|
2130 |
|
2131 |
-
|
2132 |
-
|
2133 |
-
displayField.classList.add( 'frm_image_options' );
|
2134 |
-
displayField.classList.add( 'frm_image_size_' + getImageOptionSize( fieldId ) );
|
2135 |
-
}
|
2136 |
}
|
2137 |
|
2138 |
-
function
|
2139 |
-
|
2140 |
-
fieldID = $field.data( 'fid' );
|
2141 |
-
jQuery( '.field_' + fieldID + '_option' ).trigger( 'change' );
|
2142 |
}
|
2143 |
|
2144 |
-
function
|
2145 |
-
|
2146 |
-
|
|
|
2147 |
}
|
2148 |
|
2149 |
-
function
|
2150 |
-
var
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2156 |
|
2157 |
-
|
|
|
2158 |
|
2159 |
-
|
2160 |
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
|
2168 |
-
|
2169 |
-
const attachment = fileFrame.state().get( 'selection' ).first().toJSON();
|
2170 |
-
$imagePreview.find( 'img' ).attr( 'src', attachment.url );
|
2171 |
-
$imagePreview.find( '.frm_image_preview_frame' ).show();
|
2172 |
-
$imagePreview.find( '.frm_image_preview_title' ).text( attachment.filename );
|
2173 |
-
$imagePreview.siblings( 'input[name*="[label]"]' ).data( 'frmimgurl', attachment.url );
|
2174 |
-
$imagePreview.find( '.frm_choose_image_box' ).hide();
|
2175 |
-
$imagePreview.find( 'input.frm_image_id' ).val( attachment.id ).trigger( 'change' );
|
2176 |
-
wp.media.model.settings.post.id = postID;
|
2177 |
-
});
|
2178 |
|
2179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2180 |
}
|
2181 |
|
2182 |
-
function
|
2183 |
-
var $
|
2184 |
-
$field = $this.closest( '.frm-single-settings' ),
|
2185 |
-
fieldId = $field.data( 'fid' ),
|
2186 |
-
previewWrapper = $this.closest( '.frm_image_preview_wrapper' );
|
2187 |
|
2188 |
-
|
2189 |
-
|
|
|
|
|
2190 |
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2195 |
}
|
2196 |
|
2197 |
-
function
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
dropdown.attr( 'multiple', 'multiple' );
|
2202 |
} else {
|
2203 |
-
|
2204 |
}
|
|
|
2205 |
}
|
2206 |
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2216 |
}
|
|
|
|
|
|
|
2217 |
}
|
2218 |
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
}
|
2225 |
|
2226 |
-
function
|
2227 |
-
|
2228 |
-
|
2229 |
-
parentLi = this.parentNode,
|
2230 |
-
parentUl = parentLi.parentNode,
|
2231 |
-
fieldId = this.getAttribute( 'data-fid' );
|
2232 |
|
2233 |
-
|
2234 |
-
|
2235 |
|
2236 |
-
|
2237 |
-
if ( hasOther.length < 1 ) {
|
2238 |
-
otherInput = document.getElementById( 'other_input_' + fieldId );
|
2239 |
-
if ( otherInput !== null ) {
|
2240 |
-
otherInput.value = 0;
|
2241 |
-
}
|
2242 |
-
jQuery( '#other_button_' + fieldId ).fadeIn( 'slow' );
|
2243 |
-
}
|
2244 |
-
});
|
2245 |
-
}
|
2246 |
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
function maybeUncheckRadio() {
|
2252 |
-
var $self, uncheck, unbind, up;
|
2253 |
|
2254 |
-
|
2255 |
-
|
2256 |
-
if (
|
2257 |
-
|
2258 |
-
setTimeout( function() {
|
2259 |
-
$self.prop( 'checked', false );
|
2260 |
-
}, 0 );
|
2261 |
-
};
|
2262 |
-
unbind = function() {
|
2263 |
-
$self.off( 'mouseup', up );
|
2264 |
-
};
|
2265 |
-
up = function() {
|
2266 |
-
uncheck();
|
2267 |
-
unbind();
|
2268 |
-
};
|
2269 |
-
$self.on( 'mouseup', up );
|
2270 |
-
$self.one( 'mouseout', unbind );
|
2271 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2272 |
}
|
2273 |
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2282 |
}
|
|
|
2283 |
}
|
2284 |
|
2285 |
-
function
|
2286 |
-
|
2287 |
-
var confirmMsg = frm_admin_js.conf_delete,
|
2288 |
-
maybeDivider = this.parentNode.parentNode.parentNode,
|
2289 |
-
li = maybeDivider.parentNode,
|
2290 |
-
field = jQuery( this ).closest( 'li' ),
|
2291 |
-
fieldId = field.data( 'fid' );
|
2292 |
|
2293 |
-
if (
|
2294 |
-
|
|
|
2295 |
}
|
2296 |
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
this.setAttribute( 'data-frmcaution', frm_admin_js.caution );
|
2301 |
}
|
2302 |
|
2303 |
-
|
2304 |
-
|
|
|
|
|
2305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2306 |
confirmLinkClick( this );
|
2307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2308 |
}
|
2309 |
|
2310 |
function deleteFieldConfirmed() {
|
@@ -2349,7 +3706,18 @@ function frmAdminBuildJS() {
|
|
2349 |
|
2350 |
$thisField.fadeOut( 'slow', function() {
|
2351 |
var $section = $thisField.closest( '.start_divider' ),
|
2352 |
-
type = $thisField.data( 'type' )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2353 |
$thisField.remove();
|
2354 |
if ( type === 'break' ) {
|
2355 |
renumberPageBreaks();
|
@@ -2367,6 +3735,11 @@ function frmAdminBuildJS() {
|
|
2367 |
} else if ( $section.length ) {
|
2368 |
toggleOneSectionHolder( $section );
|
2369 |
}
|
|
|
|
|
|
|
|
|
|
|
2370 |
});
|
2371 |
}
|
2372 |
});
|
@@ -2790,14 +4163,28 @@ function frmAdminBuildJS() {
|
|
2790 |
|
2791 |
function clickVis( e ) {
|
2792 |
/*jshint validthis:true */
|
2793 |
-
var currentClass
|
2794 |
-
|
|
|
|
|
|
|
2795 |
return;
|
2796 |
}
|
2797 |
|
2798 |
if ( this.closest( '.start_divider' ) !== null ) {
|
2799 |
e.stopPropagation();
|
2800 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2801 |
clickAction( this );
|
2802 |
}
|
2803 |
|
@@ -3435,43 +4822,54 @@ function frmAdminBuildJS() {
|
|
3435 |
}
|
3436 |
|
3437 |
function updateFieldOrder() {
|
3438 |
-
|
3439 |
renumberPageBreaks();
|
3440 |
jQuery( '#frm-show-fields' ).each( function( i ) {
|
3441 |
-
|
3442 |
for ( i = 0; i < fields.length; i++ ) {
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
|
3448 |
if ( currentOrder != newOrder ) {
|
3449 |
field.val( newOrder );
|
3450 |
singleField = document.getElementById( 'frm-single-settings-' + fieldId );
|
3451 |
|
3452 |
moveFieldSettings( singleField );
|
|
|
3453 |
}
|
3454 |
}
|
3455 |
});
|
3456 |
}
|
3457 |
|
3458 |
function toggleSectionHolder() {
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
|
|
|
|
3462 |
}
|
3463 |
|
3464 |
function toggleOneSectionHolder( $section ) {
|
3465 |
-
|
|
|
|
|
3466 |
return;
|
3467 |
}
|
3468 |
|
3469 |
-
|
3470 |
-
|
3471 |
-
|
3472 |
-
|
3473 |
-
|
|
|
|
|
|
|
3474 |
}
|
|
|
|
|
|
|
3475 |
}
|
3476 |
|
3477 |
function slideDown() {
|
@@ -4060,7 +5458,6 @@ function frmAdminBuildJS() {
|
|
4060 |
|
4061 |
deselectFields();
|
4062 |
$thisobj.addClass( 'selected' );
|
4063 |
-
|
4064 |
showFieldOptions( obj );
|
4065 |
}
|
4066 |
|
@@ -6876,21 +8273,15 @@ function frmAdminBuildJS() {
|
|
6876 |
},
|
6877 |
|
6878 |
buildInit: function() {
|
|
|
|
|
6879 |
if ( jQuery( '.frm_field_loading' ).length ) {
|
6880 |
-
|
6881 |
loadFields( loadFieldId );
|
6882 |
}
|
6883 |
|
6884 |
setupSortable( 'ul.frm_sorting' );
|
6885 |
|
6886 |
-
// Show message if section has no fields inside
|
6887 |
-
var frmSorting = jQuery( '.start_divider.frm_sorting' );
|
6888 |
-
for ( i = 0; i < frmSorting.length; i++ ) {
|
6889 |
-
if ( frmSorting[i].children.length < 2 ) {
|
6890 |
-
jQuery( frmSorting[i]).parent().children( '.frm_no_section_fields' ).addClass( 'frm_block' );
|
6891 |
-
}
|
6892 |
-
}
|
6893 |
-
|
6894 |
jQuery( '.field_type_list > li:not(.frm_noallow)' ).draggable({
|
6895 |
connectToSortable: '#frm-show-fields',
|
6896 |
helper: 'clone',
|
@@ -6920,8 +8311,8 @@ function frmAdminBuildJS() {
|
|
6920 |
initiateMultiselect();
|
6921 |
renumberPageBreaks();
|
6922 |
|
6923 |
-
|
6924 |
-
|
6925 |
$builderForm.on( 'click', '.frm_add_logic_row', addFieldLogicRow );
|
6926 |
$builderForm.on( 'click', '.frm_add_watch_lookup_row', addWatchLookupRow );
|
6927 |
$builderForm.on( 'change', '.frm_get_values_form', updateGetValueFieldSelection );
|
@@ -6962,6 +8353,25 @@ function frmAdminBuildJS() {
|
|
6962 |
$newFields.on( 'mousedown', 'input, textarea, select', stopFieldFocus );
|
6963 |
$newFields.on( 'click', 'input[type=radio], input[type=checkbox]', stopFieldFocus );
|
6964 |
$newFields.on( 'click', '.frm_delete_field', clickDeleteField );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6965 |
$builderForm.on( 'click', '.frm_single_option a[data-removeid]', deleteFieldOption );
|
6966 |
$builderForm.on( 'mousedown', '.frm_single_option input[type=radio]', maybeUncheckRadio );
|
6967 |
$builderForm.on( 'focusin', '.frm_single_option input[type=text]', maybeClearOptText );
|
@@ -6989,7 +8399,7 @@ function frmAdminBuildJS() {
|
|
6989 |
$builderForm.on( 'change', 'select[name^="field_options[form_select_"]', maybeChangeEmbedFormMsg );
|
6990 |
|
6991 |
jQuery( document ).on( 'submit', '#frm_js_build_form', buildSubmittedNoAjax );
|
6992 |
-
jQuery( document ).on( 'change', '#frm_builder_page input:not(.frm-search-input), #frm_builder_page select, #frm_builder_page textarea', fieldUpdated );
|
6993 |
|
6994 |
popAllProductFields();
|
6995 |
|
@@ -7003,6 +8413,7 @@ function frmAdminBuildJS() {
|
|
7003 |
maybeDisableAddSummaryBtn();
|
7004 |
maybeHideQuantityProductFieldOption();
|
7005 |
handleNameFieldOnFormBuilder();
|
|
|
7006 |
},
|
7007 |
|
7008 |
settingsInit: function() {
|
326 |
thisFormId = 0,
|
327 |
autoId = 0,
|
328 |
optionMap = {},
|
329 |
+
lastNewActionIdReturned = 0,
|
330 |
+
__ = wp.i18n.__;
|
331 |
|
332 |
if ( thisForm !== null ) {
|
333 |
thisFormId = thisForm.value;
|
392 |
$confirmMessage.empty();
|
393 |
|
394 |
if ( caution ) {
|
395 |
+
frmCaution = document.createElement( 'div' );
|
396 |
frmCaution.classList.add( 'frm-caution' );
|
397 |
frmCaution.appendChild( document.createTextNode( caution ) );
|
398 |
$confirmMessage.append( frmCaution );
|
792 |
|
793 |
/* Form Builder */
|
794 |
function setupSortable( sort ) {
|
795 |
+
var startSort, container, $previousFieldContainer, opts;
|
|
|
796 |
|
797 |
+
startSort = false;
|
798 |
+
container = jQuery( '#post-body-content' );
|
799 |
+
|
800 |
+
opts = {
|
801 |
connectWith: 'ul.frm_sorting',
|
802 |
+
items: 'li.frm_field_box',
|
803 |
placeholder: 'sortable-placeholder',
|
804 |
axis: 'y',
|
805 |
cancel: '.widget,.frm_field_opts_list,input,textarea,select,.edit_field_type_end_divider,.frm_sortable_field_opts,.frm_noallow',
|
842 |
}
|
843 |
},
|
844 |
start: function( event, ui ) {
|
845 |
+
unselectFieldGroups();
|
846 |
+
deleteEmptyDividerWrappers();
|
847 |
+
maybeRemoveGroupHoverTarget();
|
848 |
+
closeOpenFieldDropdowns();
|
849 |
+
container.get( 0 ).classList.add( 'frm-dragging-field' );
|
850 |
if ( ui.item[0].offsetHeight > 120 ) {
|
851 |
jQuery( sort ).sortable( 'refreshPositions' );
|
852 |
}
|
854 |
// If a page if collapsed, expand it before dragging since only the page break will move.
|
855 |
toggleCollapsePage( jQuery( ui.item[0]) );
|
856 |
}
|
857 |
+
$previousFieldContainer = ui.item.closest( 'ul.frm_sorting' );
|
858 |
},
|
859 |
helper: function( e, li ) {
|
860 |
copyHelper = li.clone().insertAfter( li );
|
861 |
+
return li.clone().addClass( 'frm-sortable-helper' );
|
862 |
},
|
863 |
beforeStop: function( event, ui ) {
|
864 |
// If this was dropped at the beginning of a collpased page, open it.
|
867 |
toggleCollapsePage( jQuery( previous ) );
|
868 |
}
|
869 |
},
|
870 |
+
stop: function( event, ui ) {
|
871 |
+
var moving, $previousContainerFields, $closestFieldBox;
|
872 |
+
|
873 |
+
container.get( 0 ).classList.remove( 'frm-dragging-field' );
|
874 |
+
moving = jQuery( this );
|
875 |
copyHelper && copyHelper.remove();
|
876 |
+
|
877 |
if ( cancelSort ) {
|
878 |
moving.sortable( 'cancel' );
|
879 |
+
syncAfterDragAndDrop();
|
880 |
+
return;
|
881 |
+
}
|
882 |
+
|
883 |
+
$previousContainerFields = $previousFieldContainer.length ? getFieldsInRow( $previousFieldContainer ) : [];
|
884 |
+
if ( $previousFieldContainer.length ) {
|
885 |
+
if ( ! $previousContainerFields.length ) {
|
886 |
+
$closestFieldBox = $previousFieldContainer.closest( 'li.frm_field_box' );
|
887 |
+
if ( ! $closestFieldBox.hasClass( 'edit_field_type_divider' ) ) {
|
888 |
+
// remove an empty field group, but don't remove an empty section.
|
889 |
+
$closestFieldBox.remove();
|
890 |
+
}
|
891 |
+
} else {
|
892 |
+
syncLayoutClasses( $previousContainerFields.first() );
|
893 |
+
}
|
894 |
+
}
|
895 |
+
|
896 |
+
if ( ( 'frm-show-fields' === ui.item.parent().attr( 'id' ) || ui.item.parent().hasClass( 'start_divider' ) ) && ui.item.hasClass( 'form-field' ) ) {
|
897 |
+
// dragging an item into a new row.
|
898 |
+
wrapFieldLiInPlace( ui.item );
|
899 |
+
if ( $previousContainerFields.length ) {
|
900 |
+
// only if the previous container had other sibling fields, remove the previous layout class.
|
901 |
+
syncLayoutClasses( ui.item );
|
902 |
+
}
|
903 |
} else {
|
904 |
+
syncLayoutClasses( ui.item );
|
905 |
}
|
906 |
+
|
907 |
+
syncAfterDragAndDrop();
|
908 |
},
|
909 |
+
sort: function( event, ui ) {
|
910 |
+
var $row, $children, $lastChild, currentIndex, left;
|
911 |
+
|
912 |
container.scrollTop( function( i, v ) {
|
913 |
+
var moved, h, relativePos, y;
|
914 |
+
|
915 |
if ( startSort === false ) {
|
916 |
startSort = event.clientY;
|
917 |
return v;
|
918 |
}
|
919 |
|
920 |
+
moved = event.clientY - startSort;
|
921 |
+
h = this.offsetHeight;
|
922 |
+
relativePos = event.clientY - this.offsetTop;
|
923 |
+
y = relativePos - h / 2;
|
924 |
if ( relativePos > ( h - 50 ) && moved > 5 ) {
|
925 |
// scrolling down
|
926 |
return v + y * 0.1;
|
929 |
return v - Math.abs( y * 0.1 );
|
930 |
}
|
931 |
});
|
932 |
+
|
933 |
+
maybeFixPlaceholderParent( ui, event );
|
934 |
+
|
935 |
+
$row = ui.placeholder.parent();
|
936 |
+
$children = getFieldsInRow( $row );
|
937 |
+
currentIndex = determineIndexBasedOffOfMousePositionInRow( $row, event.clientX );
|
938 |
+
|
939 |
+
if ( ! $children.length ) {
|
940 |
+
return;
|
941 |
+
}
|
942 |
+
|
943 |
+
if ( currentIndex === $children.length ) {
|
944 |
+
$lastChild = jQuery( $children.get( currentIndex - 1 ) );
|
945 |
+
left = $lastChild.offset().left - ui.placeholder.parent().offset().left + $lastChild.outerWidth();
|
946 |
+
$row.append( ui.placeholder );
|
947 |
+
} else {
|
948 |
+
left = jQuery( $children.get( currentIndex ) ).offset().left - $row.offset().left;
|
949 |
+
jQuery( $children.get( currentIndex ) ).before( ui.placeholder );
|
950 |
+
}
|
951 |
+
|
952 |
+
ui.placeholder.get( 0 ).style.left = left + 'px';
|
953 |
}
|
954 |
};
|
955 |
|
958 |
setupFieldOptionSorting( jQuery( '#frm_builder_page' ) );
|
959 |
}
|
960 |
|
961 |
+
function syncAfterDragAndDrop() {
|
962 |
+
maybeRemoveNewCancelledFields();
|
963 |
+
maybeUncancelFields();
|
964 |
+
maybeFixEndDividers();
|
965 |
+
fixUnwrappedListItems();
|
966 |
+
toggleSectionHolder();
|
967 |
+
updateFieldOrder();
|
968 |
+
}
|
969 |
+
|
970 |
+
function maybeRemoveNewCancelledFields() {
|
971 |
+
Array.from( document.getElementById( 'frm-show-fields' ).children ).forEach(
|
972 |
+
function( fieldBox ) {
|
973 |
+
if ( fieldBox.classList.contains( 'frmbutton' ) && fieldBox.classList.contains( 'ui-draggable' ) ) {
|
974 |
+
fieldBox.remove();
|
975 |
+
}
|
976 |
+
}
|
977 |
+
);
|
978 |
+
}
|
979 |
+
|
980 |
+
function maybeUncancelFields() {
|
981 |
+
document.querySelectorAll( '.frm_cancel_sort' ).forEach(
|
982 |
+
function( field ) {
|
983 |
+
field.classList.remove( 'frm_cancel_sort' );
|
984 |
+
}
|
985 |
+
);
|
986 |
+
}
|
987 |
+
|
988 |
+
/**
|
989 |
+
* Make sure the end dividers are always a child of a start divider, at the bottom at the list.
|
990 |
+
*/
|
991 |
+
function maybeFixEndDividers() {
|
992 |
+
var endDividers = document.querySelectorAll( '.edit_field_type_end_divider' );
|
993 |
+
if ( ! endDividers.length ) {
|
994 |
+
return;
|
995 |
+
}
|
996 |
+
endDividers.forEach(
|
997 |
+
function( endDivider ) {
|
998 |
+
if ( endDivider.parentNode.classList.contains( 'start_divider' ) ) {
|
999 |
+
// avoid having to call closest, but still append it as it might not be the last child.
|
1000 |
+
endDivider.parentNode.appendChild( endDivider );
|
1001 |
+
return;
|
1002 |
+
}
|
1003 |
+
endDivider.closest( '.start_divider' ).appendChild( endDivider );
|
1004 |
+
}
|
1005 |
+
);
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
/**
|
1009 |
+
* Sortable struggles to put the field into the proper section if there are multiple in a field group. This helps fix some of those issues.
|
1010 |
+
*/
|
1011 |
+
function maybeFixPlaceholderParent( ui, event ) {
|
1012 |
+
var elementFromPoint, wrapper, shouldAppend;
|
1013 |
+
elementFromPoint = document.elementFromPoint( event.clientX, event.clientY );
|
1014 |
+
if ( null === elementFromPoint ) {
|
1015 |
+
return;
|
1016 |
+
}
|
1017 |
+
wrapper = elementFromPoint.closest( '.frm_sorting' );
|
1018 |
+
if ( null === wrapper ) {
|
1019 |
+
return;
|
1020 |
+
}
|
1021 |
+
if ( ui.placeholder.closest( '.start_divider' ).parent().parent().find( '.start_divider' ).length < 2 ) {
|
1022 |
+
// placeholder is not in a problematic position that needs to be fixed so leave it.
|
1023 |
+
return;
|
1024 |
+
}
|
1025 |
+
shouldAppend = false;
|
1026 |
+
if ( wrapper.classList.contains( 'start_divider' ) ) {
|
1027 |
+
shouldAppend = jQuery( wrapper ).parent().parent().find( '.start_divider' ).length >= 2;
|
1028 |
+
} else if ( null !== wrapper.closest( '.start_divider' ) ) {
|
1029 |
+
shouldAppend = jQuery( wrapper ).closest( '.start_divider' ).parent().parent().find( '.start_divider' ).length >= 2;
|
1030 |
+
}
|
1031 |
+
if ( null !== wrapper.closest( '.frm-sortable-helper' ) ) {
|
1032 |
+
// avoid ever appending to the sortable helper.
|
1033 |
+
return;
|
1034 |
+
}
|
1035 |
+
if ( shouldAppend ) {
|
1036 |
+
// TODO instead of appendTo, we might need to look for the closest item, and appear above/below it.
|
1037 |
+
ui.placeholder.appendTo( wrapper );
|
1038 |
+
}
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
function fixUnwrappedListItems() {
|
1042 |
+
document.querySelectorAll( 'ul.start_divider > li.form-field:not(.edit_field_type_end_divider)' ).forEach(
|
1043 |
+
function( field ) {
|
1044 |
+
wrapFieldLiInPlace( field );
|
1045 |
+
}
|
1046 |
+
);
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
function deleteEmptyDividerWrappers() {
|
1050 |
+
var dividers = document.querySelectorAll( 'ul.start_divider' );
|
1051 |
+
if ( ! dividers.length ) {
|
1052 |
+
return;
|
1053 |
+
}
|
1054 |
+
dividers.forEach(
|
1055 |
+
function( divider ) {
|
1056 |
+
var children = [].slice.call( divider.children );
|
1057 |
+
children.forEach(
|
1058 |
+
function( child ) {
|
1059 |
+
if ( 0 === child.children.length ) {
|
1060 |
+
child.remove();
|
1061 |
+
} else if ( 1 === child.children.length && 'ul' === child.firstElementChild.nodeName.toLowerCase() && 0 === child.firstElementChild.children.length ) {
|
1062 |
+
child.remove();
|
1063 |
+
}
|
1064 |
+
}
|
1065 |
+
);
|
1066 |
+
}
|
1067 |
+
);
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
/**
|
1071 |
+
* @returns {bool} true if the placeholder parent should be fixed.
|
1072 |
+
*/
|
1073 |
+
function shouldTryFixingPlaceholderParent( $placeholder ) {
|
1074 |
+
var closestSection = $placeholder.closest( '.start_divider' );
|
1075 |
+
if ( null === closestSection ) {
|
1076 |
+
return false;
|
1077 |
+
}
|
1078 |
+
return jQuery( closestSection ).siblings( 'li.start_divider' ).length >= 1;
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
function getFieldsInRow( $row ) {
|
1082 |
+
return $row.children( 'li.form-field' ).not( '.ui-sortable-helper' ).not( '.edit_field_type_end_divider' ).filter(
|
1083 |
+
function() {
|
1084 |
+
return 'none' !== this.style.display;
|
1085 |
+
}
|
1086 |
+
);
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
function determineIndexBasedOffOfMousePositionInRow( $row, x ) {
|
1090 |
+
var $inputs = getFieldsInRow( $row ),
|
1091 |
+
length = $inputs.length,
|
1092 |
+
index, input, inputLeft, returnIndex;
|
1093 |
+
|
1094 |
+
returnIndex = 0;
|
1095 |
+
for ( index = length - 1; index >= 0; --index ) {
|
1096 |
+
input = $inputs.get( index );
|
1097 |
+
inputLeft = jQuery( input ).offset().left;
|
1098 |
+
if ( x > inputLeft ) {
|
1099 |
+
returnIndex = index;
|
1100 |
+
if ( x > inputLeft + ( jQuery( input ).outerWidth() / 2 ) ) {
|
1101 |
+
returnIndex = index + 1;
|
1102 |
+
}
|
1103 |
+
break;
|
1104 |
+
}
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
return returnIndex;
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
function syncLayoutClasses( $item, type ) {
|
1111 |
+
var $fields, size, layoutClasses, classToAddFunction;
|
1112 |
+
|
1113 |
+
if ( 'undefined' === typeof type ) {
|
1114 |
+
type = 'even';
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
$fields = $item.parent().children( 'li.form-field, li.frmbutton_loadingnow' ).not( '.edit_field_type_end_divider' );
|
1118 |
+
size = $fields.length;
|
1119 |
+
layoutClasses = getLayoutClasses();
|
1120 |
+
|
1121 |
+
if ( 'even' === type && 5 !== size ) {
|
1122 |
+
$fields.each( getSyncLayoutClass( layoutClasses, getEvenClassForSize( size ) ) );
|
1123 |
+
} else if ( 'clear' === type ) {
|
1124 |
+
$fields.each( getSyncLayoutClass( layoutClasses, '' ) );
|
1125 |
+
} else {
|
1126 |
+
if ( -1 !== [ 'left', 'right', 'middle', 'even' ].indexOf( type ) ) {
|
1127 |
+
classToAddFunction = function( index ) {
|
1128 |
+
return getClassForBlock( size, type, index );
|
1129 |
+
};
|
1130 |
+
} else {
|
1131 |
+
classToAddFunction = function( index ) {
|
1132 |
+
var size = type[ index ];
|
1133 |
+
return getLayoutClassForSize( size );
|
1134 |
+
};
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
$fields.each( getSyncLayoutClass( layoutClasses, classToAddFunction ) );
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
updateFieldGroupControls( $item.parent(), $fields.length );
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
function updateFieldGroupControls( $row, count ) {
|
1144 |
+
var rowOffset, shouldShowControls, controls;
|
1145 |
+
|
1146 |
+
rowOffset = $row.offset();
|
1147 |
+
|
1148 |
+
if ( 'undefined' === typeof rowOffset ) {
|
1149 |
+
return;
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
shouldShowControls = count >= 2;
|
1153 |
+
|
1154 |
+
controls = document.getElementById( 'frm_field_group_controls' );
|
1155 |
+
if ( null === controls ) {
|
1156 |
+
if ( ! shouldShowControls ) {
|
1157 |
+
// exit early. if we do not need controls and they do not exist, do nothing.
|
1158 |
+
return;
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
controls = div();
|
1162 |
+
controls.id = 'frm_field_group_controls';
|
1163 |
+
controls.innerHTML = ''.concat(
|
1164 |
+
'<span><svg class="frmsvg"><use xlink:href="#frm_field_group_layout_icon"></use></svg></span>',
|
1165 |
+
'<span class="frm-move"><svg class="frmsvg"><use xlink:href="#frm_thick_move_icon"></use></svg></span>'
|
1166 |
+
);
|
1167 |
+
document.getElementById( 'frm_builder_page' ).appendChild( controls );
|
1168 |
+
}
|
1169 |
+
|
1170 |
+
$row.append( controls );
|
1171 |
+
controls.style.display = shouldShowControls ? 'block' : 'none';
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
function getSyncLayoutClass( layoutClasses, classToAdd ) {
|
1175 |
+
return function( itemIndex ) {
|
1176 |
+
var currentClassToAdd, length, layoutClassIndex, currentClass, activeLayoutClass, fieldId, layoutClassesInput;
|
1177 |
+
|
1178 |
+
currentClassToAdd = 'function' === typeof classToAdd ? classToAdd( itemIndex ) : classToAdd;
|
1179 |
+
length = layoutClasses.length;
|
1180 |
+
activeLayoutClass = false;
|
1181 |
+
for ( layoutClassIndex = 0; layoutClassIndex < length; ++layoutClassIndex ) {
|
1182 |
+
currentClass = layoutClasses[ layoutClassIndex ];
|
1183 |
+
if ( this.classList.contains( currentClass ) ) {
|
1184 |
+
activeLayoutClass = currentClass;
|
1185 |
+
break;
|
1186 |
+
}
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
fieldId = this.dataset.fid;
|
1190 |
+
|
1191 |
+
if ( 'undefined' === typeof fieldId ) {
|
1192 |
+
// we are syncing the drag/drop placeholder before the actual field has loaded.
|
1193 |
+
// this will get called again afterward and the input will exist then.
|
1194 |
+
this.classList.add( currentClassToAdd );
|
1195 |
+
return;
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
moveFieldSettings( document.getElementById( 'frm-single-settings-' + fieldId ) );
|
1199 |
+
layoutClassesInput = document.getElementById( 'frm_classes_' + fieldId );
|
1200 |
+
|
1201 |
+
if ( null === layoutClassesInput ) {
|
1202 |
+
// not every field type has a layout class input.
|
1203 |
+
return;
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
if ( false === activeLayoutClass ) {
|
1207 |
+
if ( '' !== currentClassToAdd ) {
|
1208 |
+
layoutClassesInput.value = layoutClassesInput.value.concat( ' ' + currentClassToAdd );
|
1209 |
+
}
|
1210 |
+
} else {
|
1211 |
+
this.classList.remove( activeLayoutClass );
|
1212 |
+
layoutClassesInput.value = layoutClassesInput.value.replace( activeLayoutClass, currentClassToAdd );
|
1213 |
+
}
|
1214 |
+
|
1215 |
+
if ( this.classList.contains( 'frm_first' ) ) {
|
1216 |
+
this.classList.remove( 'frm_first' );
|
1217 |
+
layoutClassesInput.value = layoutClassesInput.value.replace( 'frm_first', '' ).trim();
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
if ( 0 === itemIndex ) {
|
1221 |
+
this.classList.add( 'frm_first' );
|
1222 |
+
layoutClassesInput.value = layoutClassesInput.value.concat( ' frm_first' );
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
jQuery( layoutClassesInput ).trigger( 'change' );
|
1226 |
+
};
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
function getLayoutClasses() {
|
1230 |
+
return [ 'frm_full', 'frm_half', 'frm_third', 'frm_fourth', 'frm_sixth', 'frm_two_thirds', 'frm_three_fourths', 'frm1', 'frm2', 'frm3', 'frm4', 'frm5', 'frm6', 'frm7', 'frm8', 'frm9', 'frm10', 'frm11', 'frm12' ];
|
1231 |
+
}
|
1232 |
+
|
1233 |
function setupFieldOptionSorting( sort ) {
|
1234 |
var opts = {
|
1235 |
items: '.frm_sortable_field_opts li',
|
1297 |
* @param {object} currentItem
|
1298 |
*/
|
1299 |
function updateFieldAfterMovingBetweenSections( currentItem ) {
|
1300 |
+
var fieldId, section, formId, sectionId;
|
1301 |
+
|
1302 |
+
fieldId = currentItem.attr( 'id' ).replace( 'frm_field_id_', '' );
|
1303 |
+
section = getSectionForFieldPlacement( currentItem );
|
1304 |
+
formId = getFormIdForFieldPlacement( section );
|
1305 |
+
sectionId = getSectionIdForFieldPlacement( section );
|
1306 |
+
|
1307 |
+
if ( currentItem.parent().hasClass( 'start_divider' ) ) {
|
1308 |
+
wrapFieldLiInPlace( currentItem );
|
1309 |
+
}
|
1310 |
|
1311 |
jQuery.ajax({
|
1312 |
type: 'POST', url: ajaxurl,
|
1337 |
* @param {object} opts
|
1338 |
*/
|
1339 |
function insertNewFieldByDragging( selectedItem, fieldButton ) {
|
1340 |
+
var fieldType, addBtn, sortableData, currentItem, insertAtIndex, section, formId, sectionId, loadingID, hasBreak, $placeholder;
|
1341 |
|
1342 |
fieldType = fieldButton.attr( 'id' );
|
1343 |
|
1347 |
disableSummaryBtnBeforeAJAX( addBtn, fieldButton );
|
1348 |
}
|
1349 |
|
1350 |
+
sortableData = jQuery( selectedItem ).data().uiSortable;
|
1351 |
+
currentItem = sortableData.currentItem;
|
1352 |
+
insertAtIndex = determineIndexBasedOffOfMousePositionInRow( currentItem.parent(), currentItem.offset().left );
|
1353 |
+
jQuery( getFieldsInRow( currentItem.parent() ).get( insertAtIndex ) ).before( currentItem );
|
1354 |
section = getSectionForFieldPlacement( currentItem );
|
1355 |
formId = getFormIdForFieldPlacement( section );
|
1356 |
sectionId = getSectionIdForFieldPlacement( section );
|
1357 |
|
1358 |
loadingID = fieldType.replace( '|', '-' ) + '_' + getAutoId();
|
1359 |
+
$placeholder = jQuery( '<li class="frm-wait frmbutton_loadingnow" id="' + loadingID + '" ></li>' );
|
1360 |
+
currentItem.replaceWith( $placeholder );
|
1361 |
+
|
1362 |
+
syncLayoutClasses( $placeholder );
|
1363 |
|
1364 |
hasBreak = 0;
|
1365 |
if ( 'summary' === fieldType ) {
|
1378 |
has_break: hasBreak
|
1379 |
},
|
1380 |
success: function( msg ) {
|
1381 |
+
var $siblings, replaceWith;
|
1382 |
document.getElementById( 'frm_form_editor_container' ).classList.add( 'frm-has-fields' );
|
1383 |
+
$siblings = $placeholder.siblings( 'li.form-field' ).not( '.edit_field_type_end_divider' );
|
1384 |
+
if ( ! $siblings.length ) {
|
1385 |
+
// if dragging into a new row, we need to wrap the li first.
|
1386 |
+
replaceWith = wrapFieldLi( msg );
|
1387 |
+
} else {
|
1388 |
+
replaceWith = msg;
|
1389 |
+
}
|
1390 |
+
$placeholder.replaceWith( replaceWith );
|
1391 |
updateFieldOrder();
|
|
|
1392 |
afterAddField( msg, false );
|
1393 |
+
if ( $siblings.length ) {
|
1394 |
+
syncLayoutClasses( $siblings.first() );
|
1395 |
+
}
|
1396 |
+
toggleSectionHolder();
|
1397 |
},
|
1398 |
error: function( jqXHR, textStatus, errorThrown ) {
|
1399 |
maybeReenableSummaryBtnAfterAJAX( fieldType, addBtn, fieldButton, errorThrown );
|
1412 |
return ++autoId;
|
1413 |
}
|
1414 |
|
1415 |
+
// don't allow page break, embed form, or section inside section field
|
1416 |
+
// don't allow page breaks inside of field groups.
|
1417 |
+
// don't allow field groups with sections inside of sections.
|
1418 |
+
// don't allow field groups in field groups.
|
1419 |
+
// don't allow hidden fields inside of field groups but allow them in sections.
|
1420 |
function allowDrop( ui ) {
|
1421 |
+
var fieldsInRow, insideFieldGroup, insideSection, isNewField, isPageBreak, isFieldGroup, isSection;
|
1422 |
+
|
1423 |
+
fieldsInRow = getFieldsInRow( ui.placeholder.parent() );
|
1424 |
+
|
1425 |
+
if ( ! groupCanFitAnotherField( fieldsInRow, ui.item ) ) {
|
1426 |
+
return false;
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
insideFieldGroup = fieldsInRow.length > 0;
|
1430 |
+
insideSection = ui.placeholder.closest( '.start_divider' ).length > 0;
|
1431 |
+
|
1432 |
+
if ( ! insideSection && ! insideFieldGroup ) {
|
1433 |
return true;
|
1434 |
}
|
1435 |
|
1436 |
+
if ( insideFieldGroup && ui.placeholder.siblings( '.edit_field_type_break, .edit_field_type_hidden' ).length ) {
|
1437 |
+
// never allow any field beside a page break or a hidden field.
|
1438 |
+
return false;
|
1439 |
+
}
|
1440 |
+
|
1441 |
+
if ( insideSection && ui.placeholder.siblings().length > 1 && ui.placeholder.prev().hasClass( 'edit_field_type_end_divider' ) ) {
|
1442 |
+
return false;
|
1443 |
+
}
|
1444 |
+
|
1445 |
+
isNewField = ui.item.hasClass( 'frmbutton' );
|
1446 |
+
|
1447 |
+
if ( isNewField ) {
|
1448 |
+
isPageBreak = ui.item.hasClass( 'frm_tbreak' );
|
1449 |
+
|
1450 |
+
if ( isPageBreak ) {
|
1451 |
+
// do not allow page break in both sections and field groups.
|
1452 |
+
return false;
|
1453 |
+
}
|
1454 |
+
|
1455 |
+
if ( ui.item.hasClass( 'frm_thidden' ) && insideFieldGroup ) {
|
1456 |
+
// do not allow a hidden field in a field group.
|
1457 |
return false;
|
1458 |
}
|
1459 |
+
|
1460 |
+
if ( ! insideSection ) {
|
1461 |
+
return true;
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
return ! ui.item.hasClass( 'frm_tform' ) && ! ui.item.hasClass( 'frm_tdivider' ) && ! ui.item.hasClass( 'frm_tdivider-repeat' );
|
1465 |
+
}
|
1466 |
+
|
1467 |
+
isPageBreak = ui.item.hasClass( 'edit_field_type_break' );
|
1468 |
+
|
1469 |
+
if ( isPageBreak ) {
|
1470 |
+
// do not allow page break in both sections and field groups.
|
1471 |
+
return false;
|
1472 |
+
}
|
1473 |
+
|
1474 |
+
isFieldGroup = ui.item.find( 'ul.frm_sorting' ).length > 0;
|
1475 |
+
isSection = ui.item.hasClass( 'edit_field_type_divider' );
|
1476 |
+
|
1477 |
+
if ( insideSection && isSection ) {
|
1478 |
+
// but do not allow a section inside of a section.
|
1479 |
+
return false;
|
1480 |
+
}
|
1481 |
+
|
1482 |
+
if ( isFieldGroup && insideFieldGroup ) {
|
1483 |
+
// allow a field group inside of a field group if it is being placed within a section above/below another field group.
|
1484 |
+
return insideSection && ui.placeholder.siblings( 'li.edit_field_type_end_divider' ).length > 0;
|
1485 |
+
}
|
1486 |
+
|
1487 |
+
if ( insideFieldGroup && ui.item.hasClass( 'edit_field_type_hidden' ) ) {
|
1488 |
+
// do not allow a hidden field inside of a field group.
|
1489 |
+
return false;
|
1490 |
+
}
|
1491 |
+
|
1492 |
+
if ( ! insideSection ) {
|
1493 |
return true;
|
1494 |
}
|
1495 |
|
1496 |
+
if ( ui.item.find( '.edit_field_type_divider' ).length ) {
|
1497 |
+
// if we are dragging a field group with a section, do not allow it in section.
|
1498 |
+
return false;
|
1499 |
+
}
|
1500 |
+
|
1501 |
// moving an existing field
|
1502 |
+
return ! ui.item.hasClass( 'edit_field_type_form' ) && ! isSection;
|
1503 |
+
}
|
1504 |
+
|
1505 |
+
function groupCanFitAnotherField( fieldsInRow, $field ) {
|
1506 |
+
var fieldId;
|
1507 |
+
if ( fieldsInRow.length < 6 ) {
|
1508 |
+
return true;
|
1509 |
+
}
|
1510 |
+
if ( fieldsInRow.length > 6 ) {
|
1511 |
+
return false;
|
1512 |
+
}
|
1513 |
+
fieldId = $field.attr( 'data-fid' );
|
1514 |
+
// allow 6 if we're not changing field groups.
|
1515 |
+
return 1 === jQuery( fieldsInRow ).filter( '[data-fid="' + fieldId + '"]' ).length;
|
1516 |
}
|
1517 |
|
1518 |
function loadFields( fieldId ) {
|
1612 |
},
|
1613 |
success: function( msg ) {
|
1614 |
document.getElementById( 'frm_form_editor_container' ).classList.add( 'frm-has-fields' );
|
1615 |
+
$newFields.append( wrapFieldLi( msg ) );
|
1616 |
afterAddField( msg, true );
|
1617 |
},
|
1618 |
error: function( jqXHR, textStatus, errorThrown ) {
|
1679 |
}
|
1680 |
|
1681 |
function duplicateField() {
|
1682 |
+
var $field, fieldId, children;
|
|
|
|
|
|
|
1683 |
|
1684 |
+
$field = jQuery( this ).closest( 'li.form-field' );
|
1685 |
+
|
1686 |
+
if ( $field.hasClass( 'frm-section-collapsed' ) || $field.hasClass( 'frm-page-collapsed' ) ) {
|
1687 |
return false;
|
1688 |
}
|
1689 |
|
1690 |
+
closeOpenFieldDropdowns();
|
1691 |
+
|
1692 |
+
fieldId = $field.data( 'fid' );
|
1693 |
+
children = fieldsInSection( fieldId );
|
1694 |
+
|
1695 |
jQuery.ajax({
|
1696 |
type: 'POST',
|
1697 |
url: ajaxurl,
|
1703 |
nonce: frmGlobal.nonce
|
1704 |
},
|
1705 |
success: function( msg ) {
|
1706 |
+
if ( $field.siblings( 'li.form-field' ).length ) {
|
1707 |
+
$field.after( msg );
|
1708 |
+
syncLayoutClasses( $field );
|
1709 |
+
} else {
|
1710 |
+
$field.parent().parent().after( wrapFieldLi( msg ) );
|
1711 |
+
}
|
1712 |
updateFieldOrder();
|
1713 |
afterAddField( msg, false );
|
1714 |
}
|
1716 |
return false;
|
1717 |
}
|
1718 |
|
1719 |
+
function closeOpenFieldDropdowns() {
|
1720 |
+
var openSettings = document.querySelector( '.frm-field-settings-open' );
|
1721 |
+
if ( null !== openSettings ) {
|
1722 |
+
openSettings.classList.remove( 'frm-field-settings-open' );
|
1723 |
+
jQuery( document ).off( 'click', '#frm_builder_page', handleClickOutsideOfFieldSettings );
|
1724 |
+
jQuery( '.frm-field-action-icons .dropdown.open' ).removeClass( 'open' );
|
1725 |
+
}
|
1726 |
+
}
|
1727 |
+
|
1728 |
+
function handleClickOutsideOfFieldSettings( event ) {
|
1729 |
+
if ( ! jQuery( event.originalEvent.target ).closest( '.frm-field-action-icons' ).length ) {
|
1730 |
+
closeOpenFieldDropdowns();
|
1731 |
+
}
|
1732 |
+
}
|
1733 |
+
|
1734 |
+
function checkForMultiselectKeysOnMouseMove( event ) {
|
1735 |
+
var keyIsDown = ! ! ( event.ctrlKey || event.metaKey || event.shiftKey );
|
1736 |
+
jQuery( document.getElementById( 'frm_builder_page' ) ).toggleClass( 'frm-multiselect-key-is-down', keyIsDown );
|
1737 |
+
checkForActiveHoverTarget( event );
|
1738 |
+
}
|
1739 |
+
|
1740 |
+
function checkForActiveHoverTarget( event ) {
|
1741 |
+
var container, elementFromPoint, list, previousHoverTarget;
|
1742 |
+
|
1743 |
+
container = document.getElementById( 'post-body-content' );
|
1744 |
+
if ( container.classList.contains( 'frm-dragging-field' ) ) {
|
1745 |
+
return;
|
1746 |
+
}
|
1747 |
+
|
1748 |
+
if ( null !== document.querySelector( '.frm-field-group-hover-target .frm-field-settings-open' ) ) {
|
1749 |
+
// do not set a hover target if a dropdown is open for the current hover target.
|
1750 |
+
return;
|
1751 |
+
}
|
1752 |
+
|
1753 |
+
elementFromPoint = document.elementFromPoint( event.clientX, event.clientY );
|
1754 |
+
if ( null !== elementFromPoint && ! elementFromPoint.classList.contains( 'edit_field_type_divider' ) ) {
|
1755 |
+
|
1756 |
+
list = elementFromPoint.closest( 'ul.frm_sorting' );
|
1757 |
+
|
1758 |
+
if ( null !== list && ! list.classList.contains( 'start_divider' ) && 'frm-show-fields' !== list.id ) {
|
1759 |
+
previousHoverTarget = maybeRemoveGroupHoverTarget();
|
1760 |
+
if ( false !== previousHoverTarget && ! jQuery( previousHoverTarget ).is( list ) ) {
|
1761 |
+
destroyFieldGroupPopup();
|
1762 |
+
}
|
1763 |
+
updateFieldGroupControls( jQuery( list ), getFieldsInRow( jQuery( list ) ).length );
|
1764 |
+
list.classList.add( 'frm-field-group-hover-target' );
|
1765 |
+
jQuery( '#wpbody-content' ).on( 'mousemove', maybeRemoveHoverTargetOnMouseMove );
|
1766 |
+
}
|
1767 |
+
}
|
1768 |
+
}
|
1769 |
+
|
1770 |
+
function maybeRemoveGroupHoverTarget() {
|
1771 |
+
var controls, previousHoverTarget;
|
1772 |
+
|
1773 |
+
controls = document.getElementById( 'frm_field_group_controls' );
|
1774 |
+
if ( null !== controls ) {
|
1775 |
+
controls.style.display = 'none';
|
1776 |
+
}
|
1777 |
+
|
1778 |
+
previousHoverTarget = document.querySelector( '.frm-field-group-hover-target' );
|
1779 |
+
if ( null === previousHoverTarget ) {
|
1780 |
+
return false;
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
jQuery( '#wpbody-content' ).off( 'mousemove', maybeRemoveHoverTargetOnMouseMove );
|
1784 |
+
previousHoverTarget.classList.remove( 'frm-field-group-hover-target' );
|
1785 |
+
return previousHoverTarget;
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
function maybeRemoveHoverTargetOnMouseMove( event ) {
|
1789 |
+
var elementFromPoint = document.elementFromPoint( event.clientX, event.clientY );
|
1790 |
+
if ( null !== elementFromPoint && null !== elementFromPoint.closest( '#frm-show-fields' ) ) {
|
1791 |
+
return;
|
1792 |
+
}
|
1793 |
+
maybeRemoveGroupHoverTarget();
|
1794 |
+
}
|
1795 |
+
|
1796 |
+
function onFieldActionDropdownShow() {
|
1797 |
+
unselectFieldGroups();
|
1798 |
+
// maybe offset the dropdown if it goes off of the right of the screen.
|
1799 |
+
setTimeout(
|
1800 |
+
function() {
|
1801 |
+
var ul, $ul;
|
1802 |
+
ul = document.querySelector( '.dropdown.open ul' );
|
1803 |
+
if ( null === ul ) {
|
1804 |
+
return;
|
1805 |
+
}
|
1806 |
+
$ul = jQuery( ul );
|
1807 |
+
if ( $ul.offset().left > jQuery( window ).width() - $ul.outerWidth() ) {
|
1808 |
+
ul.style.left = ( -$ul.outerWidth() ) + 'px';
|
1809 |
+
}
|
1810 |
+
},
|
1811 |
+
0
|
1812 |
+
);
|
1813 |
+
}
|
1814 |
+
|
1815 |
+
function wrapFieldLi( li ) {
|
1816 |
+
return jQuery( '<li>' )
|
1817 |
+
.addClass( 'frm_field_box' )
|
1818 |
+
.html(
|
1819 |
+
jQuery( '<ul>' ).addClass( 'frm_grid_container frm_sorting' ).append( li )
|
1820 |
+
);
|
1821 |
+
}
|
1822 |
+
|
1823 |
+
function wrapFieldLiInPlace( li ) {
|
1824 |
+
jQuery( li ).wrap( '<li class="frm_field_box"><ul class="frm_grid_container frm_sorting"></ul></li>' );
|
1825 |
+
}
|
1826 |
+
|
1827 |
function afterAddField( msg, addFocus ) {
|
1828 |
var regex = /id="(\S+)"/,
|
1829 |
match = regex.exec( msg ),
|
1830 |
field = document.getElementById( match[1]),
|
1831 |
+
section = '#' + match[1] + '.edit_field_type_divider ul.frm_sorting.start_divider',
|
1832 |
$thisSection = jQuery( section ),
|
1833 |
type = field.getAttribute( 'data-type' ),
|
1834 |
+
toggled = false,
|
1835 |
+
$parentSection;
|
1836 |
|
1837 |
setupSortable( section );
|
1838 |
|
1850 |
if ( $thisSection.length ) {
|
1851 |
$thisSection.parent( '.frm_field_box' ).children( '.frm_no_section_fields' ).addClass( 'frm_block' );
|
1852 |
} else {
|
1853 |
+
$parentSection = jQuery( field ).closest( 'ul.frm_sorting.start_divider' );
|
1854 |
if ( $parentSection.length ) {
|
1855 |
toggleOneSectionHolder( $parentSection );
|
1856 |
toggled = true;
|
1892 |
initiateMultiselect();
|
1893 |
}
|
1894 |
|
1895 |
+
function clearSettingsBox( preventFieldGroups ) {
|
1896 |
jQuery( '#new_fields .frm-single-settings' ).addClass( 'frm_hidden' );
|
1897 |
jQuery( '#frm-options-panel > .frm-single-settings' ).removeClass( 'frm_hidden' );
|
1898 |
+
deselectFields( preventFieldGroups );
|
1899 |
}
|
1900 |
|
1901 |
+
function deselectFields( preventFieldGroups ) {
|
1902 |
jQuery( 'li.ui-state-default.selected' ).removeClass( 'selected' );
|
1903 |
+
if ( ! preventFieldGroups ) {
|
1904 |
+
unselectFieldGroups();
|
1905 |
+
}
|
1906 |
}
|
1907 |
|
1908 |
function scrollToField( field ) {
|
2676 |
}
|
2677 |
}
|
2678 |
|
2679 |
+
function removeImageSizeClasses( field ) {
|
2680 |
+
field.classList.remove( 'frm_image_size_', 'frm_image_size_small', 'frm_image_size_medium', 'frm_image_size_large', 'frm_image_size_xlarge' );
|
2681 |
+
}
|
2682 |
+
|
2683 |
+
function setAlignment( fieldId, alignment ) {
|
2684 |
+
jQuery( '#field_options_align_' + fieldId ).val( alignment ).trigger( 'change' );
|
2685 |
+
}
|
2686 |
+
|
2687 |
+
function setImageSize() {
|
2688 |
+
var $field = jQuery( this ).closest( '.frm-single-settings' ),
|
2689 |
+
fieldId = $field.data( 'fid' ),
|
2690 |
+
displayField = document.getElementById( 'frm_field_id_' + fieldId );
|
2691 |
+
|
2692 |
+
refreshOptionDisplay();
|
2693 |
+
|
2694 |
+
if ( imagesAsOptions( fieldId ) ) {
|
2695 |
+
removeImageSizeClasses( displayField );
|
2696 |
+
displayField.classList.add( 'frm_image_options' );
|
2697 |
+
displayField.classList.add( 'frm_image_size_' + getImageOptionSize( fieldId ) );
|
2698 |
+
}
|
2699 |
+
}
|
2700 |
+
|
2701 |
+
function refreshOptionDisplayNow( object ) {
|
2702 |
+
var $field = object.closest( '.frm-single-settings' ),
|
2703 |
+
fieldID = $field.data( 'fid' );
|
2704 |
+
jQuery( '.field_' + fieldID + '_option' ).trigger( 'change' );
|
2705 |
+
}
|
2706 |
+
|
2707 |
+
function refreshOptionDisplay() {
|
2708 |
+
/*jshint validthis:true */
|
2709 |
+
refreshOptionDisplayNow( jQuery( this ) );
|
2710 |
+
}
|
2711 |
+
|
2712 |
+
function addImageToOption( event ) {
|
2713 |
+
var fileFrame,
|
2714 |
+
$this = jQuery( this ),
|
2715 |
+
$field = $this.closest( '.frm-single-settings' ),
|
2716 |
+
$imagePreview = $this.closest( '.frm_image_preview_wrapper' ),
|
2717 |
+
fieldId = $field.data( 'fid' ),
|
2718 |
+
postID = 0;
|
2719 |
+
|
2720 |
+
event.preventDefault();
|
2721 |
+
|
2722 |
+
wp.media.model.settings.post.id = postID;
|
2723 |
+
|
2724 |
+
fileFrame = wp.media.frames.file_frame = wp.media({
|
2725 |
+
multiple: false,
|
2726 |
+
library: {
|
2727 |
+
type: [ 'image' ]
|
2728 |
+
}
|
2729 |
+
});
|
2730 |
+
|
2731 |
+
fileFrame.on( 'select', function() {
|
2732 |
+
const attachment = fileFrame.state().get( 'selection' ).first().toJSON();
|
2733 |
+
$imagePreview.find( 'img' ).attr( 'src', attachment.url );
|
2734 |
+
$imagePreview.find( '.frm_image_preview_frame' ).show();
|
2735 |
+
$imagePreview.find( '.frm_image_preview_title' ).text( attachment.filename );
|
2736 |
+
$imagePreview.siblings( 'input[name*="[label]"]' ).data( 'frmimgurl', attachment.url );
|
2737 |
+
$imagePreview.find( '.frm_choose_image_box' ).hide();
|
2738 |
+
$imagePreview.find( 'input.frm_image_id' ).val( attachment.id ).trigger( 'change' );
|
2739 |
+
wp.media.model.settings.post.id = postID;
|
2740 |
+
});
|
2741 |
+
|
2742 |
+
fileFrame.open();
|
2743 |
+
}
|
2744 |
+
|
2745 |
+
function removeImageFromOption( event ) {
|
2746 |
+
var $this = jQuery( this ),
|
2747 |
+
$field = $this.closest( '.frm-single-settings' ),
|
2748 |
+
fieldId = $field.data( 'fid' ),
|
2749 |
+
previewWrapper = $this.closest( '.frm_image_preview_wrapper' );
|
2750 |
+
|
2751 |
+
event.preventDefault();
|
2752 |
+
event.stopPropagation();
|
2753 |
+
|
2754 |
+
previewWrapper.find( 'img' ).attr( 'src', '' );
|
2755 |
+
previewWrapper.find( '.frm_image_preview_frame' ).hide();
|
2756 |
+
previewWrapper.find( '.frm_choose_image_box' ).show();
|
2757 |
+
previewWrapper.find( 'input.frm_image_id' ).val( 0 ).trigger( 'change' );
|
2758 |
+
}
|
2759 |
+
|
2760 |
+
function toggleMultiselect() {
|
2761 |
+
/*jshint validthis:true */
|
2762 |
+
var dropdown = jQuery( this ).closest( 'li' ).find( '.frm_form_fields select' );
|
2763 |
+
if ( this.checked ) {
|
2764 |
+
dropdown.attr( 'multiple', 'multiple' );
|
2765 |
+
} else {
|
2766 |
+
dropdown.removeAttr( 'multiple' );
|
2767 |
+
}
|
2768 |
+
}
|
2769 |
+
|
2770 |
+
/**
|
2771 |
+
* Allow typing on form switcher click without an extra click to search.
|
2772 |
+
*/
|
2773 |
+
function focusSearchBox() {
|
2774 |
+
var searchBox = document.getElementById( 'dropform-search-input' );
|
2775 |
+
if ( searchBox !== null ) {
|
2776 |
+
setTimeout( function() {
|
2777 |
+
searchBox.focus();
|
2778 |
+
}, 100 );
|
2779 |
+
}
|
2780 |
+
}
|
2781 |
+
|
2782 |
+
/**
|
2783 |
+
* If a field is clicked in the builder, prevent inputs from changing.
|
2784 |
+
*/
|
2785 |
+
function stopFieldFocus( e ) {
|
2786 |
+
e.preventDefault();
|
2787 |
+
}
|
2788 |
+
|
2789 |
+
function deleteFieldOption() {
|
2790 |
+
/*jshint validthis:true */
|
2791 |
+
var otherInput,
|
2792 |
+
parentLi = this.parentNode,
|
2793 |
+
parentUl = parentLi.parentNode,
|
2794 |
+
fieldId = this.getAttribute( 'data-fid' );
|
2795 |
+
|
2796 |
+
jQuery( parentLi ).fadeOut( 'slow', function() {
|
2797 |
+
jQuery( parentLi ).remove();
|
2798 |
+
|
2799 |
+
var hasOther = jQuery( parentUl ).find( '.frm_other_option' );
|
2800 |
+
if ( hasOther.length < 1 ) {
|
2801 |
+
otherInput = document.getElementById( 'other_input_' + fieldId );
|
2802 |
+
if ( otherInput !== null ) {
|
2803 |
+
otherInput.value = 0;
|
2804 |
+
}
|
2805 |
+
jQuery( '#other_button_' + fieldId ).fadeIn( 'slow' );
|
2806 |
+
}
|
2807 |
+
});
|
2808 |
+
}
|
2809 |
+
|
2810 |
+
/**
|
2811 |
+
* If a radio button is set as default, allow a click to
|
2812 |
+
* deselect it.
|
2813 |
+
*/
|
2814 |
+
function maybeUncheckRadio() {
|
2815 |
+
var $self, uncheck, unbind, up;
|
2816 |
+
|
2817 |
+
/*jshint validthis:true */
|
2818 |
+
$self = jQuery( this );
|
2819 |
+
if ( $self.is( ':checked' ) ) {
|
2820 |
+
uncheck = function() {
|
2821 |
+
setTimeout( function() {
|
2822 |
+
$self.prop( 'checked', false );
|
2823 |
+
}, 0 );
|
2824 |
+
};
|
2825 |
+
unbind = function() {
|
2826 |
+
$self.off( 'mouseup', up );
|
2827 |
+
};
|
2828 |
+
up = function() {
|
2829 |
+
uncheck();
|
2830 |
+
unbind();
|
2831 |
+
};
|
2832 |
+
$self.on( 'mouseup', up );
|
2833 |
+
$self.one( 'mouseout', unbind );
|
2834 |
+
}
|
2835 |
+
}
|
2836 |
+
|
2837 |
+
/**
|
2838 |
+
* If the field option has the default text, clear it out on click.
|
2839 |
+
*/
|
2840 |
+
function maybeClearOptText() {
|
2841 |
+
/*jshint validthis:true */
|
2842 |
+
if ( this.value === frm_admin_js.new_option ) {
|
2843 |
+
this.setAttribute( 'data-value-on-focus', this.value );
|
2844 |
+
this.value = '';
|
2845 |
+
}
|
2846 |
+
}
|
2847 |
+
|
2848 |
+
function clickDeleteField() {
|
2849 |
+
/*jshint validthis:true */
|
2850 |
+
var confirmMsg = frm_admin_js.conf_delete,
|
2851 |
+
maybeDivider = this.parentNode.parentNode.parentNode.parentNode.parentNode,
|
2852 |
+
li = maybeDivider.parentNode,
|
2853 |
+
field = jQuery( this ).closest( 'li.form-field' ),
|
2854 |
+
fieldId = field.data( 'fid' );
|
2855 |
+
|
2856 |
+
if ( li.classList.contains( 'frm-section-collapsed' ) || li.classList.contains( 'frm-page-collapsed' ) ) {
|
2857 |
+
return false;
|
2858 |
+
}
|
2859 |
+
|
2860 |
+
// If deleting a section, use a special message.
|
2861 |
+
if ( maybeDivider.className === 'divider_section_only' ) {
|
2862 |
+
confirmMsg = frm_admin_js.conf_delete_sec;
|
2863 |
+
this.setAttribute( 'data-frmcaution', frm_admin_js.caution );
|
2864 |
+
}
|
2865 |
+
|
2866 |
+
this.setAttribute( 'data-frmverify', confirmMsg );
|
2867 |
+
this.setAttribute( 'data-deletefield', fieldId );
|
2868 |
+
|
2869 |
+
closeOpenFieldDropdowns();
|
2870 |
+
|
2871 |
+
confirmLinkClick( this );
|
2872 |
+
return false;
|
2873 |
+
}
|
2874 |
+
|
2875 |
+
function clickSelectField() {
|
2876 |
+
this.closest( 'li.form-field' ).click();
|
2877 |
+
}
|
2878 |
+
|
2879 |
+
function clickFieldGroupLayout() {
|
2880 |
+
var hoverTarget, sizeOfFieldGroup, popupWrapper;
|
2881 |
+
|
2882 |
+
hoverTarget = document.querySelector( '.frm-field-group-hover-target' );
|
2883 |
+
|
2884 |
+
if ( null === hoverTarget ) {
|
2885 |
+
return;
|
2886 |
+
}
|
2887 |
+
|
2888 |
+
deselectFields();
|
2889 |
+
|
2890 |
+
sizeOfFieldGroup = getSizeOfFieldGroupFromChildElement( hoverTarget.querySelector( 'li.form-field' ) );
|
2891 |
+
|
2892 |
+
hoverTarget.classList.add( 'frm-has-open-field-group-popup' );
|
2893 |
+
jQuery( document ).on( 'click', '#frm_builder_page', destroyFieldGroupPopupOnOutsideClick );
|
2894 |
+
|
2895 |
+
popupWrapper = div();
|
2896 |
+
popupWrapper.style.position = 'relative';
|
2897 |
+
popupWrapper.appendChild( getFieldGroupPopup( sizeOfFieldGroup, this ) );
|
2898 |
+
this.parentNode.appendChild( popupWrapper );
|
2899 |
+
}
|
2900 |
+
|
2901 |
+
function destroyFieldGroupPopupOnOutsideClick( event ) {
|
2902 |
+
if ( event.target.classList.contains( 'frm-custom-field-group-layout' ) || event.target.classList.contains( 'frm-cancel-custom-field-group-layout' ) ) {
|
2903 |
+
return;
|
2904 |
+
}
|
2905 |
+
if ( ! jQuery( event.target ).closest( '#frm_field_group_controls' ).length && ! jQuery( event.target ).closest( '#frm_field_group_popup' ).length ) {
|
2906 |
+
destroyFieldGroupPopup();
|
2907 |
+
}
|
2908 |
+
}
|
2909 |
+
|
2910 |
+
function getSizeOfFieldGroupFromChildElement( element ) {
|
2911 |
+
var $ul = jQuery( element ).closest( 'ul' );
|
2912 |
+
if ( $ul.length ) {
|
2913 |
+
return getFieldsInRow( $ul ).length;
|
2914 |
+
}
|
2915 |
+
return getSelectedFieldCount();
|
2916 |
+
}
|
2917 |
+
|
2918 |
+
function getFieldGroupPopup( sizeOfFieldGroup, childElement ) {
|
2919 |
+
var popup, wrapper, rowLayoutOptions, ul;
|
2920 |
+
|
2921 |
+
popup = document.getElementById( 'frm_field_group_popup' );
|
2922 |
+
if ( null === popup ) {
|
2923 |
+
popup = div();
|
2924 |
+
} else {
|
2925 |
+
popup.innerHTML = '';
|
2926 |
+
}
|
2927 |
+
|
2928 |
+
popup.id = 'frm_field_group_popup';
|
2929 |
+
|
2930 |
+
wrapper = div();
|
2931 |
+
wrapper.style.padding = '0 24px 12px';
|
2932 |
+
wrapper.appendChild( getRowLayoutTitle() );
|
2933 |
+
|
2934 |
+
rowLayoutOptions = getRowLayoutOptions( sizeOfFieldGroup );
|
2935 |
+
|
2936 |
+
ul = childElement.closest( 'ul.frm_sorting' );
|
2937 |
+
if ( null !== ul ) {
|
2938 |
+
maybeMarkRowLayoutAsActive( ul, rowLayoutOptions );
|
2939 |
+
}
|
2940 |
+
|
2941 |
+
wrapper.appendChild( rowLayoutOptions );
|
2942 |
+
|
2943 |
+
popup.appendChild( wrapper );
|
2944 |
+
popup.appendChild( separator() );
|
2945 |
+
|
2946 |
+
popup.appendChild( getCustomLayoutOption() );
|
2947 |
+
popup.appendChild( getBreakIntoDifferentRowsOption() );
|
2948 |
+
|
2949 |
+
return popup;
|
2950 |
+
}
|
2951 |
+
|
2952 |
+
function maybeMarkRowLayoutAsActive( activeRow, options ) {
|
2953 |
+
var length, index, currentRow;
|
2954 |
+
|
2955 |
+
length = options.children.length;
|
2956 |
+
for ( index = 0; index < length; ++index ) {
|
2957 |
+
currentRow = options.children[ index ];
|
2958 |
+
if ( rowLayoutsMatch( currentRow, activeRow ) ) {
|
2959 |
+
currentRow.classList.add( 'frm-active-row-layout' );
|
2960 |
+
return;
|
2961 |
+
}
|
2962 |
+
}
|
2963 |
+
}
|
2964 |
+
|
2965 |
+
function separator() {
|
2966 |
+
var hr = document.createElement( 'hr' );
|
2967 |
+
return hr;
|
2968 |
+
}
|
2969 |
+
|
2970 |
+
function getCustomLayoutOption() {
|
2971 |
+
var option = div();
|
2972 |
+
option.textContent = __( 'Custom layout', 'formidable' );
|
2973 |
+
jQuery( option ).prepend( getIconClone( 'frm_gear_svg' ) );
|
2974 |
+
option.classList.add( 'frm-custom-field-group-layout' );
|
2975 |
+
return option;
|
2976 |
+
}
|
2977 |
+
|
2978 |
+
function getIconClone( iconId ) {
|
2979 |
+
var clone = document.getElementById( iconId ).cloneNode( true );
|
2980 |
+
clone.id = '';
|
2981 |
+
return clone;
|
2982 |
+
}
|
2983 |
+
|
2984 |
+
function getBreakIntoDifferentRowsOption() {
|
2985 |
+
var option = div();
|
2986 |
+
option.textContent = __( 'Break into rows', 'formidable' );
|
2987 |
+
jQuery( option ).prepend( getIconClone( 'frm_break_field_group_svg' ) );
|
2988 |
+
option.classList.add( 'frm-break-field-group' );
|
2989 |
+
return option;
|
2990 |
+
}
|
2991 |
+
|
2992 |
+
function getRowLayoutTitle() {
|
2993 |
+
var rowLayoutTitle = div();
|
2994 |
+
rowLayoutTitle.classList.add( 'frm-row-layout-title' );
|
2995 |
+
rowLayoutTitle.textContent = __( 'Row Layout', 'formidable' );
|
2996 |
+
return rowLayoutTitle;
|
2997 |
+
}
|
2998 |
+
|
2999 |
+
function getRowLayoutOptions( size ) {
|
3000 |
+
var wrapper, padding;
|
3001 |
+
|
3002 |
+
wrapper = getEmptyGridContainer();
|
3003 |
+
if ( 5 !== size ) {
|
3004 |
+
wrapper.appendChild( getRowLayoutOption( size, 'even' ) );
|
3005 |
+
}
|
3006 |
+
if ( size % 2 === 1 ) {
|
3007 |
+
// only include the middle option for odd numbers because even doesn't make a lot of sense.
|
3008 |
+
wrapper.appendChild( getRowLayoutOption( size, 'middle' ) );
|
3009 |
+
}
|
3010 |
+
if ( size < 6 ) {
|
3011 |
+
wrapper.appendChild( getRowLayoutOption( size, 'left' ) );
|
3012 |
+
wrapper.appendChild( getRowLayoutOption( size, 'right' ) );
|
3013 |
+
} else {
|
3014 |
+
padding = div();
|
3015 |
+
padding.classList.add( 'frm_fourth' );
|
3016 |
+
wrapper.prepend( padding );
|
3017 |
+
}
|
3018 |
+
|
3019 |
+
return wrapper;
|
3020 |
+
}
|
3021 |
+
|
3022 |
+
function getRowLayoutOption( size, type ) {
|
3023 |
+
var option, useClass;
|
3024 |
+
|
3025 |
+
option = div();
|
3026 |
+
option.classList.add( 'frm-row-layout-option' );
|
3027 |
+
|
3028 |
+
switch ( size ) {
|
3029 |
+
case 6:
|
3030 |
+
useClass = 'frm_half';
|
3031 |
+
break;
|
3032 |
+
case 5:
|
3033 |
+
useClass = 'frm_third';
|
3034 |
+
break;
|
3035 |
+
default:
|
3036 |
+
useClass = size % 2 === 1 ? 'frm_fourth' : 'frm_third';
|
3037 |
+
break;
|
3038 |
+
}
|
3039 |
+
|
3040 |
+
option.classList.add( useClass );
|
3041 |
+
option.setAttribute( 'layout-type', type );
|
3042 |
+
|
3043 |
+
option.appendChild( getRowForSizeAndType( size, type ) );
|
3044 |
+
return option;
|
3045 |
+
}
|
3046 |
+
|
3047 |
+
function rowLayoutsMatch( row1, row2 ) {
|
3048 |
+
return getRowLayoutAsKey( row1 ) === getRowLayoutAsKey( row2 );
|
3049 |
+
}
|
3050 |
+
|
3051 |
+
function getRowLayoutAsKey( row ) {
|
3052 |
+
var $fields, sizes;
|
3053 |
+
if ( row.classList.contains( 'frm-row-layout-option' ) ) {
|
3054 |
+
$fields = jQuery( row ).find( '.frm_grid_container' ).children();
|
3055 |
+
} else {
|
3056 |
+
$fields = getFieldsInRow( jQuery( row ) );
|
3057 |
+
}
|
3058 |
+
sizes = [];
|
3059 |
+
$fields.each(
|
3060 |
+
function() {
|
3061 |
+
sizes.push( getSizeOfLayoutClass( getLayoutClassName( this.classList ) ) );
|
3062 |
+
}
|
3063 |
+
);
|
3064 |
+
return sizes.join( '-' );
|
3065 |
+
}
|
3066 |
+
|
3067 |
+
function getRowForSizeAndType( size, type ) {
|
3068 |
+
var row, index, block;
|
3069 |
+
|
3070 |
+
row = getEmptyGridContainer();
|
3071 |
+
for ( index = 0; index < size; ++index ) {
|
3072 |
+
block = div();
|
3073 |
+
block.classList.add( getClassForBlock( size, type, index ) );
|
3074 |
+
block.style.height = '16px';
|
3075 |
+
block.style.background = '#9EA9B8';
|
3076 |
+
block.style.borderRadius = '1px';
|
3077 |
+
row.appendChild( block );
|
3078 |
+
}
|
3079 |
+
|
3080 |
+
return row;
|
3081 |
+
}
|
3082 |
+
|
3083 |
+
/**
|
3084 |
+
* @param {int} size 2-6.
|
3085 |
+
* @param {string} type even, middle, left, or right.
|
3086 |
+
* @param {int} index 0-5.
|
3087 |
+
* @returns string
|
3088 |
+
*/
|
3089 |
+
function getClassForBlock( size, type, index ) {
|
3090 |
+
if ( 'even' === type ) {
|
3091 |
+
return getEvenClassForSize( size, index );
|
3092 |
+
} else if ( 'middle' === type ) {
|
3093 |
+
if ( 3 === size ) {
|
3094 |
+
return 1 === index ? 'frm6' : 'frm3';
|
3095 |
+
}
|
3096 |
+
if ( 5 === size ) {
|
3097 |
+
return 2 === index ? 'frm4' : 'frm2';
|
3098 |
+
}
|
3099 |
+
} else if ( 'left' === type ) {
|
3100 |
+
return 0 === index ? getLargeClassForSize( size ) : getSmallClassForSize( size );
|
3101 |
+
} else if ( 'right' === type ) {
|
3102 |
+
return index === size - 1 ? getLargeClassForSize( size ) : getSmallClassForSize( size );
|
3103 |
+
}
|
3104 |
+
return 'frm12';
|
3105 |
+
}
|
3106 |
+
|
3107 |
+
function getEvenClassForSize( size, index ) {
|
3108 |
+
if ( -1 !== [ 2, 3, 4, 6 ].indexOf( size ) ) {
|
3109 |
+
return getLayoutClassForSize( 12 / size );
|
3110 |
+
}
|
3111 |
+
if ( 5 === size && 'undefined' !== typeof index ) {
|
3112 |
+
return 0 === index ? 'frm4' : 'frm2';
|
3113 |
+
}
|
3114 |
+
return 'frm12';
|
3115 |
+
}
|
3116 |
+
|
3117 |
+
function getSmallClassForSize( size ) {
|
3118 |
+
switch ( size ) {
|
3119 |
+
case 2: case 3:
|
3120 |
+
return 'frm3';
|
3121 |
+
case 4:
|
3122 |
+
return 'frm2';
|
3123 |
+
case 5:
|
3124 |
+
return 'frm2';
|
3125 |
+
case 6:
|
3126 |
+
return 'frm1';
|
3127 |
+
}
|
3128 |
+
return 'frm12';
|
3129 |
+
}
|
3130 |
+
|
3131 |
+
function getLargeClassForSize( size ) {
|
3132 |
+
switch ( size ) {
|
3133 |
+
case 2:
|
3134 |
+
return 'frm9';
|
3135 |
+
case 3: case 4:
|
3136 |
+
return 'frm6';
|
3137 |
+
case 5:
|
3138 |
+
return 'frm4';
|
3139 |
+
case 6:
|
3140 |
+
return 'frm7';
|
3141 |
+
}
|
3142 |
+
return 'frm12';
|
3143 |
+
}
|
3144 |
+
|
3145 |
+
function getEmptyGridContainer() {
|
3146 |
+
var wrapper = div();
|
3147 |
+
wrapper.classList.add( 'frm_grid_container' );
|
3148 |
+
return wrapper;
|
3149 |
+
}
|
3150 |
+
|
3151 |
+
function div() {
|
3152 |
+
var element = document.createElement( 'div' );
|
3153 |
+
return element;
|
3154 |
+
}
|
3155 |
+
|
3156 |
+
function handleFieldGroupLayoutOptionClick() {
|
3157 |
+
var type, row;
|
3158 |
+
type = this.getAttribute( 'layout-type' );
|
3159 |
+
row = document.querySelector( '.frm-field-group-hover-target' );
|
3160 |
+
size = getFieldsInRow( jQuery( row ) ).length;
|
3161 |
+
syncLayoutClasses( getFieldsInRow( jQuery( row ) ).first(), type );
|
3162 |
+
destroyFieldGroupPopup();
|
3163 |
+
}
|
3164 |
+
|
3165 |
+
function handleFieldGroupLayoutOptionInsideMergeClick() {
|
3166 |
+
var $ul, type;
|
3167 |
+
$ul = mergeSelectedFieldGroups();
|
3168 |
+
type = this.getAttribute( 'layout-type' );
|
3169 |
+
syncLayoutClasses( getFieldsInRow( $ul ).first(), type );
|
3170 |
+
unselectFieldGroups();
|
3171 |
+
}
|
3172 |
+
|
3173 |
+
function mergeSelectedFieldGroups() {
|
3174 |
+
var $selectedFieldGroups = jQuery( '.frm-selected-field-group' ),
|
3175 |
+
$firstGroupUl = $selectedFieldGroups.first();
|
3176 |
+
$selectedFieldGroups.not( $firstGroupUl ).each(
|
3177 |
+
function() {
|
3178 |
+
getFieldsInRow( jQuery( this ) ).each(
|
3179 |
+
function() {
|
3180 |
+
var previousParent = this.parentNode;
|
3181 |
+
getFieldsInRow( $firstGroupUl ).last().after( this );
|
3182 |
+
if ( ! jQuery( previousParent ).children( 'li.form-field' ).length ) {
|
3183 |
+
// clean up the previous field group if we've removed all of its fields.
|
3184 |
+
previousParent.closest( 'li.frm_field_box' ).remove();
|
3185 |
+
}
|
3186 |
+
}
|
3187 |
+
);
|
3188 |
+
}
|
3189 |
+
);
|
3190 |
+
updateFieldOrder();
|
3191 |
+
syncLayoutClasses( getFieldsInRow( $firstGroupUl ).first() );
|
3192 |
+
return $firstGroupUl;
|
3193 |
+
}
|
3194 |
+
|
3195 |
+
function customFieldGroupLayoutClick() {
|
3196 |
+
var $fields;
|
3197 |
+
if ( null !== this.closest( '.frm-merge-fields-into-row' ) ) {
|
3198 |
+
return;
|
3199 |
+
}
|
3200 |
+
$fields = getFieldsInRow( jQuery( '.frm-field-group-hover-target' ) );
|
3201 |
+
setupCustomLayoutOptions( $fields );
|
3202 |
+
}
|
3203 |
+
|
3204 |
+
function setupCustomLayoutOptions( $fields ) {
|
3205 |
+
var size, popup, wrapper, layoutClass, inputRow, paddingElement, inputValueOverride, index, inputField, heading, label, buttonsWrapper, cancelButton, saveButton;
|
3206 |
+
|
3207 |
+
size = $fields.length;
|
3208 |
+
|
3209 |
+
popup = document.getElementById( 'frm_field_group_popup' );
|
3210 |
+
popup.innerHTML = '';
|
3211 |
+
|
3212 |
+
wrapper = div();
|
3213 |
+
wrapper.style.padding = '24px';
|
3214 |
+
|
3215 |
+
layoutClass = getEvenClassForSize( 5 === size ? 6 : size );
|
3216 |
+
|
3217 |
+
inputRow = div();
|
3218 |
+
inputRow.style.padding = '20px 0';
|
3219 |
+
inputRow.classList.add( 'frm_grid_container' );
|
3220 |
+
|
3221 |
+
if ( 5 === size ) {
|
3222 |
+
// add a span to pad the inputs by 1 column, to account for the missing 2 columns.
|
3223 |
+
paddingElement = document.createElement( 'span' );
|
3224 |
+
paddingElement.classList.add( 'frm1' );
|
3225 |
+
inputRow.appendChild( paddingElement );
|
3226 |
+
}
|
3227 |
+
|
3228 |
+
inputValueOverride = getSelectedFieldCount() > 0 ? getSizeOfLayoutClass( getEvenClassForSize( size ) ) : false;
|
3229 |
+
if ( false !== inputValueOverride && inputValueOverride >= 12 ) {
|
3230 |
+
inputValueOverride = Math.floor( 12 / size );
|
3231 |
+
}
|
3232 |
+
|
3233 |
+
for ( index = 0; index < size; ++index ) {
|
3234 |
+
inputField = document.createElement( 'input' );
|
3235 |
+
inputField.type = 'text';
|
3236 |
+
inputField.classList.add( layoutClass );
|
3237 |
+
inputField.classList.add( 'frm-custom-grid-size-input' );
|
3238 |
+
inputField.value = false !== inputValueOverride ? inputValueOverride : getSizeOfLayoutClass( getLayoutClassName( $fields.get( index ).classList ) );
|
3239 |
+
inputRow.appendChild( inputField );
|
3240 |
+
}
|
3241 |
+
|
3242 |
+
heading = div();
|
3243 |
+
heading.classList.add( 'frm-builder-popup-heading' );
|
3244 |
+
heading.textContent = __( 'Enter number of columns for each field', 'formidable' );
|
3245 |
+
|
3246 |
+
label = div();
|
3247 |
+
label.classList.add( 'frm-builder-popup-subheading' );
|
3248 |
+
label.textContent = __( 'Layouts are based on a 12-column grid system', 'formidable' );
|
3249 |
+
|
3250 |
+
wrapper.appendChild( heading );
|
3251 |
+
wrapper.appendChild( label );
|
3252 |
+
|
3253 |
+
wrapper.appendChild( inputRow );
|
3254 |
+
|
3255 |
+
buttonsWrapper = div();
|
3256 |
+
buttonsWrapper.style.textAlign = 'right';
|
3257 |
+
|
3258 |
+
cancelButton = getSecondaryButton();
|
3259 |
+
cancelButton.textContent = __( 'Cancel', 'formidable' );
|
3260 |
+
cancelButton.classList.add( 'frm-cancel-custom-field-group-layout' );
|
3261 |
+
cancelButton.style.marginRight = '10px';
|
3262 |
+
|
3263 |
+
saveButton = getPrimaryButton();
|
3264 |
+
saveButton.textContent = __( 'Save', 'formidable' );
|
3265 |
+
saveButton.classList.add( 'frm-save-custom-field-group-layout' );
|
3266 |
+
|
3267 |
+
buttonsWrapper.appendChild( cancelButton );
|
3268 |
+
buttonsWrapper.appendChild( saveButton );
|
3269 |
+
|
3270 |
+
wrapper.appendChild( buttonsWrapper );
|
3271 |
+
|
3272 |
+
popup.appendChild( wrapper );
|
3273 |
+
}
|
3274 |
+
|
3275 |
+
function customFieldGroupLayoutInsideMergeClick() {
|
3276 |
+
$fields = jQuery( '.frm-selected-field-group li.form-field' );
|
3277 |
+
setupCustomLayoutOptions( $fields );
|
3278 |
+
}
|
3279 |
+
|
3280 |
+
function getPrimaryButton() {
|
3281 |
+
var button = getButton();
|
3282 |
+
button.classList.add( 'button-primary', 'frm-button-primary' );
|
3283 |
+
return button;
|
3284 |
+
}
|
3285 |
+
|
3286 |
+
function getSecondaryButton() {
|
3287 |
+
var button = getButton();
|
3288 |
+
button.classList.add( 'button-secondary', 'frm-button-secondary' );
|
3289 |
+
return button;
|
3290 |
+
}
|
3291 |
+
|
3292 |
+
function getButton() {
|
3293 |
+
var button = document.createElement( 'a' );
|
3294 |
+
button.setAttribute( 'href', '#' );
|
3295 |
+
button.classList.add( 'button' );
|
3296 |
+
button.style.textDecoration = 'none';
|
3297 |
+
return button;
|
3298 |
+
}
|
3299 |
+
|
3300 |
+
function getSizeOfLayoutClass( className ) {
|
3301 |
+
switch ( className ) {
|
3302 |
+
case 'frm_half':
|
3303 |
+
return 6;
|
3304 |
+
case 'frm_third':
|
3305 |
+
return 4;
|
3306 |
+
case 'frm_two_thirds':
|
3307 |
+
return 8;
|
3308 |
+
case 'frm_fourth':
|
3309 |
+
return 3;
|
3310 |
+
case 'frm_three_fourths':
|
3311 |
+
return 9;
|
3312 |
+
case 'frm_sixth':
|
3313 |
+
return 2;
|
3314 |
+
}
|
3315 |
+
|
3316 |
+
if ( 0 === className.indexOf( 'frm' ) ) {
|
3317 |
+
return parseInt( className.substr( 3 ) );
|
3318 |
+
}
|
3319 |
+
|
3320 |
+
// Anything missing a layout class should be a full width row.
|
3321 |
+
return 12;
|
3322 |
+
}
|
3323 |
+
|
3324 |
+
function getLayoutClassName( classList ) {
|
3325 |
+
var classes, index, currentClass;
|
3326 |
+
classes = getLayoutClasses();
|
3327 |
+
for ( index = 0; index < classes.length; ++index ) {
|
3328 |
+
currentClass = classes[ index ];
|
3329 |
+
if ( classList.contains( currentClass ) ) {
|
3330 |
+
return currentClass;
|
3331 |
+
}
|
3332 |
+
}
|
3333 |
+
return '';
|
3334 |
+
}
|
3335 |
+
|
3336 |
+
function getLayoutClassForSize( size ) {
|
3337 |
+
return 'frm' + size;
|
3338 |
}
|
3339 |
|
3340 |
+
function breakFieldGroupClick() {
|
3341 |
+
var row = document.querySelector( '.frm-field-group-hover-target' );
|
3342 |
+
breakRow( row );
|
3343 |
+
destroyFieldGroupPopup();
|
3344 |
}
|
3345 |
|
3346 |
+
function breakRow( row ) {
|
3347 |
+
getFieldsInRow( jQuery( row ) ).each(
|
3348 |
+
function( index ) {
|
3349 |
+
if ( 0 !== index ) {
|
3350 |
+
jQuery( row ).closest( 'li' ).after( wrapFieldLi( this ) );
|
3351 |
+
}
|
3352 |
+
stripLayoutFromFields( jQuery( this ) );
|
3353 |
+
}
|
3354 |
+
);
|
3355 |
+
}
|
3356 |
|
3357 |
+
function stripLayoutFromFields( field ) {
|
3358 |
+
syncLayoutClasses( field, 'clear' );
|
3359 |
+
}
|
3360 |
|
3361 |
+
function focusFieldGroupInputOnClick() {
|
3362 |
+
this.select();
|
|
|
|
|
|
|
3363 |
}
|
3364 |
|
3365 |
+
function cancelCustomFieldGroupClick() {
|
3366 |
+
revertToFieldGroupPopupFirstPage( this );
|
|
|
|
|
3367 |
}
|
3368 |
|
3369 |
+
function revertToFieldGroupPopupFirstPage( triggerElement ) {
|
3370 |
+
jQuery( document.getElementById( 'frm_field_group_popup' ) ).replaceWith(
|
3371 |
+
getFieldGroupPopup( getSizeOfFieldGroupFromChildElement( triggerElement ), triggerElement )
|
3372 |
+
);
|
3373 |
}
|
3374 |
|
3375 |
+
function destroyFieldGroupPopup() {
|
3376 |
+
var popup, wrapper;
|
3377 |
+
popup = document.getElementById( 'frm_field_group_popup' );
|
3378 |
+
if ( popup === null ) {
|
3379 |
+
return;
|
3380 |
+
}
|
3381 |
+
wrapper = document.querySelector( '.frm-has-open-field-group-popup' );
|
3382 |
+
if ( null !== wrapper ) {
|
3383 |
+
wrapper.classList.remove( 'frm-has-open-field-group-popup' );
|
3384 |
+
popup.parentNode.remove();
|
3385 |
+
}
|
3386 |
+
jQuery( document ).off( 'click', '#frm_builder_page', destroyFieldGroupPopupOnOutsideClick );
|
3387 |
+
}
|
3388 |
|
3389 |
+
function saveCustomFieldGroupClick() {
|
3390 |
+
var syncDetails, $controls, $ul;
|
3391 |
|
3392 |
+
syncDetails = [];
|
3393 |
|
3394 |
+
jQuery( document.getElementById( 'frm_field_group_popup' ).querySelectorAll( '.frm_grid_container input' ) )
|
3395 |
+
.each(
|
3396 |
+
function() {
|
3397 |
+
syncDetails.push( parseInt( this.value ) );
|
3398 |
+
}
|
3399 |
+
);
|
3400 |
|
3401 |
+
$controls = jQuery( document.getElementById( 'frm_field_group_controls' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3402 |
|
3403 |
+
if ( $controls.length && 'none' !== $controls.get( 0 ).style.display ) {
|
3404 |
+
syncLayoutClasses( getFieldsInRow( jQuery( document.querySelector( '.frm-field-group-hover-target' ) ) ).first(), syncDetails );
|
3405 |
+
} else {
|
3406 |
+
$ul = mergeSelectedFieldGroups();
|
3407 |
+
syncLayoutClasses( getFieldsInRow( $ul ).first(), syncDetails );
|
3408 |
+
unselectFieldGroups();
|
3409 |
+
}
|
3410 |
+
|
3411 |
+
destroyFieldGroupPopup();
|
3412 |
}
|
3413 |
|
3414 |
+
function fieldGroupClick( e ) {
|
3415 |
+
var hoverTarget, ctrlOrCmdKeyIsDown, shiftKeyIsDown, groupIsActive, $selectedFieldGroups, numberOfSelectedGroups, selectedField, $firstGroup, $range;
|
|
|
|
|
|
|
3416 |
|
3417 |
+
if ( 'ul' !== e.originalEvent.target.nodeName.toLowerCase() ) {
|
3418 |
+
// only continue if the group itself was clicked / ignore when a field is clicked.
|
3419 |
+
return;
|
3420 |
+
}
|
3421 |
|
3422 |
+
hoverTarget = document.querySelector( '.frm-field-group-hover-target' );
|
3423 |
+
if ( hoverTarget === null ) {
|
3424 |
+
return;
|
3425 |
+
}
|
3426 |
+
|
3427 |
+
ctrlOrCmdKeyIsDown = e.ctrlKey || e.metaKey;
|
3428 |
+
shiftKeyIsDown = e.shiftKey;
|
3429 |
+
groupIsActive = hoverTarget.classList.contains( 'frm-selected-field-group' );
|
3430 |
+
$selectedFieldGroups = jQuery( '.frm-selected-field-group' );
|
3431 |
+
numberOfSelectedGroups = $selectedFieldGroups.length;
|
3432 |
+
|
3433 |
+
if ( ctrlOrCmdKeyIsDown || shiftKeyIsDown ) {
|
3434 |
+
// multi-selecting
|
3435 |
+
|
3436 |
+
selectedField = document.querySelector( 'li.form-field.selected' );
|
3437 |
+
if ( null !== selectedField && ! jQuery( selectedField ).siblings( 'li.form-field' ).length ) {
|
3438 |
+
// count a selected field on its own as a selected field group when multiselecting.
|
3439 |
+
selectedField.parentNode.classList.add( 'frm-selected-field-group' );
|
3440 |
+
++numberOfSelectedGroups;
|
3441 |
+
}
|
3442 |
+
|
3443 |
+
if ( ctrlOrCmdKeyIsDown ) {
|
3444 |
+
if ( groupIsActive ) {
|
3445 |
+
// unselect if holding ctrl or cmd and the group was already active.
|
3446 |
+
--numberOfSelectedGroups;
|
3447 |
+
hoverTarget.classList.remove( 'frm-selected-field-group' );
|
3448 |
+
syncAfterMultiSelect( numberOfSelectedGroups );
|
3449 |
+
return; // exit early to avoid adding back frm-selected-field-group
|
3450 |
+
} else {
|
3451 |
+
++numberOfSelectedGroups;
|
3452 |
+
}
|
3453 |
+
} else if ( shiftKeyIsDown && ! groupIsActive ) {
|
3454 |
+
++numberOfSelectedGroups; // include the one we're selecting right now.
|
3455 |
+
$firstGroup = $selectedFieldGroups.first();
|
3456 |
+
|
3457 |
+
if ( $firstGroup.parent().index() < jQuery( hoverTarget.parentNode ).index() ) {
|
3458 |
+
$range = $firstGroup.parent().nextUntil( hoverTarget.parentNode );
|
3459 |
+
} else {
|
3460 |
+
$range = $firstGroup.parent().prevUntil( hoverTarget.parentNode );
|
3461 |
+
}
|
3462 |
+
|
3463 |
+
$range.each(
|
3464 |
+
function() {
|
3465 |
+
var $fieldGroup = jQuery( this ).closest( 'li' ).find( 'ul.frm_sorting' );
|
3466 |
+
if ( ! $fieldGroup.hasClass( 'frm-selected-field-group' ) ) {
|
3467 |
+
++numberOfSelectedGroups;
|
3468 |
+
$fieldGroup.addClass( 'frm-selected-field-group' );
|
3469 |
+
}
|
3470 |
+
}
|
3471 |
+
);
|
3472 |
+
|
3473 |
+
// when holding shift and clicking, text gets selected. unselect it.
|
3474 |
+
document.getSelection().removeAllRanges();
|
3475 |
+
}
|
3476 |
+
} else {
|
3477 |
+
// not multi-selecting
|
3478 |
+
unselectFieldGroups();
|
3479 |
+
}
|
3480 |
+
|
3481 |
+
hoverTarget.classList.add( 'frm-selected-field-group' );
|
3482 |
+
syncAfterMultiSelect( numberOfSelectedGroups );
|
3483 |
+
|
3484 |
+
jQuery( document ).off( 'click', unselectFieldGroups );
|
3485 |
+
jQuery( document ).on( 'click', unselectFieldGroups );
|
3486 |
}
|
3487 |
|
3488 |
+
function syncAfterMultiSelect( numberOfSelectedGroups ) {
|
3489 |
+
clearSettingsBox( true ); // unselect any fields if one is selected.
|
3490 |
+
if ( numberOfSelectedGroups >= 2 ) {
|
3491 |
+
addFieldMultiselectPopup();
|
|
|
3492 |
} else {
|
3493 |
+
maybeRemoveMultiselectPopup();
|
3494 |
}
|
3495 |
+
maybeRemoveGroupHoverTarget();
|
3496 |
}
|
3497 |
|
3498 |
+
function unselectFieldGroups( event ) {
|
3499 |
+
if ( 'undefined' !== typeof event ) {
|
3500 |
+
if ( null !== event.originalEvent.target.closest( '#frm-show-fields' ) ) {
|
3501 |
+
return;
|
3502 |
+
}
|
3503 |
+
if ( event.originalEvent.target.classList.contains( 'frm-merge-fields-into-row' ) ) {
|
3504 |
+
return;
|
3505 |
+
}
|
3506 |
+
if ( null !== event.originalEvent.target.closest( '.frm-merge-fields-into-row' ) ) {
|
3507 |
+
return;
|
3508 |
+
}
|
3509 |
+
if ( event.originalEvent.target.classList.contains( 'frm-custom-field-group-layout' ) ) {
|
3510 |
+
return;
|
3511 |
+
}
|
3512 |
+
if ( event.originalEvent.target.classList.contains( 'frm-cancel-custom-field-group-layout' ) ) {
|
3513 |
+
return;
|
3514 |
+
}
|
3515 |
}
|
3516 |
+
jQuery( '.frm-selected-field-group' ).removeClass( 'frm-selected-field-group' );
|
3517 |
+
jQuery( document ).off( 'click', unselectFieldGroups );
|
3518 |
+
maybeRemoveMultiselectPopup();
|
3519 |
}
|
3520 |
|
3521 |
+
function maybeRemoveMultiselectPopup() {
|
3522 |
+
var popup = document.getElementById( 'frm_field_multiselect_popup' );
|
3523 |
+
if ( null !== popup ) {
|
3524 |
+
popup.remove();
|
3525 |
+
}
|
3526 |
}
|
3527 |
|
3528 |
+
function addFieldMultiselectPopup() {
|
3529 |
+
getFieldMultiselectPopup();
|
3530 |
+
}
|
|
|
|
|
|
|
3531 |
|
3532 |
+
function getFieldMultiselectPopup() {
|
3533 |
+
var popup, mergeOption, caret, verticalSeparator, deleteOption;
|
3534 |
|
3535 |
+
popup = document.getElementById( 'frm_field_multiselect_popup' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3536 |
|
3537 |
+
if ( null !== popup ) {
|
3538 |
+
popup.classList.toggle( 'frm-unmergable', ! selectedFieldsAreMergable() );
|
3539 |
+
return popup;
|
3540 |
+
}
|
|
|
|
|
3541 |
|
3542 |
+
popup = div();
|
3543 |
+
popup.id = 'frm_field_multiselect_popup';
|
3544 |
+
if ( ! selectedFieldsAreMergable() ) {
|
3545 |
+
popup.classList.add( 'frm-unmergable' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3546 |
}
|
3547 |
+
|
3548 |
+
mergeOption = div();
|
3549 |
+
mergeOption.classList.add( 'frm-merge-fields-into-row' );
|
3550 |
+
mergeOption.textContent = __( 'Merge into row', 'formidable' );
|
3551 |
+
|
3552 |
+
caret = document.createElement( 'a' );
|
3553 |
+
caret.style.marginLeft = '5px';
|
3554 |
+
caret.classList.add( 'frm_icon_font', 'frm_arrowdown6_icon' );
|
3555 |
+
caret.setAttribute( 'href', '#' );
|
3556 |
+
mergeOption.appendChild( caret );
|
3557 |
+
|
3558 |
+
popup.appendChild( mergeOption );
|
3559 |
+
|
3560 |
+
verticalSeparator = div();
|
3561 |
+
verticalSeparator.classList.add( 'frm-multiselect-popup-separator' );
|
3562 |
+
popup.appendChild( verticalSeparator );
|
3563 |
+
|
3564 |
+
deleteOption = div();
|
3565 |
+
deleteOption.classList.add( 'frm-delete-field-groups' );
|
3566 |
+
deleteOption.appendChild( getIconClone( 'frm_trash_svg' ) );
|
3567 |
+
popup.appendChild( deleteOption );
|
3568 |
+
|
3569 |
+
document.getElementById( 'post-body-content' ).appendChild( popup );
|
3570 |
+
|
3571 |
+
jQuery( popup ).hide().fadeIn();
|
3572 |
+
|
3573 |
+
return popup;
|
3574 |
}
|
3575 |
|
3576 |
+
function selectedFieldsAreMergable() {
|
3577 |
+
var selectedFieldGroups, totalFieldCount, length, index, fieldGroup;
|
3578 |
+
selectedFieldGroups = document.querySelectorAll( '.frm-selected-field-group' );
|
3579 |
+
length = selectedFieldGroups.length;
|
3580 |
+
totalFieldCount = 0;
|
3581 |
+
for ( index = 0; index < length; ++index ) {
|
3582 |
+
fieldGroup = selectedFieldGroups[ index ];
|
3583 |
+
if ( null !== fieldGroup.querySelector( '.edit_field_type_break, .edit_field_type_hidden' ) ) {
|
3584 |
+
return false;
|
3585 |
+
}
|
3586 |
+
totalFieldCount += getFieldsInRow( jQuery( fieldGroup ) ).length;
|
3587 |
+
if ( totalFieldCount > 6 ) {
|
3588 |
+
return false;
|
3589 |
+
}
|
3590 |
}
|
3591 |
+
return true;
|
3592 |
}
|
3593 |
|
3594 |
+
function mergeFieldsIntoRowClick( event ) {
|
3595 |
+
var size, popup;
|
|
|
|
|
|
|
|
|
|
|
3596 |
|
3597 |
+
if ( null !== event.originalEvent.target.closest( '#frm_field_group_popup' ) ) {
|
3598 |
+
// prevent clicks within the popup from triggering the button again.
|
3599 |
+
return;
|
3600 |
}
|
3601 |
|
3602 |
+
if ( event.originalEvent.target.classList.contains( 'frm-custom-field-group-layout' ) ) {
|
3603 |
+
// avoid switching back to the first page when clicking the custom option nested inside of the merge option.
|
3604 |
+
return;
|
|
|
3605 |
}
|
3606 |
|
3607 |
+
size = getSelectedFieldCount();
|
3608 |
+
popup = getFieldGroupPopup( size, document.querySelector( '.frm-selected-field-group' ).firstChild );
|
3609 |
+
this.appendChild( popup );
|
3610 |
+
}
|
3611 |
|
3612 |
+
function getSelectedFieldCount() {
|
3613 |
+
var count = 0;
|
3614 |
+
jQuery( document.querySelectorAll( '.frm-selected-field-group' ) ).each(
|
3615 |
+
function() {
|
3616 |
+
count += getFieldsInRow( jQuery( this ) ).length;
|
3617 |
+
}
|
3618 |
+
);
|
3619 |
+
return count;
|
3620 |
+
}
|
3621 |
+
|
3622 |
+
function deleteFieldGroupsClick() {
|
3623 |
+
var fieldIdsToDelete, deleteOnConfirm;
|
3624 |
+
|
3625 |
+
fieldIdsToDelete = getSelectedFieldIds();
|
3626 |
+
deleteOnConfirm = getDeleteSelectedFieldGroupsOnConfirmFunction( fieldIdsToDelete );
|
3627 |
+
document.getElementById( 'frm_field_multiselect_popup' ).remove();
|
3628 |
+
|
3629 |
+
this.setAttribute( 'data-frmcaution', __( 'Heads up', 'formidable' ) );
|
3630 |
+
/* translators: %1$s: Number of fields that are selected to be deleted. */
|
3631 |
+
this.setAttribute( 'data-frmverify', __( 'Are you sure you want to delete these %1$s selected fields?', 'formidable' ).replace( '%1$s', fieldIdsToDelete.length ) );
|
3632 |
confirmLinkClick( this );
|
3633 |
+
|
3634 |
+
jQuery( '#frm-confirmed-click' ).on( 'click', deleteOnConfirm );
|
3635 |
+
jQuery( '#frm_confirm_modal' ).one( 'dialogclose', function() {
|
3636 |
+
jQuery( '#frm-confirmed-click' ).off( 'click', deleteOnConfirm );
|
3637 |
+
});
|
3638 |
+
}
|
3639 |
+
|
3640 |
+
function getSelectedFieldIds() {
|
3641 |
+
var deleteFieldIds = [];
|
3642 |
+
jQuery( '.frm-selected-field-group > li.form-field' )
|
3643 |
+
.not( '.ui-sortable-helper' )
|
3644 |
+
.each(
|
3645 |
+
function() {
|
3646 |
+
deleteFieldIds.push( this.dataset.fid );
|
3647 |
+
}
|
3648 |
+
);
|
3649 |
+
return deleteFieldIds;
|
3650 |
+
}
|
3651 |
+
|
3652 |
+
function getDeleteSelectedFieldGroupsOnConfirmFunction( deleteFieldIds ) {
|
3653 |
+
return function( event ) {
|
3654 |
+
event.preventDefault();
|
3655 |
+
deleteAllSelectedFieldGroups( deleteFieldIds );
|
3656 |
+
};
|
3657 |
+
}
|
3658 |
+
|
3659 |
+
function deleteAllSelectedFieldGroups( deleteFieldIds ) {
|
3660 |
+
deleteFieldIds.forEach(
|
3661 |
+
function( fieldId ) {
|
3662 |
+
deleteField( fieldId );
|
3663 |
+
}
|
3664 |
+
);
|
3665 |
}
|
3666 |
|
3667 |
function deleteFieldConfirmed() {
|
3706 |
|
3707 |
$thisField.fadeOut( 'slow', function() {
|
3708 |
var $section = $thisField.closest( '.start_divider' ),
|
3709 |
+
type = $thisField.data( 'type' ),
|
3710 |
+
$adjacentFields = $thisField.siblings( 'li.form-field' ),
|
3711 |
+
$liWrapper;
|
3712 |
+
|
3713 |
+
if ( ! $adjacentFields.length ) {
|
3714 |
+
if ( $thisField.is( '.edit_field_type_end_divider' ) ) {
|
3715 |
+
$adjacentFields.length = $thisField.closest( 'li.form-field' ).siblings();
|
3716 |
+
} else {
|
3717 |
+
$liWrapper = $thisField.closest( 'ul.frm_sorting' ).parent();
|
3718 |
+
}
|
3719 |
+
}
|
3720 |
+
|
3721 |
$thisField.remove();
|
3722 |
if ( type === 'break' ) {
|
3723 |
renumberPageBreaks();
|
3735 |
} else if ( $section.length ) {
|
3736 |
toggleOneSectionHolder( $section );
|
3737 |
}
|
3738 |
+
if ( $adjacentFields.length ) {
|
3739 |
+
syncLayoutClasses( $adjacentFields.first() );
|
3740 |
+
} else {
|
3741 |
+
$liWrapper.remove();
|
3742 |
+
}
|
3743 |
});
|
3744 |
}
|
3745 |
});
|
4163 |
|
4164 |
function clickVis( e ) {
|
4165 |
/*jshint validthis:true */
|
4166 |
+
var currentClass, originalList;
|
4167 |
+
|
4168 |
+
currentClass = e.target.classList;
|
4169 |
+
|
4170 |
+
if ( currentClass.contains( 'frm-collapse-page' ) || currentClass.contains( 'frm-sub-label' ) || e.target.closest( '.dropdown' ) !== null ) {
|
4171 |
return;
|
4172 |
}
|
4173 |
|
4174 |
if ( this.closest( '.start_divider' ) !== null ) {
|
4175 |
e.stopPropagation();
|
4176 |
}
|
4177 |
+
|
4178 |
+
if ( this.classList.contains( 'edit_field_type_divider' ) ) {
|
4179 |
+
originalList = e.originalEvent.target.closest( 'ul.frm_sorting' );
|
4180 |
+
if ( null !== originalList ) {
|
4181 |
+
// prevent section click if clicking a field group within a section.
|
4182 |
+
if ( originalList.classList.contains( 'edit_field_type_divider' ) || originalList.parentNode.parentNode.classList.contains( 'start_divider' ) ) {
|
4183 |
+
return;
|
4184 |
+
}
|
4185 |
+
}
|
4186 |
+
}
|
4187 |
+
|
4188 |
clickAction( this );
|
4189 |
}
|
4190 |
|
4822 |
}
|
4823 |
|
4824 |
function updateFieldOrder() {
|
4825 |
+
var fields, fieldId, field, currentOrder, newOrder;
|
4826 |
renumberPageBreaks();
|
4827 |
jQuery( '#frm-show-fields' ).each( function( i ) {
|
4828 |
+
fields = jQuery( 'li.frm_field_box', this );
|
4829 |
for ( i = 0; i < fields.length; i++ ) {
|
4830 |
+
fieldId = fields[ i ].getAttribute( 'data-fid' );
|
4831 |
+
field = jQuery( 'input[name="field_options[field_order_' + fieldId + ']"]' );
|
4832 |
+
currentOrder = field.val();
|
4833 |
+
newOrder = i + 1;
|
4834 |
|
4835 |
if ( currentOrder != newOrder ) {
|
4836 |
field.val( newOrder );
|
4837 |
singleField = document.getElementById( 'frm-single-settings-' + fieldId );
|
4838 |
|
4839 |
moveFieldSettings( singleField );
|
4840 |
+
fieldUpdated();
|
4841 |
}
|
4842 |
}
|
4843 |
});
|
4844 |
}
|
4845 |
|
4846 |
function toggleSectionHolder() {
|
4847 |
+
document.querySelectorAll( '.start_divider' ).forEach(
|
4848 |
+
function( divider ) {
|
4849 |
+
toggleOneSectionHolder( jQuery( divider ) );
|
4850 |
+
}
|
4851 |
+
);
|
4852 |
}
|
4853 |
|
4854 |
function toggleOneSectionHolder( $section ) {
|
4855 |
+
var noSectionFields, $rows, length, index, sectionHasFields;
|
4856 |
+
|
4857 |
+
if ( ! $section.length ) {
|
4858 |
return;
|
4859 |
}
|
4860 |
|
4861 |
+
$rows = $section.find( 'ul.frm_sorting' );
|
4862 |
+
sectionHasFields = false;
|
4863 |
+
length = $rows.length;
|
4864 |
+
for ( index = 0; index < length; ++index ) {
|
4865 |
+
if ( 0 !== getFieldsInRow( jQuery( $rows.get( index ) ) ).length ) {
|
4866 |
+
sectionHasFields = true;
|
4867 |
+
break;
|
4868 |
+
}
|
4869 |
}
|
4870 |
+
|
4871 |
+
noSectionFields = $section.parent().children( '.frm_no_section_fields' ).get( 0 );
|
4872 |
+
noSectionFields.classList.toggle( 'frm_block', ! sectionHasFields );
|
4873 |
}
|
4874 |
|
4875 |
function slideDown() {
|
5458 |
|
5459 |
deselectFields();
|
5460 |
$thisobj.addClass( 'selected' );
|
|
|
5461 |
showFieldOptions( obj );
|
5462 |
}
|
5463 |
|
8273 |
},
|
8274 |
|
8275 |
buildInit: function() {
|
8276 |
+
var loadFieldId, $builderForm, builderArea;
|
8277 |
+
|
8278 |
if ( jQuery( '.frm_field_loading' ).length ) {
|
8279 |
+
loadFieldId = jQuery( '.frm_field_loading' ).first().attr( 'id' );
|
8280 |
loadFields( loadFieldId );
|
8281 |
}
|
8282 |
|
8283 |
setupSortable( 'ul.frm_sorting' );
|
8284 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8285 |
jQuery( '.field_type_list > li:not(.frm_noallow)' ).draggable({
|
8286 |
connectToSortable: '#frm-show-fields',
|
8287 |
helper: 'clone',
|
8311 |
initiateMultiselect();
|
8312 |
renumberPageBreaks();
|
8313 |
|
8314 |
+
$builderForm = jQuery( builderForm );
|
8315 |
+
builderArea = document.getElementById( 'frm_form_editor_container' );
|
8316 |
$builderForm.on( 'click', '.frm_add_logic_row', addFieldLogicRow );
|
8317 |
$builderForm.on( 'click', '.frm_add_watch_lookup_row', addWatchLookupRow );
|
8318 |
$builderForm.on( 'change', '.frm_get_values_form', updateGetValueFieldSelection );
|
8353 |
$newFields.on( 'mousedown', 'input, textarea, select', stopFieldFocus );
|
8354 |
$newFields.on( 'click', 'input[type=radio], input[type=checkbox]', stopFieldFocus );
|
8355 |
$newFields.on( 'click', '.frm_delete_field', clickDeleteField );
|
8356 |
+
$newFields.on( 'click', '.frm_select_field', clickSelectField );
|
8357 |
+
jQuery( document ).on( 'click', '#frm_field_group_controls > span:first-child', clickFieldGroupLayout );
|
8358 |
+
jQuery( document ).on( 'click', '.frm-row-layout-option', handleFieldGroupLayoutOptionClick );
|
8359 |
+
jQuery( document ).on( 'click', '.frm-merge-fields-into-row .frm-row-layout-option', handleFieldGroupLayoutOptionInsideMergeClick );
|
8360 |
+
jQuery( document ).on( 'click', '.frm-custom-field-group-layout', customFieldGroupLayoutClick );
|
8361 |
+
jQuery( document ).on( 'click', '.frm-merge-fields-into-row .frm-custom-field-group-layout', customFieldGroupLayoutInsideMergeClick );
|
8362 |
+
jQuery( document ).on( 'click', '.frm-break-field-group', breakFieldGroupClick );
|
8363 |
+
$newFields.on( 'click', '#frm_field_group_popup .frm_grid_container input', focusFieldGroupInputOnClick );
|
8364 |
+
jQuery( document ).on( 'click', '.frm-cancel-custom-field-group-layout', cancelCustomFieldGroupClick );
|
8365 |
+
jQuery( document ).on( 'click', '.frm-save-custom-field-group-layout', saveCustomFieldGroupClick );
|
8366 |
+
$newFields.on( 'click', 'ul.frm_sorting', fieldGroupClick );
|
8367 |
+
jQuery( document ).on( 'click', '.frm-merge-fields-into-row', mergeFieldsIntoRowClick );
|
8368 |
+
jQuery( document ).on( 'click', '.frm-delete-field-groups', deleteFieldGroupsClick );
|
8369 |
+
$newFields.on( 'click', '.frm-field-action-icons [data-toggle="dropdown"]', function() {
|
8370 |
+
this.closest( 'li.form-field' ).classList.add( 'frm-field-settings-open' );
|
8371 |
+
jQuery( document ).on( 'click', '#frm_builder_page', handleClickOutsideOfFieldSettings );
|
8372 |
+
});
|
8373 |
+
$newFields.on( 'mousemove', 'ul.frm_sorting', checkForMultiselectKeysOnMouseMove );
|
8374 |
+
$newFields.on( 'show.bs.dropdown', '.frm-field-action-icons', onFieldActionDropdownShow );
|
8375 |
$builderForm.on( 'click', '.frm_single_option a[data-removeid]', deleteFieldOption );
|
8376 |
$builderForm.on( 'mousedown', '.frm_single_option input[type=radio]', maybeUncheckRadio );
|
8377 |
$builderForm.on( 'focusin', '.frm_single_option input[type=text]', maybeClearOptText );
|
8399 |
$builderForm.on( 'change', 'select[name^="field_options[form_select_"]', maybeChangeEmbedFormMsg );
|
8400 |
|
8401 |
jQuery( document ).on( 'submit', '#frm_js_build_form', buildSubmittedNoAjax );
|
8402 |
+
jQuery( document ).on( 'change', '#frm_builder_page input:not(.frm-search-input):not(.frm-custom-grid-size-input), #frm_builder_page select, #frm_builder_page textarea', fieldUpdated );
|
8403 |
|
8404 |
popAllProductFields();
|
8405 |
|
8413 |
maybeDisableAddSummaryBtn();
|
8414 |
maybeHideQuantityProductFieldOption();
|
8415 |
handleNameFieldOnFormBuilder();
|
8416 |
+
toggleSectionHolder();
|
8417 |
},
|
8418 |
|
8419 |
settingsInit: function() {
|
js/formidable_admin_global.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
var frmWidgets, frmAdminPopup;
|
6 |
|
7 |
jQuery( document ).ready( function() {
|
8 |
-
var deauthLink,
|
9 |
installLink = document.getElementById( 'frm_install_link' );
|
10 |
if ( installLink !== null ) {
|
11 |
jQuery( installLink ).on( 'click', frmInstallPro );
|
@@ -19,6 +19,14 @@ jQuery( document ).ready( function() {
|
|
19 |
if ( typeof tb_remove === 'function' ) { // eslint-disable-line camelcase
|
20 |
frmAdminPopup.init();
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
});
|
23 |
|
24 |
function frm_install_now() { // eslint-disable-line camelcase
|
5 |
var frmWidgets, frmAdminPopup;
|
6 |
|
7 |
jQuery( document ).ready( function() {
|
8 |
+
var deauthLink, submenuItem, li,
|
9 |
installLink = document.getElementById( 'frm_install_link' );
|
10 |
if ( installLink !== null ) {
|
11 |
jQuery( installLink ).on( 'click', frmInstallPro );
|
19 |
if ( typeof tb_remove === 'function' ) { // eslint-disable-line camelcase
|
20 |
frmAdminPopup.init();
|
21 |
}
|
22 |
+
|
23 |
+
submenuItem = document.querySelector( '.frm-upgrade-submenu' );
|
24 |
+
if ( null !== submenuItem ) {
|
25 |
+
li = submenuItem.parentNode.parentNode;
|
26 |
+
if ( li ) {
|
27 |
+
li.classList.add( 'frm-submenu-highlight' );
|
28 |
+
}
|
29 |
+
}
|
30 |
});
|
31 |
|
32 |
function frm_install_now() { // eslint-disable-line camelcase
|
js/plugin-search.js
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Handles replacing the bottom row
|
3 |
+
* of the card with customized content.
|
4 |
+
*/
|
5 |
+
|
6 |
+
/* global frmPlugSearch, JSON */
|
7 |
+
|
8 |
+
var FormidablePSH = {};
|
9 |
+
|
10 |
+
function frmPS() {
|
11 |
+
FormidablePSH = {
|
12 |
+
$pluginFilter: document.getElementById( 'plugin-filter' ),
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Get parent search hint element.
|
16 |
+
* @returns {Element | null}
|
17 |
+
*/
|
18 |
+
getCard: function () {
|
19 |
+
return document.querySelector( '.plugin-card-frm-plugin-search' );
|
20 |
+
},
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Replace bottom row of the card to insert logo, text and link to dismiss the card.
|
24 |
+
*/
|
25 |
+
replaceCardBottom: function () {
|
26 |
+
var hint = FormidablePSH.getCard();
|
27 |
+
if ( 'object' === typeof hint && null !== hint ) {
|
28 |
+
hint.querySelector( '.plugin-card-bottom' ).outerHTML =
|
29 |
+
'<div class="plugin-card-bottom frm-plugin-search__bottom">' +
|
30 |
+
'<p class="frm-plugin-search__text">' +
|
31 |
+
frmPlugSearch.legend +
|
32 |
+
'</p>' +
|
33 |
+
'</div>';
|
34 |
+
|
35 |
+
// Remove link and parent li from action links and move it to bottom row
|
36 |
+
var dismissLink = document.querySelector( '.frm-plugin-search__dismiss' );
|
37 |
+
dismissLink.parentNode.parentNode.removeChild( dismissLink.parentNode );
|
38 |
+
document.querySelector( '.frm-plugin-search__bottom' ).appendChild( dismissLink );
|
39 |
+
}
|
40 |
+
},
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Check if plugin card list nodes changed. If there's a Formidable PSH card, replace the title and the bottom row.
|
45 |
+
* @param {array} mutationsList
|
46 |
+
*/
|
47 |
+
replaceOnNewResults: function ( mutationsList ) {
|
48 |
+
mutationsList.forEach( function ( mutation ) {
|
49 |
+
if (
|
50 |
+
'childList' === mutation.type &&
|
51 |
+
1 === document.querySelectorAll( '.plugin-card-frm-plugin-search' ).length
|
52 |
+
) {
|
53 |
+
FormidablePSH.replaceCardBottom();
|
54 |
+
}
|
55 |
+
} );
|
56 |
+
},
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Start suggesting.
|
60 |
+
*/
|
61 |
+
init: function () {
|
62 |
+
if ( FormidablePSH.$pluginFilter === null ) {
|
63 |
+
return;
|
64 |
+
}
|
65 |
+
|
66 |
+
// Replace PSH bottom row on page load
|
67 |
+
FormidablePSH.replaceCardBottom();
|
68 |
+
|
69 |
+
// Listen for changes in plugin search results
|
70 |
+
var resultsObserver = new MutationObserver( FormidablePSH.replaceOnNewResults );
|
71 |
+
resultsObserver.observe( FormidablePSH.$pluginFilter, { childList: true } );
|
72 |
+
},
|
73 |
+
};
|
74 |
+
|
75 |
+
FormidablePSH.init();
|
76 |
+
}
|
77 |
+
FormidablePS = frmPS();
|
languages/formidable.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the Formidable Forms plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Formidable Forms
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/formidable\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: formidable\n"
|
@@ -57,6 +57,8 @@ msgstr ""
|
|
57 |
|
58 |
#: js/src/form/calculator.js:61
|
59 |
#: languages/formidable-js-strings.php:30
|
|
|
|
|
60 |
msgid "Calculator Form"
|
61 |
msgstr ""
|
62 |
|
@@ -124,56 +126,56 @@ msgid "Strategy11"
|
|
124 |
msgstr ""
|
125 |
|
126 |
#: classes/controllers/FrmAddonsController.php:13
|
127 |
-
#: classes/controllers/FrmAddonsController.php:
|
128 |
msgid "Add-Ons"
|
129 |
msgstr ""
|
130 |
|
|
|
131 |
#: classes/controllers/FrmAddonsController.php:22
|
132 |
-
#: classes/controllers/FrmAddonsController.php:23
|
133 |
#: classes/helpers/FrmFormsHelper.php:1328
|
134 |
#: classes/views/frm-fields/back-end/smart-values.php:16
|
135 |
#: classes/views/shared/admin-header.php:32
|
136 |
msgid "Upgrade"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: classes/controllers/FrmAddonsController.php:
|
140 |
msgid "There are no plugins on your site that require a license"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: classes/controllers/FrmAddonsController.php:
|
144 |
msgid "Installed"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: classes/controllers/FrmAddonsController.php:
|
148 |
-
#: classes/helpers/FrmAppHelper.php:
|
149 |
msgid "Active"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: classes/controllers/FrmAddonsController.php:
|
153 |
msgid "Not Installed"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: classes/controllers/FrmAddonsController.php:
|
157 |
msgid "Sorry, your site requires FTP authentication. Please download plugins from FormidableForms.com and install them manually."
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: classes/controllers/FrmAddonsController.php:
|
161 |
msgid "Your plugin has been activated. Please reload the page to see more options."
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: classes/controllers/FrmAddonsController.php:
|
165 |
msgid "Could not install an upgrade. Please download from formidableforms.com and install manually."
|
166 |
msgstr ""
|
167 |
|
|
|
168 |
#: classes/controllers/FrmAddonsController.php:1128
|
169 |
-
#: classes/controllers/FrmAddonsController.php:1129
|
170 |
#: classes/controllers/FrmWelcomeController.php:141
|
171 |
#: classes/views/frm-forms/new-form-overlay.php:112
|
172 |
#: classes/views/shared/reports-info.php:24
|
173 |
msgid "Upgrade Now"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: classes/controllers/FrmAddonsController.php:
|
177 |
msgid "Your plugin has been installed. Please reload the page to see more options."
|
178 |
msgstr ""
|
179 |
|
@@ -264,23 +266,23 @@ msgstr ""
|
|
264 |
msgid "Entry was Successfully Deleted"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: classes/controllers/FrmFieldsController.php:
|
268 |
msgid "Default Value (Text)"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: classes/controllers/FrmFieldsController.php:
|
272 |
msgid "Default Value (Calculation)"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: classes/controllers/FrmFieldsController.php:
|
276 |
msgid "Calculator forms"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: classes/controllers/FrmFieldsController.php:
|
280 |
msgid "Default Value (Lookup)"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: classes/controllers/FrmFieldsController.php:
|
284 |
msgid "Lookup fields"
|
285 |
msgstr ""
|
286 |
|
@@ -846,7 +848,7 @@ msgid "Install WP Mail SMTP"
|
|
846 |
msgstr ""
|
847 |
|
848 |
#: classes/controllers/FrmSMTPController.php:305
|
849 |
-
#: classes/helpers/FrmAppHelper.php:
|
850 |
#: classes/helpers/FrmFormMigratorsHelper.php:131
|
851 |
#: classes/views/shared/upgrade_overlay.php:32
|
852 |
msgid "Install"
|
@@ -861,6 +863,7 @@ msgid "Activate WP Mail SMTP"
|
|
861 |
msgstr ""
|
862 |
|
863 |
#: classes/controllers/FrmSMTPController.php:322
|
|
|
864 |
#: classes/views/addons/settings.php:31
|
865 |
msgid "Activate"
|
866 |
msgstr ""
|
@@ -1010,200 +1013,200 @@ msgstr ""
|
|
1010 |
msgid "Select a Page"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
-
#: classes/helpers/FrmAppHelper.php:
|
1014 |
msgid "View Forms"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: classes/helpers/FrmAppHelper.php:
|
1018 |
msgid "Add and Edit Forms"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
-
#: classes/helpers/FrmAppHelper.php:
|
1022 |
msgid "Delete Forms"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
-
#: classes/helpers/FrmAppHelper.php:
|
1026 |
msgid "Access this Settings Page"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: classes/helpers/FrmAppHelper.php:
|
1030 |
msgid "View Entries from Admin Area"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
-
#: classes/helpers/FrmAppHelper.php:
|
1034 |
msgid "Delete Entries from Admin Area"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
-
#: classes/helpers/FrmAppHelper.php:
|
1038 |
msgid "Add Entries from Admin Area"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: classes/helpers/FrmAppHelper.php:
|
1042 |
msgid "Edit Entries from Admin Area"
|
1043 |
msgstr ""
|
1044 |
|
1045 |
-
#: classes/helpers/FrmAppHelper.php:
|
1046 |
msgid "View Reports"
|
1047 |
msgstr ""
|
1048 |
|
1049 |
-
#: classes/helpers/FrmAppHelper.php:
|
1050 |
msgid "Add/Edit Views"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: classes/helpers/FrmAppHelper.php:
|
1054 |
msgid "at"
|
1055 |
msgstr ""
|
1056 |
|
1057 |
-
#: classes/helpers/FrmAppHelper.php:
|
1058 |
msgid "year"
|
1059 |
msgstr ""
|
1060 |
|
1061 |
-
#: classes/helpers/FrmAppHelper.php:
|
1062 |
msgid "years"
|
1063 |
msgstr ""
|
1064 |
|
1065 |
-
#: classes/helpers/FrmAppHelper.php:
|
1066 |
msgid "month"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
-
#: classes/helpers/FrmAppHelper.php:
|
1070 |
msgid "months"
|
1071 |
msgstr ""
|
1072 |
|
1073 |
-
#: classes/helpers/FrmAppHelper.php:
|
1074 |
msgid "week"
|
1075 |
msgstr ""
|
1076 |
|
1077 |
-
#: classes/helpers/FrmAppHelper.php:
|
1078 |
msgid "weeks"
|
1079 |
msgstr ""
|
1080 |
|
1081 |
-
#: classes/helpers/FrmAppHelper.php:
|
1082 |
msgid "day"
|
1083 |
msgstr ""
|
1084 |
|
1085 |
-
#: classes/helpers/FrmAppHelper.php:
|
1086 |
msgid "days"
|
1087 |
msgstr ""
|
1088 |
|
1089 |
-
#: classes/helpers/FrmAppHelper.php:
|
1090 |
msgid "hour"
|
1091 |
msgstr ""
|
1092 |
|
1093 |
-
#: classes/helpers/FrmAppHelper.php:
|
1094 |
msgid "hours"
|
1095 |
msgstr ""
|
1096 |
|
1097 |
-
#: classes/helpers/FrmAppHelper.php:
|
1098 |
msgid "minute"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
-
#: classes/helpers/FrmAppHelper.php:
|
1102 |
msgid "minutes"
|
1103 |
msgstr ""
|
1104 |
|
1105 |
-
#: classes/helpers/FrmAppHelper.php:
|
1106 |
msgid "second"
|
1107 |
msgstr ""
|
1108 |
|
1109 |
-
#: classes/helpers/FrmAppHelper.php:
|
1110 |
msgid "seconds"
|
1111 |
msgstr ""
|
1112 |
|
1113 |
-
#: classes/helpers/FrmAppHelper.php:
|
1114 |
msgid "Give this action a label for easy reference."
|
1115 |
msgstr ""
|
1116 |
|
1117 |
-
#: classes/helpers/FrmAppHelper.php:
|
1118 |
msgid "Add one or more recipient addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com. [admin_email] is the address set in WP General Settings."
|
1119 |
msgstr ""
|
1120 |
|
1121 |
-
#: classes/helpers/FrmAppHelper.php:
|
1122 |
msgid "Add CC addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com."
|
1123 |
msgstr ""
|
1124 |
|
1125 |
-
#: classes/helpers/FrmAppHelper.php:
|
1126 |
msgid "Add BCC addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com."
|
1127 |
msgstr ""
|
1128 |
|
1129 |
-
#: classes/helpers/FrmAppHelper.php:
|
1130 |
msgid "If you would like a different reply to address than the \"from\" address, add a single address here. FORMAT: Name <name@email.com> or name@email.com."
|
1131 |
msgstr ""
|
1132 |
|
1133 |
-
#: classes/helpers/FrmAppHelper.php:
|
1134 |
msgid "Enter the name and/or email address of the sender. FORMAT: John Bates <john@example.com> or john@example.com."
|
1135 |
msgstr ""
|
1136 |
|
1137 |
#. translators: %1$s: Form name, %2$s: Date
|
1138 |
-
#: classes/helpers/FrmAppHelper.php:
|
1139 |
msgid "If you leave the subject blank, the default will be used: %1$s Form submitted on %2$s"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
-
#: classes/helpers/FrmAppHelper.php:
|
1143 |
-
#: classes/helpers/FrmAppHelper.php:
|
1144 |
msgid "Please wait while your site updates."
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#: classes/helpers/FrmAppHelper.php:
|
1148 |
msgid "Are you sure you want to deauthorize Formidable Forms on this site?"
|
1149 |
msgstr ""
|
1150 |
|
1151 |
-
#: classes/helpers/FrmAppHelper.php:
|
1152 |
-
#: classes/helpers/FrmAppHelper.php:
|
1153 |
msgid "Loading…"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
-
#: classes/helpers/FrmAppHelper.php:
|
1157 |
msgid "Remove"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
-
#: classes/helpers/FrmAppHelper.php:
|
1161 |
#: classes/helpers/FrmCSVExportHelper.php:229
|
1162 |
#: classes/views/shared/mb_adv_info.php:95
|
1163 |
msgid "ID"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
-
#: classes/helpers/FrmAppHelper.php:
|
1167 |
msgid "No results match"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
-
#: classes/helpers/FrmAppHelper.php:
|
1171 |
msgid "That file looks like Spam."
|
1172 |
msgstr ""
|
1173 |
|
1174 |
-
#: classes/helpers/FrmAppHelper.php:
|
1175 |
msgid "There is an error in the calculation in the field with key"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
-
#: classes/helpers/FrmAppHelper.php:
|
1179 |
msgid "Please complete the preceding required fields before uploading a file."
|
1180 |
msgstr ""
|
1181 |
|
1182 |
-
#: classes/helpers/FrmAppHelper.php:
|
1183 |
msgid "(Click to add description)"
|
1184 |
msgstr ""
|
1185 |
|
1186 |
-
#: classes/helpers/FrmAppHelper.php:
|
1187 |
msgid "(Blank)"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
-
#: classes/helpers/FrmAppHelper.php:
|
1191 |
msgid "(no label)"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
-
#: classes/helpers/FrmAppHelper.php:
|
1195 |
msgid "Saving"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
-
#: classes/helpers/FrmAppHelper.php:
|
1199 |
msgid "Saved"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
-
#: classes/helpers/FrmAppHelper.php:
|
1203 |
msgid "OK"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: classes/helpers/FrmAppHelper.php:
|
1207 |
#: classes/views/frm-forms/new-form-overlay.php:33
|
1208 |
#: classes/views/frm-forms/new-form-overlay.php:100
|
1209 |
#: classes/views/frm-forms/new-form-overlay.php:109
|
@@ -1212,418 +1215,420 @@ msgstr ""
|
|
1212 |
#: classes/views/frm-forms/new-form-overlay.php:139
|
1213 |
#: classes/views/shared/admin-header.php:63
|
1214 |
#: classes/views/shared/confirm-overlay.php:19
|
|
|
1215 |
msgid "Cancel"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
-
#: classes/helpers/FrmAppHelper.php:
|
1219 |
#: classes/views/frm-fields/back-end/settings.php:270
|
1220 |
msgid "Default"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
-
#: classes/helpers/FrmAppHelper.php:
|
1224 |
msgid "Clear default value when typing"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#: classes/helpers/FrmAppHelper.php:
|
1228 |
msgid "Do not clear default value when typing"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
-
#: classes/helpers/FrmAppHelper.php:
|
1232 |
msgid "Default value will pass form validation"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
-
#: classes/helpers/FrmAppHelper.php:
|
1236 |
msgid "Default value will NOT pass form validation"
|
1237 |
msgstr ""
|
1238 |
|
1239 |
-
#: classes/helpers/FrmAppHelper.php:
|
1240 |
#: classes/helpers/FrmListHelper.php:405
|
|
|
1241 |
msgid "Heads up"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
-
#: classes/helpers/FrmAppHelper.php:
|
1245 |
#: classes/views/shared/confirm-overlay.php:15
|
1246 |
#: classes/views/shared/info-overlay.php:15
|
1247 |
msgid "Are you sure?"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
-
#: classes/helpers/FrmAppHelper.php:
|
1251 |
msgid "Are you sure you want to delete this field and all data associated with it?"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
-
#: classes/helpers/FrmAppHelper.php:
|
1255 |
msgid "All fields inside this Section will be deleted along with their data. Are you sure you want to delete this group of fields?"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
-
#: classes/helpers/FrmAppHelper.php:
|
1259 |
msgid "Warning: If you have entries with multiple rows, all but the first row will be lost."
|
1260 |
msgstr ""
|
1261 |
|
1262 |
-
#: classes/helpers/FrmAppHelper.php:
|
1263 |
#: classes/helpers/FrmFieldsHelper.php:286
|
1264 |
msgid "The entered values do not match"
|
1265 |
msgstr ""
|
1266 |
|
1267 |
-
#: classes/helpers/FrmAppHelper.php:
|
1268 |
msgid "Enter Email"
|
1269 |
msgstr ""
|
1270 |
|
1271 |
-
#: classes/helpers/FrmAppHelper.php:
|
1272 |
msgid "Confirm Email"
|
1273 |
msgstr ""
|
1274 |
|
1275 |
-
#: classes/helpers/FrmAppHelper.php:
|
1276 |
#: classes/views/shared/mb_adv_info.php:166
|
1277 |
msgid "Conditional content here"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
-
#: classes/helpers/FrmAppHelper.php:
|
1281 |
#: classes/helpers/FrmFieldsHelper.php:458
|
1282 |
#: classes/helpers/FrmFieldsHelper.php:459
|
1283 |
msgid "New Option"
|
1284 |
msgstr ""
|
1285 |
|
1286 |
-
#: classes/helpers/FrmAppHelper.php:
|
1287 |
msgid "In certain browsers (e.g. Firefox) text will not display correctly if the field height is too small relative to the field padding and text size. Please increase your field height or decrease your field padding."
|
1288 |
msgstr ""
|
1289 |
|
1290 |
-
#: classes/helpers/FrmAppHelper.php:
|
1291 |
msgid "Enter Password"
|
1292 |
msgstr ""
|
1293 |
|
1294 |
-
#: classes/helpers/FrmAppHelper.php:
|
1295 |
msgid "Confirm Password"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
-
#: classes/helpers/FrmAppHelper.php:
|
1299 |
msgid "Import Complete"
|
1300 |
msgstr ""
|
1301 |
|
1302 |
-
#: classes/helpers/FrmAppHelper.php:
|
1303 |
msgid "Warning: There is no way to retrieve unsaved entries."
|
1304 |
msgstr ""
|
1305 |
|
1306 |
-
#: classes/helpers/FrmAppHelper.php:
|
1307 |
msgid "Private"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
-
#: classes/helpers/FrmAppHelper.php:
|
1311 |
msgid "No new licenses were found"
|
1312 |
msgstr ""
|
1313 |
|
1314 |
-
#: classes/helpers/FrmAppHelper.php:
|
1315 |
msgid "This calculation has at least one unmatched ( ) { } [ ]."
|
1316 |
msgstr ""
|
1317 |
|
1318 |
-
#: classes/helpers/FrmAppHelper.php:
|
1319 |
msgid "This calculation may have shortcodes that work in Views but not forms."
|
1320 |
msgstr ""
|
1321 |
|
1322 |
-
#: classes/helpers/FrmAppHelper.php:
|
1323 |
msgid "This calculation may have shortcodes that work in text calculations but not numeric calculations."
|
1324 |
msgstr ""
|
1325 |
|
1326 |
-
#: classes/helpers/FrmAppHelper.php:
|
1327 |
msgid "This form action is limited to one per form. Please edit the existing form action."
|
1328 |
msgstr ""
|
1329 |
|
1330 |
#. Translators: %s is the name of a Detail Page Slug that is a reserved word.
|
1331 |
-
#: classes/helpers/FrmAppHelper.php:
|
1332 |
msgid "The Detail Page Slug \"%s\" is reserved by WordPress. This may cause problems. Is this intentional?"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
#. Translators: %s is the name of a parameter that is a reserved word. More than one word could be listed here, though that would not be common.
|
1336 |
-
#: classes/helpers/FrmAppHelper.php:
|
1337 |
msgid "The parameter \"%s\" is reserved by WordPress. This may cause problems when included in the URL. Is this intentional? "
|
1338 |
msgstr ""
|
1339 |
|
1340 |
-
#: classes/helpers/FrmAppHelper.php:
|
1341 |
#: classes/helpers/FrmFormsHelper.php:1502
|
1342 |
msgid "See the list of reserved words in WordPress."
|
1343 |
msgstr ""
|
1344 |
|
1345 |
-
#: classes/helpers/FrmAppHelper.php:
|
1346 |
msgid "Please enter a Repeat Limit that is greater than 1."
|
1347 |
msgstr ""
|
1348 |
|
1349 |
-
#: classes/helpers/FrmAppHelper.php:
|
1350 |
msgid "Please select a limit between 0 and 200."
|
1351 |
msgstr ""
|
1352 |
|
1353 |
-
#: classes/helpers/FrmAppHelper.php:
|
1354 |
#: classes/views/shared/mb_adv_info.php:113
|
1355 |
#: classes/views/shared/mb_adv_info.php:127
|
1356 |
msgid "Select a Field"
|
1357 |
msgstr ""
|
1358 |
|
1359 |
-
#: classes/helpers/FrmAppHelper.php:
|
1360 |
#: classes/helpers/FrmListHelper.php:262
|
1361 |
msgid "No items found."
|
1362 |
msgstr ""
|
1363 |
|
1364 |
-
#: classes/helpers/FrmAppHelper.php:
|
1365 |
msgid "You are running an outdated version of Formidable. This plugin may not work correctly if you do not update Formidable."
|
1366 |
msgstr ""
|
1367 |
|
1368 |
-
#: classes/helpers/FrmAppHelper.php:
|
1369 |
msgid "You are running a version of Formidable Forms that may not be compatible with your version of Formidable Forms Pro."
|
1370 |
msgstr ""
|
1371 |
|
1372 |
-
#: classes/helpers/FrmAppHelper.php:
|
1373 |
msgid "The version of PHP on your server is too low. If this is not corrected, you may see issues with Formidable Forms. Please contact your web host and ask to be updated to PHP 7.0+."
|
1374 |
msgstr ""
|
1375 |
|
1376 |
-
#: classes/helpers/FrmAppHelper.php:
|
1377 |
msgid "You are using an outdated browser that is not compatible with Formidable Forms. Please update to a more current browser (we recommend Chrome)."
|
1378 |
msgstr ""
|
1379 |
|
1380 |
-
#: classes/helpers/FrmAppHelper.php:
|
1381 |
msgid "English"
|
1382 |
msgstr ""
|
1383 |
|
1384 |
-
#: classes/helpers/FrmAppHelper.php:
|
1385 |
msgid "Afrikaans"
|
1386 |
msgstr ""
|
1387 |
|
1388 |
-
#: classes/helpers/FrmAppHelper.php:
|
1389 |
msgid "Albanian"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
-
#: classes/helpers/FrmAppHelper.php:
|
1393 |
msgid "Arabic"
|
1394 |
msgstr ""
|
1395 |
|
1396 |
-
#: classes/helpers/FrmAppHelper.php:
|
1397 |
msgid "Armenian"
|
1398 |
msgstr ""
|
1399 |
|
1400 |
-
#: classes/helpers/FrmAppHelper.php:
|
1401 |
msgid "Azerbaijani"
|
1402 |
msgstr ""
|
1403 |
|
1404 |
-
#: classes/helpers/FrmAppHelper.php:
|
1405 |
msgid "Basque"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
-
#: classes/helpers/FrmAppHelper.php:
|
1409 |
msgid "Bosnian"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
-
#: classes/helpers/FrmAppHelper.php:
|
1413 |
msgid "Bulgarian"
|
1414 |
msgstr ""
|
1415 |
|
1416 |
-
#: classes/helpers/FrmAppHelper.php:
|
1417 |
msgid "Catalan"
|
1418 |
msgstr ""
|
1419 |
|
1420 |
-
#: classes/helpers/FrmAppHelper.php:
|
1421 |
msgid "Chinese Hong Kong"
|
1422 |
msgstr ""
|
1423 |
|
1424 |
-
#: classes/helpers/FrmAppHelper.php:
|
1425 |
msgid "Chinese Simplified"
|
1426 |
msgstr ""
|
1427 |
|
1428 |
-
#: classes/helpers/FrmAppHelper.php:
|
1429 |
msgid "Chinese Traditional"
|
1430 |
msgstr ""
|
1431 |
|
1432 |
-
#: classes/helpers/FrmAppHelper.php:
|
1433 |
msgid "Croatian"
|
1434 |
msgstr ""
|
1435 |
|
1436 |
-
#: classes/helpers/FrmAppHelper.php:
|
1437 |
msgid "Czech"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
-
#: classes/helpers/FrmAppHelper.php:
|
1441 |
msgid "Danish"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
-
#: classes/helpers/FrmAppHelper.php:
|
1445 |
msgid "Dutch"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
-
#: classes/helpers/FrmAppHelper.php:
|
1449 |
msgid "English/UK"
|
1450 |
msgstr ""
|
1451 |
|
1452 |
-
#: classes/helpers/FrmAppHelper.php:
|
1453 |
msgid "Esperanto"
|
1454 |
msgstr ""
|
1455 |
|
1456 |
-
#: classes/helpers/FrmAppHelper.php:
|
1457 |
msgid "Estonian"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
-
#: classes/helpers/FrmAppHelper.php:
|
1461 |
msgid "Faroese"
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: classes/helpers/FrmAppHelper.php:
|
1465 |
msgid "Farsi/Persian"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
-
#: classes/helpers/FrmAppHelper.php:
|
1469 |
msgid "Filipino"
|
1470 |
msgstr ""
|
1471 |
|
1472 |
-
#: classes/helpers/FrmAppHelper.php:
|
1473 |
msgid "Finnish"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
-
#: classes/helpers/FrmAppHelper.php:
|
1477 |
msgid "French"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: classes/helpers/FrmAppHelper.php:
|
1481 |
msgid "French/Canadian"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
-
#: classes/helpers/FrmAppHelper.php:
|
1485 |
msgid "French/Swiss"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
-
#: classes/helpers/FrmAppHelper.php:
|
1489 |
msgid "German"
|
1490 |
msgstr ""
|
1491 |
|
1492 |
-
#: classes/helpers/FrmAppHelper.php:
|
1493 |
msgid "German/Austria"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
-
#: classes/helpers/FrmAppHelper.php:
|
1497 |
msgid "German/Switzerland"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
-
#: classes/helpers/FrmAppHelper.php:
|
1501 |
msgid "Greek"
|
1502 |
msgstr ""
|
1503 |
|
1504 |
-
#: classes/helpers/FrmAppHelper.php:
|
1505 |
-
#: classes/helpers/FrmAppHelper.php:
|
1506 |
msgid "Hebrew"
|
1507 |
msgstr ""
|
1508 |
|
1509 |
-
#: classes/helpers/FrmAppHelper.php:
|
1510 |
msgid "Hindi"
|
1511 |
msgstr ""
|
1512 |
|
1513 |
-
#: classes/helpers/FrmAppHelper.php:
|
1514 |
msgid "Hungarian"
|
1515 |
msgstr ""
|
1516 |
|
1517 |
-
#: classes/helpers/FrmAppHelper.php:
|
1518 |
msgid "Icelandic"
|
1519 |
msgstr ""
|
1520 |
|
1521 |
-
#: classes/helpers/FrmAppHelper.php:
|
1522 |
msgid "Indonesian"
|
1523 |
msgstr ""
|
1524 |
|
1525 |
-
#: classes/helpers/FrmAppHelper.php:
|
1526 |
msgid "Italian"
|
1527 |
msgstr ""
|
1528 |
|
1529 |
-
#: classes/helpers/FrmAppHelper.php:
|
1530 |
msgid "Japanese"
|
1531 |
msgstr ""
|
1532 |
|
1533 |
-
#: classes/helpers/FrmAppHelper.php:
|
1534 |
msgid "Korean"
|
1535 |
msgstr ""
|
1536 |
|
1537 |
-
#: classes/helpers/FrmAppHelper.php:
|
1538 |
msgid "Latvian"
|
1539 |
msgstr ""
|
1540 |
|
1541 |
-
#: classes/helpers/FrmAppHelper.php:
|
1542 |
msgid "Lithuanian"
|
1543 |
msgstr ""
|
1544 |
|
1545 |
-
#: classes/helpers/FrmAppHelper.php:
|
1546 |
msgid "Malaysian"
|
1547 |
msgstr ""
|
1548 |
|
1549 |
-
#: classes/helpers/FrmAppHelper.php:
|
1550 |
msgid "Norwegian"
|
1551 |
msgstr ""
|
1552 |
|
1553 |
-
#: classes/helpers/FrmAppHelper.php:
|
1554 |
msgid "Polish"
|
1555 |
msgstr ""
|
1556 |
|
1557 |
-
#: classes/helpers/FrmAppHelper.php:
|
1558 |
msgid "Portuguese"
|
1559 |
msgstr ""
|
1560 |
|
1561 |
-
#: classes/helpers/FrmAppHelper.php:
|
1562 |
msgid "Portuguese/Brazilian"
|
1563 |
msgstr ""
|
1564 |
|
1565 |
-
#: classes/helpers/FrmAppHelper.php:
|
1566 |
msgid "Portuguese/Portugal"
|
1567 |
msgstr ""
|
1568 |
|
1569 |
-
#: classes/helpers/FrmAppHelper.php:
|
1570 |
msgid "Romanian"
|
1571 |
msgstr ""
|
1572 |
|
1573 |
-
#: classes/helpers/FrmAppHelper.php:
|
1574 |
msgid "Russian"
|
1575 |
msgstr ""
|
1576 |
|
1577 |
-
#: classes/helpers/FrmAppHelper.php:
|
1578 |
-
#: classes/helpers/FrmAppHelper.php:
|
1579 |
msgid "Serbian"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
-
#: classes/helpers/FrmAppHelper.php:
|
1583 |
msgid "Slovak"
|
1584 |
msgstr ""
|
1585 |
|
1586 |
-
#: classes/helpers/FrmAppHelper.php:
|
1587 |
msgid "Slovenian"
|
1588 |
msgstr ""
|
1589 |
|
1590 |
-
#: classes/helpers/FrmAppHelper.php:
|
1591 |
msgid "Spanish"
|
1592 |
msgstr ""
|
1593 |
|
1594 |
-
#: classes/helpers/FrmAppHelper.php:
|
1595 |
msgid "Spanish/Latin America"
|
1596 |
msgstr ""
|
1597 |
|
1598 |
-
#: classes/helpers/FrmAppHelper.php:
|
1599 |
msgid "Swedish"
|
1600 |
msgstr ""
|
1601 |
|
1602 |
-
#: classes/helpers/FrmAppHelper.php:
|
1603 |
msgid "Tamil"
|
1604 |
msgstr ""
|
1605 |
|
1606 |
-
#: classes/helpers/FrmAppHelper.php:
|
1607 |
msgid "Thai"
|
1608 |
msgstr ""
|
1609 |
|
1610 |
-
#: classes/helpers/FrmAppHelper.php:
|
1611 |
msgid "Turkish"
|
1612 |
msgstr ""
|
1613 |
|
1614 |
-
#: classes/helpers/FrmAppHelper.php:
|
1615 |
msgid "Ukranian"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
-
#: classes/helpers/FrmAppHelper.php:
|
1619 |
msgid "Vietnamese"
|
1620 |
msgstr ""
|
1621 |
|
1622 |
-
#: classes/helpers/FrmAppHelper.php:
|
1623 |
msgid "Your account has expired"
|
1624 |
msgstr ""
|
1625 |
|
1626 |
-
#: classes/helpers/FrmAppHelper.php:
|
1627 |
msgid "Renew Now"
|
1628 |
msgstr ""
|
1629 |
|
@@ -1745,6 +1750,7 @@ msgstr ""
|
|
1745 |
#: classes/helpers/FrmFormsHelper.php:1134
|
1746 |
#: classes/helpers/FrmFormsListHelper.php:133
|
1747 |
#: classes/views/frm-form-actions/form_action.php:25
|
|
|
1748 |
msgid "Delete"
|
1749 |
msgstr ""
|
1750 |
|
@@ -3732,66 +3738,66 @@ msgid "Website"
|
|
3732 |
msgstr ""
|
3733 |
|
3734 |
#. translators: %1$s: Plugin name, %2$s: Start link HTML, %3$s: end link HTML
|
3735 |
-
#: classes/models/FrmAddon.php:
|
3736 |
msgid "Your %1$s license key is missing. Please add it on the %2$slicenses page%3$s."
|
3737 |
msgstr ""
|
3738 |
|
3739 |
-
#: classes/models/FrmAddon.php:
|
3740 |
msgid "Oops! You forgot to enter your license number."
|
3741 |
msgstr ""
|
3742 |
|
3743 |
-
#: classes/models/FrmAddon.php:
|
3744 |
msgid "Your license has been activated. Enjoy!"
|
3745 |
msgstr ""
|
3746 |
|
3747 |
-
#: classes/models/FrmAddon.php:
|
3748 |
-
#: classes/models/FrmAddon.php:
|
3749 |
msgid "That license key is invalid"
|
3750 |
msgstr ""
|
3751 |
|
3752 |
-
#: classes/models/FrmAddon.php:
|
3753 |
msgid "That license is expired"
|
3754 |
msgstr ""
|
3755 |
|
3756 |
-
#: classes/models/FrmAddon.php:
|
3757 |
msgid "That license has been refunded"
|
3758 |
msgstr ""
|
3759 |
|
3760 |
-
#: classes/models/FrmAddon.php:
|
3761 |
msgid "That license has been used on too many sites"
|
3762 |
msgstr ""
|
3763 |
|
3764 |
-
#: classes/models/FrmAddon.php:
|
3765 |
msgid "Oops! That is the wrong license key for this plugin."
|
3766 |
msgstr ""
|
3767 |
|
3768 |
-
#: classes/models/FrmAddon.php:
|
3769 |
msgid "Cache cleared"
|
3770 |
msgstr ""
|
3771 |
|
3772 |
-
#: classes/models/FrmAddon.php:
|
3773 |
msgid "That license was removed successfully"
|
3774 |
msgstr ""
|
3775 |
|
3776 |
-
#: classes/models/FrmAddon.php:
|
3777 |
msgid "There was an error deactivating your license."
|
3778 |
msgstr ""
|
3779 |
|
3780 |
-
#: classes/models/FrmAddon.php:
|
3781 |
msgid "Your License Key was invalid"
|
3782 |
msgstr ""
|
3783 |
|
3784 |
#. translators: %1$s: Start link HTML, %2$s: End link HTML
|
3785 |
-
#: classes/models/FrmAddon.php:
|
3786 |
msgid "You had an error communicating with the Formidable API. %1$sClick here%2$s for more information."
|
3787 |
msgstr ""
|
3788 |
|
3789 |
-
#: classes/models/FrmAddon.php:
|
3790 |
msgid "You had an HTTP error connecting to the Formidable API"
|
3791 |
msgstr ""
|
3792 |
|
3793 |
#. translators: %1$s: Error code, %2$s: Error message
|
3794 |
-
#: classes/models/FrmAddon.php:
|
3795 |
msgid "There was a %1$s error: %2$s"
|
3796 |
msgstr ""
|
3797 |
|
@@ -4076,6 +4082,28 @@ msgstr ""
|
|
4076 |
msgid "Form Submissions"
|
4077 |
msgstr ""
|
4078 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4079 |
#. translators: %s: User name, %2$d: number of entries
|
4080 |
#: classes/models/FrmReviews.php:108
|
4081 |
msgid "Congratulations%1$s! You have collected %2$d form submissions."
|
@@ -4116,7 +4144,7 @@ msgid "We're sorry. It looks like you've already submitted that."
|
|
4116 |
msgstr ""
|
4117 |
|
4118 |
#: classes/models/FrmSettings.php:108
|
4119 |
-
#: classes/views/frm-forms/form.php:
|
4120 |
#: classes/views/styles/_sample_form.php:79
|
4121 |
msgid "Submit"
|
4122 |
msgstr ""
|
@@ -4694,6 +4722,7 @@ msgid "Conditional emails"
|
|
4694 |
msgstr ""
|
4695 |
|
4696 |
#: classes/views/frm-form-actions/form_action.php:21
|
|
|
4697 |
msgid "Duplicate"
|
4698 |
msgstr ""
|
4699 |
|
@@ -4809,32 +4838,29 @@ msgstr ""
|
|
4809 |
msgid "Show options"
|
4810 |
msgstr ""
|
4811 |
|
4812 |
-
#: classes/views/frm-forms/add_field.php:
|
4813 |
msgid "Expand/Collapse Section"
|
4814 |
msgstr ""
|
4815 |
|
4816 |
-
#: classes/views/frm-forms/add_field.php:
|
4817 |
msgid "Move Field"
|
4818 |
msgstr ""
|
4819 |
|
4820 |
-
#: classes/views/frm-forms/add_field.php:
|
4821 |
-
msgid "
|
4822 |
msgstr ""
|
4823 |
|
4824 |
-
#: classes/views/frm-forms/add_field.php:
|
4825 |
-
msgid "
|
4826 |
msgstr ""
|
4827 |
|
4828 |
-
#: classes/views/frm-forms/add_field.php:
|
4829 |
-
msgid "Duplicate Field"
|
4830 |
-
msgstr ""
|
4831 |
-
|
4832 |
-
#: classes/views/frm-forms/add_field.php:42
|
4833 |
msgid "(Collapsed)"
|
4834 |
msgstr ""
|
4835 |
|
4836 |
-
#: classes/views/frm-forms/add_field.php:
|
4837 |
-
|
|
|
4838 |
msgstr ""
|
4839 |
|
4840 |
#: classes/views/frm-forms/add_field_links.php:11
|
@@ -4902,11 +4928,7 @@ msgstr ""
|
|
4902 |
msgid "Page %s"
|
4903 |
msgstr ""
|
4904 |
|
4905 |
-
#: classes/views/frm-forms/form.php:
|
4906 |
-
msgid "Add Fields Here"
|
4907 |
-
msgstr ""
|
4908 |
-
|
4909 |
-
#: classes/views/frm-forms/form.php:52
|
4910 |
msgid "Click or drag a field from the sidebar to add it to your form"
|
4911 |
msgstr ""
|
4912 |
|
@@ -6193,3 +6215,36 @@ msgstr ""
|
|
6193 |
#: deprecated/FrmEDD_SL_Plugin_Updater.php:315
|
6194 |
msgid "Error"
|
6195 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
# This file is distributed under the same license as the Formidable Forms plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Formidable Forms 5.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/formidable\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-08-11T16:40:36+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: formidable\n"
|
57 |
|
58 |
#: js/src/form/calculator.js:61
|
59 |
#: languages/formidable-js-strings.php:30
|
60 |
+
#: js/src/form/calculator.js:26
|
61 |
+
#: js/src/form/calculator.js:52
|
62 |
msgid "Calculator Form"
|
63 |
msgstr ""
|
64 |
|
126 |
msgstr ""
|
127 |
|
128 |
#: classes/controllers/FrmAddonsController.php:13
|
129 |
+
#: classes/controllers/FrmAddonsController.php:16
|
130 |
msgid "Add-Ons"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: classes/controllers/FrmAddonsController.php:21
|
134 |
#: classes/controllers/FrmAddonsController.php:22
|
|
|
135 |
#: classes/helpers/FrmFormsHelper.php:1328
|
136 |
#: classes/views/frm-fields/back-end/smart-values.php:16
|
137 |
#: classes/views/shared/admin-header.php:32
|
138 |
msgid "Upgrade"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: classes/controllers/FrmAddonsController.php:68
|
142 |
msgid "There are no plugins on your site that require a license"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: classes/controllers/FrmAddonsController.php:590
|
146 |
msgid "Installed"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: classes/controllers/FrmAddonsController.php:595
|
150 |
+
#: classes/helpers/FrmAppHelper.php:2529
|
151 |
msgid "Active"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: classes/controllers/FrmAddonsController.php:600
|
155 |
msgid "Not Installed"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: classes/controllers/FrmAddonsController.php:887
|
159 |
msgid "Sorry, your site requires FTP authentication. Please download plugins from FormidableForms.com and install them manually."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: classes/controllers/FrmAddonsController.php:943
|
163 |
msgid "Your plugin has been activated. Please reload the page to see more options."
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: classes/controllers/FrmAddonsController.php:1042
|
167 |
msgid "Could not install an upgrade. Please download from formidableforms.com and install manually."
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: classes/controllers/FrmAddonsController.php:1127
|
171 |
#: classes/controllers/FrmAddonsController.php:1128
|
|
|
172 |
#: classes/controllers/FrmWelcomeController.php:141
|
173 |
#: classes/views/frm-forms/new-form-overlay.php:112
|
174 |
#: classes/views/shared/reports-info.php:24
|
175 |
msgid "Upgrade Now"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: classes/controllers/FrmAddonsController.php:1142
|
179 |
msgid "Your plugin has been installed. Please reload the page to see more options."
|
180 |
msgstr ""
|
181 |
|
266 |
msgid "Entry was Successfully Deleted"
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: classes/controllers/FrmFieldsController.php:353
|
270 |
msgid "Default Value (Text)"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: classes/controllers/FrmFieldsController.php:360
|
274 |
msgid "Default Value (Calculation)"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: classes/controllers/FrmFieldsController.php:364
|
278 |
msgid "Calculator forms"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: classes/controllers/FrmFieldsController.php:369
|
282 |
msgid "Default Value (Lookup)"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: classes/controllers/FrmFieldsController.php:373
|
286 |
msgid "Lookup fields"
|
287 |
msgstr ""
|
288 |
|
848 |
msgstr ""
|
849 |
|
850 |
#: classes/controllers/FrmSMTPController.php:305
|
851 |
+
#: classes/helpers/FrmAppHelper.php:2528
|
852 |
#: classes/helpers/FrmFormMigratorsHelper.php:131
|
853 |
#: classes/views/shared/upgrade_overlay.php:32
|
854 |
msgid "Install"
|
863 |
msgstr ""
|
864 |
|
865 |
#: classes/controllers/FrmSMTPController.php:322
|
866 |
+
#: classes/models/FrmPluginSearch.php:307
|
867 |
#: classes/views/addons/settings.php:31
|
868 |
msgid "Activate"
|
869 |
msgstr ""
|
1013 |
msgid "Select a Page"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: classes/helpers/FrmAppHelper.php:1237
|
1017 |
msgid "View Forms"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: classes/helpers/FrmAppHelper.php:1238
|
1021 |
msgid "Add and Edit Forms"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: classes/helpers/FrmAppHelper.php:1239
|
1025 |
msgid "Delete Forms"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: classes/helpers/FrmAppHelper.php:1240
|
1029 |
msgid "Access this Settings Page"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: classes/helpers/FrmAppHelper.php:1241
|
1033 |
msgid "View Entries from Admin Area"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: classes/helpers/FrmAppHelper.php:1242
|
1037 |
msgid "Delete Entries from Admin Area"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: classes/helpers/FrmAppHelper.php:1250
|
1041 |
msgid "Add Entries from Admin Area"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: classes/helpers/FrmAppHelper.php:1251
|
1045 |
msgid "Edit Entries from Admin Area"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: classes/helpers/FrmAppHelper.php:1252
|
1049 |
msgid "View Reports"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: classes/helpers/FrmAppHelper.php:1253
|
1053 |
msgid "Add/Edit Views"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: classes/helpers/FrmAppHelper.php:1959
|
1057 |
msgid "at"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: classes/helpers/FrmAppHelper.php:2103
|
1061 |
msgid "year"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: classes/helpers/FrmAppHelper.php:2104
|
1065 |
msgid "years"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: classes/helpers/FrmAppHelper.php:2108
|
1069 |
msgid "month"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: classes/helpers/FrmAppHelper.php:2109
|
1073 |
msgid "months"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: classes/helpers/FrmAppHelper.php:2113
|
1077 |
msgid "week"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: classes/helpers/FrmAppHelper.php:2114
|
1081 |
msgid "weeks"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: classes/helpers/FrmAppHelper.php:2118
|
1085 |
msgid "day"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: classes/helpers/FrmAppHelper.php:2119
|
1089 |
msgid "days"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: classes/helpers/FrmAppHelper.php:2123
|
1093 |
msgid "hour"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: classes/helpers/FrmAppHelper.php:2124
|
1097 |
msgid "hours"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: classes/helpers/FrmAppHelper.php:2128
|
1101 |
msgid "minute"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: classes/helpers/FrmAppHelper.php:2129
|
1105 |
msgid "minutes"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: classes/helpers/FrmAppHelper.php:2133
|
1109 |
msgid "second"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: classes/helpers/FrmAppHelper.php:2134
|
1113 |
msgid "seconds"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: classes/helpers/FrmAppHelper.php:2228
|
1117 |
msgid "Give this action a label for easy reference."
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: classes/helpers/FrmAppHelper.php:2229
|
1121 |
msgid "Add one or more recipient addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com. [admin_email] is the address set in WP General Settings."
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: classes/helpers/FrmAppHelper.php:2230
|
1125 |
msgid "Add CC addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com."
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: classes/helpers/FrmAppHelper.php:2231
|
1129 |
msgid "Add BCC addresses separated by a \",\". FORMAT: Name <name@email.com> or name@email.com."
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: classes/helpers/FrmAppHelper.php:2232
|
1133 |
msgid "If you would like a different reply to address than the \"from\" address, add a single address here. FORMAT: Name <name@email.com> or name@email.com."
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: classes/helpers/FrmAppHelper.php:2233
|
1137 |
msgid "Enter the name and/or email address of the sender. FORMAT: John Bates <john@example.com> or john@example.com."
|
1138 |
msgstr ""
|
1139 |
|
1140 |
#. translators: %1$s: Form name, %2$s: Date
|
1141 |
+
#: classes/helpers/FrmAppHelper.php:2235
|
1142 |
msgid "If you leave the subject blank, the default will be used: %1$s Form submitted on %2$s"
|
1143 |
msgstr ""
|
1144 |
|
1145 |
+
#: classes/helpers/FrmAppHelper.php:2431
|
1146 |
+
#: classes/helpers/FrmAppHelper.php:2510
|
1147 |
msgid "Please wait while your site updates."
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: classes/helpers/FrmAppHelper.php:2432
|
1151 |
msgid "Are you sure you want to deauthorize Formidable Forms on this site?"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
+
#: classes/helpers/FrmAppHelper.php:2435
|
1155 |
+
#: classes/helpers/FrmAppHelper.php:2464
|
1156 |
msgid "Loading…"
|
1157 |
msgstr ""
|
1158 |
|
1159 |
+
#: classes/helpers/FrmAppHelper.php:2465
|
1160 |
msgid "Remove"
|
1161 |
msgstr ""
|
1162 |
|
1163 |
+
#: classes/helpers/FrmAppHelper.php:2468
|
1164 |
#: classes/helpers/FrmCSVExportHelper.php:229
|
1165 |
#: classes/views/shared/mb_adv_info.php:95
|
1166 |
msgid "ID"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: classes/helpers/FrmAppHelper.php:2469
|
1170 |
msgid "No results match"
|
1171 |
msgstr ""
|
1172 |
|
1173 |
+
#: classes/helpers/FrmAppHelper.php:2470
|
1174 |
msgid "That file looks like Spam."
|
1175 |
msgstr ""
|
1176 |
|
1177 |
+
#: classes/helpers/FrmAppHelper.php:2471
|
1178 |
msgid "There is an error in the calculation in the field with key"
|
1179 |
msgstr ""
|
1180 |
|
1181 |
+
#: classes/helpers/FrmAppHelper.php:2472
|
1182 |
msgid "Please complete the preceding required fields before uploading a file."
|
1183 |
msgstr ""
|
1184 |
|
1185 |
+
#: classes/helpers/FrmAppHelper.php:2483
|
1186 |
msgid "(Click to add description)"
|
1187 |
msgstr ""
|
1188 |
|
1189 |
+
#: classes/helpers/FrmAppHelper.php:2484
|
1190 |
msgid "(Blank)"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
+
#: classes/helpers/FrmAppHelper.php:2485
|
1194 |
msgid "(no label)"
|
1195 |
msgstr ""
|
1196 |
|
1197 |
+
#: classes/helpers/FrmAppHelper.php:2486
|
1198 |
msgid "Saving"
|
1199 |
msgstr ""
|
1200 |
|
1201 |
+
#: classes/helpers/FrmAppHelper.php:2487
|
1202 |
msgid "Saved"
|
1203 |
msgstr ""
|
1204 |
|
1205 |
+
#: classes/helpers/FrmAppHelper.php:2488
|
1206 |
msgid "OK"
|
1207 |
msgstr ""
|
1208 |
|
1209 |
+
#: classes/helpers/FrmAppHelper.php:2489
|
1210 |
#: classes/views/frm-forms/new-form-overlay.php:33
|
1211 |
#: classes/views/frm-forms/new-form-overlay.php:100
|
1212 |
#: classes/views/frm-forms/new-form-overlay.php:109
|
1215 |
#: classes/views/frm-forms/new-form-overlay.php:139
|
1216 |
#: classes/views/shared/admin-header.php:63
|
1217 |
#: classes/views/shared/confirm-overlay.php:19
|
1218 |
+
#: js/formidable_admin.js:3259
|
1219 |
msgid "Cancel"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
+
#: classes/helpers/FrmAppHelper.php:2490
|
1223 |
#: classes/views/frm-fields/back-end/settings.php:270
|
1224 |
msgid "Default"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: classes/helpers/FrmAppHelper.php:2491
|
1228 |
msgid "Clear default value when typing"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: classes/helpers/FrmAppHelper.php:2492
|
1232 |
msgid "Do not clear default value when typing"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: classes/helpers/FrmAppHelper.php:2493
|
1236 |
msgid "Default value will pass form validation"
|
1237 |
msgstr ""
|
1238 |
|
1239 |
+
#: classes/helpers/FrmAppHelper.php:2494
|
1240 |
msgid "Default value will NOT pass form validation"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: classes/helpers/FrmAppHelper.php:2495
|
1244 |
#: classes/helpers/FrmListHelper.php:405
|
1245 |
+
#: js/formidable_admin.js:3629
|
1246 |
msgid "Heads up"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
+
#: classes/helpers/FrmAppHelper.php:2496
|
1250 |
#: classes/views/shared/confirm-overlay.php:15
|
1251 |
#: classes/views/shared/info-overlay.php:15
|
1252 |
msgid "Are you sure?"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
+
#: classes/helpers/FrmAppHelper.php:2497
|
1256 |
msgid "Are you sure you want to delete this field and all data associated with it?"
|
1257 |
msgstr ""
|
1258 |
|
1259 |
+
#: classes/helpers/FrmAppHelper.php:2498
|
1260 |
msgid "All fields inside this Section will be deleted along with their data. Are you sure you want to delete this group of fields?"
|
1261 |
msgstr ""
|
1262 |
|
1263 |
+
#: classes/helpers/FrmAppHelper.php:2499
|
1264 |
msgid "Warning: If you have entries with multiple rows, all but the first row will be lost."
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: classes/helpers/FrmAppHelper.php:2501
|
1268 |
#: classes/helpers/FrmFieldsHelper.php:286
|
1269 |
msgid "The entered values do not match"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: classes/helpers/FrmAppHelper.php:2502
|
1273 |
msgid "Enter Email"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
+
#: classes/helpers/FrmAppHelper.php:2503
|
1277 |
msgid "Confirm Email"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
+
#: classes/helpers/FrmAppHelper.php:2504
|
1281 |
#: classes/views/shared/mb_adv_info.php:166
|
1282 |
msgid "Conditional content here"
|
1283 |
msgstr ""
|
1284 |
|
1285 |
+
#: classes/helpers/FrmAppHelper.php:2505
|
1286 |
#: classes/helpers/FrmFieldsHelper.php:458
|
1287 |
#: classes/helpers/FrmFieldsHelper.php:459
|
1288 |
msgid "New Option"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
+
#: classes/helpers/FrmAppHelper.php:2506
|
1292 |
msgid "In certain browsers (e.g. Firefox) text will not display correctly if the field height is too small relative to the field padding and text size. Please increase your field height or decrease your field padding."
|
1293 |
msgstr ""
|
1294 |
|
1295 |
+
#: classes/helpers/FrmAppHelper.php:2507
|
1296 |
msgid "Enter Password"
|
1297 |
msgstr ""
|
1298 |
|
1299 |
+
#: classes/helpers/FrmAppHelper.php:2508
|
1300 |
msgid "Confirm Password"
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: classes/helpers/FrmAppHelper.php:2509
|
1304 |
msgid "Import Complete"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: classes/helpers/FrmAppHelper.php:2511
|
1308 |
msgid "Warning: There is no way to retrieve unsaved entries."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
+
#: classes/helpers/FrmAppHelper.php:2512
|
1312 |
msgid "Private"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
+
#: classes/helpers/FrmAppHelper.php:2515
|
1316 |
msgid "No new licenses were found"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
+
#: classes/helpers/FrmAppHelper.php:2516
|
1320 |
msgid "This calculation has at least one unmatched ( ) { } [ ]."
|
1321 |
msgstr ""
|
1322 |
|
1323 |
+
#: classes/helpers/FrmAppHelper.php:2517
|
1324 |
msgid "This calculation may have shortcodes that work in Views but not forms."
|
1325 |
msgstr ""
|
1326 |
|
1327 |
+
#: classes/helpers/FrmAppHelper.php:2518
|
1328 |
msgid "This calculation may have shortcodes that work in text calculations but not numeric calculations."
|
1329 |
msgstr ""
|
1330 |
|
1331 |
+
#: classes/helpers/FrmAppHelper.php:2519
|
1332 |
msgid "This form action is limited to one per form. Please edit the existing form action."
|
1333 |
msgstr ""
|
1334 |
|
1335 |
#. Translators: %s is the name of a Detail Page Slug that is a reserved word.
|
1336 |
+
#: classes/helpers/FrmAppHelper.php:2522
|
1337 |
msgid "The Detail Page Slug \"%s\" is reserved by WordPress. This may cause problems. Is this intentional?"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
#. Translators: %s is the name of a parameter that is a reserved word. More than one word could be listed here, though that would not be common.
|
1341 |
+
#: classes/helpers/FrmAppHelper.php:2524
|
1342 |
msgid "The parameter \"%s\" is reserved by WordPress. This may cause problems when included in the URL. Is this intentional? "
|
1343 |
msgstr ""
|
1344 |
|
1345 |
+
#: classes/helpers/FrmAppHelper.php:2525
|
1346 |
#: classes/helpers/FrmFormsHelper.php:1502
|
1347 |
msgid "See the list of reserved words in WordPress."
|
1348 |
msgstr ""
|
1349 |
|
1350 |
+
#: classes/helpers/FrmAppHelper.php:2526
|
1351 |
msgid "Please enter a Repeat Limit that is greater than 1."
|
1352 |
msgstr ""
|
1353 |
|
1354 |
+
#: classes/helpers/FrmAppHelper.php:2527
|
1355 |
msgid "Please select a limit between 0 and 200."
|
1356 |
msgstr ""
|
1357 |
|
1358 |
+
#: classes/helpers/FrmAppHelper.php:2530
|
1359 |
#: classes/views/shared/mb_adv_info.php:113
|
1360 |
#: classes/views/shared/mb_adv_info.php:127
|
1361 |
msgid "Select a Field"
|
1362 |
msgstr ""
|
1363 |
|
1364 |
+
#: classes/helpers/FrmAppHelper.php:2531
|
1365 |
#: classes/helpers/FrmListHelper.php:262
|
1366 |
msgid "No items found."
|
1367 |
msgstr ""
|
1368 |
|
1369 |
+
#: classes/helpers/FrmAppHelper.php:2559
|
1370 |
msgid "You are running an outdated version of Formidable. This plugin may not work correctly if you do not update Formidable."
|
1371 |
msgstr ""
|
1372 |
|
1373 |
+
#: classes/helpers/FrmAppHelper.php:2586
|
1374 |
msgid "You are running a version of Formidable Forms that may not be compatible with your version of Formidable Forms Pro."
|
1375 |
msgstr ""
|
1376 |
|
1377 |
+
#: classes/helpers/FrmAppHelper.php:2614
|
1378 |
msgid "The version of PHP on your server is too low. If this is not corrected, you may see issues with Formidable Forms. Please contact your web host and ask to be updated to PHP 7.0+."
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: classes/helpers/FrmAppHelper.php:2620
|
1382 |
msgid "You are using an outdated browser that is not compatible with Formidable Forms. Please update to a more current browser (we recommend Chrome)."
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: classes/helpers/FrmAppHelper.php:2634
|
1386 |
msgid "English"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
+
#: classes/helpers/FrmAppHelper.php:2635
|
1390 |
msgid "Afrikaans"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
+
#: classes/helpers/FrmAppHelper.php:2636
|
1394 |
msgid "Albanian"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
+
#: classes/helpers/FrmAppHelper.php:2637
|
1398 |
msgid "Arabic"
|
1399 |
msgstr ""
|
1400 |
|
1401 |
+
#: classes/helpers/FrmAppHelper.php:2638
|
1402 |
msgid "Armenian"
|
1403 |
msgstr ""
|
1404 |
|
1405 |
+
#: classes/helpers/FrmAppHelper.php:2639
|
1406 |
msgid "Azerbaijani"
|
1407 |
msgstr ""
|
1408 |
|
1409 |
+
#: classes/helpers/FrmAppHelper.php:2640
|
1410 |
msgid "Basque"
|
1411 |
msgstr ""
|
1412 |
|
1413 |
+
#: classes/helpers/FrmAppHelper.php:2641
|
1414 |
msgid "Bosnian"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
+
#: classes/helpers/FrmAppHelper.php:2642
|
1418 |
msgid "Bulgarian"
|
1419 |
msgstr ""
|
1420 |
|
1421 |
+
#: classes/helpers/FrmAppHelper.php:2643
|
1422 |
msgid "Catalan"
|
1423 |
msgstr ""
|
1424 |
|
1425 |
+
#: classes/helpers/FrmAppHelper.php:2644
|
1426 |
msgid "Chinese Hong Kong"
|
1427 |
msgstr ""
|
1428 |
|
1429 |
+
#: classes/helpers/FrmAppHelper.php:2645
|
1430 |
msgid "Chinese Simplified"
|
1431 |
msgstr ""
|
1432 |
|
1433 |
+
#: classes/helpers/FrmAppHelper.php:2646
|
1434 |
msgid "Chinese Traditional"
|
1435 |
msgstr ""
|
1436 |
|
1437 |
+
#: classes/helpers/FrmAppHelper.php:2647
|
1438 |
msgid "Croatian"
|
1439 |
msgstr ""
|
1440 |
|
1441 |
+
#: classes/helpers/FrmAppHelper.php:2648
|
1442 |
msgid "Czech"
|
1443 |
msgstr ""
|
1444 |
|
1445 |
+
#: classes/helpers/FrmAppHelper.php:2649
|
1446 |
msgid "Danish"
|
1447 |
msgstr ""
|
1448 |
|
1449 |
+
#: classes/helpers/FrmAppHelper.php:2650
|
1450 |
msgid "Dutch"
|
1451 |
msgstr ""
|
1452 |
|
1453 |
+
#: classes/helpers/FrmAppHelper.php:2651
|
1454 |
msgid "English/UK"
|
1455 |
msgstr ""
|
1456 |
|
1457 |
+
#: classes/helpers/FrmAppHelper.php:2652
|
1458 |
msgid "Esperanto"
|
1459 |
msgstr ""
|
1460 |
|
1461 |
+
#: classes/helpers/FrmAppHelper.php:2653
|
1462 |
msgid "Estonian"
|
1463 |
msgstr ""
|
1464 |
|
1465 |
+
#: classes/helpers/FrmAppHelper.php:2654
|
1466 |
msgid "Faroese"
|
1467 |
msgstr ""
|
1468 |
|
1469 |
+
#: classes/helpers/FrmAppHelper.php:2655
|
1470 |
msgid "Farsi/Persian"
|
1471 |
msgstr ""
|
1472 |
|
1473 |
+
#: classes/helpers/FrmAppHelper.php:2656
|
1474 |
msgid "Filipino"
|
1475 |
msgstr ""
|
1476 |
|
1477 |
+
#: classes/helpers/FrmAppHelper.php:2657
|
1478 |
msgid "Finnish"
|
1479 |
msgstr ""
|
1480 |
|
1481 |
+
#: classes/helpers/FrmAppHelper.php:2658
|
1482 |
msgid "French"
|
1483 |
msgstr ""
|
1484 |
|
1485 |
+
#: classes/helpers/FrmAppHelper.php:2659
|
1486 |
msgid "French/Canadian"
|
1487 |
msgstr ""
|
1488 |
|
1489 |
+
#: classes/helpers/FrmAppHelper.php:2660
|
1490 |
msgid "French/Swiss"
|
1491 |
msgstr ""
|
1492 |
|
1493 |
+
#: classes/helpers/FrmAppHelper.php:2661
|
1494 |
msgid "German"
|
1495 |
msgstr ""
|
1496 |
|
1497 |
+
#: classes/helpers/FrmAppHelper.php:2662
|
1498 |
msgid "German/Austria"
|
1499 |
msgstr ""
|
1500 |
|
1501 |
+
#: classes/helpers/FrmAppHelper.php:2663
|
1502 |
msgid "German/Switzerland"
|
1503 |
msgstr ""
|
1504 |
|
1505 |
+
#: classes/helpers/FrmAppHelper.php:2664
|
1506 |
msgid "Greek"
|
1507 |
msgstr ""
|
1508 |
|
1509 |
+
#: classes/helpers/FrmAppHelper.php:2665
|
1510 |
+
#: classes/helpers/FrmAppHelper.php:2666
|
1511 |
msgid "Hebrew"
|
1512 |
msgstr ""
|
1513 |
|
1514 |
+
#: classes/helpers/FrmAppHelper.php:2667
|
1515 |
msgid "Hindi"
|
1516 |
msgstr ""
|
1517 |
|
1518 |
+
#: classes/helpers/FrmAppHelper.php:2668
|
1519 |
msgid "Hungarian"
|
1520 |
msgstr ""
|
1521 |
|
1522 |
+
#: classes/helpers/FrmAppHelper.php:2669
|
1523 |
msgid "Icelandic"
|
1524 |
msgstr ""
|
1525 |
|
1526 |
+
#: classes/helpers/FrmAppHelper.php:2670
|
1527 |
msgid "Indonesian"
|
1528 |
msgstr ""
|
1529 |
|
1530 |
+
#: classes/helpers/FrmAppHelper.php:2671
|
1531 |
msgid "Italian"
|
1532 |
msgstr ""
|
1533 |
|
1534 |
+
#: classes/helpers/FrmAppHelper.php:2672
|
1535 |
msgid "Japanese"
|
1536 |
msgstr ""
|
1537 |
|
1538 |
+
#: classes/helpers/FrmAppHelper.php:2673
|
1539 |
msgid "Korean"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
+
#: classes/helpers/FrmAppHelper.php:2674
|
1543 |
msgid "Latvian"
|
1544 |
msgstr ""
|
1545 |
|
1546 |
+
#: classes/helpers/FrmAppHelper.php:2675
|
1547 |
msgid "Lithuanian"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
+
#: classes/helpers/FrmAppHelper.php:2676
|
1551 |
msgid "Malaysian"
|
1552 |
msgstr ""
|
1553 |
|
1554 |
+
#: classes/helpers/FrmAppHelper.php:2677
|
1555 |
msgid "Norwegian"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
+
#: classes/helpers/FrmAppHelper.php:2678
|
1559 |
msgid "Polish"
|
1560 |
msgstr ""
|
1561 |
|
1562 |
+
#: classes/helpers/FrmAppHelper.php:2679
|
1563 |
msgid "Portuguese"
|
1564 |
msgstr ""
|
1565 |
|
1566 |
+
#: classes/helpers/FrmAppHelper.php:2680
|
1567 |
msgid "Portuguese/Brazilian"
|
1568 |
msgstr ""
|
1569 |
|
1570 |
+
#: classes/helpers/FrmAppHelper.php:2681
|
1571 |
msgid "Portuguese/Portugal"
|
1572 |
msgstr ""
|
1573 |
|
1574 |
+
#: classes/helpers/FrmAppHelper.php:2682
|
1575 |
msgid "Romanian"
|
1576 |
msgstr ""
|
1577 |
|
1578 |
+
#: classes/helpers/FrmAppHelper.php:2683
|
1579 |
msgid "Russian"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
+
#: classes/helpers/FrmAppHelper.php:2684
|
1583 |
+
#: classes/helpers/FrmAppHelper.php:2685
|
1584 |
msgid "Serbian"
|
1585 |
msgstr ""
|
1586 |
|
1587 |
+
#: classes/helpers/FrmAppHelper.php:2686
|
1588 |
msgid "Slovak"
|
1589 |
msgstr ""
|
1590 |
|
1591 |
+
#: classes/helpers/FrmAppHelper.php:2687
|
1592 |
msgid "Slovenian"
|
1593 |
msgstr ""
|
1594 |
|
1595 |
+
#: classes/helpers/FrmAppHelper.php:2688
|
1596 |
msgid "Spanish"
|
1597 |
msgstr ""
|
1598 |
|
1599 |
+
#: classes/helpers/FrmAppHelper.php:2689
|
1600 |
msgid "Spanish/Latin America"
|
1601 |
msgstr ""
|
1602 |
|
1603 |
+
#: classes/helpers/FrmAppHelper.php:2690
|
1604 |
msgid "Swedish"
|
1605 |
msgstr ""
|
1606 |
|
1607 |
+
#: classes/helpers/FrmAppHelper.php:2691
|
1608 |
msgid "Tamil"
|
1609 |
msgstr ""
|
1610 |
|
1611 |
+
#: classes/helpers/FrmAppHelper.php:2692
|
1612 |
msgid "Thai"
|
1613 |
msgstr ""
|
1614 |
|
1615 |
+
#: classes/helpers/FrmAppHelper.php:2693
|
1616 |
msgid "Turkish"
|
1617 |
msgstr ""
|
1618 |
|
1619 |
+
#: classes/helpers/FrmAppHelper.php:2694
|
1620 |
msgid "Ukranian"
|
1621 |
msgstr ""
|
1622 |
|
1623 |
+
#: classes/helpers/FrmAppHelper.php:2695
|
1624 |
msgid "Vietnamese"
|
1625 |
msgstr ""
|
1626 |
|
1627 |
+
#: classes/helpers/FrmAppHelper.php:2737
|
1628 |
msgid "Your account has expired"
|
1629 |
msgstr ""
|
1630 |
|
1631 |
+
#: classes/helpers/FrmAppHelper.php:2740
|
1632 |
msgid "Renew Now"
|
1633 |
msgstr ""
|
1634 |
|
1750 |
#: classes/helpers/FrmFormsHelper.php:1134
|
1751 |
#: classes/helpers/FrmFormsListHelper.php:133
|
1752 |
#: classes/views/frm-form-actions/form_action.php:25
|
1753 |
+
#: classes/views/frm-forms/add_field.php:34
|
1754 |
msgid "Delete"
|
1755 |
msgstr ""
|
1756 |
|
3738 |
msgstr ""
|
3739 |
|
3740 |
#. translators: %1$s: Plugin name, %2$s: Start link HTML, %3$s: end link HTML
|
3741 |
+
#: classes/models/FrmAddon.php:305
|
3742 |
msgid "Your %1$s license key is missing. Please add it on the %2$slicenses page%3$s."
|
3743 |
msgstr ""
|
3744 |
|
3745 |
+
#: classes/models/FrmAddon.php:500
|
3746 |
msgid "Oops! You forgot to enter your license number."
|
3747 |
msgstr ""
|
3748 |
|
3749 |
+
#: classes/models/FrmAddon.php:583
|
3750 |
msgid "Your license has been activated. Enjoy!"
|
3751 |
msgstr ""
|
3752 |
|
3753 |
+
#: classes/models/FrmAddon.php:584
|
3754 |
+
#: classes/models/FrmAddon.php:589
|
3755 |
msgid "That license key is invalid"
|
3756 |
msgstr ""
|
3757 |
|
3758 |
+
#: classes/models/FrmAddon.php:585
|
3759 |
msgid "That license is expired"
|
3760 |
msgstr ""
|
3761 |
|
3762 |
+
#: classes/models/FrmAddon.php:586
|
3763 |
msgid "That license has been refunded"
|
3764 |
msgstr ""
|
3765 |
|
3766 |
+
#: classes/models/FrmAddon.php:587
|
3767 |
msgid "That license has been used on too many sites"
|
3768 |
msgstr ""
|
3769 |
|
3770 |
+
#: classes/models/FrmAddon.php:588
|
3771 |
msgid "Oops! That is the wrong license key for this plugin."
|
3772 |
msgstr ""
|
3773 |
|
3774 |
+
#: classes/models/FrmAddon.php:605
|
3775 |
msgid "Cache cleared"
|
3776 |
msgstr ""
|
3777 |
|
3778 |
+
#: classes/models/FrmAddon.php:627
|
3779 |
msgid "That license was removed successfully"
|
3780 |
msgstr ""
|
3781 |
|
3782 |
+
#: classes/models/FrmAddon.php:629
|
3783 |
msgid "There was an error deactivating your license."
|
3784 |
msgstr ""
|
3785 |
|
3786 |
+
#: classes/models/FrmAddon.php:673
|
3787 |
msgid "Your License Key was invalid"
|
3788 |
msgstr ""
|
3789 |
|
3790 |
#. translators: %1$s: Start link HTML, %2$s: End link HTML
|
3791 |
+
#: classes/models/FrmAddon.php:677
|
3792 |
msgid "You had an error communicating with the Formidable API. %1$sClick here%2$s for more information."
|
3793 |
msgstr ""
|
3794 |
|
3795 |
+
#: classes/models/FrmAddon.php:680
|
3796 |
msgid "You had an HTTP error connecting to the Formidable API"
|
3797 |
msgstr ""
|
3798 |
|
3799 |
#. translators: %1$s: Error code, %2$s: Error message
|
3800 |
+
#: classes/models/FrmAddon.php:691
|
3801 |
msgid "There was a %1$s error: %2$s"
|
3802 |
msgstr ""
|
3803 |
|
4082 |
msgid "Form Submissions"
|
4083 |
msgstr ""
|
4084 |
|
4085 |
+
#. translators: Formidable addon name
|
4086 |
+
#: classes/models/FrmPluginSearch.php:77
|
4087 |
+
msgctxt "Formidable Addon Name"
|
4088 |
+
msgid "Formidable %s"
|
4089 |
+
msgstr ""
|
4090 |
+
|
4091 |
+
#: classes/models/FrmPluginSearch.php:314
|
4092 |
+
msgid "Install Now"
|
4093 |
+
msgstr ""
|
4094 |
+
|
4095 |
+
#: classes/models/FrmPluginSearch.php:323
|
4096 |
+
msgid "Learn more"
|
4097 |
+
msgstr ""
|
4098 |
+
|
4099 |
+
#: classes/models/FrmPluginSearch.php:332
|
4100 |
+
msgid "Hide this suggestion"
|
4101 |
+
msgstr ""
|
4102 |
+
|
4103 |
+
#: classes/models/FrmPluginSearch.php:356
|
4104 |
+
msgid "This suggestion was made by Formidable Forms, the form builder and application plugin already installed on your site."
|
4105 |
+
msgstr ""
|
4106 |
+
|
4107 |
#. translators: %s: User name, %2$d: number of entries
|
4108 |
#: classes/models/FrmReviews.php:108
|
4109 |
msgid "Congratulations%1$s! You have collected %2$d form submissions."
|
4144 |
msgstr ""
|
4145 |
|
4146 |
#: classes/models/FrmSettings.php:108
|
4147 |
+
#: classes/views/frm-forms/form.php:48
|
4148 |
#: classes/views/styles/_sample_form.php:79
|
4149 |
msgid "Submit"
|
4150 |
msgstr ""
|
4722 |
msgstr ""
|
4723 |
|
4724 |
#: classes/views/frm-form-actions/form_action.php:21
|
4725 |
+
#: classes/views/frm-forms/add_field.php:37
|
4726 |
msgid "Duplicate"
|
4727 |
msgstr ""
|
4728 |
|
4838 |
msgid "Show options"
|
4839 |
msgstr ""
|
4840 |
|
4841 |
+
#: classes/views/frm-forms/add_field.php:21
|
4842 |
msgid "Expand/Collapse Section"
|
4843 |
msgstr ""
|
4844 |
|
4845 |
+
#: classes/views/frm-forms/add_field.php:24
|
4846 |
msgid "Move Field"
|
4847 |
msgstr ""
|
4848 |
|
4849 |
+
#: classes/views/frm-forms/add_field.php:29
|
4850 |
+
msgid "More Options"
|
4851 |
msgstr ""
|
4852 |
|
4853 |
+
#: classes/views/frm-forms/add_field.php:41
|
4854 |
+
msgid "Field settings"
|
4855 |
msgstr ""
|
4856 |
|
4857 |
+
#: classes/views/frm-forms/add_field.php:54
|
|
|
|
|
|
|
|
|
4858 |
msgid "(Collapsed)"
|
4859 |
msgstr ""
|
4860 |
|
4861 |
+
#: classes/views/frm-forms/add_field.php:90
|
4862 |
+
#: classes/views/frm-forms/form.php:55
|
4863 |
+
msgid "Add Fields Here"
|
4864 |
msgstr ""
|
4865 |
|
4866 |
#: classes/views/frm-forms/add_field_links.php:11
|
4928 |
msgid "Page %s"
|
4929 |
msgstr ""
|
4930 |
|
4931 |
+
#: classes/views/frm-forms/form.php:58
|
|
|
|
|
|
|
|
|
4932 |
msgid "Click or drag a field from the sidebar to add it to your form"
|
4933 |
msgstr ""
|
4934 |
|
6215 |
#: deprecated/FrmEDD_SL_Plugin_Updater.php:315
|
6216 |
msgid "Error"
|
6217 |
msgstr ""
|
6218 |
+
|
6219 |
+
#: js/formidable_admin.js:2972
|
6220 |
+
msgid "Custom layout"
|
6221 |
+
msgstr ""
|
6222 |
+
|
6223 |
+
#: js/formidable_admin.js:2986
|
6224 |
+
msgid "Break into rows"
|
6225 |
+
msgstr ""
|
6226 |
+
|
6227 |
+
#: js/formidable_admin.js:2995
|
6228 |
+
msgid "Row Layout"
|
6229 |
+
msgstr ""
|
6230 |
+
|
6231 |
+
#: js/formidable_admin.js:3244
|
6232 |
+
msgid "Enter number of columns for each field"
|
6233 |
+
msgstr ""
|
6234 |
+
|
6235 |
+
#: js/formidable_admin.js:3248
|
6236 |
+
msgid "Layouts are based on a 12-column grid system"
|
6237 |
+
msgstr ""
|
6238 |
+
|
6239 |
+
#: js/formidable_admin.js:3264
|
6240 |
+
msgid "Save"
|
6241 |
+
msgstr ""
|
6242 |
+
|
6243 |
+
#: js/formidable_admin.js:3550
|
6244 |
+
msgid "Merge into row"
|
6245 |
+
msgstr ""
|
6246 |
+
|
6247 |
+
#. translators: %1$s: Number of fields that are selected to be deleted.
|
6248 |
+
#: js/formidable_admin.js:3631
|
6249 |
+
msgid "Are you sure you want to delete these %1$s selected fields?"
|
6250 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Plugin Name: Formidable Forms - Contact Form, Survey & Quiz Forms Plugin for WordPress
|
3 |
Contributors: formidableforms, sswells, srwells
|
4 |
Tags: forms, contact form, form builder, survey, form maker, form creator, paypal form, paypal, stripe, stripe form, aweber, aweber form, getresponse, getresponse form, calculator, price calculator, quote form, contact button, form manager, Akismet, payment form, survey form, donation form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form, constant contact, mailpoet, active campaign, salesforce, hubspot, campaign monitor, quiz builder, quiz, feedback form, mailchimp form
|
5 |
-
Requires at least:
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag:
|
9 |
|
10 |
The most advanced WordPress forms plugin. Go beyond contact forms with our drag & drop form builder for surveys, quizzes, and more.
|
11 |
|
@@ -440,6 +440,17 @@ Using our Zapier integration, you can easily connect Formidable with over 1000+
|
|
440 |
See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
|
441 |
|
442 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
= 4.11.05 =
|
444 |
* New: Improved support for importing grid and table view content.
|
445 |
* Fix: The update and preview buttons in the form builder would wrap to two lines for some longer translations including German and Dutch.
|
@@ -470,11 +481,4 @@ See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zap
|
|
470 |
* New: Added a frm_process_honeypot filter for gracefully handling honeypot spam.
|
471 |
* Fix: A warning was getting logged when exporting as XML.
|
472 |
|
473 |
-
= 4.10.03 =
|
474 |
-
* New: Improved the performance of the style editor preview.
|
475 |
-
* New: You can now sign up for free templates directly from your inbox.
|
476 |
-
* Fix: Date fields were not properly detecting duplicate entries.
|
477 |
-
* Fix: Conditionals were not properly fading in when the form block was added to a page.
|
478 |
-
* Fix: Actions would occasionally conflict if multiple were added too quickly.
|
479 |
-
|
480 |
<a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>
|
2 |
Plugin Name: Formidable Forms - Contact Form, Survey & Quiz Forms Plugin for WordPress
|
3 |
Contributors: formidableforms, sswells, srwells
|
4 |
Tags: forms, contact form, form builder, survey, form maker, form creator, paypal form, paypal, stripe, stripe form, aweber, aweber form, getresponse, getresponse form, calculator, price calculator, quote form, contact button, form manager, Akismet, payment form, survey form, donation form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form, constant contact, mailpoet, active campaign, salesforce, hubspot, campaign monitor, quiz builder, quiz, feedback form, mailchimp form
|
5 |
+
Requires at least: 5.0
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 5.0
|
9 |
|
10 |
The most advanced WordPress forms plugin. Go beyond contact forms with our drag & drop form builder for surveys, quizzes, and more.
|
11 |
|
440 |
See all <a href="https://zapier.com/apps/formidable/integrations">Formidable Zapier Integrations</a>.
|
441 |
|
442 |
== Changelog ==
|
443 |
+
= 5.0 =
|
444 |
+
* Increased WP version requirement to 5.0.
|
445 |
+
* New: Fields can now be dragged beside each other and grid layouts will be automatically applied.
|
446 |
+
* New: Added the option to quickly set layouts for a full row of fields at once.
|
447 |
+
* New: Fields can now be multiselected using the command, control, and shift keys. Selected field groups can be merged into rows and deleted in batches.
|
448 |
+
* New: Added additional formatting to calculations to avoid issues with comparisons getting stripped when spaces are left out.
|
449 |
+
* New: Permissions are now updated right away when a formidable license is activated to avoid issues with certain pro features not being available right away.
|
450 |
+
* Fix: Updated styling rules for repeater button icons to avoid issues with file upload icons getting styled as well.
|
451 |
+
* Fix: The confirmation pop up title was displaying as inline when trying to delete a section.
|
452 |
+
* Fix: Updated styling for new fields that are about to be dropped into a form.
|
453 |
+
|
454 |
= 4.11.05 =
|
455 |
* New: Improved support for importing grid and table view content.
|
456 |
* Fix: The update and preview buttons in the form builder would wrap to two lines for some longer translations including German and Dutch.
|
481 |
* New: Added a frm_process_honeypot filter for gracefully handling honeypot spam.
|
482 |
* Fix: A warning was getting logged when exporting as XML.
|
483 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
484 |
<a href="https://raw.githubusercontent.com/Strategy11/formidable-forms/master/changelog.txt">See changelog for all versions</a>
|