Skip to content

Commit

Permalink
Merge branch 'release/2.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Mar 8, 2017
2 parents 949c4f7 + cdc0309 commit 5d73deb
Show file tree
Hide file tree
Showing 50 changed files with 631 additions and 464 deletions.
26 changes: 26 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
------------------------------------------------------------------------------------------------------------------
Version 2.1.3
- Added security enhancements. Credit: James Golovich from Pritect, Inc. (https://pritect.net)
- Added Dutch (Belgium) translation. Credit: Dave Loodts
- Added form ID and field ID modifiers to 'gform_field_content' and 'gform_field_input' filters.
- Added 'gform_target_page' filter to allow modifying the target page; See https://www.gravityhelp.com/documentation/article/gform_target_page/
- Added 'gform_order_summary' filter. See https://www.gravityhelp.com/documentation/article/gform_order_summary/

- Updated gform_add_meta() and gform_get_meta() to no longer save meta for psuedo-entries; requires an integer greater than zero.
- Updated strings for translations
- Updated the Czech (cs_CZ) translation. Credit: Tomáš Očadlý.
- Updated the gform_form_trash_link filter to include $form_id as the second parameter.

- Fixed several PHP notices and warnings which occurred when saving a new confirmation with PHP 7.1.
- Fixed the entry detail/{all_fields} display value for the Single Product field when the quantity input is empty or the price is 0. Credit: the GravityView team.
- Fixed an issue with the PHPMailer error message logging statement.
- Fixed the filter links on the Forms list page incorrectly displaying "All" as the current filter when another filter was selected.
- Fixed an issue where fields can show up as invalid in the form editor if the form was updated using the form object returned after a validation failure.
- Fixed an issue with the view entry links on the entry list page when the list has been sorted.
- Fixed PHP notice during submission if a non-field merge tag is used in a calculation formula.
- Fixed an issue with the no duplicates validation for the Phone field.
- Fixed strings for translations.
- Fixed an issue with the forms current page number when resuming an incomplete submission for a single page form which could prevent Stripe.js from processing the submission.

- AF: Fixed an issue setting the entry payment date when starting a subscription.

------------------------------------------------------------------------------------------------------------------
Version 2.1.2
- Added $entry as a fourth parameter for the gform_merge_tag_data filter.
Expand Down
45 changes: 35 additions & 10 deletions common.php
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,20 @@ public static function get_submitted_pricing_fields( $form, $lead, $format, $use
break;
}

/**
* Filter the markup of the order summary which appears on the Entry Detail, the {all_fields} merge tag and the {pricing_fields} merge tag.
*
* @since 2.1.2.5
* @see https://www.gravityhelp.com/documentation/article/gform_order_summary/
*
* @var string $field_data The order summary markup.
* @var array $form Current form object.
* @var array $lead Current entry object.
* @var array $products Current order summary object.
* @var string $format Format that should be used to display the summary ('html' or 'text').
*/
$field_data = gf_apply_filters( array( 'gform_order_summary', $form['id'] ), $field_data, $form, $lead, $products, $format );

return $field_data;
}

Expand Down Expand Up @@ -1805,7 +1819,7 @@ public static function has_user_notification( $form ) {
}

public static function send_email( $from, $to, $bcc, $reply_to, $subject, $message, $from_name = '', $message_format = 'html', $attachments = '', $entry = false, $notification = false ) {

global $phpmailer;

$to = str_replace( ' ', '', $to );
Expand Down Expand Up @@ -1880,8 +1894,8 @@ public static function send_email( $from, $to, $bcc, $reply_to, $subject, $messa
}

if ( ! empty( $phpmailer->ErrorInfo ) ) {
GFCommon::log_debug( __METHOD__ . '(): PHPMailer class returned an error message: ' . $phpmailer->ErrorInfo );
}
GFCommon::log_debug( __METHOD__ . '(): PHPMailer class returned an error message: ' . print_r( $phpmailer->ErrorInfo, 1 ) );
}
} else {
GFCommon::log_debug( 'GFCommon::send_email(): Aborting. The gform_pre_send_email hook was used to set the abort_email parameter to true.' );
}
Expand Down Expand Up @@ -2014,9 +2028,9 @@ public static function is_pricing_field( $field_type ) {
*
* @access public
* @since 2.1.1.12 Added support for hiddenproduct, singleproduct, and singleshipping input types.
*
*
* @param string $field_type The field type.
*
*
* @return bool Returns true if it is a product field. Otherwise, false.
*/
public static function is_product_field( $field_type ) {
Expand All @@ -2025,7 +2039,7 @@ public static function is_product_field( $field_type ) {
*
* @since 2.1.1.12 Added support for hiddenproduct, singleproduct, and singleshipping input types.
* @since 1.9.14
*
*
* @param $product_fields The product field types.
*/
$product_fields = apply_filters( 'gform_product_field_types', array( 'option', 'quantity', 'product', 'total', 'shipping', 'calculation', 'price', 'hiddenproduct', 'singleproduct', 'singleshipping' ) );
Expand Down Expand Up @@ -2773,7 +2787,18 @@ public static function get_field_input( $field, $value = '', $lead_id = 0, $form
}
}

$field_input = apply_filters( 'gform_field_input', '', $field, $value, $lead_id, $form_id );
/**
* Filters the field input markup.
*
* @since 2.1.2.14 Added form and field ID modifiers.
*
* @param string empty The markup. Defaults to an empty string.
* @param array $field The Field Object.
* @param int $lead_id The entry ID.
* @param string $value The field value.
* @param int $form_id The form ID.
*/
$field_input = gf_apply_filters( array( 'gform_field_input', $form['id'], $field->id ), '', $field, $value, $lead_id, $form_id );
if ( $field_input ) {
return $field_input;
}
Expand Down Expand Up @@ -3755,9 +3780,9 @@ public static function get_calculation_value( $field_id, $form, $lead, $number_f
$value = false;

$field = RGFormsModel::get_field( $form, $field_id );
$is_pricing_field = self::has_currency_value( $field );
$is_pricing_field = $field ? self::has_currency_value( $field ) : false;

if ( $field->numberFormat ) {
if ( $field && $field->numberFormat ) {
$number_format = $field->numberFormat;
} elseif ( empty( $number_format ) ) {
$number_format = 'decimal_dot';
Expand Down Expand Up @@ -4948,7 +4973,7 @@ public static function get_visibility_options() {
array(
'label' => __( 'Administrative', 'gravityforms' ),
'value' => 'administrative',
'description' => __( 'The field is only visible when administrating submitted entries. The field is not visible or functional when viewing the form.', 'gravityforms' )
'description' => __( 'The field is only visible when administering submitted entries. The field is not visible or functional when viewing the form.', 'gravityforms' )
),
);

Expand Down
20 changes: 13 additions & 7 deletions css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
admin.css
Gravity Forms Administration Styles
http: //www.gravityforms.com
updated: July 12, 2016 10:10 PM GMT-5
updated: January 24, 2017 05:08 PM (GMT-05:00) US Eastern Time
Gravity Forms is a Rocketgenius project
copyright 2008-2016 Rocketgenius Inc.
copyright 2008-2017 Rocketgenius Inc.
http: //www.rocketgenius.com
this may not be re-distrubited without the
express written permission of the author.
Expand Down Expand Up @@ -100,9 +100,15 @@ select {
display: none;
}

.gform_pending_delete{
background-color: #FFE1E1;
border: 5px solid #f00;
.gform_pending_delete,
.field_hover.gform_pending_delete {
background-color: rgba(255, 223, 224, 0.5);
color: #790000 !important;
background-image: none;
border: 1px solid rgba(121, 0, 0, 1) !important;
-webkit-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0);
-moz-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0);
box-shadow: 0px 1px 1px 0px rgba(0,0,0,0);
}

table.xwidefat {
Expand Down Expand Up @@ -375,7 +381,7 @@ label.float_label {
width: 80% !important;
}

.field_hover {
.field_hover:not(.gform_pending_delete) {
border: 1px solid #D2E0EB !important;
background-image: url(../images/gf-fieldsettings-header.jpg);
background-position: 0 0;
Expand Down Expand Up @@ -683,7 +689,7 @@ h2.gsection_title {
font-size: 20px;
font-family: helvetica,arial,sans-serif;
width: 100%;
border-bottom: 5px double #CCC !important;
border-bottom: 1px solid #CCC !important;
}

h3.gf_add_fields {
Expand Down
2 changes: 1 addition & 1 deletion css/admin.min.css

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions css/browsers.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
browsers.css
Gravity Forms Browser-Specific CSS
http://www.gravityforms.com
updated: September 27, 2016 12:02 PM GMT-5
updated: January 12, 2017 03:56 PM (GMT-05:00) US Eastern Time
Gravity Forms is a Rocketgenius project
copyright 2008-2016 Rocketgenius Inc.
copyright 2008-2017 Rocketgenius Inc.
http: //www.rocketgenius.com
this may not be redistributed without the
express written permission of the author.
Expand Down Expand Up @@ -146,10 +146,6 @@ to no.
margin-top:-2px;
}

.gform_wrapper.gf_browser_chrome .gform_body {
width: calc(100% + 15px);
}

/* Firefox specific styles */

.gform_wrapper.gf_browser_gecko select {
Expand Down
Loading

0 comments on commit 5d73deb

Please sign in to comment.