Skip to content

Commit 8de057e

Browse files
authored
Merge pull request #145 from BoldGrid/1.6.10-rc1
Updated Versioning and readme
2 parents f7c6258 + 89c5c0a commit 8de057e

File tree

13 files changed

+248
-193
lines changed

13 files changed

+248
-193
lines changed

README.md

Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# weForms - Easy Drag & Drop Contact Form Builder For WordPress #
2-
**Contributors:** [tareq1988](https://profiles.wordpress.org/tareq1988), [nizamuddinbabu](https://profiles.wordpress.org/nizamuddinbabu), [boldgrid](https://profiles.wordpress.org/boldgrid), [joemoto](https://profiles.wordpress.org/joemoto), [jamesros161](https://profiles.wordpress.org/jamesros161)
3-
**Tags:** forms, contact form, contact form plugin, custom form, form builder, form, form creator, form manager, form creation, contact forms, custom forms, forms builder, forms creator, forms manager, forms creation
4-
**Requires at least:** 4.4
5-
**Requires PHP:** 5.6.20
6-
**Tested up to:** 5.7
7-
**Stable tag:** 1.6.9
8-
**License:** GPLv2 or later
9-
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html
2+
**Contributors:** [tareq1988](https://profiles.wordpress.org/tareq1988), [nizamuddinbabu](https://profiles.wordpress.org/nizamuddinbabu), [boldgrid](https://profiles.wordpress.org/boldgrid), [joemoto](https://profiles.wordpress.org/joemoto), [jamesros161](https://profiles.wordpress.org/jamesros161)
3+
**Tags:** forms, contact form, contact form plugin, custom form, form builder, form, form creator, form manager, form creation, contact forms, custom forms, forms builder, forms creator, forms manager, forms creation
4+
**Requires at least:** 4.4
5+
**Requires PHP:** 5.6.20
6+
**Tested up to:** 5.7
7+
**Stable tag:** 1.6.10
8+
**License:** GPLv2 or later
9+
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html
1010

1111
The easiest & fastest Contact Form on WordPress. Multiple templates, drag-&-drop live builder, submission listing, reCaptcha & more!
1212

@@ -21,36 +21,6 @@ Moreover, with more than 20+ custom field, you can swiftly build contact forms,
2121

2222
So weForms is an all-in-one form builder created with the global users in mind. Its minimalistic design is not only modern but also super fast and user-friendly. Everything works on a single page. Feel no delay – because your time is precious!
2323

24-
## Development ##
25-
26-
### Installing Dependencies ###
27-
Before you can use the development version of this plugin you must install the dependencies.
28-
29-
```
30-
npm install
31-
```
32-
33-
### Workflow ###
34-
Before editing or making changes check to make sure you are not editing any concatenated files. Check the Gruntfile.js in the concat: section for details. If you edit a concatenated file and run the build process any of your changes will be overwritten.
35-
36-
Once you have made the changes and are ready to test run the following command.
37-
38-
```
39-
grunt concat:(specified source)
40-
```
41-
42-
#### Minify JS ####
43-
If you want to test changes with SCRIPT_DEBUG set to false. You will need to make sure the scripts are minified.
44-
To minify Javascript for testing run the following command.
45-
46-
```
47-
grunt uglify:main
48-
```
49-
50-
### Build Process ###
51-
When you are ready to build for release or QA make sure all branchs are merge that will be in the release and follow:
52-
[Release Process https://github.com/BoldGrid/weforms/wiki/Release-Process]
53-
5424
### Quick Overview of weForms ###
5525
[youtube https://www.youtube.com/watch?v=4uYi0833Kjw]
5626

@@ -279,6 +249,16 @@ weForms is the most beginner friendly and fastest WordPress contact form plugin
279249

280250
## Changelog ##
281251

252+
### Version 1.6.10 (05 January, 2022) ###
253+
* **Update:** Axios from 0.21.1 to 0.21.2.
254+
* **Update:** Set-value from 3.0.2 to 4.0.1.
255+
* **Update:** Added data-sytle to all fields.
256+
* **Fix:** Enforce date format from datepicker.
257+
* **Fix:** Changed entry after submission to form setting from global setting.
258+
* **Fix:** Removed id from entry table view.
259+
* **Fix:** Entry details show option and value selected.
260+
* **Improvement:** Address fields in notifications now accepts value: tags for selection fields
261+
282262
### Version 1.6.9 (15 September, 2021) ###
283263
* **Fix:** PHP 8.0 Emogrifier updates
284264
* **Fix:** Transaction page link updated to weforms site

assets/js-templates/spa-components.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,14 @@
826826

827827
<div class="inside">
828828
<p class="help">
829-
<?php esc_html_e( 'Export your form entries/submissions as a <strong>CSV</strong> file.', 'weforms' ); ?>
829+
<?php
830+
// translators: 1: Opening strong tag. 2: closing strong tag
831+
printf(
832+
esc_html__( 'Export your form entries/submissions as a %1$sCSV%2$S file.', 'weforms' ),
833+
'<strong>',
834+
'</strong>'
835+
);
836+
?>
830837
</p>
831838

832839
<template v-if="!loading">
@@ -854,7 +861,15 @@
854861
<h3><?php esc_html_e( 'Import Contact Form', 'weforms' ); ?></h3>
855862

856863
<p><?php esc_html_e( 'Browse and locate a json file you backed up before.', 'weforms' ); ?></p>
857-
<p><?php esc_html_e( 'Press <strong>Import</strong> button, we will do the rest for you.', 'weforms' ); ?></p>
864+
<p><?php
865+
// translators: 1: Strong tag with text.
866+
printf(
867+
esc_html__( 'Press %1$s Import button, we will do the rest for you.', 'weforms' ),
868+
'<strong>',
869+
'</strong>'
870+
);
871+
?>
872+
</p>
858873

859874
<div class="updated-message notice notice-success is-dismissible" v-if="isSuccess">
860875
<p>{{ responseMessage }}</p>

assets/js/spa-app.js

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
'use strict';
22

3-
var _typeof5 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3+
var _typeof10 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4+
5+
var _typeof9 = typeof Symbol === "function" && _typeof10(Symbol.iterator) === "symbol" ? function (obj) {
6+
return typeof obj === "undefined" ? "undefined" : _typeof10(obj);
7+
} : function (obj) {
8+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof10(obj);
9+
};
10+
11+
var _typeof8 = typeof Symbol === "function" && _typeof9(Symbol.iterator) === "symbol" ? function (obj) {
12+
return typeof obj === "undefined" ? "undefined" : _typeof9(obj);
13+
} : function (obj) {
14+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof9(obj);
15+
};
16+
17+
var _typeof7 = typeof Symbol === "function" && _typeof8(Symbol.iterator) === "symbol" ? function (obj) {
18+
return typeof obj === "undefined" ? "undefined" : _typeof8(obj);
19+
} : function (obj) {
20+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof8(obj);
21+
};
22+
23+
var _typeof6 = typeof Symbol === "function" && _typeof7(Symbol.iterator) === "symbol" ? function (obj) {
24+
return typeof obj === "undefined" ? "undefined" : _typeof7(obj);
25+
} : function (obj) {
26+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof7(obj);
27+
};
28+
29+
var _typeof5 = typeof Symbol === "function" && _typeof6(Symbol.iterator) === "symbol" ? function (obj) {
30+
return typeof obj === "undefined" ? "undefined" : _typeof6(obj);
31+
} : function (obj) {
32+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof6(obj);
33+
};
434

535
var _typeof4 = typeof Symbol === "function" && _typeof5(Symbol.iterator) === "symbol" ? function (obj) {
636
return typeof obj === "undefined" ? "undefined" : _typeof5(obj);

assets/js/spa-app.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/class-ajax.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -767,20 +767,20 @@ public function handle_frontend_submission() {
767767
$entry_id = weforms_insert_entry( [
768768
'form_id' => $form_id,
769769
], $entry_fields );
770-
if ( is_wp_error( $entry_id ) ) {
771-
wp_send_json( [
772-
'success' => false,
773-
'error' => $entry_id->get_error_message(),
770+
if ( is_wp_error( $entry_id ) ) {
771+
wp_send_json( [
772+
'success' => false,
773+
'error' => $entry_id->get_error_message(),
774+
] );
775+
}
776+
// Fire a hook for integration
777+
do_action( 'weforms_entry_submission', $entry_id, $form_id, $page_id, $form_settings );
778+
$notification = new WeForms_Notification( [
779+
'form_id' => $form_id,
780+
'page_id' => $page_id,
781+
'entry_id' => $entry_id,
774782
] );
775-
}
776-
// Fire a hook for integration
777-
do_action( 'weforms_entry_submission', $entry_id, $form_id, $page_id, $form_settings );
778-
$notification = new WeForms_Notification( [
779-
'form_id' => $form_id,
780-
'page_id' => $page_id,
781-
'entry_id' => $entry_id,
782-
] );
783-
$notification->send_notifications();
783+
$notification->send_notifications();
784784
}
785785
// redirect URL
786786
$show_message = false;

includes/class-form.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ public function get_fields() {
140140
}
141141

142142
// Check if meta_key has changed when saving form compared current entries
143-
$field['original_name'] = $field['name'];
144-
143+
if ( isset( $field['name'] ) ) {
144+
$field['original_name'] = $field['name'];
145+
}
145146
$form_fields[] = apply_filters( 'weforms-get-form-field', $field, $this->id );
146147
}
147148

includes/fields/class-field-date.php

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function __construct() {
1212
}
1313

1414
/**
15-
* Render the text field
15+
* Render the date field
1616
*
1717
* @param array $field_settings
1818
* @param int $form_id
@@ -29,7 +29,11 @@ public function render( $field_settings, $form_id ) {
2929
<div class="wpuf-fields">
3030
<input
3131
id="wpuf-date-<?php echo esc_attr( $field_settings['name'] ); ?>"
32-
type="text" <?php echo esc_attr( $field_settings['enforce_format'] !== 'yes' ) ? '' : 'readonly'; ?>
32+
type="text"
33+
<?php
34+
$field_settings['enforce_format'] = ! isset( $field_settings['enforce_format'] ) ? '' : $field_settings['enforce_format'];
35+
echo esc_attr( $field_settings['enforce_format'] !== 'yes' ) ? '' : 'readonly';
36+
?>
3337
class="datepicker <?php echo ' wpuf_'.esc_attr( $field_settings['name'] ).'_'. esc_attr($form_id); ?>"
3438
data-required="<?php echo esc_attr($field_settings['required']) ?>"
3539
data-type="text"
@@ -71,19 +75,19 @@ public function get_options_settings() {
7175
$settings = [
7276
[
7377
'name' => 'format',
74-
'title' => __( 'Date Format', 'weforms' ),
78+
'title' => esc_html__( 'Date Format', 'weforms' ),
7579
'type' => 'text',
7680
'section' => 'advanced',
7781
'priority' => 23,
78-
'help_text' => __( 'The date format', 'weforms' ),
82+
'help_text' => esc_html__( 'The date format', 'weforms' ),
7983
],
8084
[
8185
'name' => 'time',
8286
'title' => '',
8387
'type' => 'checkbox',
8488
'is_single_opt' => true,
8589
'options' => [
86-
'yes' => __( 'Enable time input', 'weforms' ),
90+
'yes' => esc_html__( 'Enable time input', 'weforms' ),
8791
],
8892
'section' => 'advanced',
8993
'priority' => 24,
@@ -95,24 +99,25 @@ public function get_options_settings() {
9599
'type' => 'checkbox',
96100
'is_single_opt' => true,
97101
'options' => [
98-
'yes' => __( 'Set this as publish time input', 'weforms' ),
102+
'yes' => esc_html__( 'Set this as publish time input', 'weforms' ),
99103
],
100104
'section' => 'advanced',
101105
'priority' => 24,
102106
'help_text' => '',
103107
],
104108
[
105109
'name' => 'enforce_format',
106-
'title' => '',
110+
'title' => __( 'Toggle Keyboard input for Date', 'weforms' ),
107111
'type' => 'checkbox',
108112
'section' => 'advanced',
109113
'is_single_opt' => true,
110114
'options' => [
111-
'yes' => __( 'Enforce Date Format', 'weforms' ),
115+
'yes' => esc_html__( 'Force Datepicker Input', 'weforms' ),
112116
],
117+
'default' => 'yes',
113118
'priority' => 24,
114-
'help_text' => __( 'Disables Keyboard Input and uses the Datepicker Format', 'weforms' ),
115-
]
119+
'help_text' => esc_html__( 'Disables Keyboard Input and uses the Datepicker Format', 'weforms' ),
120+
],
116121
];
117122

118123
return array_merge( $default_options, $settings );
@@ -129,6 +134,7 @@ public function get_field_props() {
129134
'format' => 'dd/mm/yy',
130135
'time' => '',
131136
'is_publish_time' => '',
137+
'enforce_format' => '',
132138
];
133139

134140
return array_merge( $defaults, $props );

includes/integrations/sprout-invoices/class-integration-sprout-invoices.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function create_doc($entry_id, $form_id, $page_id)
9696
'country' => isset( $address['country_select'] ) ? $address['country_select'] : '',
9797
);
9898
}
99-
99+
100100
preg_match_all("/(?<=:)\w+(?=\})/", $integration->fields->line_items, $matches );
101101

102102
$line_item_data = array_key_exists( $matches[0][0], $form_data['data'] );
@@ -132,7 +132,7 @@ public function create_doc($entry_id, $form_id, $page_id)
132132
'qty' => $lineItemsSelected[0]['quantity'],
133133
);
134134
}
135-
135+
136136
};
137137
if ( isset( $li_items ) && isset( $li_deposit ) ) {
138138
$li = array_merge( $li_items, $li_deposit );
@@ -158,7 +158,7 @@ public function create_doc($entry_id, $form_id, $page_id)
158158
'vat' => self::get_value( $integration->fields->vat, $entry_id, $form_id, $page_id ),
159159
'entry_note' => self::build_entry_note( $form_id, $entry_id ),
160160
'entry_id' => $entry_id,
161-
'payment' => !empty( $li_deposit ) ? 'true' : 'false',
161+
'payment' => !empty( $payment_data ) ? 'true' : 'false',
162162
'form_id' => $form_id,
163163
'page_id' => $page_id,
164164
'form_data' => $form_data['data'],
@@ -167,17 +167,17 @@ public function create_doc($entry_id, $form_id, $page_id)
167167

168168
$doc_id = 0;
169169
$doctype = $integration->doctype;
170-
$create_user_and_client = $integration->create_user_and_client;
170+
$create_user_and_client = isset( $integration->create_user_and_client ) ? $integration->create_user_and_client : 'false';
171171
switch ($doctype) {
172172
case 'invoice':
173173
$doc_id = $this->create_invoice( $submission );
174-
if ($create_user_and_client) {
174+
if ( 'false' !== $create_user_and_client ) {
175175
$this->create_client( $submission, $doc_id );
176176
}
177177
break;
178178
case 'estimate':
179179
$doc_id = $this->create_estimate( $submission );
180-
if ($create_user_and_client) {
180+
if ( 'false' !== $create_user_and_client ) {
181181
$this->create_client( $submission, $doc_id );
182182
}
183183
break;
@@ -190,8 +190,8 @@ public function create_doc($entry_id, $form_id, $page_id)
190190
}
191191

192192
// REDIRECT
193-
$redirect = $integration->redirect;
194-
if ($redirect && $doc_id) {
193+
$redirect = isset( $integration->redirect ) ? $integration->redirect : 'false';
194+
if ( 'false' !== $redirect && $doc_id ) {
195195
$doc = si_get_doc_object( $doc_id );
196196
$doc->set_pending();
197197
$url = wp_get_referer();
@@ -342,7 +342,7 @@ public static function build_entry_note($form_id, $entry_id)
342342
return $table;
343343
}
344344

345-
protected function create_invoice($submission = array())
345+
protected function create_invoice( $submission = array() )
346346
{
347347
$invoice_args = array(
348348
'subject' => sprintf( apply_filters( 'si_form_submission_title_format', '%1$s (%2$s)', $submission ), $submission['subject'], $submission['client_name'] ),
@@ -357,11 +357,12 @@ protected function create_invoice($submission = array())
357357
*/
358358
$invoice_id = SI_Invoice::create_invoice( $invoice_args );
359359
$invoice = SI_Invoice::get_instance( $invoice_id );
360-
$status = SI_Payment::STATUS_AUTHORIZED;
361-
$invoice_status = SI_Payment::set_status($status);
362-
360+
363361
$invoice->set_line_items( $submission['line_items'] );
364362
$invoice->set_calculated_total();
363+
if ( 'false' === $submission['payment'] ) {
364+
$invoice->set_pending();
365+
}
365366

366367
// notes
367368
if (isset( $submission['notes'] ) && '' !== $submission['notes']) {
@@ -377,7 +378,7 @@ protected function create_invoice($submission = array())
377378
}
378379

379380
// Add Payment from weForms if deposit
380-
if ( $submission['payment'] === 'false' ) {
381+
if ( 'true' === $submission['payment'] ) {
381382
SI_PAYMENT::new_payment();
382383
}
383384

0 commit comments

Comments
 (0)