From 96d6ebcbf3d38394300746a3a33491f01223ff9c Mon Sep 17 00:00:00 2001 From: Remco Tolsma Date: Thu, 29 Jan 2015 10:49:26 +0100 Subject: [PATCH] Manual update from 1.8.20.5 to 1.9. --- change_log.txt | 341 +- common.php | 8561 ++++++---------- css/admin.css | 917 +- css/browsers.css | 115 +- css/forms.css | 11 +- css/formsmain.css | 1335 ++- css/gravityfont.css | 340 + css/index.php | 2 + css/preview.css | 127 +- css/readyclass.css | 729 +- css/rtl.css | 32 +- css/shortcode-ui-editor-styles.css | 3 + css/shortcode-ui.css | 42 + css/tooltip.css | 2 +- currency.php | 260 +- entry_detail.php | 2093 ++-- entry_list.php | 2738 +++-- export.php | 1519 ++- fonts/gravityfont.eot | Bin 0 -> 13136 bytes fonts/gravityfont.svg | 79 + fonts/gravityfont.ttf | Bin 0 -> 12956 bytes fonts/gravityfont.woff | Bin 0 -> 13032 bytes fonts/index.php | 2 + form_detail.php | 5238 +++++----- form_display.php | 4908 +++++---- form_list.php | 1306 +-- form_settings.php | 2582 ++--- forms_model.php | 7152 ++++++------- gpl-3.0.txt | 674 ++ gravityforms.php | 5557 +++++----- help.php | 297 +- images/active0.png | Bin 1424 -> 222 bytes images/active1.png | Bin 1448 -> 219 bytes images/add.png | Bin 3448 -> 271 bytes images/arrow-handle.png | Bin 1140 -> 0 bytes images/arrow-right.jpg | Bin 2363 -> 0 bytes images/arrow-right.png | Bin 0 -> 679 bytes images/arrow-rightleft.jpg | Bin 2831 -> 0 bytes images/arrow-rightleft.png | Bin 0 -> 1134 bytes images/blank.gif | Bin 43 -> 0 bytes images/blankspace.png | Bin 0 -> 105 bytes images/captcha_large.png | Bin 3100 -> 1440 bytes images/captcha_medium.png | Bin 2181 -> 1026 bytes images/captcha_small.png | Bin 1698 -> 791 bytes images/chosen-sprite@2x.png | Bin images/close.png | Bin 1182 -> 0 bytes images/datepicker/arrow.png | Bin 451 -> 316 bytes images/datepicker/index.php | 2 + images/datepicker/ui-icons_222222_256x240.png | Bin 4369 -> 4196 bytes images/datepicker/ui-icons_454545_256x240.png | Bin 4369 -> 4196 bytes images/datepicker/ui-icons_888888_256x240.png | Bin 4369 -> 4196 bytes images/datepicker/ui-icons_cd0a0a_256x240.png | Bin 4369 -> 4196 bytes images/delete.png | Bin 1249 -> 261 bytes images/doctypes/index.php | 2 + images/error.png | Bin 1209 -> 0 bytes images/form-button.png | Bin 182 -> 0 bytes images/form_options.png | Bin 1290 -> 0 bytes images/gf-creditcard-icons.png | Bin 76461 -> 75752 bytes images/gf-expand-title-bg-rtl.png | Bin 1680 -> 1453 bytes images/gf-expand-title-bg.png | Bin 822 -> 0 bytes images/gf-hovergrad-bg.png | Bin 208 -> 0 bytes images/gf-nofields-steps.png | Bin 420360 -> 387974 bytes images/gf-pagebreak-first.png | Bin 2008 -> 1900 bytes images/gf-pagebreak-inline.png | Bin 2613 -> 2331 bytes images/gf-percentbar-bg.png | Bin 334 -> 241 bytes images/gf-percentbar-gray.png | Bin 375 -> 253 bytes images/gf-toolbar-iconsprite.png | Bin 4704 -> 0 bytes images/gravity-admin-icon.png | Bin 350 -> 0 bytes images/gravity-logo.png | Bin 5684 -> 0 bytes images/gravityforms-business-upgrade.png | Bin 15018 -> 10549 bytes images/gravityforms-developer-upgrade.png | Bin 16650 -> 10787 bytes images/icon-drop-list.png | Bin 1106 -> 1079 bytes images/icon-submenu-down.png | Bin 1110 -> 1093 bytes images/index.php | 2 + images/loading.gif | Bin 1849 -> 0 bytes images/prodlist-last.png | Bin 144 -> 143 bytes images/prodlist.png | Bin 253 -> 156 bytes images/prodlist_last.png | Bin 144 -> 143 bytes images/remove.png | Bin 3401 -> 271 bytes images/screen-options-left.gif | Bin 640 -> 0 bytes images/spinner.gif | Bin 2193 -> 1849 bytes images/star0.png | Bin 1189 -> 318 bytes images/star1.png | Bin 1188 -> 318 bytes images/stop.png | Bin 1182 -> 0 bytes images/stopbanner.png | Bin 14831 -> 0 bytes images/tiny-arrow-down.png | Bin 1020 -> 0 bytes images/top-highlight.png | Bin 110 -> 0 bytes images/webkit-enhanced-select.png | Bin 282 -> 2885 bytes images/wp-logo.png | Bin 661 -> 0 bytes includes/addon/class-gf-addon-locking.php | 90 +- includes/addon/class-gf-addon.php | 7275 ++++++------- includes/addon/class-gf-auto-upgrade.php | 444 +- includes/addon/class-gf-feed-addon.php | 1571 +-- includes/addon/class-gf-payment-addon.php | 3412 ++++--- includes/addon/class-gf-results.php | 1713 ++-- includes/addon/css/index.php | 2 + includes/addon/index.php | 2 + includes/addon/js/gaddon_payment.js | 5 +- includes/addon/js/gaddon_results.js | 2 +- includes/addon/js/index.php | 2 + includes/api.php | 2008 ++-- includes/fields/class-gf-field-address.php | 891 ++ .../fields/class-gf-field-calculation.php | 121 + includes/fields/class-gf-field-captcha.php | 300 + includes/fields/class-gf-field-checkbox.php | 269 + includes/fields/class-gf-field-creditcard.php | 390 + includes/fields/class-gf-field-date.php | 492 + includes/fields/class-gf-field-donation.php | 83 + includes/fields/class-gf-field-email.php | 199 + includes/fields/class-gf-field-fileupload.php | 451 + includes/fields/class-gf-field-hidden.php | 59 + .../fields/class-gf-field-hiddenproduct.php | 73 + includes/fields/class-gf-field-html.php | 53 + includes/fields/class-gf-field-list.php | 442 + .../fields/class-gf-field-multiselect.php | 112 + includes/fields/class-gf-field-name.php | 360 + includes/fields/class-gf-field-number.php | 217 + includes/fields/class-gf-field-option.php | 34 + includes/fields/class-gf-field-page.php | 34 + includes/fields/class-gf-field-password.php | 165 + includes/fields/class-gf-field-phone.php | 95 + .../fields/class-gf-field-post-category.php | 36 + .../fields/class-gf-field-post-content.php | 75 + .../class-gf-field-post-custom-field.php | 68 + .../fields/class-gf-field-post-excerpt.php | 73 + includes/fields/class-gf-field-post-image.php | 170 + includes/fields/class-gf-field-post-tags.php | 66 + includes/fields/class-gf-field-post-title.php | 76 + includes/fields/class-gf-field-price.php | 77 + includes/fields/class-gf-field-product.php | 33 + includes/fields/class-gf-field-quantity.php | 34 + includes/fields/class-gf-field-radio.php | 230 + includes/fields/class-gf-field-section.php | 39 + includes/fields/class-gf-field-select.php | 107 + includes/fields/class-gf-field-shipping.php | 31 + .../fields/class-gf-field-singleproduct.php | 114 + .../fields/class-gf-field-singleshipping.php | 50 + includes/fields/class-gf-field-text.php | 78 + includes/fields/class-gf-field-textarea.php | 67 + includes/fields/class-gf-field-time.php | 233 + includes/fields/class-gf-field-total.php | 74 + includes/fields/class-gf-field-website.php | 100 + includes/fields/class-gf-field.php | 526 + includes/fields/class-gf-fields.php | 83 + includes/fields/index.php | 2 + includes/index.php | 2 + includes/locking/class-gf-locking.php | 1036 +- includes/locking/css/index.php | 2 + includes/locking/images/index.php | 2 + includes/locking/index.php | 2 + includes/locking/js/index.php | 2 + includes/locking/locking.php | 270 +- includes/phpqrcode/index.php | 2 + .../templates/edit-shortcode-form.tpl.php | 102 + includes/upload.php | 316 +- includes/webapi/css/index.php | 2 + includes/webapi/index.php | 2 + includes/webapi/js/index.php | 2 + includes/webapi/webapi.php | 2973 +++--- index.php | 2 + js.php | 2016 ++-- js/conditional_logic.js | 63 +- js/datepicker.js | 77 +- js/form_admin.js | 159 +- js/form_editor.js | 1164 ++- js/forms.js | 45 +- js/gf_field_filter.js | 94 +- js/gravityforms.js | 93 +- js/gravityforms.min.js | 1 + js/index.php | 2 + js/jquery.placeholders.2.1.1.min.js | 2 - js/placeholders.jquery.min.js | 2 + js/shortcode-ui.js | 678 ++ js/tooltip_init.js | 18 +- languages/gravityforms-ar.mo | Bin 0 -> 60328 bytes languages/gravityforms-da_DK.mo | Bin 135109 -> 135081 bytes languages/gravityforms-de_DE.mo | Bin 158024 -> 169373 bytes languages/gravityforms-es_ES.mo | Bin 142006 -> 163683 bytes languages/gravityforms-fi.mo | Bin 163843 -> 163853 bytes languages/gravityforms-sv_SE.mo | Bin 129165 -> 129181 bytes languages/gravityforms.pot | 9003 +++++++++-------- languages/index.php | 2 + notification.php | 2372 ++--- preview.php | 119 +- print-entry.php | 210 +- recaptchalib.php | 147 +- select_columns.php | 404 +- settings.php | 1082 +- tooltips.php | 315 +- update.php | 170 +- widget.php | 211 +- xml.php | 449 +- 192 files changed, 53406 insertions(+), 40985 deletions(-) create mode 100644 css/gravityfont.css create mode 100644 css/index.php create mode 100755 css/shortcode-ui-editor-styles.css create mode 100644 css/shortcode-ui.css create mode 100755 fonts/gravityfont.eot create mode 100755 fonts/gravityfont.svg create mode 100755 fonts/gravityfont.ttf create mode 100755 fonts/gravityfont.woff create mode 100644 fonts/index.php create mode 100644 gpl-3.0.txt delete mode 100644 images/arrow-handle.png delete mode 100644 images/arrow-right.jpg create mode 100644 images/arrow-right.png delete mode 100644 images/arrow-rightleft.jpg create mode 100644 images/arrow-rightleft.png delete mode 100644 images/blank.gif create mode 100644 images/blankspace.png mode change 100644 => 100755 images/chosen-sprite@2x.png delete mode 100644 images/close.png create mode 100644 images/datepicker/index.php create mode 100644 images/doctypes/index.php delete mode 100755 images/error.png delete mode 100644 images/form-button.png delete mode 100644 images/form_options.png delete mode 100644 images/gf-expand-title-bg.png delete mode 100644 images/gf-hovergrad-bg.png delete mode 100644 images/gf-toolbar-iconsprite.png delete mode 100644 images/gravity-admin-icon.png delete mode 100644 images/gravity-logo.png create mode 100644 images/index.php delete mode 100644 images/loading.gif delete mode 100644 images/screen-options-left.gif delete mode 100644 images/stop.png delete mode 100644 images/stopbanner.png delete mode 100644 images/tiny-arrow-down.png delete mode 100644 images/top-highlight.png delete mode 100644 images/wp-logo.png create mode 100644 includes/addon/css/index.php create mode 100644 includes/addon/index.php create mode 100644 includes/addon/js/index.php create mode 100644 includes/fields/class-gf-field-address.php create mode 100644 includes/fields/class-gf-field-calculation.php create mode 100644 includes/fields/class-gf-field-captcha.php create mode 100644 includes/fields/class-gf-field-checkbox.php create mode 100644 includes/fields/class-gf-field-creditcard.php create mode 100644 includes/fields/class-gf-field-date.php create mode 100644 includes/fields/class-gf-field-donation.php create mode 100644 includes/fields/class-gf-field-email.php create mode 100644 includes/fields/class-gf-field-fileupload.php create mode 100644 includes/fields/class-gf-field-hidden.php create mode 100644 includes/fields/class-gf-field-hiddenproduct.php create mode 100644 includes/fields/class-gf-field-html.php create mode 100644 includes/fields/class-gf-field-list.php create mode 100644 includes/fields/class-gf-field-multiselect.php create mode 100644 includes/fields/class-gf-field-name.php create mode 100644 includes/fields/class-gf-field-number.php create mode 100644 includes/fields/class-gf-field-option.php create mode 100644 includes/fields/class-gf-field-page.php create mode 100644 includes/fields/class-gf-field-password.php create mode 100644 includes/fields/class-gf-field-phone.php create mode 100644 includes/fields/class-gf-field-post-category.php create mode 100644 includes/fields/class-gf-field-post-content.php create mode 100644 includes/fields/class-gf-field-post-custom-field.php create mode 100644 includes/fields/class-gf-field-post-excerpt.php create mode 100644 includes/fields/class-gf-field-post-image.php create mode 100644 includes/fields/class-gf-field-post-tags.php create mode 100644 includes/fields/class-gf-field-post-title.php create mode 100644 includes/fields/class-gf-field-price.php create mode 100644 includes/fields/class-gf-field-product.php create mode 100644 includes/fields/class-gf-field-quantity.php create mode 100644 includes/fields/class-gf-field-radio.php create mode 100644 includes/fields/class-gf-field-section.php create mode 100644 includes/fields/class-gf-field-select.php create mode 100644 includes/fields/class-gf-field-shipping.php create mode 100644 includes/fields/class-gf-field-singleproduct.php create mode 100644 includes/fields/class-gf-field-singleshipping.php create mode 100644 includes/fields/class-gf-field-text.php create mode 100644 includes/fields/class-gf-field-textarea.php create mode 100644 includes/fields/class-gf-field-time.php create mode 100644 includes/fields/class-gf-field-total.php create mode 100644 includes/fields/class-gf-field-website.php create mode 100644 includes/fields/class-gf-field.php create mode 100644 includes/fields/class-gf-fields.php create mode 100644 includes/fields/index.php create mode 100644 includes/index.php create mode 100644 includes/locking/css/index.php create mode 100644 includes/locking/images/index.php create mode 100644 includes/locking/index.php create mode 100644 includes/locking/js/index.php create mode 100644 includes/phpqrcode/index.php create mode 100755 includes/templates/edit-shortcode-form.tpl.php create mode 100644 includes/webapi/css/index.php create mode 100644 includes/webapi/index.php create mode 100644 includes/webapi/js/index.php create mode 100644 index.php create mode 100644 js/gravityforms.min.js create mode 100644 js/index.php delete mode 100755 js/jquery.placeholders.2.1.1.min.js create mode 100644 js/placeholders.jquery.min.js create mode 100755 js/shortcode-ui.js create mode 100644 languages/gravityforms-ar.mo create mode 100644 languages/index.php diff --git a/change_log.txt b/change_log.txt index 7161c12..7500988 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,24 +1,339 @@ ------------------------------------------------------------------------------------------------------------------- -Version 1.8.20.5 - - Fixed issue with exporting/importing some post field settings. - - Fixed notice when filter entries with empty filter value +Version 1.9 + + - Added drop and drop to the field buttons in the Form Editor. + - Added placeholder field settings. + - Added default input values field settings. + - Added label placement and visibility field settings. These settings are currently hidden by default in the Form Editor. Use the gform_enable_field_label_placement_settings filter to display the settings. + add_filter("gform_enable_field_label_placement_settings", "__return_true"); + - Added support for rendering forms in admin pages with the gravity_form() function and the gravityform shortcode. Use in conjunction with gravity_form_enqueue_scripts(). + - Added support for retrieving form markup via ajax. + - Added save and continue. + - Added support for string customization options in the {save_email_input} merge tag. The two options, button_text and validation_message, can be added using shortcode syntax. E.g., + {save_email_input: button_text="Send the link to my email address" validation_message="The link couldn't be sent because the email address is not valid."} + - Added automatic background updates. Minor versions only e.g. from 1.9.1 to 1.9.2 + - Added setting to enable background updates. Use the GFORM_DISABLE_AUTO_UPDATE constant or gform_disable_auto_update filter to override. The filter will override the setting and the constant will override the filter. + define( 'GFORM_DISABLE_AUTO_UPDATE', true ); + add_filter( 'gform_disable_auto_update', '__return_true' ); + - Added shortcode preview in the post/page editor visual editor. The preview is disabled by default. Use the gform_shortcode_preview_disabled filter to enable. + add_filter('gform_shortcode_preview_disabled', '__return_false'); + - Added gravityforms.min.js. The minified file loads by default unless SCRIPT_DEBUG is active or query param gform_debug is set. e.g. domain.com/?gform_debug + - Added the add-ons to the updates page. + - Added visual editor to the confirmation message UI. + - Added Middle Name input to the name field. + - Added Name Prefix drop-down plus sub-setting UI. + - Added Name Fields sub-setting to the Name field. + - Added Address Fields sub-setting to the Address field. + - Added support for translation (.mo) files in the WP_LANG_DIR/gravityforms folder. e.g. /wp-content/languages/gravityforms/gravityforms-es_ES.mo + - Added classes to complex fields. + - Added HTML5 support for date field when configured with input type "date field". + - Added support for 'gform_file_upload_markup' JS and PHP hooks; useful for modifying the multi-file upload "preview". + - Added the gform_incomplete_submissions_expiration_days filter to allow the lifetime of saved incomplete submissions to be customized. + - Added change event when updating value of total input. + - Added min='0' attribute to product field quantity input when HTML5 enabled. + - Added input mask to the Phone field (standard format). + - Added sub-label setting to Date, Time, Email and Credit Card Fields. + - Added min and max attributes to HTML5 number input with values using the fields min and max range setting. + - Added support for filtering entries using the contains operator for the name, address, single line and paragraph fields. Applies to the entry list, export entries and results pages. + - Added support for date format modifiers (:year, :month, :day, :dmy, :mdy, :ymd etc.) to Date field merge tag. + - Added support for :title, :caption, and :description modifiers to Post Image field merge tag. + - Added Gravity Font. + - Added min, max and step attributes to HTML5 Date Field number inputs. The min and max for the year input can be set using the gform_date_min_year and gform_date_max_year hooks. + - Added condition to not include "gform_chosen" if "chosen" is already enqueued. + - Added support for the Russian Ruble. + - Added Bulgarian translation file. + - Added gform_form_args hook to allow modification of the options used to display the form. + - Added $field_values as a third parameter for the gform_pre_render filter. + - Added form-specific version of "gform_pre_validation" filter. + - Added PHP version of the 'gform_merge_tag_value_pre_calculation' filter. + add_filter( 'gform_merge_tag_value_pre_calculation', 'merge_tag_value', 10, 6 ); + function merge_tag_value( $value, $input_id, $modifier, $field, $form, $entry ) { + // modify the $value + return $value; + } + - Added the gform_submission_values_pre_save filter to allow submitted values to be modified before saving. + add_filter( 'gform_submission_values_pre_save', 'submission_values_pre_save', 10, 2 ); + function submission_values_pre_save( $submitted_values, $form ) { + $submitted_values['custom_value'] = $_POST['custom_value']; + return $submitted_values; + } + - Added 'gform_disable_address_map_link' filter allowing address field map link to be removed. + add_filter( 'gform_disable_address_map_link', '__return_true' ); + - Added 'gform_entry_detail_title' hook for changing the title in the entry detail table. + add_filter( 'gform_entry_detail_title', function( $title, $form, $entry ) { + return 'Your new title for entry #' . $entry['id']; + }, 10, 3 ); + - Added 'gform_incomplete_submission_post_save' hook for performing custom actions when an incomplete submission has been saved. + add_action( 'gform_incomplete_submission_post_save', function ( $submission, $resume_token, $form, $entry ) { + // do stuff + }, 10, 4 ); + - Added 'gform_save_and_continue_resume_url' hook to allow modification of the Save & Continue resume URL + add_filter( 'gform_save_and_continue_resume_url', function( $resume_url, $form, $token, $email ) { + + // remove specific query arg + //$resume_url = remove_query_arg( array( 'boom' ), $resume_url ); + + // remove ALL query args + $resume_url = add_query_arg( array( 'gf_token' => $token ), array_shift( explode( '?', $resume_url ) ) ); + + return $resume_url; + }, 10, 4 ); + - Added new action 'gform_pre_confirmation_deleted' to allow users to perform custom actions just before deleting a confirmation + add_action( 'gform_pre_confirmation_deleted', 'my_pre_confirmation_deleted_func' 10, 2); + function my_pre_confirmation_deleted_func( $confirmation_id, $form ) { + // perform action before a confirmation is deleted + } + - Added new action 'gform_post_form_activated' to allow users to perform custom actions just after a form has been activated + add_action( 'gform_post_form_activated', 'my_post_form_activated_func', 10); + function my_post_form_activated_func( $form_id ) { + // perform action after a form has been activated + } + - Added new action 'gform_post_form_deactivated' to allow users to perform custom actions just after a form has been deactivated + add_action( 'gform_post_form_deactivated', 'my_post_form_deactivated_func', 10); + function my_post_form_deactivated_func( $form_id ) { + // perform action after a form has been deactivated + } + - Added new action 'gform_post_form_trashed' to allow users to perform custom actions just after a form has been moved to the trash + add_action( 'gform_post_form_trashed', 'my_post_form_trashed_func', 10); + function my_post_form_trashed_func( $form_id ) { + // perform action after a form has been moved to the trash + } + - Added new action 'gform_post_form_restored' to allow users to perform custom actions just after a form has been restored + add_action( 'gform_post_form_restored', 'my_post_form_restored_func', 10); + function my_post_form_restored_func( $form_id ) { + // perform action after a form has been restored + } + - Added new action 'gform_post_form_duplicated' to allow users to perform custom actions just after a form has been duplicated. This replaces the deprecated gform_after_duplicate_form action. + add_action( 'gform_post_form_duplicated', 'my_post_form_duplicated_func', 10, 2); + function my_post_form_duplicated_func( $form_id, $new_form_id ) ) { + // perform action after a form has been duplicated + } + - Added new action 'gform_post_form_views_deleted' to allow users to perform custom actions just after the form view count has been reset to zero + add_action( 'gform_post_form_views_deleted', 'my_post_form_views_deleted_func', 10); + function my_post_form_views_deleted_func( $form_id ) { + // perform action after the form view count has been reset to zero + } + - Added new action 'gform_post_note_added' to allow users to perform custom actions just after a note has been added + add_action( 'gform_post_note_added', 'my_post_note_added_func', 10, 6); + function my_post_note_added_func( $note_id, $lead_id, $user_id, $user_name, $note, $note_type ) { + // perform action after the note has been added + } + - Added new action 'gform_pre_note_deleted' to allow users to perform custom actions just before a note has been deleted + add_action( 'gform_pre_note_deleted', 'my_pre_note_deleted_func', 10, 2); + function my_pre_note_deleted_func( $note_id, $lead_id ) { + // perform action just before after the note has been deleted + } + - Added PHP version of the "gform_calculation_result" filter + add_filter( 'gform_calculation_result', 'my_calc_result', 10, 5 ); + function my_calc_result( $result, $formula, $field, $form, $entry ) { + // modify result as needed + return $result; + } + - Added new JS filter: 'gform_calculation_formula' to allow modifying formula before it is processed by GF on frontend + gform.addFilter( 'gform_calculation_formula', function( formula, formulaField, formId, calcObj ) { + // custom code here + return formula; + } ); + - Added JS filter 'gform_list_item_pre_add' to allow new list field row to be modifed before the row is inserted. + gform.addFilter( 'gform_list_item_pre_add', function( clone ) { + // handle datepicker + clone.find( '.ui-datepicker-trigger' ).remove(); + clone.find( 'input.datepicker' ).removeClass( 'hasDatepicker' ).removeAttr( 'id' ); + return clone; + }); + - Added JS 'gform_post_calculation_events' action hook to allow custom methods for triggering calculations. + gform.addAction( 'gform_post_calculation_events', function( mergeTagArr, formulaField, formId, calcObj ){ + var fieldId = parseInt( mergeTagArr[1] ), + fieldSelector = '#field_' + formId + '_' + fieldId; + + if ( jQuery( fieldSelector + ' table.gfield_list' ).length == 1 ) { + jQuery( fieldSelector ) + .on( 'click', '.add_list_item', function () { + jQuery( fieldSelector + ' .delete_list_item' ).removeProp( 'onclick' ); + calcObj.bindCalcEvent( fieldId, formulaField, formId, 0 ); + }) + .on( 'click', '.delete_list_item', function () { + gformDeleteListItem( this, 0 ); + calcObj.bindCalcEvent( fieldId, formulaField, formId, 0 ); + }); + + if ( mergeTagArr[2] != null ) { + var columnNo = mergeTag[2].substr( 1 ), + columnSelector = '.gfield_list_' + fieldId + '_cell' + columnNo + ' :input'; + jQuery( fieldSelector ).on( 'change', columnSelector, function () { + calcObj.bindCalcEvent( fieldId, formulaField, formId, 0 ); + }); + } + } + }); + - Added JS 'gform_merge_tag_value_pre_calculation' hook to allow merge tag value to be modified before calculation is performed. + gform.addFilter( 'gform_merge_tag_value_pre_calculation', function( value, mergeTagArr, isVisible, formulaField, formId ){ + var fieldId = parseInt( mergeTagArr[1] ), + fieldSelector = '#field_' + formId + '_' + fieldId; + + // check if merge tag belongs to a List field and that it isn't hidden by conditional logic + if ( jQuery( fieldSelector + ' table.gfield_list' ).length == 1 && isVisible ) { + + if ( mergeTagArr[2] == null ) { + // if no column specified count the rows + value = jQuery( fieldSelector + ' tbody tr' ).length; + } else { + var columnNo = mergeTagArr[2].substr( 1 ), + columnSelector = '.gfield_list_' + fieldId + '_cell' + columnNo + ' :input', + cellValue = 0; + + // if column specified get the input values from each row and calculate the sum + jQuery( columnSelector ).each( function () { + cellValue = gformToNumber( jQuery( this ).val() ); + value += parseFloat( cellValue ) || 0; + }); + } + + } + + return value; + }); + - Added JS filter 'gform_datepicker_options_pre_init' to allow datepicker options to be modified before the datepicker is initialized. gform_datepicker_init now has gform_gravityforms as a dependency. + gform.addFilter( 'gform_datepicker_options_pre_init', function( optionsObj, formId, fieldId ) { + if ( formId == 587 && fieldId == 1 ) { + optionsObj.minDate = 2; + optionsObj.beforeShowDay = function(date) { + var day = date.getDay(); + return [(day > 1)]; + }; + } + return optionsObj; + }); + - Added $form and $field parameters to the 'gform_date_min_year' and 'gform_date_max_year' filters. + add_filter( 'gform_date_max_year', 'change_max_year', 10, 3 ); + function change_max_year( $max_year, $form, $field ) { + // do stuff with the $form and/or $field + return $max_year; + } + + - Updated GFCommon::replace_variables_prepopulate to support replacing custom merge tags via the 'gform_replace_merge_tags' hook. + - Updated set_logging_supported function to be public instead of protected. + - Updated register strings with URLs in them to be able to be translated properly. + - Updated trim_conditional_logic_values_from_element function to handle when the element's class is GF_Field. + - Updated select, radio and checkbox type pricing fields to use 0 for price if choice price is blank, preventing validation error. + - Updated the Forms menu icon and Add Form button icon. + - Updated the placeholders.js script to the latest version (3.0.2). Removed jquery.placeholders.2.1.1.min.js. Added placeholders.jquery.min.js. This is the jQuery adapter version of the script which patches val() to return an empty string when the placeholder is active. gform_placeholder now has jQuery as a dependency. + - Updated name of "gform_before_update_form_meta" hook to "gform_post_update_form_meta" and changed from "add_action" to "do_action". + - Updated GFFormsModel::get_form_meta() to return an array of GF_Field objects in the fields array. + - Updated the forms import & export tools to use JSON. Legacy XML files are still supported on import. + - Updated the update button on the entry edit page to be disabled until the page loads completely. + - Updated the field settings to hide the advanced tab if no advanced fields are available for the field. + - Updated the Add Field button in the Form Editor to require the field type in the "type" data attribute. Use of the inline onclick attribute to trigger StartAddField() is now deprecated. + - Updated the permission check for bulk deleting notes from GFFormsModel to GFEntryDetail. + - Updated the gform_pre_confirmation_save filter to send $is_new_confirmation as an additional parameter. + - Updated the 'chosen' script and styles to v1.1.0. + - Updated the contents of the entries export csv file to use UTF-16LE encoding. + - Updated Time field hour and minute inputs to use number type and include min, max and step attributes when HTML5 enabled. + - Updated a variety of strings to be translatable. + - Updated gravityforms.pot. + - Updated Danish translation file. + - Updated Spanish (es_ES) translation. + - Updated German translation file. + + - Deprecated the gform_after_duplicate_form action. Use the gform_post_form_duplicated action instead. + - Deprecated GFCommon::get_us_states() and GFCommon::get_canadian_provinces(). + + - Removed RGFormsModel::add_default_properties(). + - Removed support for legacy post category fields created before version 1.6.3. Post category fields created after version 1.6.3 remain functional and continue to be supported. + + - AF: Added GF_Field for all field objects with support for array notation for backward compatibility (with some limitations). + - AF: Added get_form_editor_inline_script() and get_form_inline_script() to GF_Field. + - AF: Added fail_payment, add_pending_payment, void_authorization, expire_subscription for the Payment Add-On. + - AF: Added tooltips for the Payment Add-On. + - AF: Added create_subscription action type for Payment the Add-On. + - AF: Added support for array values in the Settings API. Added support for array values to the select setting. + - AF: Added has_subscription function to check if a subscription exists for Payment the Add-On. + - AF: Added 'title' to the settings tabs array so the title can be customized. + - AF: Added form id and form title to the results page title. + - AF: Added a warning to the add-on settings page which appears if the add-on contains deprecated methods. + - AF: Added support in the results page for score averages by row in multi-row Likert fields. + - AF: Added helper function in the Payment Add-On to remove spaces from credit card number. + + - AF: Updated note set in complete_payment for Payment the Add-On. + - AF: Updated start_subscription to check if a subscription has already been created for Payment the Add-On. + - AF: Updated add_subscription_payment to check is a subscription has already been created for Payment the Add-On. + - AF: Updated log messages for Payment the Add-On. + - AF: Updated the parameters for the post_callback function to two (the action and the result) for the Payment Add-On. + - AF: Updated fail_subscription_payment to set the entry payment status to Failed for Payment the Add-On. + - AF: Updated get_setting function to handle when the part is a zero. + - AF: Updated localization of certain strings for the Payment Add-On Framework. + - AF: Updated feed field mapping to exclude credit card field options, except the credit card number (last 4 digits) and credit card type as choices. + + - AF: Deprecated protected access level for all methods. Use either public or private instead. Deprecation notices are triggered in the admin footer when WP_DEBUG is on. + + - API: Added GFAPI::update_entry_field() to allow updates of individual entry fields. + - API: Added GFAPI::get_forms(). + - API: Added GFAPI::send_notifications(). + - API: Updated GFAPI::update_entry() to update only changed values. ------------------------------------------------------------------------------------------------------------------- -Version 1.8.20.4 - - Fixed issue with password field on multi-page forms +Version 1.8.22.9 + - Fixed issue where 'sack' was not available on some pages ------------------------------------------------------------------------------------------------------------------- -Version 1.8.20.3 - - Fixed an issue with list field shim when RTL was enabled - - Fixed an issue with the results page where the 'show more' link retrieves duplicate values if some values of that field are empty. +Version 1.8.22.8 + - Fixed an issue with some entries where the Checkbox field value could be ordered incorrectly when the field has ten or more choices. ------------------------------------------------------------------------------------------------------------------- -Version 1.8.20.2 - - Fixed issue with section breaks getting displayed on {all_fields_display_empty} even when hidden by conditional logic. +Version 1.8.22.7 + - Fixed issue when search entries with an & character. + +------------------------------------------------------------------------------------------------------------------- +Version 1.8.22.6 + - Fixed issue with gform_confirmation_loaded event not firing under certain conditions. + +------------------------------------------------------------------------------------------------------------------- +Version 1.8.22.5 + - AF: Fixed notice for payment feeds. ------------------------------------------------------------------------------------------------------------------- -Version 1.8.20.1 +Version 1.8.22.4 + - Fixed issue when searching entries with single quotes under certain scenarios. + +------------------------------------------------------------------------------------------------------------------- +Version 1.8.22.3 + - Fixed issue where extra call to wp_print_scripts was causing issues and removing broke New Form modal + +------------------------------------------------------------------------------------------------------------------- +Version 1.8.22.2 + - Fixed issue when searching for entries with single quotes. + +------------------------------------------------------------------------------------------------------------------- +Version 1.8.22.1 + - Fixed an issue with positioning of multi-page form buttons following display by conditional logic. + +------------------------------------------------------------------------------------------------------------------- +Version 1.8.22 + - Added logging statements. + - Fixed issue when displaying new form modal. + +------------------------------------------------------------------------------------------------------------------- +Version 1.8.21 + - Added logging statements around post creation. + - Updated translation in Finnish PO file to fix a javascript error thrown on the entry detail page. + - Updated notification validation so that it allows a comma separate list of emails in Reply-To (compliant with RFC 5322). + - Fixed issue where total was displayed as -$0.00 instead of $0.00 in certain scenarios. + - Fixed issue where {admin_email} could not be used in notification "To" fields. + - Fixed conflict with Jetpack by removing unneccessary call to wp_print_scripts(). + - Fixed an issue with the AJAX spinner and the multi-file uploader. + - Fixed signup URL for reCAPTCHA in error messages. + - Fixed issue with input-based fields with over 100 inputs. + - Fixed duplicate choice label causing issues on checkbox and radio button fields when there are multiple forms on one page. + - Fixed an issue with the results page for forms with a lot of fields on servers with limited resources. + - Fixed issue with exporting/importing some post field settings. + - Fixed notice when filter entries with empty filter value. + - Fixed issue with password field on multi-page forms. + - Fixed an issue with list field shim when RTL was enabled. + - Fixed an issue with the results page where the 'show more' link retrieves duplicate values if some values of that field are empty. + - Fixed issue with section breaks getting displayed on {all_fields_display_empty} even when hidden by conditional logic. - Fixed an issue where exporting lead data for checkbox fields did not work when the choice label included quotes. + - AF: Fixed issue with Sales results incorrectly calculating refunds. + - AF: Fixed issue with the billing cycle length drop down not showing appropriate numbers in some instances in the Payment Add-On. ------------------------------------------------------------------------------------------------------------------- Version 1.8.20 @@ -98,7 +413,7 @@ Version 1.8.17 - Fixed issue with Add-On manager displaying error when installing Add-Ons. - Fixed notice when $form['pagination']['display_progressbar_on_confirmation'] was not set. - Fixed issue with entry list page payment status drop down containing "Approved" instead of "Paid". - - Fixed issue where setting an input-based field value to empty would fail to save. + - Fixed issue where setting an input-based field value to empty would fail to field hour and minute inputs tosave. - AF: Added get_feeds_by_slug function. - AF: Added is_delayed function to check whether a feed is delayed processing with PayPal Standard. - AF: Updated maybe_process_feed function to handle processing when add-on is set as delayed in PayPal Standard feed setup. @@ -254,7 +569,7 @@ Version 1.8.9 - Added "password" to the list of fields which allow HTML input. - Added 'gform_field_container' filter to allow modifying the field container markup. - add_action( 'gform_field_container', 'my_field_container', 10, 6 ); + add_filter( 'gform_field_container', 'my_field_container', 10, 6 ); function my_field_container( $field_container, $field, $form, $class_attr, $style, $field_content ) { return '
  • {FIELD_CONTENT}
  • '; } diff --git a/common.php b/common.php index 5dbc68e..eab25f6 100644 --- a/common.php +++ b/common.php @@ -1,224 +1,264 @@ " . $field_label . ""; - } - } - return $str; - } + $str = ''; + foreach ( $form['fields'] as $field ) { + $input_type = RGFormsModel::get_input_type( $field ); + $field_label = RGFormsModel::get_label( $field ); + if ( $input_type == 'checkbox' || $input_type == 'radio' || $input_type == 'select' ) { + $selected = $field->id == $selected_field_id ? "selected='selected'" : ''; + $str .= "'; + } + } - public static function is_numeric($value, $number_format=""){ + return $str; + } - if($number_format == "currency"){ + public static function is_numeric( $value, $number_format = '' ) { - $number_format = self::is_currency_decimal_dot() ? "decimal_dot" : "decimal_comma"; - $value = self::remove_currency_symbol($value); - } + if ( $number_format == 'currency' ) { - switch($number_format){ - case "decimal_dot" : - return preg_match("/^(-?[0-9]{1,3}(?:,?[0-9]{3})*(?:\.[0-9]+)?)$/", $value); - break; + $number_format = self::is_currency_decimal_dot() ? 'decimal_dot' : 'decimal_comma'; + $value = self::remove_currency_symbol( $value ); + } - case "decimal_comma" : - return preg_match("/^(-?[0-9]{1,3}(?:\.?[0-9]{3})*(?:,[0-9]+)?)$/", $value); - break; + switch ( $number_format ) { + case 'decimal_dot' : + return preg_match( "/^(-?[0-9]{1,3}(?:,?[0-9]{3})*(?:\.[0-9]+)?)$/", $value ); + break; - default : - return preg_match("/^(-?[0-9]{1,3}(?:,?[0-9]{3})*(?:\.[0-9]{2})?)$/", $value) || preg_match("/^(-?[0-9]{1,3}(?:\.?[0-9]{3})*(?:,[0-9]{2})?)$/", $value); + case 'decimal_comma' : + return preg_match( "/^(-?[0-9]{1,3}(?:\.?[0-9]{3})*(?:,[0-9]+)?)$/", $value ); + break; - } - } + default : + return preg_match( "/^(-?[0-9]{1,3}(?:,?[0-9]{3})*(?:\.[0-9]{2})?)$/", $value ) || preg_match( "/^(-?[0-9]{1,3}(?:\.?[0-9]{3})*(?:,[0-9]{2})?)$/", $value ); - public static function remove_currency_symbol($value, $currency = null){ - if($currency == null){ - $code = GFCommon::get_currency(); - if(empty($code)) - $code = "USD"; + } + } - $currency = RGCurrency::get_currency($code); - } + public static function remove_currency_symbol( $value, $currency = null ) { + if ( $currency == null ) { + $code = GFCommon::get_currency(); + if ( empty( $code ) ) { + $code = 'USD'; + } - $value = str_replace($currency["symbol_left"], "", $value); - $value = str_replace($currency["symbol_right"], "", $value); + $currency = RGCurrency::get_currency( $code ); + } - //some symbols can't be easily matched up, so this will catch any of them - $value = preg_replace('/[^,.\d]/', "", $value); + $value = str_replace( $currency['symbol_left'], '', $value ); + $value = str_replace( $currency['symbol_right'], '', $value ); - return $value; - } + //some symbols can't be easily matched up, so this will catch any of them + $value = preg_replace( '/[^,.\d]/', '', $value ); - public static function is_currency_decimal_dot($currency = null){ + return $value; + } - if($currency == null){ - $code = GFCommon::get_currency(); - if(empty($code)) - $code = "USD"; + public static function is_currency_decimal_dot( $currency = null ) { - $currency = RGCurrency::get_currency($code); - } + if ( $currency == null ) { + $code = GFCommon::get_currency(); + if ( empty( $code ) ) { + $code = 'USD'; + } - return rgar($currency, "decimal_separator") == "."; - } + $currency = RGCurrency::get_currency( $code ); + } - public static function trim_all($text){ - $text = trim($text); - do{ - $prev_text = $text; - $text = str_replace(" ", " ", $text); - } - while($text != $prev_text); + return rgar( $currency, 'decimal_separator' ) == '.'; + } - return $text; - } + public static function trim_all( $text ) { + $text = trim( $text ); + do { + $prev_text = $text; + $text = str_replace( ' ', ' ', $text ); + } while ( $text != $prev_text ); - public static function format_number($number, $number_format){ - if(!is_numeric($number)) - return $number; - - //replacing commas with dots and dots with commas - if($number_format == "currency"){ - if(false === class_exists('RGCurrency')){ - require_once( GFCommon::get_base_path() . '/currency.php' ); - } - $currency = new RGCurrency( GFCommon::get_currency() ); - $number = $currency->to_money( $number ); - } elseif ($number_format == "decimal_comma"){ - $number = str_replace(",", "|", $number); - $number = str_replace(".", ",", $number); - $number = str_replace("|", ".", $number); - } + return $text; + } - return $number; - } + public static function format_number( $number, $number_format ) { + if ( ! is_numeric( $number ) ) { + return $number; + } - public static function recursive_add_index_file($dir) { - if(!is_dir($dir)) - return; + //replacing commas with dots and dots with commas + if ( $number_format == 'currency' ) { + if ( false === class_exists( 'RGCurrency' ) ) { + require_once( GFCommon::get_base_path() . '/currency.php' ); + } + $currency = new RGCurrency( GFCommon::get_currency() ); + $number = $currency->to_money( $number ); + } elseif ( $number_format == 'decimal_comma' ) { + $number = str_replace( ',', '|', $number ); + $number = str_replace( '.', ',', $number ); + $number = str_replace( '|', '.', $number ); + } - if(!($dp = opendir($dir))) - return; + return $number; + } - //ignores all errors - set_error_handler(create_function("", "return 0;"), E_ALL); + public static function recursive_add_index_file( $dir ) { + if ( ! is_dir( $dir ) ) { + return; + } - //creates an empty index.html file - if($f = fopen($dir . "/index.html", 'w')) - fclose($f); + if ( ! ( $dp = opendir( $dir ) ) ) { + return; + } - //restores error handler - restore_error_handler(); + //ignores all errors + set_error_handler( create_function( '', 'return 0;' ), E_ALL ); - while((false !== $file = readdir($dp))){ - if(is_dir("$dir/$file") && $file != '.' && $file !='..') - self::recursive_add_index_file("$dir/$file"); - } + //creates an empty index.html file + if ( $f = fopen( $dir . '/index.html', 'w' ) ) { + fclose( $f ); + } - closedir($dp); - } + //restores error handler + restore_error_handler(); - public static function clean_number($number, $number_format=""){ - if(rgblank($number)) - return $number; - - $decimal_char = ""; - if($number_format == "decimal_dot") - $decimal_char = "."; - else if($number_format == "decimal_comma") - $decimal_char = ","; - - $float_number = ""; - $clean_number = ""; - $is_negative = false; - - //Removing all non-numeric characters - $array = str_split($number); - foreach($array as $char){ - if (($char >= '0' && $char <= '9') || $char=="," || $char==".") - $clean_number .= $char; - else if($char == '-') - $is_negative = true; - } + while ( ( false !== $file = readdir( $dp ) ) ) { + if ( is_dir( "$dir/$file" ) && $file != '.' && $file != '..' ) { + self::recursive_add_index_file( "$dir/$file" ); + } + } + + closedir( $dp ); + } + + public static function add_htaccess_file(){ - //Removing thousand separators but keeping decimal point - $array = str_split($clean_number); - for($i=0, $count = sizeof($array); $i<$count; $i++) - { - $char = $array[$i]; - if ($char >= '0' && $char <= '9') - $float_number .= $char; - else if(empty($decimal_char) && ($char == "." || $char == ",") && strlen($clean_number) - $i <= 3) - $float_number .= "."; - else if($decimal_char == $char) - $float_number .= "."; + $upload_root = GFFormsModel::get_upload_root(); + + if ( ! is_dir( $upload_root ) ) { + return; } + $htaccess_file = $upload_root . '/.htaccess'; + if ( file_exists( $htaccess_file ) ) { + unlink($htaccess_file); + } + $txt= '# Disable parsing of PHP for some server configurations. + + SetHandler none + SetHandler default-handler + Options -ExecCGI + RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo + + + php_flag engine off +'; + $rules = explode( "\n", $txt ); + insert_with_markers( $htaccess_file, 'Gravity Forms', $rules ); + + } + + public static function clean_number( $number, $number_format = '' ) { + if ( rgblank( $number ) ) { + return $number; + } - if($is_negative) - $float_number = "-" . $float_number; + $decimal_char = ''; + if ( $number_format == 'decimal_dot' ) { + $decimal_char = '.'; + } else if ( $number_format == 'decimal_comma' ) { + $decimal_char = ','; + } - return $float_number; + $float_number = ''; + $clean_number = ''; + $is_negative = false; + + //Removing all non-numeric characters + $array = str_split( $number ); + foreach ( $array as $char ) { + if ( ( $char >= '0' && $char <= '9' ) || $char == ',' || $char == '.' ) { + $clean_number .= $char; + } else if ( $char == '-' ) { + $is_negative = true; + } + } - } + //Removing thousand separators but keeping decimal point + $array = str_split( $clean_number ); + for ( $i = 0, $count = sizeof( $array ); $i < $count; $i ++ ) { + $char = $array[ $i ]; + if ( $char >= '0' && $char <= '9' ) { + $float_number .= $char; + } else if ( empty( $decimal_char ) && ( $char == '.' || $char == ',' ) && strlen( $clean_number ) - $i <= 3 ) { + $float_number .= '.'; + } else if ( $decimal_char == $char ) { + $float_number .= '.'; + } + } - public static function json_encode($value){ - return json_encode($value); - } + if ( $is_negative ) { + $float_number = '-' . $float_number; + } - public static function json_decode($str, $is_assoc=true){ - return json_decode($str, $is_assoc); - } + return $float_number; - //Returns the url of the plugin's root folder - public static function get_base_url(){ - return plugins_url( '', __FILE__ ); - } + } - //Returns the physical path of the plugin's root folder - public static function get_base_path(){ - return dirname( __FILE__ ); - } + public static function json_encode( $value ) { + return json_encode( $value ); + } - public static function get_email_fields($form){ - $fields = array(); - foreach($form["fields"] as $field){ - if(RGForms::get("type", $field) == "email" || RGForms::get("inputType", $field) == "email") - $fields[] = $field; - } + public static function json_decode( $str, $is_assoc = true ) { + return json_decode( $str, $is_assoc ); + } - return $fields; - } + //Returns the url of the plugin's root folder + public static function get_base_url() { + return plugins_url( '', __FILE__ ); + } - public static function truncate_middle($text, $max_length){ - if(strlen($text) <= $max_length) - return $text; + //Returns the physical path of the plugin's root folder + public static function get_base_path() { + return dirname( __FILE__ ); + } - $middle = intval($max_length / 2); - return self::safe_substr($text, 0, $middle) . "..." . self::safe_substr($text, strlen($text) - $middle, $middle); - } + public static function get_email_fields( $form ) { + $fields = array(); + foreach ( $form['fields'] as $field ) { + if ( $field->type == 'email' || $field->inputType == 'email' ) { + $fields[] = $field; + } + } - public static function is_invalid_or_empty_email($email){ - return empty($email) || !self::is_valid_email($email); - } + return $fields; + } + + public static function truncate_middle( $text, $max_length ) { + if ( strlen( $text ) <= $max_length ) { + return $text; + } + + $middle = intval( $max_length / 2 ); + + return self::safe_substr( $text, 0, $middle ) . '...' . self::safe_substr( $text, strlen( $text ) - $middle, $middle ); + } + + public static function is_invalid_or_empty_email( $email ) { + return empty( $email ) || ! self::is_valid_email( $email ); + } public static function is_valid_url( $url ) { $url = trim( $url ); @@ -246,906 +286,859 @@ public static function is_valid_email_list( $email_list ) { return true; } - public static function get_label($field, $input_id = 0, $input_only = false){ - return RGFormsModel::get_label($field, $input_id, $input_only); - } - - public static function get_input($field, $id){ - return RGFormsModel::get_input($field, $id); - } - - public static function insert_variables($fields, $element_id, $hide_all_fields=false, $callback="", $onchange="", $max_label_size=40, $exclude = null, $args="", $class_name=""){ - - if($fields == null) - $fields = array(); + public static function get_label( $field, $input_id = 0, $input_only = false ) { + return RGFormsModel::get_label( $field, $input_id, $input_only ); + } - if($exclude == null) - $exclude = array(); + public static function get_input( $field, $id ) { + return RGFormsModel::get_input( $field, $id ); + } - $exclude = apply_filters("gform_merge_tag_list_exclude", $exclude, $element_id, $fields); - $merge_tags = self::get_merge_tags($fields, $element_id, $hide_all_fields, $exclude, $args); + public static function insert_variables( $fields, $element_id, $hide_all_fields = false, $callback = '', $onchange = '', $max_label_size = 40, $exclude = null, $args = '', $class_name = '' ) { - $onchange = empty($onchange) ? "InsertVariable('{$element_id}', '{$callback}');" : $onchange; - $class = trim($class_name . " gform_merge_tags"); + if ( $fields == null ) { + $fields = array(); + } - ?> + if ( $exclude == null ) { + $exclude = array(); + } - + - if($group_label) { ?> - - + $group_tags ) { - - - - - + if ( $group_label ) { + ?> + + - + + + + + - /** - * This function is used by the gfMergeTags JS object to get the localized label for non-field merge tags as well as - * for backwards compatability with the gform_custom_merge_tags hook. Lastly, this plugin is used by the soon-to-be - * deprecrated insert_variables() function as the new gfMergeTags object has not yet been applied to the Post Content - * Template setting. - * - * @param $fields - * @param $element_id - * @param bool $hide_all_fields - * @param array $exclude_field_types - * @param string $option - * @return array - */ - public static function get_merge_tags($fields, $element_id, $hide_all_fields = false, $exclude_field_types = array(), $option = '') { + - if($fields == null) - $fields = array(); + '{all_fields}', 'label' => __('All Submitted Fields', 'gravityforms')); + $required_fields = $optional_fields = $pricing_fields = array(); + $ungrouped = $required_group = $optional_group = $pricing_group = $other_group = array(); - // group fields by required, optional, and pricing - foreach($fields as $field) { + if ( ! $hide_all_fields ) { + $ungrouped[] = array( 'tag' => '{all_fields}', 'label' => __( 'All Submitted Fields', 'gravityforms' ) ); + } - if(rgget("displayOnly", $field)) - continue; + // group fields by required, optional, and pricing + foreach ( $fields as $field ) { - $input_type = RGFormsModel::get_input_type($field); + if ( $field->displayOnly ) { + continue; + } - // skip field types that should be excluded - if(is_array($exclude_field_types) && in_array($input_type, $exclude_field_types)) - continue; + $input_type = RGFormsModel::get_input_type( $field ); - if(rgar($field, 'isRequired')) { + // skip field types that should be excluded + if ( is_array( $exclude_field_types ) && in_array( $input_type, $exclude_field_types ) ) { + continue; + } - switch($input_type) { + if ( $field->isRequired ) { - case "name" : + switch ( $input_type ) { - if(rgar($field,"nameFormat") == "extended") { + case 'name' : - $prefix = GFCommon::get_input($field, $field["id"] + 0.2); - $suffix = GFCommon::get_input($field, $field["id"] + 0.8); - $optional_field = $field; - $optional_field["inputs"] = array($prefix, $suffix); + if ( $field->nameFormat == 'extended' ) { - //Add optional name fields to the optional list - $optional_fields[] = $optional_field; + $prefix = GFCommon::get_input( $field, $field->id . '.2' ); + $suffix = GFCommon::get_input( $field, $field->id . '.8' ); + $optional_field = $field; + $optional_field['inputs'] = array( $prefix, $suffix ); - //Remove optional name field from required list - unset($field["inputs"][0]); - unset($field["inputs"][3]); + //Add optional name fields to the optional list + $optional_fields[] = $optional_field; - } + //Remove optional name field from required list + unset( $field->inputs[0] ); + unset( $field->inputs[3] ); - $required_fields[] = $field; + } - break; + $required_fields[] = $field; - default: - $required_fields[] = $field; - } - } - else { - $optional_fields[] = $field; - } + break; - if(self::is_pricing_field($field["type"])){ - $pricing_fields[] = $field; - } + default: + $required_fields[] = $field; + } + } else { + $optional_fields[] = $field; + } - } + if ( self::is_pricing_field( $field->type ) ) { + $pricing_fields[] = $field; + } + } - if(!empty($required_fields)){ - foreach($required_fields as $field){ - $required_group = array_merge($required_group, self::get_field_merge_tags($field, $option)); - } - } + if ( ! empty( $required_fields ) ) { + foreach ( $required_fields as $field ) { + $required_group = array_merge( $required_group, self::get_field_merge_tags( $field, $option ) ); + } + } - if(!empty($optional_fields)){ - foreach($optional_fields as $field){ - $optional_group = array_merge($optional_group, self::get_field_merge_tags($field, $option)); - } - } + if ( ! empty( $optional_fields ) ) { + foreach ( $optional_fields as $field ) { + $optional_group = array_merge( $optional_group, self::get_field_merge_tags( $field, $option ) ); + } + } - if(!empty($pricing_fields)){ + if ( ! empty( $pricing_fields ) ) { - if(!$hide_all_fields) - $pricing_group[] = array('tag' => '{pricing_fields}', 'label' => __("All Pricing Fields", "gravityforms")); + if ( ! $hide_all_fields ) { + $pricing_group[] = array( 'tag' => '{pricing_fields}', 'label' => __( 'All Pricing Fields', 'gravityforms' ) ); + } - foreach($pricing_fields as $field){ - $pricing_group = array_merge($pricing_group, self::get_field_merge_tags($field, $option)); - } + foreach ( $pricing_fields as $field ) { + $pricing_group = array_merge( $pricing_group, self::get_field_merge_tags( $field, $option ) ); + } + } - } + $other_group[] = array( 'tag' => '{ip}', 'label' => __( 'User IP Address', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{date_mdy}', 'label' => __( 'Date', 'gravityforms' ) . ' (mm/dd/yyyy)' ); + $other_group[] = array( 'tag' => '{date_dmy}', 'label' => __( 'Date', 'gravityforms' ) . ' (dd/mm/yyyy)' ); + $other_group[] = array( 'tag' => '{embed_post:ID}', 'label' => __( 'Embed Post/Page Id', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{embed_post:post_title}', 'label' => __( 'Embed Post/Page Title', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{embed_url}', 'label' => __( 'Embed URL', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{entry_id}', 'label' => __( 'Entry Id', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{entry_url}', 'label' => __( 'Entry URL', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{form_id}', 'label' => __( 'Form Id', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{form_title}', 'label' => __( 'Form Title', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{user_agent}', 'label' => __( 'HTTP User Agent', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{referer}', 'label' => __( 'HTTP Referer URL', 'gravityforms' ) ); + + if ( self::has_post_field( $fields ) ) { + $other_group[] = array( 'tag' => '{post_id}', 'label' => __( 'Post Id', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{post_edit_url}', 'label' => __( 'Post Edit URL', 'gravityforms' ) ); + } - $other_group[] = array('tag' => '{ip}', 'label' => __("User IP Address", "gravityforms")); - $other_group[] = array('tag' => '{date_mdy}', 'label' => __("Date", "gravityforms") . ' (mm/dd/yyyy)'); - $other_group[] = array('tag' => '{date_dmy}', 'label' => __("Date", "gravityforms") . ' (dd/mm/yyyy)'); - $other_group[] = array('tag' => '{embed_post:ID}', 'label' => __("Embed Post/Page Id", "gravityforms")); - $other_group[] = array('tag' => '{embed_post:post_title}', 'label' => __("Embed Post/Page Title", "gravityforms")); - $other_group[] = array('tag' => '{embed_url}', 'label' => __("Embed URL", "gravityforms")); - $other_group[] = array('tag' => '{entry_id}', 'label' => __("Entry Id", "gravityforms")); - $other_group[] = array('tag' => '{entry_url}', 'label' => __("Entry URL", "gravityforms")); - $other_group[] = array('tag' => '{form_id}', 'label' => __("Form Id", "gravityforms")); - $other_group[] = array('tag' => '{form_title}', 'label' => __("Form Title", "gravityforms")); - $other_group[] = array('tag' => '{user_agent}', 'label' => __("HTTP User Agent", "gravityforms")); - $other_group[] = array('tag' => '{referer}', 'label' => __("HTTP Referer URL", "gravityforms")); - - if(self::has_post_field($fields)) { - $other_group[] = array('tag' => '{post_id}', 'label' => __("Post Id", "gravityforms")); - $other_group[] = array('tag' => '{post_edit_url}', 'label' => __("Post Edit URL", "gravityforms")); - } + $other_group[] = array( 'tag' => '{user:display_name}', 'label' => __( 'User Display Name', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{user:user_email}', 'label' => __( 'User Email', 'gravityforms' ) ); + $other_group[] = array( 'tag' => '{user:user_login}', 'label' => __( 'User Login', 'gravityforms' ) ); + + $form_id = isset($fields[0]) ? $fields[0]->formId : 0; + + $custom_group = apply_filters( 'gform_custom_merge_tags', array(), $form_id, $fields, $element_id ); + + $merge_tags = array( + 'ungrouped' => array( + 'label' => false, + 'tags' => $ungrouped, + ), + 'required' => array( + 'label' => __( 'Required form fields', 'gravityforms' ), + 'tags' => $required_group, + ), + 'optional' => array( + 'label' => __( 'Optional form fields', 'gravityforms' ), + 'tags' => $optional_group, + ), + 'pricing' => array( + 'label' => __( 'Pricing form fields', 'gravityforms' ), + 'tags' => $pricing_group, + ), + 'other' => array( + 'label' => __( 'Other', 'gravityforms' ), + 'tags' => $other_group, + ), + 'custom' => array( + 'label' => __( 'Custom', 'gravityforms' ), + 'tags' => $custom_group, + ) + ); + + return $merge_tags; + } - $other_group[] = array('tag' => '{user:display_name}', 'label' => __("User Display Name", "gravityforms")); - $other_group[] = array('tag' => '{user:user_email}', 'label' => __("User Email", "gravityforms")); - $other_group[] = array('tag' => '{user:user_login}', 'label' => __("User Login", "gravityforms")); - - $custom_group = apply_filters('gform_custom_merge_tags', array(), rgars($fields, '0/formId'), $fields, $element_id); - - $merge_tags = array( - 'ungrouped' => array( - 'label' => false, - 'tags' => $ungrouped - ), - 'required' => array( - 'label' => __("Required form fields", "gravityforms"), - 'tags' => $required_group - ), - 'optional' => array( - 'label' => __("Optional form fields", "gravityforms"), - 'tags' => $optional_group - ), - 'pricing' => array( - 'label' => __("Pricing form fields", "gravityforms"), - 'tags' => $pricing_group - ), - 'other' => array( - 'label' => __("Other", "gravityforms"), - 'tags' => $other_group - ), - 'custom' => array( - 'label' => __("Custom", "gravityforms"), - 'tags' => $custom_group - ) - ); - - return $merge_tags; - } + /** + * @param GF_Field $field + * @param string $option + * @return string + */ + public static function get_field_merge_tags( $field, $option = '' ) { - public static function get_field_merge_tags($field, $option="") { + $merge_tags = array(); + $tag_args = RGFormsModel::get_input_type( $field ) == 'list' ? ":{$option}" : ''; //args currently only supported by list field - $merge_tags = array(); - $tag_args = RGFormsModel::get_input_type($field) == "list" ? ":{$option}" : ""; //args currently only supported by list field + $inputs = $field->get_entry_inputs(); - if(isset($field["inputs"]) && is_array($field["inputs"])) { + if ( is_array( $inputs ) ) { - if(RGFormsModel::get_input_type($field) == "checkbox") { - $value = "{" . esc_html(GFCommon::get_label($field, $field["id"])) . ":" . $field["id"] . "{$tag_args}}"; - $merge_tags[] = array( 'tag' => $value, 'label' => esc_html(GFCommon::get_label($field, $field["id"])) ); - } + if ( RGFormsModel::get_input_type( $field ) == 'checkbox' ) { + $value = '{' . esc_html( GFCommon::get_label( $field, $field->id ) ) . ':' . $field->id . "{$tag_args}}"; + $merge_tags[] = array( + 'tag' => $value, + 'label' => esc_html( GFCommon::get_label( $field, $field->id ) ) + ); + } - foreach($field["inputs"] as $input) { - if( RGFormsModel::get_input_type( $field ) == 'creditcard' ) { + foreach ( $field->inputs as $input ) { + if ( RGFormsModel::get_input_type( $field ) == 'creditcard' ) { //only include the credit card type (field_id.4) and number (field_id.1) if ( $input['id'] == $field['id'] . '.1' || $input['id'] == $field['id'] . '.4' ) { - $value = '{' . esc_html( GFCommon::get_label( $field, $input['id'] ) ) . ':' . $input['id'] . "{$tag_args}}"; - $merge_tags[] = array( 'tag' => $value, 'label' => esc_html( GFCommon::get_label( $field, $input['id'] ) ) ); + $value = '{' . esc_html( GFCommon::get_label( $field, $input['id'] ) ) . ':' . $input['id'] . "{$tag_args}}"; + $merge_tags[] = array( + 'tag' => $value, + 'label' => esc_html( GFCommon::get_label( $field, $input['id'] ) ) + ); } - } - else { - $value = "{" . esc_html(GFCommon::get_label($field, $input["id"])) . ":" . $input["id"] . "{$tag_args}}"; - $merge_tags[] = array( 'tag' => $value, 'label' => esc_html(GFCommon::get_label($field, $input["id"])) ); + } else { + $value = '{' . esc_html( GFCommon::get_label( $field, $input['id'] ) ) . ':' . $input['id'] . "{$tag_args}}"; + $merge_tags[] = array( + 'tag' => $value, + 'label' => esc_html( GFCommon::get_label( $field, $input['id'] ) ) + ); } } + } else { + $value = '{' . esc_html( GFCommon::get_label( $field ) ) . ':' . $field->id . "{$tag_args}}"; + $merge_tags[] = array( + 'tag' => $value, + 'label' => esc_html( GFCommon::get_label( $field ) ) + ); + } - } - else { - $value = "{" . esc_html(GFCommon::get_label($field)) . ":" . $field["id"] . "{$tag_args}}"; - $merge_tags[] = array( 'tag' => $value, 'label' => esc_html(GFCommon::get_label($field)) ); - } + return $merge_tags; + } - return $merge_tags; - } + public static function insert_field_variable( $field, $max_label_size = 40, $args = '' ) { + + $tag_args = RGFormsModel::get_input_type( $field ) == 'list' ? ":{$args}" : ''; //args currently only supported by list field + + if ( is_array( $field->inputs ) ) { + if ( RGFormsModel::get_input_type( $field ) == 'checkbox' ) { + ?> + + inputs as $input ) { + ?> + + + + +    + + - - - - - - -    - - + + - - "> + - formId : 0; + $custom_merge_tags = apply_filters( 'gform_custom_merge_tags', array(), $form_id, $fields, $element_id ); - if(!self::is_valid_for_calcuation($field)) - continue; + if ( is_array( $custom_merge_tags ) && ! empty( $custom_merge_tags ) ) { + ?> - if(RGFormsModel::get_input_type($field) == 'checkbox') { - foreach($field["inputs"] as $input){ - ?> - - "> - } - ?> + - + - - $custom_merge_tags = apply_filters('gform_custom_merge_tags', array(), rgars($fields, '0/formId'), $fields, $element_id); + - if(is_array($custom_merge_tags) && !empty($custom_merge_tags)) { ?> + - "> + - + '> + private static function get_post_image_variable( $media_id, $arg1, $arg2, $is_url = false ) { - + if ( $is_url ) { + $image = wp_get_attachment_image_src( $media_id, $arg1 ); + if ( $image ) { + list( $src, $width, $height ) = $image; + } - + return $src; + } - + switch ( $arg1 ) { + case 'title' : + $media = get_post( $media_id ); - + return $media->post_title; + case 'caption' : + $media = get_post( $media_id ); - post_excerpt; + case 'description' : + $media = get_post( $media_id ); - private static function get_post_image_variable($media_id, $arg1, $arg2, $is_url = false){ + return $media->post_content; - if($is_url){ - $image = wp_get_attachment_image_src($media_id, $arg1); - if ( $image ) - list($src, $width, $height) = $image; + default : - return $src; - } + $img = wp_get_attachment_image( $media_id, $arg1, false, array( 'class' => "size-{$arg1} align{$arg2} wp-image-{$media_id}" ) ); - switch($arg1){ - case "title" : - $media = get_post($media_id); - return $media->post_title; - case "caption" : - $media = get_post($media_id); - return $media->post_excerpt; - case "description" : - $media = get_post($media_id); - return $media->post_content; - - default : - - $img = wp_get_attachment_image($media_id, $arg1, false, array("class" => "size-{$arg1} align{$arg2} wp-image-{$media_id}")); - return $img; - } - } + return $img; + } + } - public static function replace_variables_post_image($text, $post_images, $lead){ - - preg_match_all('/{[^{]*?:(\d+)(:([^:]*?))?(:([^:]*?))?(:url)?}/mi', $text, $matches, PREG_SET_ORDER); - if(is_array($matches)) - { - foreach($matches as $match){ - $input_id = $match[1]; - - //ignore fields that are not post images - if(!isset($post_images[$input_id])) - continue; - - //Reading alignment and "url" parameters. - //Format could be {image:5:medium:left:url} or {image:5:medium:url} - $size_meta = empty($match[3]) ? "full" : $match[3]; - $align = empty($match[5]) ? "none" : $match[5]; - if($align == "url"){ - $align = "none"; - $is_url = true; - } - else{ - $is_url = rgar($match,6) == ":url"; - } - - $media_id = $post_images[$input_id]; - $value = is_wp_error($media_id) ? "" : self::get_post_image_variable($media_id, $size_meta, $align, $is_url); - - $text = str_replace($match[0], $value , $text); - } - } + public static function replace_variables_post_image( $text, $post_images, $lead ) { - return $text; - } + preg_match_all( '/{[^{]*?:(\d+)(:([^:]*?))?(:([^:]*?))?(:url)?}/mi', $text, $matches, PREG_SET_ORDER ); + if ( is_array( $matches ) ) { + foreach ( $matches as $match ) { + $input_id = $match[1]; - public static function implode_non_blank($separator, $array){ + //ignore fields that are not post images + if ( ! isset( $post_images[ $input_id ] ) ) { + continue; + } - if(!is_array($array)) - return ""; + //Reading alignment and 'url' parameters. + //Format could be {image:5:medium:left:url} or {image:5:medium:url} + $size_meta = empty( $match[3] ) ? 'full' : $match[3]; + $align = empty( $match[5] ) ? 'none' : $match[5]; + if ( $align == 'url' ) { + $align = 'none'; + $is_url = true; + } else { + $is_url = rgar( $match, 6 ) == ':url'; + } - $ary = array(); - foreach($array as $item){ - if(!rgblank($item)) - $ary[] = $item; - } - return implode($separator, $ary); - } + $media_id = $post_images[ $input_id ]; + $value = is_wp_error( $media_id ) ? '' : self::get_post_image_variable( $media_id, $size_meta, $align, $is_url ); - private static function format_variable_value($value, $url_encode, $esc_html, $format){ - if($esc_html) - $value = esc_html($value); + $text = str_replace( $match[0], $value, $text ); + } + } - if($format == "html") - $value = nl2br($value); + return $text; + } - if($url_encode) - $value = urlencode($value); + public static function implode_non_blank( $separator, $array ) { - return $value; - } + if ( ! is_array( $array ) ) { + return ''; + } - public static function replace_variables($text, $form, $lead, $url_encode = false, $esc_html=true, $nl2br = true, $format="html"){ - $text = $nl2br ? nl2br($text) : $text; + $ary = array(); + foreach ( $array as $item ) { + if ( ! rgblank( $item ) ) { + $ary[] = $item; + } + } - //Replacing field variables: {FIELD_LABEL:FIELD_ID} {My Field:2} - preg_match_all('/{[^{]*?:(\d+(\.\d+)?)(:(.*?))?}/mi', $text, $matches, PREG_SET_ORDER); - if(is_array($matches)) - { - foreach($matches as $match){ - $input_id = $match[1]; + return implode( $separator, $ary ); + } - $field = RGFormsModel::get_field($form,$input_id); + public static function format_variable_value( $value, $url_encode, $esc_html, $format ) { + if ( $esc_html ) { + $value = esc_html( $value ); + } - $value = RGFormsModel::get_lead_field_value($lead, $field); - $raw_value = $value; + if ( $format == 'html' ) { + $value = nl2br( $value ); + } - if(is_array($value)) - $value = rgar($value, $input_id); + if ( $url_encode ) { + $value = urlencode( $value ); + } - $value = self::format_variable_value($value, $url_encode, $esc_html, $format); + return $value; + } - switch(RGFormsModel::get_input_type($field)){ + public static function replace_variables( $text, $form, $lead, $url_encode = false, $esc_html = true, $nl2br = true, $format = 'html' ) { + $text = $nl2br ? nl2br( $text ) : $text; - case "number" : + //Replacing field variables: {FIELD_LABEL:FIELD_ID} {My Field:2} + preg_match_all( '/{[^{]*?:(\d+(\.\d+)?)(:(.*?))?}/mi', $text, $matches, PREG_SET_ORDER ); + if ( is_array( $matches ) ) { + foreach ( $matches as $match ) { + $input_id = $match[1]; - $value = GFCommon::format_number($value, rgar($field, "numberFormat")); + $field = RGFormsModel::get_field( $form, $input_id ); - break; + if ( ! $field instanceof GF_Field ) { + $field = GF_Fields::create( $field ); + } - case "fileupload" : - if(rgar($field, "multipleFiles")){ + $value = RGFormsModel::get_lead_field_value( $lead, $field ); + $raw_value = $value; - $files = empty( $raw_value ) ? array() : json_decode( $raw_value, true ); - foreach ( $files as &$file ) { + if ( is_array( $value ) ) { + $value = rgar( $value, $input_id ); + } - $file = str_replace( ' ', '%20', $file ); + $value = self::format_variable_value( $value, $url_encode, $esc_html, $format ); - if ( $esc_html ){ - $value = esc_html( $value ); - } - } - $value = $format == 'html' ? join( "
    ", $files ) : join( ", ", $files ); + $modifier = strtolower( rgar( $match, 4 ) ); - } else { - $value = str_replace( ' ', '%20', $value ); - } + $value = $field->get_value_merge_tag( $value, $input_id, $lead, $form, $modifier, $raw_value, $url_encode, $esc_html, $format ); - if ( $url_encode ){ - $value = urlencode( $value ); + if ( $modifier == 'label' ) { + $value = empty( $value ) ? '' : $field->label; + } else if ( $modifier == 'qty' && $field->type == 'product' ) { + //getting quantity associated with product field + $products = self::get_product_fields( $form, $lead, false, false ); + $value = 0; + foreach ( $products['products'] as $product_id => $product ) { + if ( $product_id == $field->id ) { + $value = $product['quantity']; } + } + } - break; - - case "post_image" : - list( $url, $title, $caption, $description ) = array_pad( explode( '|:|', $value ), 4, false ); - $value = str_replace( ' ', '%20', $url ); - break; - - case "checkbox" : - case "select" : - case "radio" : - - $use_value = rgar($match,4) == "value"; - $use_price = in_array(rgar($match,4), array("price", "currency")); - $format_currency = rgar($match,4) == "currency"; - - if(is_array($raw_value) && (string)intval($input_id) != $input_id){ - $items = array($input_id => $value); //float input Ids. (i.e. 4.1 ). Used when targeting specific checkbox items - } - else if(is_array($raw_value)){ - $items = $raw_value; - } - else{ - $items = array($input_id => $raw_value); - } - - $ary = array(); - - foreach($items as $input_id => $item){ - if($use_value){ - list($val, $price) = rgexplode("|", $item, 2); - } - else if($use_price){ - list($name, $val) = rgexplode("|", $item, 2); - if($format_currency) - $val = GFCommon::to_money($val, rgar($lead, "currency")); - } - else if($field["type"] == "post_category"){ - $use_id = strtolower(rgar($match,4)) == "id"; - $item_value = self::format_post_category($item, $use_id); - - $val = RGFormsModel::is_field_hidden($form, $field, array(), $lead) ? "" : $item_value; - } - else{ - $val = RGFormsModel::is_field_hidden($form, $field, array(), $lead) ? "" : RGFormsModel::get_choice_text($field, $raw_value, $input_id); - } - - $ary[] = self::format_variable_value($val, $url_encode, $esc_html, $format); - } - - $value = self::implode_non_blank(", ", $ary); - - break; - - case "multiselect" : - if($field["type"] == "post_category"){ - $use_id = strtolower(rgar($match,4)) == "id"; - $items = explode(",", $value); - - if(is_array($items)){ - $cats = array(); - foreach($items as $item){ - $cat = self::format_post_category($item, $use_id); - $cats[] = self::format_variable_value($cat, $url_encode, $esc_html, $format); - } - $value = self::implode_non_blank(", ", $cats); - } - } - - break; - - case "date" : - $value = self::date_display($value, rgar($field,"dateFormat")); - break; - - case "total" : - $format_numeric = rgar($match,4) == "price"; - - $value = $format_numeric ? GFCommon::to_number($value) : GFCommon::to_money($value); - - $value = self::format_variable_value($value, $url_encode, $esc_html, $format); - break; - - case "post_category" : - $use_id = strtolower(rgar($match,4)) == "id"; - $value = self::format_post_category($value, $use_id); - $value = self::format_variable_value($value, $url_encode, $esc_html, $format); - break; - - case "list" : - $output_format = in_array(rgar($match,4), array("text", "html", "url")) ? rgar($match,4) : $format; - $value = self::get_lead_field_display($field, $raw_value, $lead["currency"], true, $output_format); - break; - } - - if(rgar($match,4) == "label"){ - $value = empty($value) ? "" : rgar($field, "label"); - } - else if(rgar($match,4) == "qty" && $field["type"] == "product"){ - //getting quantity associated with product field - $products = self::get_product_fields($form, $lead, false, false); - $value = 0; - foreach($products["products"] as $product_id => $product) - { - if($product_id == $field["id"]) - $value = $product["quantity"]; - } - } - - //Encoding left curly bracket so that merge tags entered in the front end are displayed as is and not "executed" - $value = self::encode_merge_tag($value); - - //filter can change merge code variable - $value = apply_filters("gform_merge_tag_filter", $value, $input_id, rgar($match,4), $field, $raw_value); - if($value === false) - $value = ""; - - $text = str_replace($match[0], $value , $text); - } - } + //Encoding left curly bracket so that merge tags entered in the front end are displayed as is and not 'executed' + $value = self::encode_merge_tag( $value ); - //replacing global variables - //form title - $text = str_replace("{form_title}", $url_encode ? urlencode($form["title"]) : $form["title"], $text); - - $matches = array(); - preg_match_all("/{all_fields(:(.*?))?}/", $text, $matches, PREG_SET_ORDER); - foreach($matches as $match){ - $options = explode(",", rgar($match,2)); - $use_value = in_array("value", $options); - $display_empty = in_array("empty", $options); - $use_admin_label = in_array("admin", $options); - - //all submitted fields using text - if (strpos($text, $match[0]) !== false){ - $text = str_replace($match[0], self::get_submitted_fields($form, $lead, $display_empty, !$use_value, $format, $use_admin_label, "all_fields", rgar($match,2)), $text); - } - } + //filter can change merge tab variable + $value = apply_filters( 'gform_merge_tag_filter', $value, $input_id, $modifier, $field, $raw_value ); + if ( $value === false ) { + $value = ''; + } - //all submitted fields including empty fields - if (strpos($text, "{all_fields_display_empty}") !== false){ - $text = str_replace("{all_fields_display_empty}", self::get_submitted_fields($form, $lead, true, true, $format, false, "all_fields_display_empty"), $text); - } + $text = str_replace( $match[0], $value, $text ); + } + } + + //replacing global variables + //form title + $text = str_replace( '{form_title}', $url_encode ? urlencode( $form['title'] ) : $form['title'], $text ); + + $matches = array(); + preg_match_all( "/{all_fields(:(.*?))?}/", $text, $matches, PREG_SET_ORDER ); + foreach ( $matches as $match ) { + $options = explode( ',', rgar( $match, 2 ) ); + $use_value = in_array( 'value', $options ); + $display_empty = in_array( 'empty', $options ); + $use_admin_label = in_array( 'admin', $options ); + + //all submitted fields using text + if ( strpos( $text, $match[0] ) !== false ) { + $text = str_replace( $match[0], self::get_submitted_fields( $form, $lead, $display_empty, ! $use_value, $format, $use_admin_label, 'all_fields', rgar( $match, 2 ) ), $text ); + } + } + + //all submitted fields including empty fields + if ( strpos( $text, '{all_fields_display_empty}' ) !== false ) { + $text = str_replace( '{all_fields_display_empty}', self::get_submitted_fields( $form, $lead, true, true, $format, false, 'all_fields_display_empty' ), $text ); + } - //pricing fields - if (strpos($text, "{pricing_fields}") !== false){ - $text = str_replace("{pricing_fields}", ' + //pricing fields + if ( strpos( $text, '{pricing_fields}' ) !== false ) { + $pricing_fields = self::get_submitted_pricing_fields( $form, $lead, $format ); + if ( $format == 'html' ) { + $text = str_replace( + '{pricing_fields}', '
    ' . - self::get_submitted_pricing_fields($form, $lead, $format) . - '
    + $pricing_fields . + '
    ', - $text); - } + $text + ); + } else { + $text = str_replace( '{pricing_fields}', $pricing_fields, $text ); + } + } - //form id - $text = str_replace("{form_id}", $url_encode ? urlencode($form["id"]) : $form["id"], $text); + //form id + $text = str_replace( '{form_id}', $url_encode ? urlencode( $form['id'] ) : $form['id'], $text ); - //entry id - $text = str_replace("{entry_id}", $url_encode ? urlencode(rgar($lead, "id")) : rgar($lead, "id"), $text); + //entry id + $text = str_replace( '{entry_id}', $url_encode ? urlencode( rgar( $lead, 'id' ) ) : rgar( $lead, 'id' ), $text ); - //entry url - $entry_url = get_bloginfo("wpurl") . "/wp-admin/admin.php?page=gf_entries&view=entry&id=" . $form["id"] . "&lid=" . rgar($lead,"id"); - $text = str_replace("{entry_url}", $url_encode ? urlencode($entry_url) : $entry_url, $text); + //entry url + $entry_url = get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=gf_entries&view=entry&id=' . $form['id'] . '&lid=' . rgar( $lead, 'id' ); + $text = str_replace( '{entry_url}', $url_encode ? urlencode( $entry_url ) : $entry_url, $text ); - //post id - $text = str_replace("{post_id}", $url_encode ? urlencode(rgar($lead, "post_id")) : rgar($lead, "post_id"), $text); + //post id + $text = str_replace( '{post_id}', $url_encode ? urlencode( rgar( $lead, 'post_id' ) ) : rgar( $lead, 'post_id' ), $text ); - //admin email - $wp_email = get_bloginfo("admin_email"); - $text = str_replace("{admin_email}", $url_encode ? urlencode($wp_email) : $wp_email, $text); + //admin email + $wp_email = get_bloginfo( 'admin_email' ); + $text = str_replace( '{admin_email}', $url_encode ? urlencode( $wp_email ) : $wp_email, $text ); - //post edit url - $post_url = get_bloginfo("wpurl") . "/wp-admin/post.php?action=edit&post=" . rgar($lead, "post_id"); - $text = str_replace("{post_edit_url}", $url_encode ? urlencode($post_url) : $post_url, $text); + //post edit url + $post_url = get_bloginfo( 'wpurl' ) . '/wp-admin/post.php?action=edit&post=' . rgar( $lead, 'post_id' ); + $text = str_replace( '{post_edit_url}', $url_encode ? urlencode( $post_url ) : $post_url, $text ); - $text = self::replace_variables_prepopulate($text, $url_encode, $lead); + $text = self::replace_variables_prepopulate( $text, $url_encode, $lead ); - // hook allows for custom merge tags - $text = apply_filters('gform_replace_merge_tags', $text, $form, $lead, $url_encode, $esc_html, $nl2br, $format); + // hook allows for custom merge tags + $text = apply_filters( 'gform_replace_merge_tags', $text, $form, $lead, $url_encode, $esc_html, $nl2br, $format ); - // TODO: Deprecate the 'gform_replace_merge_tags' and replace it with a call to the 'gform_merge_tag_filter' - //$text = apply_filters('gform_merge_tag_filter', $text, false, false, false ); + // TODO: Deprecate the 'gform_replace_merge_tags' and replace it with a call to the 'gform_merge_tag_filter' + //$text = apply_filters('gform_merge_tag_filter', $text, false, false, false ); - $text = self::decode_merge_tag($text); - return $text; - } + $text = self::decode_merge_tag( $text ); - public static function encode_merge_tag($text){ - return str_replace("{", "{", $text); - } + return $text; + } - public static function decode_merge_tag($text){ - return str_replace("{", "{", $text); - } + public static function encode_merge_tag( $text ) { + return str_replace( '{', '{', $text ); + } - public static function format_post_category($value, $use_id){ + public static function decode_merge_tag( $text ) { + return str_replace( '{', '{', $text ); + } - list($item_value, $item_id) = rgexplode(":", $value, 2); + public static function format_post_category( $value, $use_id ) { - if($use_id && !empty($item_id)) - $item_value = $item_id; + list( $item_value, $item_id ) = rgexplode( ':', $value, 2 ); - return $item_value; - } + if ( $use_id && ! empty( $item_id ) ) { + $item_value = $item_id; + } - public static function get_embed_post(){ - global $embed_post, $post, $wp_query; + return $item_value; + } - if($embed_post){ - return $embed_post; - } + public static function get_embed_post() { + global $embed_post, $post, $wp_query; - if(!rgempty("gform_embed_post")){ - $post_id = absint(rgpost("gform_embed_post")); - $embed_post = get_post($post_id); - } - else if($wp_query->is_in_loop){ - $embed_post = $post; - } - else{ - $embed_post = array(); - } - } + if ( $embed_post ) { + return $embed_post; + } + + if ( ! rgempty( 'gform_embed_post' ) ) { + $post_id = absint( rgpost( 'gform_embed_post' ) ); + $embed_post = get_post( $post_id ); + } else if ( $wp_query->is_in_loop ) { + $embed_post = $post; + } else { + $embed_post = array(); + } + } - public static function replace_variables_prepopulate($text, $url_encode=false, $entry=false){ + public static function get_ul_classes( $form ){ - //embed url - $text = str_replace("{embed_url}", $url_encode ? urlencode(RGFormsModel::get_current_page_url()) : RGFormsModel::get_current_page_url(), $text); + $description_class = rgar( $form, 'descriptionPlacement' ) == 'above' ? 'description_above' : 'description_below'; + $sublabel_class = rgar( $form, 'subLabelPlacement' ) == 'above' ? 'form_sublabel_above' : 'form_sublabel_below'; + $label_class = rgempty( 'labelPlacement', $form ) ? 'top_label' : rgar( $form, 'labelPlacement' ); - $local_timestamp = self::get_local_timestamp(time()); + $css_class = preg_replace( '/\s+/', ' ', "gform_fields {$label_class} {$sublabel_class} {$description_class}" ); //removing extra spaces - //date (mm/dd/yyyy) - $local_date_mdy = date_i18n("m/d/Y", $local_timestamp, true); - $text = str_replace("{date_mdy}", $url_encode ? urlencode($local_date_mdy) : $local_date_mdy, $text); + return $css_class; + } - //date (dd/mm/yyyy) - $local_date_dmy = date_i18n("d/m/Y", $local_timestamp, true); - $text = str_replace("{date_dmy}", $url_encode ? urlencode($local_date_dmy) : $local_date_dmy, $text); - // ip - $ip = isset( $entry['ip'] ) ? $entry['ip'] : GFFormsModel::get_ip(); - $text = str_replace( '{ip}', $url_encode ? urlencode( $ip ) : $ip, $text ); + public static function replace_variables_prepopulate( $text, $url_encode = false, $entry = false ) { - global $post; - $post_array = self::object_to_array($post); - preg_match_all("/\{embed_post:(.*?)\}/", $text, $matches, PREG_SET_ORDER); - foreach($matches as $match){ - $full_tag = $match[0]; - $property = $match[1]; - $text = str_replace($full_tag, $url_encode ? urlencode($post_array[$property]) : $post_array[$property], $text); - } + //embed url + $text = str_replace( '{embed_url}', $url_encode ? urlencode( RGFormsModel::get_current_page_url() ) : RGFormsModel::get_current_page_url(), $text ); - //embed post custom fields - preg_match_all("/\{custom_field:(.*?)\}/", $text, $matches, PREG_SET_ORDER); - foreach($matches as $match){ + $local_timestamp = self::get_local_timestamp( time() ); - $full_tag = $match[0]; - $custom_field_name = $match[1]; - $custom_field_value = !empty($post_array["ID"]) ? get_post_meta($post_array["ID"], $custom_field_name, true) : ""; - $text = str_replace($full_tag, $url_encode ? urlencode($custom_field_value) : $custom_field_value, $text); - } + //date (mm/dd/yyyy) + $local_date_mdy = date_i18n( 'm/d/Y', $local_timestamp, true ); + $text = str_replace( '{date_mdy}', $url_encode ? urlencode( $local_date_mdy ) : $local_date_mdy, $text ); - //user agent - $text = str_replace("{user_agent}", $url_encode ? urlencode(RGForms::get("HTTP_USER_AGENT", $_SERVER)) : RGForms::get("HTTP_USER_AGENT", $_SERVER), $text); + //date (dd/mm/yyyy) + $local_date_dmy = date_i18n( 'd/m/Y', $local_timestamp, true ); + $text = str_replace( '{date_dmy}', $url_encode ? urlencode( $local_date_dmy ) : $local_date_dmy, $text ); - //referrer - $text = str_replace("{referer}", $url_encode ? urlencode(RGForms::get("HTTP_REFERER", $_SERVER)) : RGForms::get("HTTP_REFERER", $_SERVER), $text); + // ip + $ip = isset( $entry['ip'] ) ? $entry['ip'] : GFFormsModel::get_ip(); + $text = str_replace( '{ip}', $url_encode ? urlencode( $ip ) : $ip, $text ); - //logged in user info - global $userdata, $wp_version, $current_user; - $user_array = self::object_to_array($userdata); + global $post; + $post_array = self::object_to_array( $post ); + preg_match_all( "/\{embed_post:(.*?)\}/", $text, $matches, PREG_SET_ORDER ); + foreach ( $matches as $match ) { + $full_tag = $match[0]; + $property = $match[1]; + $text = str_replace( $full_tag, $url_encode ? urlencode( $post_array[ $property ] ) : $post_array[ $property ], $text ); + } - preg_match_all("/\{user:(.*?)\}/", $text, $matches, PREG_SET_ORDER); - foreach($matches as $match){ - $full_tag = $match[0]; - $property = $match[1]; + //embed post custom fields + preg_match_all( "/\{custom_field:(.*?)\}/", $text, $matches, PREG_SET_ORDER ); + foreach ( $matches as $match ) { - $value = version_compare($wp_version, '3.3', '>=') ? $current_user->get($property) : $user_array[$property]; - $value = $url_encode ? urlencode($value) : $value; + $full_tag = $match[0]; + $custom_field_name = $match[1]; + $custom_field_value = ! empty( $post_array['ID'] ) ? get_post_meta( $post_array['ID'], $custom_field_name, true ) : ''; + $text = str_replace( $full_tag, $url_encode ? urlencode( $custom_field_value ) : $custom_field_value, $text ); + } - $text = str_replace($full_tag, $value, $text); - } + //user agent + $text = str_replace( '{user_agent}', $url_encode ? urlencode( RGForms::get( 'HTTP_USER_AGENT', $_SERVER ) ) : RGForms::get( 'HTTP_USER_AGENT', $_SERVER ), $text ); - return $text; - } + //referrer + $text = str_replace( '{referer}', $url_encode ? urlencode( RGForms::get( 'HTTP_REFERER', $_SERVER ) ) : RGForms::get( 'HTTP_REFERER', $_SERVER ), $text ); - public static function object_to_array($object){ - $array=array(); - if(!empty($object)){ - foreach($object as $member=>$data) - $array[$member]=$data; - } - return $array; - } + //logged in user info + global $userdata, $wp_version, $current_user; + $user_array = self::object_to_array( $userdata ); - public static function is_empty_array($val){ - if(!is_array($val)) - $val = array($val); + preg_match_all( "/\{user:(.*?)\}/", $text, $matches, PREG_SET_ORDER ); + foreach ( $matches as $match ) { + $full_tag = $match[0]; + $property = $match[1]; - $ary = array_values($val); - foreach($ary as $item){ - if(!rgblank($item)) - return false; - } - return true; - } + $value = version_compare( $wp_version, '3.3', '>=' ) ? $current_user->get( $property ) : $user_array[ $property ]; + $value = $url_encode ? urlencode( $value ) : $value; - public static function get_submitted_fields($form, $lead, $display_empty=false, $use_text=false, $format="html", $use_admin_label=false, $merge_tag="", $options=""){ + $text = str_replace( $full_tag, $value, $text ); + } + + $text = apply_filters( 'gform_replace_merge_tags', $text, false, false, $url_encode, false, false, false ); + + return $text; + } + + public static function object_to_array( $object ) { + $array = array(); + if ( ! empty( $object ) ) { + foreach ( $object as $member => $data ) { + $array[ $member ] = $data; + } + } + + return $array; + } + + public static function is_empty_array( $val ) { + if ( ! is_array( $val ) ) { + $val = array( $val ); + } + + $ary = array_values( $val ); + foreach ( $ary as $item ) { + if ( ! rgblank( $item ) ) { + return false; + } + } + + return true; + } - $field_data = ""; - if($format == "html"){ - $field_data = '
    + public static function get_submitted_fields( $form, $lead, $display_empty = false, $use_text = false, $format = 'html', $use_admin_label = false, $merge_tag = '', $options = '' ) { + + $field_data = ''; + if ( $format == 'html' ) { + $field_data = '
    '; - } + } - $options_array = explode(",", $options); - $no_admin = in_array("noadmin", $options_array); - $no_hidden = in_array("nohidden", $options_array); - $display_product_summary = false; + $options_array = explode( ',', $options ); + $no_admin = in_array( 'noadmin', $options_array ); + $no_hidden = in_array( 'nohidden', $options_array ); + $display_product_summary = false; - foreach($form["fields"] as $field){ - $field_value = ""; + foreach ( $form['fields'] as $field ) { + $field_value = ''; - $field_label = $use_admin_label && !rgempty("adminLabel", $field) ? rgar($field, "adminLabel") : esc_html(GFCommon::get_label($field)); + $field_label = $use_admin_label && ! empty( $field->adminLabel ) ? $field->adminLabel : esc_html( GFCommon::get_label( $field ) ); - switch($field["type"]){ - case "captcha" : - break; + switch ( $field->type ) { + case 'captcha' : + break; - case "section" : + case 'section' : if ( GFFormsModel::is_field_hidden( $form, $field, array(), $lead ) ){ continue; } - if ( ( ! GFCommon::is_section_empty( $field, $form, $lead ) || $display_empty ) && !rgar( $field, "adminOnly" ) ) { + if ( ( ! GFCommon::is_section_empty( $field, $form, $lead ) || $display_empty ) && ! $field->adminOnly ) { - switch($format){ - case "text" : - $field_value = "--------------------------------\n{$field_label}\n\n"; - break; + switch ( $format ) { + case 'text' : + $field_value = "--------------------------------\n{$field_label}\n\n"; + break; - default: - $field_value = sprintf(' + default: + $field_value = sprintf( + ' - ', $field_label); - break; - } - } - - $field_value = apply_filters("gform_merge_tag_filter", $field_value, $merge_tag, $options, $field, $field_label); + ', $field_label + ); + break; + } + } - $field_data .= $field_value; + $field_value = apply_filters( 'gform_merge_tag_filter', $field_value, $merge_tag, $options, $field, $field_label ); - break; - case "password" : - //ignore password fields - break; + $field_data .= $field_value; - default : + break; + case 'password' : + //ignore password fields + break; - if( self::is_product_field( $field['type'] ) ) { + default : - // ignore product fields as they will be grouped together at the end of the grid - $display_product_summary = apply_filters( 'gform_display_product_summary', true, $field, $form, $lead ); - if( $display_product_summary ) - continue; + if ( self::is_product_field( $field->type ) ) { - } - else if( GFFormsModel::is_field_hidden( $form, $field, array(), $lead) ){ - // ignore fields hidden by conditional logic - continue; - } + // ignore product fields as they will be grouped together at the end of the grid + $display_product_summary = apply_filters( 'gform_display_product_summary', true, $field, $form, $lead ); + if ( $display_product_summary ) { + continue; + } + } else if ( GFFormsModel::is_field_hidden( $form, $field, array(), $lead ) ) { + // ignore fields hidden by conditional logic + continue; + } - $raw_field_value = RGFormsModel::get_lead_field_value($lead, $field); - $field_value = GFCommon::get_lead_field_display($field, $raw_field_value, rgar($lead,"currency"), $use_text, $format, "email"); + $raw_field_value = RGFormsModel::get_lead_field_value( $lead, $field ); + $field_value = GFCommon::get_lead_field_display( $field, $raw_field_value, rgar( $lead, 'currency' ), $use_text, $format, 'email' ); - $display_field = true; - //depending on parameters, don't display adminOnly or hidden fields - if($no_admin && rgar($field, "adminOnly")) - $display_field = false; - else if($no_hidden && RGFormsModel::get_input_type($field) == "hidden") - $display_field = false; + $display_field = true; + //depending on parameters, don't display adminOnly or hidden fields + if ( $no_admin && $field->adminOnly ) { + $display_field = false; + } else if ( $no_hidden && RGFormsModel::get_input_type( $field ) == 'hidden' ) { + $display_field = false; + } - //if field is not supposed to be displayed, pass false to filter. otherwise, pass field's value - if(!$display_field) - $field_value = false; + //if field is not supposed to be displayed, pass false to filter. otherwise, pass field's value + if ( ! $display_field ) { + $field_value = false; + } - $field_value = apply_filters("gform_merge_tag_filter", $field_value, $merge_tag, $options, $field, $raw_field_value); + $field_value = apply_filters( 'gform_merge_tag_filter', $field_value, $merge_tag, $options, $field, $raw_field_value ); - if($field_value === false) - continue; + if ( $field_value === false ) { + continue; + } - if( !empty($field_value) || strlen($field_value) > 0 || $display_empty){ - switch($format){ - case "text" : - $field_data .= "{$field_label}: {$field_value}\n\n"; - break; + if ( ! empty( $field_value ) || strlen( $field_value ) > 0 || $display_empty ) { + switch ( $format ) { + case 'text' : + $field_data .= "{$field_label}: {$field_value}\n\n"; + break; - default: + default: - $field_data .= sprintf(' + $field_data .= sprintf( + ' @@ -1156,67 +1149,70 @@ public static function get_submitted_fields($form, $lead, $display_empty=false, %2$s - ', $field_label, empty($field_value) && strlen($field_value) == 0 ? " " : $field_value, apply_filters("gform_email_background_color_label", '#EAF2FA', $field, $lead), apply_filters("gform_email_background_color_data", '#FFFFFF', $field, $lead) ); - break; - } - } - } - } + ', $field_label, empty( $field_value ) && strlen( $field_value ) == 0 ? ' ' : $field_value, apply_filters( 'gform_email_background_color_label', '#EAF2FA', $field, $lead ), apply_filters( 'gform_email_background_color_data', '#FFFFFF', $field, $lead ) + ); + break; + } + } + } + } - if( $display_product_summary ) - $field_data .= self::get_submitted_pricing_fields( $form, $lead, $format, $use_text, $use_admin_label ); + if ( $display_product_summary ) { + $field_data .= self::get_submitted_pricing_fields( $form, $lead, $format, $use_text, $use_admin_label ); + } - if($format == "html"){ - $field_data .='
    %s
    %1$s
    + if ( $format == 'html' ) { + $field_data .= '
    '; - } + } - return $field_data; - } + return $field_data; + } + + public static function get_submitted_pricing_fields( $form, $lead, $format, $use_text = true, $use_admin_label = false ) { + $form_id = $form['id']; + $order_label = apply_filters( "gform_order_label_{$form['id']}", apply_filters( 'gform_order_label', __( 'Order' , 'gravityforms' ), $form['id'] ), $form['id'] ); + $products = GFCommon::get_product_fields( $form, $lead, $use_text, $use_admin_label ); + $total = 0; + $field_data = ''; + + switch ( $format ) { + case 'text' : + if ( ! empty( $products['products'] ) ) { + $field_data = "--------------------------------\n" . $order_label . "\n\n"; + foreach ( $products['products'] as $product ) { + $product_name = $product['quantity'] . ' ' . $product['name']; + $price = self::to_number( $product['price'] ); + if ( ! empty( $product['options'] ) ) { + $product_name .= ' ('; + $options = array(); + foreach ( $product['options'] as $option ) { + $price += self::to_number( $option['price'] ); + $options[] = $option['option_name']; + } + $product_name .= implode( ', ', $options ) . ')'; + } + $subtotal = floatval( $product['quantity'] ) * $price; + $total += $subtotal; + + $field_data .= "{$product_name}: " . self::to_money( $subtotal, $lead['currency'] ) . "\n\n"; + } + $total += floatval( $products['shipping']['price'] ); + + if ( ! empty( $products['shipping']['name'] ) ) { + $field_data .= $products['shipping']['name'] . ': ' . self::to_money( $products['shipping']['price'], $lead['currency'] ) . "\n\n"; + } - public static function get_submitted_pricing_fields($form, $lead, $format, $use_text=true, $use_admin_label=false){ - $form_id = $form["id"]; - $order_label = apply_filters("gform_order_label_{$form["id"]}", apply_filters("gform_order_label", __("Order", "gravityforms"), $form["id"]), $form["id"]); - $products = GFCommon::get_product_fields($form, $lead, $use_text, $use_admin_label); - $total = 0; - $field_data = ""; - - switch($format){ - case "text" : - if(!empty($products["products"])){ - $field_data = "--------------------------------\n" . $order_label . "\n\n"; - foreach($products["products"] as $product){ - $product_name = $product["quantity"] . " " . $product["name"]; - $price = self::to_number($product["price"]); - if(!empty($product["options"])){ - $product_name .= " ("; - $options = array(); - foreach($product["options"] as $option){ - $price += self::to_number($option["price"]); - $options[] = $option["option_name"]; - } - $product_name .= implode(", ", $options) . ")"; - } - $subtotal = floatval($product["quantity"]) * $price; - $total += $subtotal; - - $field_data .= "{$product_name}: " . self::to_money($subtotal, $lead["currency"]) . "\n\n"; - } - $total += floatval($products["shipping"]["price"]); - - if(!empty($products["shipping"]["name"])) - $field_data .= $products["shipping"]["name"] . ": " . self::to_money($products["shipping"]["price"], $lead["currency"]) . "\n\n"; - - $field_data .= __("Total", "gravityforms") . ": " . self::to_money($total, $lead["currency"]) . "\n\n"; - } - break; - - - default : - if(!empty($products["products"])){ - $field_data =' + $field_data .= __( 'Total' , 'gravityforms' ) . ': ' . self::to_money( $total, $lead['currency'] ) . "\n\n"; + } + break; + + + default : + if ( ! empty( $products['products'] ) ) { + $field_data = ' ' . $order_label . ' @@ -1226,827 +1222,833 @@ public static function get_submitted_pricing_fields($form, $lead, $format, $use_ - - - - + + + + '; - foreach($products["products"] as $product){ + foreach ( $products['products'] as $product ) { - $field_data .= ' + $field_data .= ' - - - + + + '; - } - $total += floatval($products["shipping"]["price"]); - $field_data .= ' + } + $total += floatval( $products['shipping']['price'] ); + $field_data .= ''; - if(!empty($products["shipping"]["name"])){ - $field_data .= ' + if ( ! empty( $products['shipping']['name'] ) ) { + $field_data .= ' - - + + '; - } + } - $field_data .= ' + $field_data .= ' '; - if(empty($products["shipping"]["name"])){ - $field_data .= ' + if ( empty( $products['shipping']['name'] ) ) { + $field_data .= ' '; - } + } - $field_data .= ' - - + $field_data .= ' + +
    ' . apply_filters("gform_product_{$form_id}", apply_filters("gform_product", __("Product", "gravityforms"), $form_id), $form_id) . '' . apply_filters("gform_product_qty_{$form_id}", apply_filters("gform_product_qty", __("Qty", "gravityforms"), $form_id), $form_id) . '' . apply_filters("gform_product_unitprice_{$form_id}", apply_filters("gform_product_unitprice", __("Unit Price", "gravityforms"), $form_id), $form_id) . '' . apply_filters("gform_product_price_{$form_id}", apply_filters("gform_product_price", __("Price", "gravityforms"), $form_id), $form_id) . '' . apply_filters( "gform_product_{$form_id}", apply_filters( 'gform_product', __( 'Product' , 'gravityforms' ), $form_id ), $form_id ) . '' . apply_filters( "gform_product_qty_{$form_id}", apply_filters( 'gform_product_qty', __( 'Qty' , 'gravityforms' ), $form_id ), $form_id ) . '' . apply_filters( "gform_product_unitprice_{$form_id}", apply_filters( 'gform_product_unitprice', __( 'Unit Price' , 'gravityforms' ), $form_id ), $form_id ) . '' . apply_filters( "gform_product_price_{$form_id}", apply_filters( 'gform_product_price', __( 'Price' , 'gravityforms' ), $form_id ), $form_id ) . '
    - ' . $product["name"] .' + ' . $product['name'] . '
      '; - $price = self::to_number($product["price"]); - if(is_array(rgar($product,"options"))){ - foreach($product["options"] as $option){ - $price += self::to_number($option["price"]); - $field_data .= '
    • ' . $option["option_label"] .'
    • '; - } - } - $subtotal = floatval($product["quantity"]) * $price; - $total += $subtotal; - - $field_data .='
    + $price = self::to_number( $product['price'] ); + if ( is_array( rgar( $product, 'options' ) ) ) { + foreach ( $product['options'] as $option ) { + $price += self::to_number( $option['price'] ); + $field_data .= '
  • ' . $option['option_label'] . '
  • '; + } + } + $subtotal = floatval( $product['quantity'] ) * $price; + $total += $subtotal; + + $field_data .= '
    ' . $product["quantity"] .'' . self::to_money($price, $lead["currency"]) .'' . self::to_money($subtotal, $lead["currency"]) .'' . $product['quantity'] . '' . self::to_money( $price, $lead['currency'] ) . '' . self::to_money( $subtotal, $lead['currency'] ) . '
     ' . $products["shipping"]["name"] . ''. self::to_money($products["shipping"]["price"], $lead["currency"]) . '' . $products['shipping']['name'] . '' . self::to_money( $products['shipping']['price'], $lead['currency'] ) . '
     ' . __("Total:", "gravityforms") . ''. self::to_money($total, $lead["currency"]) . '' . __( 'Total:' , 'gravityforms' ) . '' . self::to_money( $total, $lead['currency'] ) . '
    '; - } - break; - } + } + break; + } - return $field_data; - } + return $field_data; + } - public static function send_user_notification($form, $lead, $override_options = false){ - _deprecated_function("send_user_notification", "1.7", "send_notification"); + public static function send_user_notification( $form, $lead, $override_options = false ) { + _deprecated_function( 'send_user_notification', '1.7', 'send_notification' ); - $notification = self::prepare_user_notification($form, $lead, $override_options); - self::send_email($notification["from"], $notification["to"], $notification["bcc"], $notification["reply_to"], $notification["subject"], $notification["message"], $notification["from_name"], $notification["message_format"], $notification["attachments"]); - } + $notification = self::prepare_user_notification( $form, $lead, $override_options ); + self::send_email( $notification['from'], $notification['to'], $notification['bcc'], $notification['reply_to'], $notification['subject'], $notification['message'], $notification['from_name'], $notification['message_format'], $notification['attachments'] ); + } - public static function send_admin_notification($form, $lead, $override_options = false){ - _deprecated_function("send_admin_notification", "1.7", "send_notification"); + public static function send_admin_notification( $form, $lead, $override_options = false ) { + _deprecated_function( 'send_admin_notification', '1.7', 'send_notification' ); - $notification = self::prepare_admin_notification($form, $lead, $override_options); - self::send_email($notification["from"], $notification["to"], $notification["bcc"], $notification["replyTo"], $notification["subject"], $notification["message"], $notification["from_name"], $notification["message_format"], $notification["attachments"]); - } + $notification = self::prepare_admin_notification( $form, $lead, $override_options ); + self::send_email( $notification['from'], $notification['to'], $notification['bcc'], $notification['replyTo'], $notification['subject'], $notification['message'], $notification['from_name'], $notification['message_format'], $notification['attachments'] ); + } - private static function prepare_user_notification($form, $lead, $override_options = false){ - $form_id = $form["id"]; + private static function prepare_user_notification( $form, $lead, $override_options = false ) { + $form_id = $form['id']; - if(!isset($form["autoResponder"])) - return; + if ( ! isset( $form['autoResponder'] ) ) { + return; + } - //handling autoresponder email - $to_field = isset($form["autoResponder"]["toField"]) ? rgget($form["autoResponder"]["toField"], $lead) : ""; - $to = apply_filters("gform_autoresponder_email_{$form_id}", apply_filters("gform_autoresponder_email", $to_field, $form), $form); - $subject = GFCommon::replace_variables(rgget("subject", $form["autoResponder"]), $form, $lead, false, false); + //handling autoresponder email + $to_field = isset( $form['autoResponder']['toField'] ) ? rgget( $form['autoResponder']['toField'], $lead ) : ''; + $to = apply_filters( "gform_autoresponder_email_{$form_id}", apply_filters( 'gform_autoresponder_email', $to_field, $form ), $form ); + $subject = GFCommon::replace_variables( rgget( 'subject', $form['autoResponder'] ), $form, $lead, false, false ); + + $message_format = apply_filters( "gform_notification_format_{$form['id']}", apply_filters( 'gform_notification_format', 'html', 'user', $form, $lead ), 'user', $form, $lead ); + $message = GFCommon::replace_variables( rgget( 'message', $form['autoResponder'] ), $form, $lead, false, false, ! rgget( 'disableAutoformat', $form['autoResponder'] ), $message_format ); + $message = do_shortcode( $message ); + + //Running trough variable replacement + $to = GFCommon::replace_variables( $to, $form, $lead, false, false ); + $from = GFCommon::replace_variables( rgget( 'from', $form['autoResponder'] ), $form, $lead, false, false ); + $bcc = GFCommon::replace_variables( rgget( 'bcc', $form['autoResponder'] ), $form, $lead, false, false ); + $reply_to = GFCommon::replace_variables( rgget( 'replyTo', $form['autoResponder'] ), $form, $lead, false, false ); + $from_name = GFCommon::replace_variables( rgget( 'fromName', $form['autoResponder'] ), $form, $lead, false, false ); + + // override default values if override options provided + if ( $override_options && is_array( $override_options ) ) { + foreach ( $override_options as $override_key => $override_value ) { + ${$override_key} = $override_value; + } + } - $message_format = apply_filters("gform_notification_format_{$form["id"]}", apply_filters("gform_notification_format", "html", "user", $form, $lead), "user", $form, $lead); - $message = GFCommon::replace_variables(rgget("message", $form["autoResponder"]), $form, $lead, false, false, !rgget("disableAutoformat", $form["autoResponder"]), $message_format); + $attachments = apply_filters( "gform_user_notification_attachments_{$form_id}", apply_filters( 'gform_user_notification_attachments', array(), $lead, $form ), $lead, $form ); - if(apply_filters("gform_enable_shortcode_notification_message", true, $form, $lead)){ - $message = do_shortcode($message); - } + //Disabling autoformat to prevent double autoformatting of messages + $disableAutoformat = '1'; - //Running trough variable replacement - $to = GFCommon::replace_variables($to, $form, $lead, false, false); - $from = GFCommon::replace_variables(rgget("from", $form["autoResponder"]), $form, $lead, false, false); - $bcc = GFCommon::replace_variables(rgget("bcc", $form["autoResponder"]), $form, $lead, false, false); - $reply_to = GFCommon::replace_variables(rgget("replyTo", $form["autoResponder"]), $form, $lead, false, false); - $from_name = GFCommon::replace_variables(rgget("fromName", $form["autoResponder"]), $form, $lead, false, false); - - // override default values if override options provided - if($override_options && is_array($override_options)){ - foreach($override_options as $override_key => $override_value){ - ${$override_key} = $override_value; - } - } + return compact( 'to', 'from', 'bcc', 'reply_to', 'subject', 'message', 'from_name', 'message_format', 'attachments', 'disableAutoformat' ); + } - $attachments = apply_filters("gform_user_notification_attachments_{$form_id}", apply_filters("gform_user_notification_attachments", array(), $lead, $form), $lead, $form); + private static function prepare_admin_notification( $form, $lead, $override_options = false ) { + $form_id = $form['id']; - //Disabling autoformat to prevent double autoformatting of messages - $disableAutoformat = "1"; + //handling admin notification email + $subject = GFCommon::replace_variables( rgget( 'subject', $form['notification'] ), $form, $lead, false, false ); - return compact("to", "from", "bcc", "reply_to", "subject", "message", "from_name", "message_format", "attachments", "disableAutoformat"); - } + $message_format = apply_filters( "gform_notification_format_{$form['id']}", apply_filters( 'gform_notification_format', 'html', 'admin', $form, $lead ), 'admin', $form, $lead ); + $message = GFCommon::replace_variables( rgget( 'message', $form['notification'] ), $form, $lead, false, false, ! rgget( 'disableAutoformat', $form['notification'] ), $message_format ); + $message = do_shortcode( $message ); - private static function prepare_admin_notification($form, $lead, $override_options = false){ - $form_id = $form["id"]; + $version_info = self::get_version_info(); + $is_expired = ! rgempty( 'expiration_time', $version_info ) && $version_info['expiration_time'] < time(); + if ( ! rgar( $version_info, 'is_valid_key' ) && $is_expired ) { + $message .= "

    Your Gravity Forms License Key has expired. In order to continue receiving support and software updates you must renew your license key. You can do so by following the renewal instructions on the Gravity Forms Settings page in your WordPress Dashboard or by clicking here."; + } - //handling admin notification email - $subject = GFCommon::replace_variables(rgget("subject", $form["notification"]), $form, $lead, false, false); + $from = rgempty( 'fromField', $form['notification'] ) ? rgget( 'from', $form['notification'] ) : rgget( $form['notification']['fromField'], $lead ); - $message_format = apply_filters("gform_notification_format_{$form["id"]}", apply_filters("gform_notification_format", "html", "admin", $form, $lead), "admin", $form, $lead); - $message = GFCommon::replace_variables(rgget("message", $form["notification"]), $form, $lead, false, false, !rgget("disableAutoformat", $form["notification"]), $message_format); + if ( rgempty( 'fromNameField', $form['notification'] ) ) { + $from_name = rgget( 'fromName', $form['notification'] ); + } else { + $field = RGFormsModel::get_field( $form, rgget( 'fromNameField', $form['notification'] ) ); + $value = RGFormsModel::get_lead_field_value( $lead, $field ); + $from_name = GFCommon::get_lead_field_display( $field, $value ); + } - if(apply_filters("gform_enable_shortcode_notification_message", true, $form, $lead)){ - $message = do_shortcode($message); - } + $replyTo = rgempty( 'replyToField', $form['notification'] ) ? rgget( 'replyTo', $form['notification'] ) : rgget( $form['notification']['replyToField'], $lead ); - $version_info = self::get_version_info(); - $is_expired = !rgempty("expiration_time", $version_info) && $version_info["expiration_time"] < time(); - if( !rgar($version_info, "is_valid_key") && $is_expired){ - $message .= "

    Your Gravity Forms License Key has expired. In order to continue receiving support and software updates you must renew your license key. You can do so by following the renewal instructions on the Gravity Forms Settings page in your WordPress Dashboard or by clicking here."; - } + if ( rgempty( 'routing', $form['notification'] ) ) { + $email_to = rgempty( 'toField', $form['notification'] ) ? rgget( 'to', $form['notification'] ) : rgget( 'toField', $form['notification'] ); + } else { + $email_to = array(); + foreach ( $form['notification']['routing'] as $routing ) { - $from = rgempty("fromField", $form["notification"]) ? rgget("from", $form["notification"]) : rgget($form["notification"]["fromField"], $lead); + $source_field = RGFormsModel::get_field( $form, $routing['fieldId'] ); + $field_value = RGFormsModel::get_lead_field_value( $lead, $source_field ); + $is_value_match = RGFormsModel::is_value_match( $field_value, $routing['value'], $routing['operator'], $source_field, $routing, $form ) && ! RGFormsModel::is_field_hidden( $form, $source_field, array(), $lead ); - if(rgempty("fromNameField", $form["notification"])){ - $from_name = rgget("fromName", $form["notification"]); - } - else{ - $field = RGFormsModel::get_field($form, rgget("fromNameField", $form["notification"])); - $value = RGFormsModel::get_lead_field_value($lead, $field); - $from_name = GFCommon::get_lead_field_display($field, $value); - } + if ( $is_value_match ) { + $email_to[] = $routing['email']; + } + } - $replyTo = rgempty("replyToField", $form["notification"]) ? rgget("replyTo", $form["notification"]): rgget($form["notification"]["replyToField"], $lead); + $email_to = join( ',', $email_to ); + } - if(rgempty("routing", $form["notification"])){ - $email_to = rgempty("toField", $form["notification"]) ? rgget("to", $form["notification"]) : rgget("toField", $form["notification"]); - } - else{ - $email_to = array(); - foreach($form["notification"]["routing"] as $routing){ + //Running through variable replacement + $email_to = GFCommon::replace_variables( $email_to, $form, $lead, false, false ); + $from = GFCommon::replace_variables( $from, $form, $lead, false, false ); + $bcc = GFCommon::replace_variables( rgget( 'bcc', $form['notification'] ), $form, $lead, false, false ); + $reply_to = GFCommon::replace_variables( $replyTo, $form, $lead, false, false ); + $from_name = GFCommon::replace_variables( $from_name, $form, $lead, false, false ); - $source_field = RGFormsModel::get_field($form, $routing["fieldId"]); - $field_value = RGFormsModel::get_lead_field_value($lead, $source_field); - $is_value_match = RGFormsModel::is_value_match( $field_value, $routing["value"], $routing["operator"], $source_field, $routing, $form ) && !RGFormsModel::is_field_hidden($form, $source_field, array(), $lead); + //Filters the admin notification email to address. Allows users to change email address before notification is sent + $to = apply_filters( "gform_notification_email_{$form_id}", apply_filters( 'gform_notification_email', $email_to, $lead ), $lead ); - if ($is_value_match) - $email_to[] = $routing["email"]; - } + // override default values if override options provided + if ( $override_options && is_array( $override_options ) ) { + foreach ( $override_options as $override_key => $override_value ) { + ${$override_key} = $override_value; + } + } - $email_to = join(",", $email_to); - } + $attachments = apply_filters( "gform_admin_notification_attachments_{$form_id}", apply_filters( 'gform_admin_notification_attachments', array(), $lead, $form ), $lead, $form ); - //Running through variable replacement - $email_to = GFCommon::replace_variables($email_to, $form, $lead, false, false); - $from = GFCommon::replace_variables($from, $form, $lead, false, false); - $bcc = GFCommon::replace_variables(rgget("bcc", $form["notification"]), $form, $lead, false, false); - $reply_to = GFCommon::replace_variables($replyTo, $form, $lead, false, false); - $from_name = GFCommon::replace_variables($from_name, $form, $lead, false, false); - - //Filters the admin notification email to address. Allows users to change email address before notification is sent - $to = apply_filters("gform_notification_email_{$form_id}" , apply_filters("gform_notification_email", $email_to, $lead), $lead); - - // override default values if override options provided - if($override_options && is_array($override_options)){ - foreach($override_options as $override_key => $override_value){ - ${$override_key} = $override_value; - } - } + //Disabling autoformat to prevent double autoformatting of messages + $disableAutoformat = '1'; - $attachments = apply_filters("gform_admin_notification_attachments_{$form_id}", apply_filters("gform_admin_notification_attachments", array(), $lead, $form), $lead, $form); + return compact( 'to', 'from', 'bcc', 'replyTo', 'subject', 'message', 'from_name', 'message_format', 'attachments', 'disableAutoformat' ); - //Disabling autoformat to prevent double autoformatting of messages - $disableAutoformat = "1"; + } - return compact("to", "from", "bcc", "replyTo", "subject", "message", "from_name", "message_format", "attachments", "disableAutoformat"); + public static function send_notification( $notification, $form, $lead ) { - } + GFCommon::log_debug( "GFCommon::send_notification(): Starting to process notification (#{$notification['id']} - {$notification['name']})." ); + $notification = apply_filters( "gform_notification_{$form['id']}", apply_filters( 'gform_notification', $notification, $form, $lead ), $form, $lead ); + + $to_field = ''; + if ( rgar( $notification, 'toType' ) == 'field' ) { + $to_field = rgar( $notification, 'toField' ); + if ( rgempty( 'toField', $notification ) ) { + $to_field = rgar( $notification, 'to' ); + } + } - public static function send_notification($notification, $form, $lead){ + $email_to = rgar( $notification, 'to' ); + //do routing logic if "to" field doesn't have a value (to support legacy notifications that will run routing prior to this method) + if ( empty( $email_to ) && rgar( $notification, 'toType' ) == 'routing' ) { + $email_to = array(); + foreach ( $notification['routing'] as $routing ) { - $notification = apply_filters("gform_notification_{$form["id"]}", apply_filters("gform_notification", $notification, $form, $lead), $form, $lead); + $source_field = RGFormsModel::get_field( $form, $routing['fieldId'] ); + $field_value = RGFormsModel::get_lead_field_value( $lead, $source_field ); + $is_value_match = RGFormsModel::is_value_match( $field_value, $routing['value'], $routing['operator'], $source_field, $routing, $form ) && ! RGFormsModel::is_field_hidden( $form, $source_field, array(), $lead ); - $to_field = ""; - if(rgar($notification, "toType") == "field"){ - $to_field = rgar($notification, "toField"); - if(rgempty("toField", $notification)){ - $to_field = rgar($notification, "to"); + if ( $is_value_match ) { + $email_to[] = $routing['email']; + } } - } - $email_to = rgar($notification, "to"); - //do routing logic if "to" field doesn't have a value (to support legacy notifications what will run routing prior to this method - if(empty($email_to) && rgar($notification, "toType") == "routing"){ - $email_to = array(); - foreach($notification["routing"] as $routing){ + $email_to = join( ',', $email_to ); + } else if ( ! empty( $to_field ) ) { + $source_field = RGFormsModel::get_field( $form, $to_field ); + $email_to = RGFormsModel::get_lead_field_value( $lead, $source_field ); + } - $source_field = RGFormsModel::get_field($form, $routing["fieldId"]); - $field_value = RGFormsModel::get_lead_field_value($lead, $source_field); - $is_value_match = RGFormsModel::is_value_match($field_value, $routing["value"], $routing["operator"], $source_field, $routing, $form ) && !RGFormsModel::is_field_hidden($form, $source_field, array(), $lead); + //Running through variable replacement + $to = GFCommon::replace_variables( $email_to, $form, $lead, false, false ); + $subject = GFCommon::replace_variables( rgar( $notification, 'subject' ), $form, $lead, false, false, true, 'text' ); + $from = GFCommon::replace_variables( rgar( $notification, 'from' ), $form, $lead, false, false ); + $from_name = GFCommon::replace_variables( rgar( $notification, 'fromName' ), $form, $lead, false, false, true, 'text' ); + $bcc = GFCommon::replace_variables( rgar( $notification, 'bcc' ), $form, $lead, false, false ); + $replyTo = GFCommon::replace_variables( rgar( $notification, 'replyTo' ), $form, $lead, false, false ); + + $message_format = rgempty( 'message_format', $notification ) ? 'html' : rgar( $notification, 'message_format' ); + $message = GFCommon::replace_variables( rgar( $notification, 'message' ), $form, $lead, false, false, ! rgar( $notification, 'disableAutoformat' ), $message_format ); + $message = do_shortcode( $message ); + + // allow attachments to be passed as a single path (string) or an array of paths, if string provided, add to array + $attachments = rgar( $notification, 'attachments' ); + if ( ! empty( $attachments ) ) { + $attachments = is_array( $attachments ) ? $attachments : array( $attachments ); + } else { + $attachments = array(); + } - if ($is_value_match) - $email_to[] = $routing["email"]; - } + self::send_email( $from, $to, $bcc, $replyTo, $subject, $message, $from_name, $message_format, $attachments ); - $email_to = join(",", $email_to); - } - else if (!empty($to_field)) { - $source_field = RGFormsModel::get_field($form, $to_field); - $email_to = RGFormsModel::get_lead_field_value($lead, $source_field); - } + return compact( 'to', 'from', 'bcc', 'replyTo', 'subject', 'message', 'from_name', 'message_format', 'attachments' ); - //Running through variable replacement - $to = GFCommon::replace_variables($email_to, $form, $lead, false, false); - $subject = GFCommon::replace_variables(rgar($notification, "subject"), $form, $lead, false, false, true, 'text'); - $from = GFCommon::replace_variables(rgar($notification, "from"), $form, $lead, false, false); - $from_name = GFCommon::replace_variables(rgar($notification, "fromName"), $form, $lead, false, false, true, 'text'); - $bcc = GFCommon::replace_variables(rgar($notification, "bcc"), $form, $lead, false, false); - $replyTo = GFCommon::replace_variables(rgar($notification, "replyTo"), $form, $lead, false, false); + } - $message_format = rgempty("message_format", $notification) ? "html" : rgar($notification, "message_format"); - $message = GFCommon::replace_variables(rgar($notification, "message"), $form, $lead, false, false, !rgar($notification, "disableAutoformat"), $message_format); + public static function send_notifications( $notification_ids, $form, $lead, $do_conditional_logic = true, $event = 'form_submission' ) { + if ( ! is_array( $notification_ids ) || empty( $notification_ids ) ) { + GFCommon::log_debug( "GFCommon::send_notifications(): Aborting. No notifications to process for {$event} event." ); - if(apply_filters("gform_enable_shortcode_notification_message", true, $form, $lead)){ - $message = do_shortcode($message); - } + return; + } - // allow attachments to be passed as a single path (string) or an array of paths, if string provided, add to array - $attachments = rgar( $notification, "attachments" ); - if( !empty( $attachments ) ) { - $attachments = is_array( $attachments ) ? $attachments : array( $attachments ); - } else { - $attachments = array(); - } + GFCommon::log_debug( "GFCommon::send_notifications(): Processing notifications for {$event} event: " . print_r( $notification_ids, true ) . "\n(only active/applicable notifications are sent)" ); - self::send_email($from, $to, $bcc, $replyTo, $subject, $message, $from_name, $message_format, $attachments); + foreach ( $notification_ids as $notification_id ) { + if ( ! isset( $form['notifications'][ $notification_id ] ) ) { + continue; + } + if ( isset( $form['notifications'][ $notification_id ]['isActive'] ) && ! $form['notifications'][ $notification_id ]['isActive'] ) { + GFCommon::log_debug( "GFCommon::send_notifications(): Notification is inactive, not processing notification (#{$notification_id} - {$form['notifications'][$notification_id]['name']})." ); + continue; + } - return compact("to", "from", "bcc", "replyTo", "subject", "message", "from_name", "message_format", "attachments"); + $notification = $form['notifications'][ $notification_id ]; - } + //check conditional logic when appropriate + if ( $do_conditional_logic && ! GFCommon::evaluate_conditional_logic( rgar( $notification, 'conditionalLogic' ), $form, $lead ) ) { + GFCommon::log_debug( "GFCommon::send_notifications(): Notification conditional logic not met, not processing notification (#{$notification_id} - {$notification['name']})." ); + continue; + } - public static function send_notifications($notification_ids, $form, $lead, $do_conditional_logic = true, $event = "form_submission"){ - if(!is_array($notification_ids)){ - GFCommon::log_debug("No notifications to be sent."); - return; - } + if ( rgar( $notification, 'type' ) == 'user' ) { - GFCommon::log_debug( 'Processing notifications: ' . print_r( $notification_ids, true ) . "\n(only active/applicable notifications are sent)" ); + //Getting user notification from legacy structure (for backwards compatibility) + $legacy_notification = GFCommon::prepare_user_notification( $form, $lead ); + $notification = self::merge_legacy_notification( $notification, $legacy_notification ); + } else if ( rgar( $notification, 'type' ) == 'admin' ) { - foreach($notification_ids as $notification_id){ - if(!isset($form["notifications"][$notification_id])){ - continue; - } - if(isset($form["notifications"][$notification_id]["isActive"]) && ! $form["notifications"][$notification_id]["isActive"]){ - continue; - } + //Getting admin notification from legacy structure (for backwards compatibility) + $legacy_notification = GFCommon::prepare_admin_notification( $form, $lead ); + $notification = self::merge_legacy_notification( $notification, $legacy_notification ); + } - $notification = $form["notifications"][$notification_id]; + //sending notification + self::send_notification( $notification, $form, $lead ); + } - //check conditional logic when appropriate - if($do_conditional_logic && !GFCommon::evaluate_conditional_logic( rgar($notification,"conditionalLogic"), $form, $lead) ){ - continue; - } + } - if(rgar($notification,"type") == "user"){ + public static function send_form_submission_notifications( $form, $lead ) { + GFAPI::send_notifications( $form, $lead ); + } - //Getting user notification from legacy structure (for backwards compatibility) - $legacy_notification = GFCommon::prepare_user_notification($form, $lead); - $notification = self::merge_legacy_notification($notification, $legacy_notification); - } - else if(rgar($notification,"type") == "admin"){ + private static function merge_legacy_notification( $notification, $notification_data ) { - //Getting admin notification from legacy structure (for backwards compatibility) - $legacy_notification = GFCommon::prepare_admin_notification($form, $lead); - $notification = self::merge_legacy_notification($notification, $legacy_notification); - } + $keys = array( 'to', 'from', 'bcc', 'replyTo', 'subject', 'message', 'from_name', 'message_format', 'attachments', 'disableAutoformat' ); + foreach ( $keys as $key ) { + $notification[ $key ] = rgar( $notification_data, $key ); + } + return $notification; + } - //sending notification - self::send_notification($notification, $form, $lead); - } + public static function get_notifications_to_send( $event, $form, $lead ) { + $notifications = self::get_notifications( $event, $form ); + $notifications_to_send = array(); + foreach ( $notifications as $notification ) { + if ( GFCommon::evaluate_conditional_logic( rgar( $notification, 'conditionalLogic' ), $form, $lead ) ) { + $notifications_to_send[] = $notification; + } + } - } + return $notifications_to_send; + } - public static function send_form_submission_notifications($form, $lead){ - $notifications = self::get_notifications_to_send("form_submission", $form, $lead); - $notifications_to_send = array(); + public static function get_notifications( $event, $form ) { + if ( rgempty( 'notifications', $form ) ) { + return array(); + } + $notifications = array(); + foreach ( $form['notifications'] as $notification ) { + if ( rgar( $notification, 'event' ) == $event ) { + $notifications[] = $notification; + } + } + return $notifications; + } - //running through filters that disable form submission notifications - foreach($notifications as $notification){ + public static function has_admin_notification( $form ) { - if(rgar($notification,"type") == "user" && apply_filters("gform_disable_user_notification_{$form["id"]}", apply_filters("gform_disable_user_notification", false, $form, $lead), $form, $lead)){ - //skip user notification if it has been disabled by a hook - continue; - } - else if(rgar($notification,"type") == "admin" && apply_filters("gform_disable_admin_notification_{$form["id"]}", apply_filters("gform_disable_admin_notification", false, $form, $lead), $form, $lead)){ - //skip admin notification if it has been disabled by a hook - continue; - } + return ( ! empty( $form['notification']['to'] ) || ! empty( $form['notification']['routing'] ) ) && ( ! empty( $form['notification']['subject'] ) || ! empty( $form['notification']['message'] ) ); - if(apply_filters("gform_disable_notification_{$form["id"]}", apply_filters("gform_disable_notification", false, $notification, $form, $lead), $notification, $form, $lead)){ - //skip notifications if it has been disabled by a hook - continue; - } + } - $notifications_to_send[] = $notification["id"]; - } + public static function has_user_notification( $form ) { + return ! empty( $form['autoResponder']['toField'] ) && ( ! empty( $form['autoResponder']['subject'] ) || ! empty( $form['autoResponder']['message'] ) ); - self::send_notifications($notifications_to_send, $form, $lead, true, "form_submission"); - } + } - private static function merge_legacy_notification($notification, $notification_data){ + private static function send_email( $from, $to, $bcc, $reply_to, $subject, $message, $from_name = '', $message_format = 'html', $attachments = '' ) { - $keys = array("to", "from", "bcc", "replyTo", "subject", "message", "from_name", "message_format", "attachments", "disableAutoformat"); - foreach($keys as $key) - $notification[$key] = rgar($notification_data,$key); + $to = str_replace( ' ', '', $to ); + $bcc = str_replace( ' ', '', $bcc ); + $error = false; - return $notification; - } + if ( ! GFCommon::is_valid_email( $from ) ) { + $from = get_bloginfo( 'admin_email' ); + } - public static function get_notifications_to_send($action, $form, $lead){ - $notifications = self::get_notifications($action, $form); - $notifications_to_send = array(); - foreach($notifications as $notification){ - if(GFCommon::evaluate_conditional_logic(rgar($notification,"conditionalLogic"), $form, $lead)){ - $notifications_to_send[] = $notification; - } - } + if ( ! GFCommon::is_valid_email_list( $to ) ) { + $error = new WP_Error( 'invalid_to', 'Cannot send email because the TO address is invalid.' ); + } else if ( empty( $subject ) && empty( $message ) ) { + $error = new WP_Error( 'missing_subject_and_message', 'Cannot send email because there is no SUBJECT and no MESSAGE.' ); + } else if ( ! GFCommon::is_valid_email( $from ) ) { + $error = new WP_Error( 'invalid_from', 'Cannot send email because the FROM address is invalid.' ); + } - return $notifications_to_send; - } + if ( is_wp_error( $error ) ) { + GFCommon::log_error( 'GFCommon::send_email(): ' . $error->get_error_message() ); + GFCommon::log_error( print_r( compact( 'to', 'subject', 'message' ), true ) ); + do_action( 'gform_send_email_failed', $error, compact( 'from', 'to', 'bcc', 'reply_to', 'subject', 'message', 'from_name', 'message_format', 'attachments' ) ); - public static function get_notifications($action, $form){ - if(rgempty("notifications", $form)) - return array(); + return; + } - $notifications = array(); - foreach($form["notifications"] as $notification){ - if(rgar($notification, "event") == $action) - $notifications[] = $notification; - } + $content_type = $message_format == 'html' ? 'text/html' : 'text/plain'; + $name = empty( $from_name ) ? $from : $from_name; - return $notifications; - } + $headers = array(); + $headers['From'] = "From: \"" . wp_strip_all_tags($name, true) . "\" <{$from}>"; - public static function has_admin_notification($form){ + if ( GFCommon::is_valid_email_list( $reply_to ) ) { + $headers['Reply-To'] = "Reply-To: {$reply_to}"; + } - return (!empty($form["notification"]["to"]) || !empty($form["notification"]["routing"])) && (!empty($form["notification"]["subject"]) || !empty($form["notification"]["message"])); + if ( GFCommon::is_valid_email_list( $bcc ) ) { + $headers['Bcc'] = "Bcc: $bcc"; + } - } + $headers['Content-type'] = "Content-type: {$content_type}; charset=" . get_option( 'blog_charset' ); + + $abort_email = false; + extract( apply_filters( 'gform_pre_send_email', compact( 'to', 'subject', 'message', 'headers', 'attachments', 'abort_email' ), $message_format ) ); + + $is_success = false; + if ( ! $abort_email ) { + GFCommon::log_debug( 'GFCommon::send_email(): Sending email via wp_mail().' ); + GFCommon::log_debug( print_r( compact( 'to', 'subject', 'message', 'headers', 'attachments', 'abort_email' ), true ) ); + $is_success = wp_mail( $to, $subject, $message, $headers, $attachments ); + GFCommon::log_debug( "GFCommon::send_email(): Result from wp_mail(): {$is_success}" ); + if ( $is_success ) { + GFCommon::log_debug( 'GFCommon::send_email(): Mail was passed from WordPress to the mail server.' ); + } else { + GFCommon::log_error( 'GFCommon::send_email(): The mail message was passed off to WordPress for processing, but WordPress was unable to send the message.' ); + } + } else { + GFCommon::log_debug( 'GFCommon::send_email(): Aborting. The gform_pre_send_email hook was used to set the abort_email parameter to true.' ); + } - public static function has_user_notification($form){ + self::add_emails_sent(); - return !empty($form["autoResponder"]["toField"]) && (!empty($form["autoResponder"]["subject"]) || !empty($form["autoResponder"]["message"])); + do_action( 'gform_after_email', $is_success, $to, $subject, $message, $headers, $attachments, $message_format ); + } - } + public static function add_emails_sent() { - private static function send_email($from, $to, $bcc, $reply_to, $subject, $message, $from_name="", $message_format="html", $attachments=""){ + $count = self::get_emails_sent(); - $to = str_replace( " ", "", $to ); - $bcc = str_replace( " ", "", $bcc ); - $error = false; + update_option( 'gform_email_count', ++$count ); - if( ! GFCommon::is_valid_email( $from ) ) { - $from = get_bloginfo( 'admin_email' ); - } + } - if( ! GFCommon::is_valid_email_list( $to ) ) { - $error = new WP_Error( 'invalid_to', 'Cannot send email because the TO address is invalid.' ); - } else if( empty( $subject ) && empty( $message ) ) { - $error = new WP_Error( 'missing_subject_and_message', 'Cannot send email because there is no SUBJECT and no MESSAGE.' ); - } else if( ! GFCommon::is_valid_email( $from ) ) { - $error = new WP_Error( 'invalid_from', 'Cannot send email because the FROM address is invalid.' ); - } + public static function get_emails_sent() { + $count = get_option( 'gform_email_count' ); - if( is_wp_error( $error ) ) { - GFCommon::log_debug( $error->get_error_message() ); - GFCommon::log_debug( print_r( compact( 'to', 'subject', 'message' ), true ) ); - do_action( 'gform_send_email_failed', $error, compact( 'from', 'to', 'bcc', 'reply_to', 'subject', 'message', 'from_name', 'message_format', 'attachments' ) ); - return; - } + if ( ! $count ) { + $count = 0; + } - $content_type = $message_format == "html" ? "text/html" : "text/plain"; - $name = empty($from_name) ? $from : $from_name; + return $count; + } - $headers = array(); - $headers["From"] = "From: \"" . wp_strip_all_tags($name, true) . "\" <{$from}>"; + public static function get_api_calls() { + $count = get_option( 'gform_api_count' ); - if(GFCommon::is_valid_email($reply_to)) - $headers["Reply-To"] = "Reply-To: {$reply_to}"; + if ( ! $count ) { + $count = 0; + } - if(GFCommon::is_valid_email_list($bcc)) - $headers["Bcc"] = "Bcc: $bcc"; + return $count; + } - $headers["Content-type"] = "Content-type: {$content_type}; charset=" . get_option('blog_charset'); + public static function add_api_call() { - $abort_email = false; - extract(apply_filters("gform_pre_send_email", compact("to", "subject", "message", "headers", "attachments", "abort_email"), $message_format)); + $count = self::get_api_calls(); - $is_success = false; - if(!$abort_email){ - GFCommon::log_debug("Sending email via wp_mail()"); - GFCommon::log_debug(print_r(compact("to", "subject", "message", "headers", "attachments", "abort_email"), true)); - $is_success = wp_mail($to, $subject, $message, $headers, $attachments); - GFCommon::log_debug( "Result from wp_mail(): {$is_success}" ); - if( $is_success ) { - GFCommon::log_debug( 'Mail was passed from WordPress to the mail server.' ); - } else { - GFCommon::log_debug( 'The mail message was passed off to WordPress for processing, but WordPress was unable to send the message.' ); - } + update_option( 'gform_api_count', ++$count ); - } + } - self::add_emails_sent(); + public static function has_post_field( $fields ) { + foreach ( $fields as $field ) { + if ( in_array( $field->type, array( 'post_title', 'post_content', 'post_excerpt', 'post_category', 'post_image', 'post_tags', 'post_custom_field' ) ) ) { + return true; + } + } - do_action("gform_after_email", $is_success, $to, $subject, $message, $headers, $attachments, $message_format); - } + return false; + } - public static function add_emails_sent(){ + public static function has_list_field( $form ) { + return self::has_field_by_type( $form, 'list' ); + } - $count = self::get_emails_sent(); + public static function has_credit_card_field( $form ) { + return self::has_field_by_type( $form, 'creditcard' ); + } - update_option("gform_email_count", ++$count); + private static function has_field_by_type( $form, $type ) { + if ( is_array( $form['fields'] ) ) { + foreach ( $form['fields'] as $field ) { - } + if ( RGFormsModel::get_input_type( $field ) == $type ) { + return true; + } + } + } - public static function get_emails_sent(){ - $count = get_option("gform_email_count"); + return false; + } - if(!$count) - $count = 0; + public static function current_user_can_any( $caps ) { - return $count; - } + if ( ! is_array( $caps ) ) { + $has_cap = current_user_can( $caps ) || current_user_can( 'gform_full_access' ); - public static function get_api_calls(){ - $count = get_option("gform_api_count"); + return $has_cap; + } - if(!$count) - $count = 0; + foreach ( $caps as $cap ) { + if ( current_user_can( $cap ) ) { + return true; + } + } - return $count; - } + $has_full_access = current_user_can( 'gform_full_access' ); - public static function add_api_call(){ + return $has_full_access; + } - $count = self::get_api_calls(); + public static function current_user_can_which( $caps ) { - update_option("gform_api_count", ++$count); + foreach ( $caps as $cap ) { + if ( current_user_can( $cap ) ) { + return $cap; + } + } - } + return ''; + } - public static function has_post_field($fields){ - foreach($fields as $field){ - if(in_array($field["type"], array("post_title", "post_content", "post_excerpt", "post_category", "post_image", "post_tags", "post_custom_field"))) - return true; - } - return false; - } + public static function is_pricing_field( $field_type ) { + return self::is_product_field( $field_type ) || $field_type == 'donation'; + } - public static function has_list_field($form){ - return self::has_field_by_type($form, 'list'); - } + public static function is_product_field( $field_type ) { + return in_array( $field_type, array( 'option', 'quantity', 'product', 'total', 'shipping', 'calculation' ) ); + } - public static function has_credit_card_field($form){ - return self::has_field_by_type($form, 'creditcard'); - } + public static function all_caps() { + return array( + 'gravityforms_edit_forms', + 'gravityforms_delete_forms', + 'gravityforms_create_form', + 'gravityforms_view_entries', + 'gravityforms_edit_entries', + 'gravityforms_delete_entries', + 'gravityforms_view_settings', + 'gravityforms_edit_settings', + 'gravityforms_export_entries', + 'gravityforms_uninstall', + 'gravityforms_view_entry_notes', + 'gravityforms_edit_entry_notes', + 'gravityforms_view_updates', + 'gravityforms_view_addons', + 'gravityforms_preview_forms', + ); + } - private static function has_field_by_type($form, $type) { - if(is_array($form["fields"])){ - foreach($form["fields"] as $field){ + public static function delete_directory( $dir ) { + if ( ! file_exists( $dir ) ) { + return; + } - if(RGFormsModel::get_input_type($field) == $type) - return true; - } - } - return false; - } + if ( $handle = opendir( $dir ) ) { + $array = array(); + while ( false !== ( $file = readdir( $handle ) ) ) { + if ( $file != '.' && $file != '..' ) { + if ( is_dir( $dir . $file ) ) { + if ( ! @rmdir( $dir . $file ) ) { + // Empty directory? Remove it + self::delete_directory( $dir . $file . '/' ); + } // Not empty? Delete the files inside it + } else { + @unlink( $dir . $file ); + } + } + } + closedir( $handle ); + @rmdir( $dir ); + } + } - public static function current_user_can_any($caps){ + public static function get_remote_message() { + return stripslashes( get_option( 'rg_gforms_message' ) ); + } - if(!is_array($caps)){ - $has_cap = current_user_can($caps) || current_user_can("gform_full_access"); - return $has_cap; - } + public static function get_key() { + return get_option( 'rg_gforms_key' ); + } - foreach($caps as $cap){ - if(current_user_can($cap)){ - return true; - } - } + public static function has_update( $use_cache = true ) { + $version_info = GFCommon::get_version_info( $use_cache ); + $version = rgar( $version_info, 'version' ); - $has_full_access = current_user_can("gform_full_access"); - return $has_full_access; - } + return empty( $version ) ? false : version_compare( GFCommon::$version, $version, '<' ); + } - public static function current_user_can_which($caps){ + public static function get_key_info( $key ) { - foreach($caps as $cap){ - if(current_user_can($cap)) - return $cap; - } + $options = array( 'method' => 'POST', 'timeout' => 3 ); + $options['headers'] = array( + 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' ), + 'User-Agent' => 'WordPress/' . get_bloginfo( 'version' ), + 'Referer' => get_bloginfo( 'url' ) + ); - return ""; - } + $raw_response = self::post_to_manager( 'api.php', "op=get_key&key={$key}", $options ); - public static function is_pricing_field($field_type){ - return self::is_product_field($field_type) || $field_type == "donation"; - } + if ( is_wp_error( $raw_response ) || $raw_response['response']['code'] != 200 ) { + return array(); + } - public static function is_product_field($field_type){ - return in_array($field_type, array("option", "quantity", "product", "total", "shipping", "calculation")); - } + $key_info = unserialize( trim( $raw_response['body'] ) ); - public static function all_caps(){ - return array( 'gravityforms_edit_forms', - 'gravityforms_delete_forms', - 'gravityforms_create_form', - 'gravityforms_view_entries', - 'gravityforms_edit_entries', - 'gravityforms_delete_entries', - 'gravityforms_view_settings', - 'gravityforms_edit_settings', - 'gravityforms_export_entries', - 'gravityforms_uninstall', - 'gravityforms_view_entry_notes', - 'gravityforms_edit_entry_notes', - 'gravityforms_view_updates', - 'gravityforms_view_addons', - 'gravityforms_preview_forms' - ); - } + return $key_info ? $key_info : array(); + } - public static function delete_directory($dir) { - if(!file_exists($dir)) - return; + public static function get_version_info( $cache = true ) { - if ($handle = opendir($dir)){ - $array = array(); - while (false !== ($file = readdir($handle))) { - if ($file != "." && $file != "..") { - if(is_dir($dir.$file)){ - if(!@rmdir($dir.$file)) // Empty directory? Remove it - self::delete_directory($dir.$file.'/'); // Not empty? Delete the files inside it - } - else{ - @unlink($dir.$file); - } - } - } - closedir($handle); - @rmdir($dir); - } - } + $raw_response = get_transient( 'gform_update_info' ); + if ( ! $cache ) { + $raw_response = null; + } - public static function get_remote_message(){ - return stripslashes(get_option("rg_gforms_message")); - } + if ( ! $raw_response ) { + //Getting version number + $options = array( 'method' => 'POST', 'timeout' => 20 ); + $options['headers'] = array( + 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' ), + 'User-Agent' => 'WordPress/' . get_bloginfo( 'version' ), + 'Referer' => get_bloginfo( 'url' ) + ); + $options['body'] = self::get_remote_post_params(); + $options['timeout'] = 15; - public static function get_key(){ - return get_option("rg_gforms_key"); - } + $nocache = $cache ? '' : 'nocache=1'; //disabling server side caching - public static function has_update($use_cache=true){ - $version_info = GFCommon::get_version_info($use_cache); - $version = rgar($version_info, "version"); - return empty($version) ? false : version_compare(GFCommon::$version, $version, '<'); - } + $raw_response = self::post_to_manager( 'version.php', $nocache, $options ); - public static function get_key_info($key){ + //caching responses. + set_transient( 'gform_update_info', $raw_response, 86400 ); //caching for 24 hours + } - $options = array('method' => 'POST', 'timeout' => 3); - $options['headers'] = array( - 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'), - 'User-Agent' => 'WordPress/' . get_bloginfo("version"), - 'Referer' => get_bloginfo("url") - ); - $raw_response = self::post_to_manager("api.php", "op=get_key&key={$key}", $options); - if ( is_wp_error( $raw_response ) || $raw_response['response']['code'] != 200) - return array(); + if ( is_wp_error( $raw_response ) || rgars( $raw_response, 'response/code' ) != 200 ) { - $key_info = unserialize(trim($raw_response["body"])); - return $key_info ? $key_info : array(); - } + return array( 'is_valid_key' => '1', 'version' => '', 'url' => '', 'is_error' => '1' ); + } - public static function get_version_info($cache=true){ + $version_info = json_decode( $raw_response['body'], true ); - $raw_response = get_transient("gform_update_info"); - if(!$cache) - $raw_response = null; + if ( empty( $version_info ) ) { + return array( 'is_valid_key' => '1', 'version' => '', 'url' => '', 'is_error' => '1' ); + } - if(!$raw_response){ - //Getting version number - $options = array('method' => 'POST', 'timeout' => 20); - $options['headers'] = array( - 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'), - 'User-Agent' => 'WordPress/' . get_bloginfo("version"), - 'Referer' => get_bloginfo("url") - ); - $options['body'] = self::get_remote_post_params(); - $options['timeout'] = 15; + return $version_info; + } - $nocache = $cache ? "" : "nocache=1"; //disabling server side caching + public static function get_remote_request_params() { + global $wpdb; - $raw_response = self::post_to_manager("version.php", $nocache, $options); + return sprintf( 'of=GravityForms&key=%s&v=%s&wp=%s&php=%s&mysql=%s&version=2', urlencode( self::get_key() ), urlencode( self::$version ), urlencode( get_bloginfo( 'version' ) ), urlencode( phpversion() ), urlencode( $wpdb->db_version() ) ); + } - //caching responses. - set_transient("gform_update_info", $raw_response, 86400); //caching for 24 hours - } + public static function get_remote_post_params() { + global $wpdb; - if ( is_wp_error( $raw_response ) || rgars($raw_response, 'response/code') != 200 ) { - return array("is_valid_key" => "1", "version" => "", "url" => "", "is_error" => "1"); + if ( ! function_exists( 'get_plugins' ) ) { + require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); } + $plugin_list = get_plugins(); + $site_url = get_bloginfo( 'url' ); + $plugins = array(); - $version_info = json_decode($raw_response['body'], true); - - if( empty($version_info) ) - return array("is_valid_key" => "1", "version" => "", "url" => "", "is_error" => "1"); - - return $version_info; - } + $active_plugins = get_option( 'active_plugins' ); - public static function get_remote_request_params(){ - global $wpdb; + foreach ( $plugin_list as $key => $plugin ) { + $is_active = in_array( $key, $active_plugins ); - return sprintf("of=GravityForms&key=%s&v=%s&wp=%s&php=%s&mysql=%s&version=2", urlencode(self::get_key()), urlencode(self::$version), urlencode(get_bloginfo("version")), urlencode(phpversion()), urlencode($wpdb->db_version())); - } + //filter for only gravityforms ones, may get some others if using our naming convention + if ( strpos( strtolower( $plugin['Title'] ), 'gravity forms' ) !== false ) { + $name = substr( $key, 0, strpos( $key, '/' ) ); + $plugins[] = array( 'name' => $name, 'version' => $plugin['Version'], 'is_active' => $is_active ); + } + } + $plugins = json_encode( $plugins ); + + //get theme info + $theme = wp_get_theme(); + $theme_name = $theme->get( 'Name' ); + $theme_uri = $theme->get( 'ThemeURI' ); + $theme_version = $theme->get( 'Version' ); + $theme_author = $theme->get( 'Author' ); + $theme_author_uri = $theme->get( 'AuthorURI' ); + + $form_counts = GFFormsModel::get_form_count(); + $active_count = $form_counts['active']; + $inactive_count = $form_counts['inactive']; + $fc = abs( $active_count ) + abs( $inactive_count ); + $entry_count = GFFormsModel::get_lead_count_all_forms( 'active' ); + $im = is_multisite(); + + $post = array( 'of' => 'gravityforms', 'key' => self::get_key(), 'v' => self::$version, 'wp' => get_bloginfo( 'version' ), 'php' => phpversion(), 'mysql' => $wpdb->db_version(), 'version' => '2', 'plugins' => $plugins, 'tn' => $theme_name, 'tu' => $theme_uri, 'tv' => $theme_version, 'ta' => $theme_author, 'tau' => $theme_author_uri, 'im' => $im, 'fc' => $fc, 'ec' => $entry_count, 'emc' => self::get_emails_sent(), 'api' => self::get_api_calls() ); + + return $post; + } - public static function get_remote_post_params(){ - global $wpdb; + public static function ensure_wp_version() { + if ( ! GF_SUPPORTED_WP_VERSION ) { + echo "
    " . sprintf( __( 'Gravity Forms require WordPress %s or greater. You must upgrade WordPress in order to use Gravity Forms' , 'gravityforms' ), GF_MIN_WP_VERSION ) . '
    '; - if(!function_exists('get_plugins')){ - require_once(ABSPATH . 'wp-admin/includes/plugin.php'); - } - $plugin_list = get_plugins(); - $site_url = get_bloginfo("url"); - $plugins = array(); + return false; + } - $active_plugins = get_option( 'active_plugins' ); + return true; + } - foreach ($plugin_list as $key => $plugin) { - $is_active = in_array($key, $active_plugins); + public static function check_update( $option, $cache = true ) { - //filter for only gravityforms ones, may get some others if using our naming convention - if (strpos(strtolower($plugin["Title"]), "gravity forms") !== false){ - $name = substr($key, 0, strpos($key,"/")); - $plugins[] = array("name" => $name, "version" => $plugin["Version"], "is_active" => $is_active); - } - } - $plugins = json_encode($plugins); - - //get theme info - $theme = wp_get_theme(); - $theme_name = $theme->get("Name"); - $theme_uri = $theme->get("ThemeURI"); - $theme_version = $theme->get("Version"); - $theme_author = $theme->get("Author"); - $theme_author_uri = $theme->get("AuthorURI"); - - $form_counts = GFFormsModel::get_form_count(); - $active_count = $form_counts["active"]; - $inactive_count = $form_counts["inactive"]; - $fc = abs($active_count) + abs($inactive_count); - $entry_count = GFFormsModel::get_lead_count_all_forms("active"); - $im = is_multisite(); - - $post = array("of" => "gravityforms", "key" => self::get_key(), "v" => self::$version, "wp" => get_bloginfo("version"), "php" => phpversion(), "mysql" => $wpdb->db_version(), "version" => "2", "plugins" => $plugins, "tn" => $theme_name, "tu" => $theme_uri, "tv" => $theme_version, "ta" => $theme_author, "tau" => $theme_author_uri, "im" => $im, "fc" => $fc, "ec" => $entry_count, "emc" => self::get_emails_sent(), "api" => self::get_api_calls()); - return $post; - } + if ( ! is_object( $option ) ) { + return $option; + } - public static function ensure_wp_version(){ - if(!GF_SUPPORTED_WP_VERSION){ - echo "
    " . sprintf(__("Gravity Forms require WordPress %s or greater. You must upgrade WordPress in order to use Gravity Forms", "gravityforms"), GF_MIN_WP_VERSION) . "
    "; - return false; - } - return true; - } + $version_info = self::get_version_info( $cache ); - public static function check_update($option, $cache=true){ + if ( ! $version_info ) { + return $option; + } - if(!is_object($option)) - return $option; + $plugin_path = 'gravityforms/gravityforms.php'; + if ( empty( $option->response[ $plugin_path ] ) ) { + $option->response[ $plugin_path ] = new stdClass(); + } - $version_info = self::get_version_info($cache); + $version = rgar( $version_info, 'version' ); + //Empty response means that the key is invalid. Do not queue for upgrade + if ( ! rgar( $version_info, 'is_valid_key' ) || version_compare( GFCommon::$version, $version, '>=' ) ) { + unset( $option->response[ $plugin_path ] ); + } else { + $url = rgar( $version_info, 'url' ); + $option->response[ $plugin_path ]->url = 'http://www.gravityforms.com'; + $option->response[ $plugin_path ]->slug = 'gravityforms'; + $option->response[ $plugin_path ]->plugin = $plugin_path; + $option->response[ $plugin_path ]->package = str_replace( '{KEY}', GFCommon::get_key(), $url ); + $option->response[ $plugin_path ]->new_version = $version; + $option->response[ $plugin_path ]->id = '0'; + } - if (!$version_info) - return $option; + return $option; - $plugin_path = "gravityforms/gravityforms.php"; - if(empty($option->response[$plugin_path])) - $option->response[$plugin_path] = new stdClass(); + } - $version = rgar($version_info, "version"); - //Empty response means that the key is invalid. Do not queue for upgrade - if(!rgar($version_info, "is_valid_key") || version_compare(GFCommon::$version, $version, '>=')){ - unset($option->response[$plugin_path]); - } - else{ - $url = rgar($version_info, "url"); - $option->response[$plugin_path]->url = "http://www.gravityforms.com"; - $option->response[$plugin_path]->slug = "gravityforms"; - $option->response[$plugin_path]->package = str_replace("{KEY}", GFCommon::get_key(), $url); - $option->response[$plugin_path]->new_version = $version; - $option->response[$plugin_path]->id = "0"; - } + public static function cache_remote_message() { + //Getting version number + $key = GFCommon::get_key(); + $body = "key=$key"; + $options = array( 'method' => 'POST', 'timeout' => 3, 'body' => $body ); + $options['headers'] = array( + 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' ), + 'Content-Length' => strlen( $body ), + 'User-Agent' => 'WordPress/' . get_bloginfo( 'version' ), + 'Referer' => get_bloginfo( 'url' ) + ); + + $raw_response = self::post_to_manager( 'message.php', GFCommon::get_remote_request_params(), $options ); + + if ( is_wp_error( $raw_response ) || 200 != $raw_response['response']['code'] ) { + $message = ''; + } else { + $message = $raw_response['body']; + } - return $option; + //validating that message is a valid Gravity Form message. If message is invalid, don't display anything + if ( substr( $message, 0, 10 ) != '' ) { + $message = ''; + } - } + update_option( 'rg_gforms_message', $message ); + } - public static function cache_remote_message(){ - //Getting version number - $key = GFCommon::get_key(); - $body = "key=$key"; - $options = array('method' => 'POST', 'timeout' => 3, 'body' => $body); - $options['headers'] = array( - 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'), - 'Content-Length' => strlen($body), - 'User-Agent' => 'WordPress/' . get_bloginfo("version"), - 'Referer' => get_bloginfo("url") - ); - - $raw_response = self::post_to_manager("message.php", GFCommon::get_remote_request_params(), $options); - - if ( is_wp_error( $raw_response ) || 200 != $raw_response['response']['code'] ) - $message = ""; - else - $message = $raw_response['body']; - - //validating that message is a valid Gravity Form message. If message is invalid, don't display anything - if(substr($message, 0, 10) != "") - $message = ""; - - update_option("rg_gforms_message", $message); - } + public static function post_to_manager( $file, $query, $options ) { - public static function post_to_manager($file, $query, $options){ + $request_url = GRAVITY_MANAGER_URL . '/' . $file . '?' . $query; + $raw_response = wp_remote_post( $request_url, $options ); - $request_url = GRAVITY_MANAGER_URL . "/" . $file . "?" . $query; - $raw_response = wp_remote_post($request_url, $options); + if ( is_wp_error( $raw_response ) || 200 != $raw_response['response']['code'] ) { + $request_url = GRAVITY_MANAGER_PROXY_URL . '/proxy.php?f=' . $file . '&' . $query; + $raw_response = wp_remote_post( $request_url, $options ); + } - if ( is_wp_error( $raw_response ) || 200 != $raw_response['response']['code'] ){ - $request_url = GRAVITY_MANAGER_PROXY_URL . "/proxy.php?f=" . $file . "&" . $query; - $raw_response = wp_remote_post($request_url, $options); - } + return $raw_response; + } - return $raw_response; - } + public static function get_local_timestamp( $timestamp = null ) { + if ( $timestamp == null ) { + $timestamp = time(); + } - public static function get_local_timestamp($timestamp = null){ - if($timestamp == null) - $timestamp = time(); + return $timestamp + ( get_option( 'gmt_offset' ) * 3600 ); + } - return $timestamp + (get_option( 'gmt_offset' ) * 3600 ); - } + public static function get_gmt_timestamp( $local_timestamp ) { + return $local_timestamp - ( get_option( 'gmt_offset' ) * 3600 ); + } - public static function get_gmt_timestamp($local_timestamp){ - return $local_timestamp - (get_option( 'gmt_offset' ) * 3600 ); - } + public static function format_date( $gmt_datetime, $is_human = true, $date_format = '', $include_time = true ) { + if ( empty( $gmt_datetime ) ) { + return ''; + } - public static function format_date($gmt_datetime, $is_human = true, $date_format="", $include_time=true){ - if(empty($gmt_datetime)) - return ""; + //adjusting date to local configured Time Zone + $lead_gmt_time = mysql2date( 'G', $gmt_datetime ); + $lead_local_time = self::get_local_timestamp( $lead_gmt_time ); - //adjusting date to local configured Time Zone - $lead_gmt_time = mysql2date("G", $gmt_datetime); - $lead_local_time = self::get_local_timestamp($lead_gmt_time); + if ( empty( $date_format ) ) { + $date_format = get_option( 'date_format' ); + } - if(empty($date_format)) - $date_format = get_option('date_format'); + if ( $is_human ) { + $time_diff = time() - $lead_gmt_time; - if($is_human){ - $time_diff = time() - $lead_gmt_time; + if ( $time_diff > 0 && $time_diff < 24 * 60 * 60 ) { + $date_display = sprintf( __( '%s ago', 'gravityforms' ), human_time_diff( $lead_gmt_time ) ); + } else { + $date_display = $include_time ? sprintf( __( '%1$s at %2$s', 'gravityforms' ), date_i18n( $date_format, $lead_local_time, true ), date_i18n( get_option( 'time_format' ), $lead_local_time, true ) ) : date_i18n( $date_format, $lead_local_time, true ); + } + } else { + $date_display = $include_time ? sprintf( __( '%1$s at %2$s', 'gravityforms' ), date_i18n( $date_format, $lead_local_time, true ), date_i18n( get_option( 'time_format' ), $lead_local_time, true ) ) : date_i18n( $date_format, $lead_local_time, true ); + } - if ($time_diff > 0 && $time_diff < 24*60*60) - $date_display = sprintf(__('%s ago', 'gravityforms'), human_time_diff($lead_gmt_time)); - else - $date_display = $include_time ? sprintf(__('%1$s at %2$s', 'gravityforms'), date_i18n($date_format, $lead_local_time, true), date_i18n(get_option('time_format'), $lead_local_time, true)) : date_i18n($date_format, $lead_local_time, true); - } - else{ - $date_display = $include_time ? sprintf(__('%1$s at %2$s', 'gravityforms'), date_i18n($date_format, $lead_local_time, true), date_i18n(get_option('time_format'), $lead_local_time, true)) : date_i18n($date_format, $lead_local_time, true); - } + return $date_display; + } - return $date_display; - } + public static function get_selection_value( $value ) { + $ary = explode( '|', $value ); + $val = $ary[0]; - public static function get_selection_value($value){ - $ary = explode("|", $value); - $val = $ary[0]; - return $val; - } + return $val; + } - public static function selection_display($value, $field, $currency="", $use_text=false){ - if (is_array($value)){ - return ""; - } + public static function selection_display( $value, $field, $currency = '', $use_text = false ) { + if ( is_array( $value ) ) { + return ''; + } - if ( isset( $field['enablePrice'] ) && $field['enablePrice'] ) { + if ( $field !== null && $field->enablePrice ) { $ary = explode( '|', $value ); $val = $ary[0]; $price = count( $ary ) > 1 ? $ary[1] : ''; @@ -2055,3933 +2057,1990 @@ public static function selection_display($value, $field, $currency="", $use_text $price = ''; } - if($use_text) - $val = RGFormsModel::get_choice_text($field, $val); - - if(!empty($price)) - return "$val (" . self::to_money($price, $currency) . ")"; - else - return $val; - } + if ( $use_text ) { + $val = RGFormsModel::get_choice_text( $field, $val ); + } - public static function date_display($value, $format = "mdy"){ - $date = self::parse_date($value, $format); - if(empty($date)) - return $value; - - list($position, $separator) = rgexplode("_", $format, 2); - switch($separator){ - case "dash" : - $separator = "-"; - break; - case "dot" : - $separator = "."; - break; - default : - $separator = "/"; - break; - } + if ( ! empty( $price ) ) { + return "$val (" . self::to_money( $price, $currency ) . ')'; + } else { + return $val; + } + } - switch($position){ - case "ymd" : - return $date["year"] . $separator . $date["month"] . $separator . $date["day"]; - break; + public static function date_display( $value, $format = 'mdy' ) { + $date = self::parse_date( $value, $format ); + if ( empty( $date ) ) { + return $value; + } - case "dmy" : - return $date["day"] . $separator . $date["month"] . $separator . $date["year"]; - break; - - default : - return $date["month"] . $separator . $date["day"] . $separator . $date["year"]; - break; - - } - } - - public static function parse_date($date, $format="mdy"){ - $date_info = array(); - - $position = substr($format, 0, 3); - - if(is_array($date)){ - - switch($position){ - case "mdy" : - $date_info["month"] = rgar($date, 0); - $date_info["day"] = rgar($date, 1); - $date_info["year"] = rgar($date, 2); - break; - - case "dmy" : - $date_info["day"] = rgar($date, 0); - $date_info["month"] = rgar($date, 1); - $date_info["year"] = rgar($date, 2); - break; - - case "ymd" : - $date_info["year"] = rgar($date, 0); - $date_info["month"] = rgar($date, 1); - $date_info["day"] = rgar($date, 2); - break; - } - return $date_info; - } - - $date = preg_replace("|[/\.]|", "-", $date); - if(preg_match('/^(\d{1,4})-(\d{1,2})-(\d{1,4})$/', $date, $matches)){ - - if(strlen($matches[1]) == 4){ - //format yyyy-mm-dd - $date_info["year"] = $matches[1]; - $date_info["month"] = $matches[2]; - $date_info["day"] = $matches[3]; - } - else if ($position == "mdy"){ - //format mm-dd-yyyy - $date_info["month"] = $matches[1]; - $date_info["day"] = $matches[2]; - $date_info["year"] = $matches[3]; - } - else{ - //format dd-mm-yyyy - $date_info["day"] = $matches[1]; - $date_info["month"] = $matches[2]; - $date_info["year"] = $matches[3]; - } - } - - return $date_info; - } - - - public static function truncate_url($url){ - $truncated_url = basename($url); - if(empty($truncated_url)) - $truncated_url = dirname($url); - - $ary = explode("?", $truncated_url); - - return $ary[0]; - } - - public static function get_tabindex(){ - return GFCommon::$tab_index > 0 ? "tabindex='" . GFCommon::$tab_index++ . "'" : ""; - } - - public static function get_checkbox_choices($field, $value, $disabled_text){ - $choices = ""; - - if(is_array($field["choices"])){ - $choice_number = 1; - $count = 1; - foreach($field["choices"] as $choice){ - if($choice_number % 10 == 0) //hack to skip numbers ending in 0. so that 5.1 doesn't conflict with 5.10 - $choice_number++; - - $input_id = $field["id"] . '.' . $choice_number; - $id = $field["id"] . '_' . $choice_number++; - - if(empty($_POST) && rgar($choice,"isSelected")){ - $checked = "checked='checked'"; - } - else if(is_array($value) && RGFormsModel::choice_value_match($field, $choice, rgget($input_id, $value))){ - $checked = "checked='checked'"; - } - else if(!is_array($value) && RGFormsModel::choice_value_match($field, $choice, $value)){ - $checked = "checked='checked'"; - } - else{ - $checked = ""; - } - - $logic_event = self::get_logic_event($field, "click"); - - $tabindex = self::get_tabindex(); - $choice_value = $choice["value"]; - if(rgget("enablePrice", $field)) - $choice_value .= "|" . GFCommon::to_number(rgar($choice,"price")); - - $choices.= sprintf("
  • ", $input_id, esc_attr($choice_value), $checked, $id, $disabled_text, $id, $id, $choice["text"]); - - if(IS_ADMIN && RG_CURRENT_VIEW != "entry" && $count >=5) - break; - - $count++; - } - - $total = sizeof($field["choices"]); - if($count < $total) - $choices .= "
  • " . sprintf(__("%d of %d items shown. Edit field to view all", "gravityforms"), $count, $total) . "
  • "; - } - - return apply_filters("gform_field_choices_" . rgget("formId", $field), apply_filters("gform_field_choices", $choices, $field), $field); - - } - - public static function get_radio_choices($field, $value="", $disabled_text){ - $choices = ""; - - if(is_array($field["choices"])){ - $choice_id = 0; - - // add "other" choice to choices if enabled - if(rgar($field, 'enableOtherChoice')) { - $other_default_value = GFCommon::get_other_choice_value(); - $field["choices"][] = array('text' => $other_default_value, 'value' => 'gf_other_choice', 'isSelected' => false, 'isOtherChoice' => true); - } + list( $position, $separator ) = rgexplode( '_', $format, 2 ); + switch ( $separator ) { + case 'dash' : + $separator = '-'; + break; + case 'dot' : + $separator = '.'; + break; + default : + $separator = '/'; + break; + } - $logic_event = self::get_logic_event($field, "click"); - $count = 1; + switch ( $position ) { + case 'year' : + case 'month' : + case 'day' : + return $date[ $position ]; - foreach($field["choices"] as $choice){ - $id = $field["id"] . '_' . $choice_id++; + case 'ymd' : + return $date['year'] . $separator . $date['month'] . $separator . $date['day']; + break; - $field_value = !empty($choice["value"]) || rgar($field, "enableChoiceValue") ? $choice["value"] : $choice["text"]; + case 'dmy' : + return $date['day'] . $separator . $date['month'] . $separator . $date['year']; + break; - if(rgget("enablePrice", $field)) - $field_value .= "|" . GFCommon::to_number(rgar($choice,"price")); + default : + return $date['month'] . $separator . $date['day'] . $separator . $date['year']; + break; - if(rgblank($value) && RG_CURRENT_VIEW != "entry"){ - $checked = rgar($choice,"isSelected") ? "checked='checked'" : ""; - } - else { - $checked = RGFormsModel::choice_value_match($field, $choice, $value) ? "checked='checked'" : ""; - } + } + } - $tabindex = self::get_tabindex(); - $label = sprintf("", $id, $id, $choice["text"]); - $input_focus = ''; + public static function parse_date( $date, $format = 'mdy' ) { + $date_info = array(); - // handle "other" choice - if(rgar($choice, 'isOtherChoice')) { + $position = substr( $format, 0, 3 ); - $onfocus = !IS_ADMIN ? 'jQuery(this).prev("input").attr("checked", true); if(jQuery(this).val() == "' . $other_default_value . '") { jQuery(this).val(""); }' : ''; - $onblur = !IS_ADMIN ? 'if(jQuery(this).val().replace(" ", "") == "") { jQuery(this).val("' . $other_default_value . '"); }' : ''; - $onkeyup = self::get_logic_event($field, "keyup"); + if ( is_array( $date ) ) { - $input_focus = !IS_ADMIN ? "onfocus=\"jQuery(this).next('input').focus();\"" : ""; - $value_exists = RGFormsModel::choices_value_match($field, $field["choices"], $value); + switch ( $position ) { + case 'mdy' : + $date_info['month'] = rgar( $date, 0 ); + $date_info['day'] = rgar( $date, 1 ); + $date_info['year'] = rgar( $date, 2 ); + break; - if($value == 'gf_other_choice' && rgpost("input_{$field["id"]}_other")){ - $other_value = rgpost("input_{$field["id"]}_other"); - } else if(!$value_exists && !empty($value)){ - $other_value = $value; - $value = 'gf_other_choice'; - $checked = "checked='checked'"; - } else { - $other_value = $other_default_value; - } - $label = ""; - } + case 'dmy' : + $date_info['day'] = rgar( $date, 0 ); + $date_info['month'] = rgar( $date, 1 ); + $date_info['year'] = rgar( $date, 2 ); + break; - $choices .= sprintf("
  • %s
  • ", $field["id"], esc_attr($field_value), $checked, $id, $disabled_text, $input_focus, $label); + case 'ymd' : + $date_info['year'] = rgar( $date, 0 ); + $date_info['month'] = rgar( $date, 1 ); + $date_info['day'] = rgar( $date, 2 ); + break; + } + return $date_info; + } - if(IS_ADMIN && RG_CURRENT_VIEW != "entry" && $count >=5) - break; + $date = preg_replace( "|[/\.]|", '-', $date ); + if ( preg_match( '/^(\d{1,4})-(\d{1,2})-(\d{1,4})$/', $date, $matches ) ) { + + if ( strlen( $matches[1] ) == 4 ) { + //format yyyy-mm-dd + $date_info['year'] = $matches[1]; + $date_info['month'] = $matches[2]; + $date_info['day'] = $matches[3]; + } else if ( $position == 'mdy' ) { + //format mm-dd-yyyy + $date_info['month'] = $matches[1]; + $date_info['day'] = $matches[2]; + $date_info['year'] = $matches[3]; + } else { + //format dd-mm-yyyy + $date_info['day'] = $matches[1]; + $date_info['month'] = $matches[2]; + $date_info['year'] = $matches[3]; + } + } - $count++; - } + return $date_info; + } - $total = sizeof($field["choices"]); - if($count < $total) - $choices .= "
  • " . sprintf(__("%d of %d items shown. Edit field to view all", "gravityforms"), $count, $total) . "
  • "; - } - return apply_filters("gform_field_choices_" . rgget("formId", $field), apply_filters("gform_field_choices", $choices, $field), $field); - } + public static function truncate_url( $url ) { + $truncated_url = basename( $url ); + if ( empty( $truncated_url ) ) { + $truncated_url = dirname( $url ); + } - public static function get_field_type_title($type){ - switch($type){ - case "text" : - return __("Single Line Text", "gravityforms"); - case "textarea" : - return __("Paragraph Text", "gravityforms"); - case "select" : - return __("Drop Down", "gravityforms"); - case "multiselect" : - return __("Multi Select", "gravityforms"); - case "number" : - return __("Number", "gravityforms"); - case "checkbox" : - return __("Checkboxes", "gravityforms"); - case "radio" : - return __("Radio Buttons", "gravityforms"); - case "hidden" : - return __("Hidden", "gravityforms"); - case "html" : - return __("HTML", "gravityforms"); - case "section" : - return __("Section Break", "gravityforms"); - case "page" : - return __("Page Break", "gravityforms"); - case "name" : - return __("Name", "gravityforms"); - case "date" : - return __("Date", "gravityforms"); - case "time" : - return __("Time", "gravityforms"); - case "phone" : - return __("Phone", "gravityforms"); - case "address" : - return __("Address", "gravityforms"); - case "website" : - return __("Website", "gravityforms"); - case "email" : - return __("Email", "gravityforms"); - case "password" : - return __("Password", "gravityforms"); - case "fileupload" : - return __("File Upload", "gravityforms"); - case "captcha" : - return __("CAPTCHA", "gravityforms"); - case "list" : - return __("List", "gravityforms"); - case "creditcard" : - return __("Credit Card", "gravityforms"); - case "post_title" : - return __("Title", "gravityforms"); - case "post_content" : - return __("Body", "gravityforms"); - case "post_excerpt" : - return __("Excerpt", "gravityforms"); - case "post_tags" : - return __("Tags", "gravityforms"); - case "post_category" : - return __("Category", "gravityforms"); - case "post_image" : - return __("Image", "gravityforms"); - case "post_custom_field" : - return __("Custom Field", "gravityforms"); - case "product" : - return __("Product", "gravityforms"); - case "quantity" : - return __("Quantity", "gravityforms"); - case "option" : - return __("Option", "gravityforms"); - case "shipping" : - return __("Shipping", "gravityforms"); - case "total" : - return __("Total", "gravityforms"); - - default : - return apply_filters("gform_field_type_title", $type, $type); - } - } + $ary = explode( '?', $truncated_url ); - public static function get_select_choices($field, $value=""){ - $choices = ""; - - if(RG_CURRENT_VIEW == "entry" && empty($value)) - $choices .= ""; - - if(is_array(rgar($field, "choices"))){ - foreach($field["choices"] as $choice){ - - //needed for users upgrading from 1.0 - $field_value = !empty($choice["value"]) || rgget("enableChoiceValue", $field) || $field['type'] == 'post_category' ? $choice["value"] : $choice["text"]; - if(rgget("enablePrice", $field)) - $field_value .= "|" . GFCommon::to_number(rgar($choice,"price")); - - if(rgblank($value) && RG_CURRENT_VIEW != "entry"){ - $selected = rgar($choice,"isSelected") ? "selected='selected'" : ""; - } - else{ - if(is_array($value)){ - $is_match = false; - foreach($value as $item){ - if(RGFormsModel::choice_value_match($field, $choice, $item)){ - $is_match = true; - break; - } - } - $selected = $is_match ? "selected='selected'" : ""; - } - else{ - $selected = RGFormsModel::choice_value_match($field, $choice, $value) ? "selected='selected'" : ""; - } - } - - $choices.= sprintf("", esc_attr($field_value), $selected, esc_html($choice["text"])); - } - } - return $choices; - } + return $ary[0]; + } - public static function is_section_empty( $section_field, $form, $entry ) { + public static function get_field_placeholder_attribute( $field ) { - $cache_key = "GFCommon::is_section_empty_{$form['id']}_{$section_field['id']}"; - $value = GFCache::get( $cache_key ); + $placeholder_value = GFCommon::replace_variables_prepopulate( $field->placeholder ); - if( $value !== false ) { - return $value == true; - } + return ! empty( $placeholder_value ) ? sprintf( "placeholder='%s'", $placeholder_value ) : ''; + } - $fields = self::get_section_fields( $form, $section_field['id'] ); - if( ! is_array( $fields ) ) { - GFCache::set( $cache_key, 1 ); - return true; - } + public static function get_input_placeholder_attribute( $input ) { - foreach( $fields as $field ) { + $placeholder_value = self::get_input_placeholder_value( $input ); - $value = GFFormsModel::get_lead_field_value( $entry, $field ); - $value = GFCommon::get_lead_field_display( $field, $value, rgar( $entry, 'currency' ) ); + return ! empty( $placeholder_value ) ? sprintf( "placeholder='%s'", $placeholder_value ) : ''; + } - if( rgblank( $value ) ) { - continue; - } + public static function get_input_placeholder_value( $input ) { - // most fields are displayed in the section by default, exceptions are handled below - $is_field_displayed_in_section = true; + $placeholder = rgar( $input, 'placeholder' ); - // by default, product fields are not displayed in their containing section (displayed in a product summary table) - // if the filter is used to disable this, product fields are displayed in the section like other fields - if( self::is_product_field( $field['type'] ) ) { - $display_product_summary = apply_filters( 'gform_display_product_summary', true, $field, $form, $entry ); - $is_field_displayed_in_section = ! $display_product_summary; - } + return empty( $placeholder ) ? '' : GFCommon::replace_variables_prepopulate( $placeholder ); + } - if( $is_field_displayed_in_section ) { - GFCache::set( $cache_key, 0 ); - return false; - } + public static function get_tabindex() { + return GFCommon::$tab_index > 0 ? "tabindex='" . GFCommon::$tab_index ++ . "'" : ''; + } - } + /** + * @deprecated + * + * @param GF_Field_Checkbox $field + * @param $value + * @param $disabled_text + * + * @return mixed + */ + public static function get_checkbox_choices( $field, $value, $disabled_text ) { + _deprecated_function( 'get_checkbox_choices', '1.9', 'GF_Field_Checkbox::get_checkbox_choices' ); + + return $field->get_checkbox_choices( $value, $disabled_text ); + } - GFCache::set( $cache_key, 1 ); + /** + * @deprecated + * + * @param GF_Field_Radio $field + * @param string $value + * @param $disabled_text + * + * @return mixed + */ + public static function get_radio_choices( $field, $value = '', $disabled_text ) { + _deprecated_function( 'get_radio_choices', '1.9', 'GF_Field_Checkbox::get_radio_choices' ); + + return $field->get_radio_choices( $value, $disabled_text ); + } - return true; - } + public static function get_field_type_title( $type ) { + $gf_field = GF_Fields::get( $type ); + if ( ! empty( $gf_field ) ) { + return $gf_field->get_form_editor_field_title(); + } - public static function get_section_fields($form, $section_field_id){ - $fields = array(); - $in_section = false; - foreach($form["fields"] as $field){ - if(in_array($field["type"], array("section", "page")) && $in_section) - return $fields; + return apply_filters( 'gform_field_type_title', $type, $type ); + } - if($field["id"] == $section_field_id) - $in_section = true; + public static function get_select_choices( $field, $value = '' ) { + $choices = ''; - if($in_section) - $fields[] = $field; - } + if ( RG_CURRENT_VIEW == 'entry' && empty( $value ) && empty( $field->placeholder ) ) { + $choices .= ""; + } - return $fields; - } + if ( is_array( $field->choices ) ) { + if ( GFFormsModel::get_input_type( $field ) == 'select' && ! empty( $field->placeholder ) ) { + $selected = empty( $value ) ? "selected='selected'" : ''; + $choices .= sprintf( "", $selected, esc_html( $field->placeholder ) ); + } - public static function get_countries(){ - return apply_filters("gform_countries", array( - __('Afghanistan', 'gravityforms'),__('Albania', 'gravityforms'),__('Algeria', 'gravityforms'), __('American Samoa', 'gravityforms'), __('Andorra', 'gravityforms'),__('Angola', 'gravityforms'),__('Antigua and Barbuda', 'gravityforms'),__('Argentina', 'gravityforms'),__('Armenia', 'gravityforms'),__('Australia', 'gravityforms'),__('Austria', 'gravityforms'),__('Azerbaijan', 'gravityforms'),__('Bahamas', 'gravityforms'),__('Bahrain', 'gravityforms'),__('Bangladesh', 'gravityforms'),__('Barbados', 'gravityforms'),__('Belarus', 'gravityforms'),__('Belgium', 'gravityforms'),__('Belize', 'gravityforms'),__('Benin', 'gravityforms'),__('Bermuda', 'gravityforms'),__('Bhutan', 'gravityforms'),__('Bolivia', 'gravityforms'),__('Bosnia and Herzegovina', 'gravityforms'),__('Botswana', 'gravityforms'),__('Brazil', 'gravityforms'),__('Brunei', 'gravityforms'),__('Bulgaria', 'gravityforms'),__('Burkina Faso', 'gravityforms'),__('Burundi', 'gravityforms'),__('Cambodia', 'gravityforms'),__('Cameroon', 'gravityforms'),__('Canada', 'gravityforms'),__('Cape Verde', 'gravityforms'),__('Cayman Islands', 'gravityforms'),__('Central African Republic', 'gravityforms'),__('Chad', 'gravityforms'),__('Chile', 'gravityforms'),__('China', 'gravityforms'),__('Colombia', 'gravityforms'),__('Comoros', 'gravityforms'),__('Congo, Democratic Republic of the', 'gravityforms'),__('Congo, Republic of the', 'gravityforms'),__('Costa Rica', 'gravityforms'),__('Côte d\'Ivoire', 'gravityforms'),__('Croatia', 'gravityforms'),__('Cuba', 'gravityforms'),__('Cyprus', 'gravityforms'),__('Czech Republic', 'gravityforms'),__('Denmark', 'gravityforms'),__('Djibouti', 'gravityforms'),__('Dominica', 'gravityforms'),__('Dominican Republic', 'gravityforms'),__('East Timor', 'gravityforms'),__('Ecuador', 'gravityforms'),__('Egypt', 'gravityforms'),__('El Salvador', 'gravityforms'),__('Equatorial Guinea', 'gravityforms'),__('Eritrea', 'gravityforms'),__('Estonia', 'gravityforms'),__('Ethiopia', 'gravityforms'),__('Fiji', 'gravityforms'),__('Finland', 'gravityforms'),__('France', 'gravityforms'), __('French Polynesia', 'gravityforms'), __('Gabon', 'gravityforms'), - __('Gambia', 'gravityforms'),_x('Georgia', 'Country', 'gravityforms'),__('Germany', 'gravityforms'),__('Ghana', 'gravityforms'),__('Greece', 'gravityforms'),__('Greenland', 'gravityforms'),__('Grenada', 'gravityforms'),__('Guam', 'gravityforms'),__('Guatemala', 'gravityforms'),__('Guinea', 'gravityforms'),__('Guinea-Bissau', 'gravityforms'),__('Guyana', 'gravityforms'),__('Haiti', 'gravityforms'),__('Honduras', 'gravityforms'),__('Hong Kong', 'gravityforms'),__('Hungary', 'gravityforms'),__('Iceland', 'gravityforms'),__('India', 'gravityforms'),__('Indonesia', 'gravityforms'),__('Iran', 'gravityforms'),__('Iraq', 'gravityforms'),__('Ireland', 'gravityforms'),__('Israel', 'gravityforms'),__('Italy', 'gravityforms'),__('Jamaica', 'gravityforms'),__('Japan', 'gravityforms'),__('Jordan', 'gravityforms'),__('Kazakhstan', 'gravityforms'),__('Kenya', 'gravityforms'),__('Kiribati', 'gravityforms'),__('North Korea', 'gravityforms'),__('South Korea', 'gravityforms'),__('Kosovo', 'gravityforms'),__('Kuwait', 'gravityforms'),__('Kyrgyzstan', 'gravityforms'),__('Laos', 'gravityforms'),__('Latvia', 'gravityforms'),__('Lebanon', 'gravityforms'),__('Lesotho', 'gravityforms'),__('Liberia', 'gravityforms'),__('Libya', 'gravityforms'),__('Liechtenstein', 'gravityforms'),__('Lithuania', 'gravityforms'),__('Luxembourg', 'gravityforms'),__('Macedonia', 'gravityforms'),__('Madagascar', 'gravityforms'),__('Malawi', 'gravityforms'),__('Malaysia', 'gravityforms'),__('Maldives', 'gravityforms'),__('Mali', 'gravityforms'),__('Malta', 'gravityforms'),__('Marshall Islands', 'gravityforms'),__('Mauritania', 'gravityforms'),__('Mauritius', 'gravityforms'),__('Mexico', 'gravityforms'),__('Micronesia', 'gravityforms'),__('Moldova', 'gravityforms'),__('Monaco', 'gravityforms'),__('Mongolia', 'gravityforms'),__('Montenegro', 'gravityforms'),__('Morocco', 'gravityforms'),__('Mozambique', 'gravityforms'),__('Myanmar', 'gravityforms'),__('Namibia', 'gravityforms'),__('Nauru', 'gravityforms'),__('Nepal', 'gravityforms'),__('Netherlands', 'gravityforms'),__('New Zealand', 'gravityforms'), - __('Nicaragua', 'gravityforms'),__('Niger', 'gravityforms'),__('Nigeria', 'gravityforms'),__('Norway', 'gravityforms'), __('Northern Mariana Islands', 'gravityforms'), __('Oman', 'gravityforms'),__('Pakistan', 'gravityforms'),__('Palau', 'gravityforms'),__('Palestine', 'gravityforms'),__('Panama', 'gravityforms'),__('Papua New Guinea', 'gravityforms'),__('Paraguay', 'gravityforms'),__('Peru', 'gravityforms'),__('Philippines', 'gravityforms'),__('Poland', 'gravityforms'),__('Portugal', 'gravityforms'),__('Puerto Rico', 'gravityforms'),__('Qatar', 'gravityforms'),__('Romania', 'gravityforms'),__('Russia', 'gravityforms'),__('Rwanda', 'gravityforms'),__('Saint Kitts and Nevis', 'gravityforms'),__('Saint Lucia', 'gravityforms'),__('Saint Vincent and the Grenadines', 'gravityforms'),__('Samoa', 'gravityforms'),__('San Marino', 'gravityforms'),__('Sao Tome and Principe', 'gravityforms'),__('Saudi Arabia', 'gravityforms'),__('Senegal', 'gravityforms'),__('Serbia and Montenegro', 'gravityforms'),__('Seychelles', 'gravityforms'),__('Sierra Leone', 'gravityforms'),__('Singapore', 'gravityforms'),__('Slovakia', 'gravityforms'),__('Slovenia', 'gravityforms'),__('Solomon Islands', 'gravityforms'),__('Somalia', 'gravityforms'),__('South Africa', 'gravityforms'),__('Spain', 'gravityforms'),__('Sri Lanka', 'gravityforms'),__('Sudan', 'gravityforms'),__('Sudan, South', 'gravityforms'),__('Suriname', 'gravityforms'),__('Swaziland', 'gravityforms'),__('Sweden', 'gravityforms'),__('Switzerland', 'gravityforms'),__('Syria', 'gravityforms'),__('Taiwan', 'gravityforms'),__('Tajikistan', 'gravityforms'),__('Tanzania', 'gravityforms'),__('Thailand', 'gravityforms'),__('Togo', 'gravityforms'),__('Tonga', 'gravityforms'),__('Trinidad and Tobago', 'gravityforms'),__('Tunisia', 'gravityforms'),__('Turkey', 'gravityforms'),__('Turkmenistan', 'gravityforms'),__('Tuvalu', 'gravityforms'),__('Uganda', 'gravityforms'),__('Ukraine', 'gravityforms'),__('United Arab Emirates', 'gravityforms'),__('United Kingdom', 'gravityforms'), - __('United States', 'gravityforms'),__('Uruguay', 'gravityforms'),__('Uzbekistan', 'gravityforms'),__('Vanuatu', 'gravityforms'),__('Vatican City', 'gravityforms'),__('Venezuela', 'gravityforms'),__('Vietnam', 'gravityforms'), __('Virgin Islands, British', 'gravityforms'), __('Virgin Islands, U.S.', 'gravityforms'),__('Yemen', 'gravityforms'),__('Zambia', 'gravityforms'),__('Zimbabwe', 'gravityforms'))); + foreach ( $field->choices as $choice ) { + //needed for users upgrading from 1.0 + $field_value = ! empty( $choice['value'] ) || $field->enableChoiceValue || $field->type == 'post_category' ? $choice['value'] : $choice['text']; + if ( $field->enablePrice ) { + $price = rgempty( 'price', $choice ) ? 0 : GFCommon::to_number( rgar( $choice, 'price' ) ); + $field_value .= '|' . $price; + } - } + if ( rgblank( $value ) && RG_CURRENT_VIEW != 'entry' ) { + $selected = rgar( $choice, 'isSelected' ) ? "selected='selected'" : ''; + } else { + if ( is_array( $value ) ) { + $is_match = false; + foreach ( $value as $item ) { + if ( RGFormsModel::choice_value_match( $field, $choice, $item ) ) { + $is_match = true; + break; + } + } + $selected = $is_match ? "selected='selected'" : ''; + } else { + $selected = RGFormsModel::choice_value_match( $field, $choice, $value ) ? "selected='selected'" : ''; + } + } - public static function get_country_code($country_name) { - $codes = array( - __('AFGHANISTAN', 'gravityforms') => "AF" , - __('ALBANIA', 'gravityforms') => "AL" , - __('ALGERIA', 'gravityforms') => "DZ" , - __('AMERICAN SAMOA', 'gravityforms') => "AS" , - __('ANDORRA', 'gravityforms') => "AD" , - __('ANGOLA', 'gravityforms') => "AO" , - __('ANTIGUA AND BARBUDA', 'gravityforms') => "AG" , - __('ARGENTINA', 'gravityforms') => "AR" , - __('ARMENIA', 'gravityforms') => "AM" , - __('AUSTRALIA', 'gravityforms') => "AU" , - __('AUSTRIA', 'gravityforms') => "AT" , - __('AZERBAIJAN', 'gravityforms') => "AZ" , - __('BAHAMAS', 'gravityforms') => "BS" , - __('BAHRAIN', 'gravityforms') => "BH" , - __('BANGLADESH', 'gravityforms') => "BD" , - __('BARBADOS', 'gravityforms') => "BB" , - __('BELARUS', 'gravityforms') => "BY" , - __('BELGIUM', 'gravityforms') => "BE" , - __('BELIZE', 'gravityforms') => "BZ" , - __('BENIN', 'gravityforms') => "BJ" , - __('BERMUDA', 'gravityforms') => "BM" , - __('BHUTAN', 'gravityforms') => "BT" , - __('BOLIVIA', 'gravityforms') => "BO" , - __('BOSNIA AND HERZEGOVINA', 'gravityforms') => "BA" , - __('BOTSWANA', 'gravityforms') => "BW" , - __('BRAZIL', 'gravityforms') => "BR" , - __('BRUNEI', 'gravityforms') => "BN" , - __('BULGARIA', 'gravityforms') => "BG" , - __('BURKINA FASO', 'gravityforms') => "BF" , - __('BURUNDI', 'gravityforms') => "BI" , - __('CAMBODIA', 'gravityforms') => "KH" , - __('CAMEROON', 'gravityforms') => "CM" , - __('CANADA', 'gravityforms') => "CA" , - __('CAPE VERDE', 'gravityforms') => "CV" , - __('CAYMAN ISLANDS', 'gravityforms') => "KY" , - __('CENTRAL AFRICAN REPUBLIC', 'gravityforms') => "CF" , - __('CHAD', 'gravityforms') => "TD" , - __('CHILE', 'gravityforms') => "CL" , - __('CHINA', 'gravityforms') => "CN" , - __('COLOMBIA', 'gravityforms') => "CO" , - __('COMOROS', 'gravityforms') => "KM" , - __('CONGO, DEMOCRATIC REPUBLIC OF THE', 'gravityforms') => "CD" , - __('CONGO, REPUBLIC OF THE', 'gravityforms') => "CG" , - __('COSTA RICA', 'gravityforms') => "CR" , - __('C&OCIRC;TE D\'IVOIRE', 'gravityforms') => "CI" , - __('CROATIA', 'gravityforms') => "HR" , - __('CUBA', 'gravityforms') => "CU" , - __('CYPRUS', 'gravityforms') => "CY" , - __('CZECH REPUBLIC', 'gravityforms') => "CZ" , - __('DENMARK', 'gravityforms') => "DK" , - __('DJIBOUTI', 'gravityforms') => "DJ" , - __('DOMINICA', 'gravityforms') => "DM" , - __('DOMINICAN REPUBLIC', 'gravityforms') => "DO" , - __('EAST TIMOR', 'gravityforms') => "TL" , - __('ECUADOR', 'gravityforms') => "EC" , - __('EGYPT', 'gravityforms') => "EG" , - __('EL SALVADOR', 'gravityforms') => "SV" , - __('EQUATORIAL GUINEA', 'gravityforms') => "GQ" , - __('ERITREA', 'gravityforms') => "ER" , - __('ESTONIA', 'gravityforms') => "EE" , - __('ETHIOPIA', 'gravityforms') => "ET" , - __('FIJI', 'gravityforms') => "FJ" , - __('FINLAND', 'gravityforms') => "FI" , - __('FRANCE', 'gravityforms') => "FR" , - __('GABON', 'gravityforms') => "GA" , - __('GAMBIA', 'gravityforms') => "GM" , - _x('GEORGIA', 'Country', 'gravityforms') => "GE" , - __('GERMANY', 'gravityforms') => "DE" , - __('GHANA', 'gravityforms') => "GH" , - __('GREECE', 'gravityforms') => "GR" , - __('GREENLAND', 'gravityforms') => "GL" , - __('GRENADA', 'gravityforms') => "GD" , - __('GUAM', 'gravityforms') => "GU" , - __('GUATEMALA', 'gravityforms') => "GT" , - __('GUINEA', 'gravityforms') => "GN" , - __('GUINEA-BISSAU', 'gravityforms') => "GW" , - __('GUYANA', 'gravityforms') => "GY" , - __('HAITI', 'gravityforms') => "HT" , - __('HONDURAS', 'gravityforms') => "HN" , - __('HONG KONG', 'gravityforms') => "HK" , - __('HUNGARY', 'gravityforms') => "HU" , - __('ICELAND', 'gravityforms') => "IS" , - __('INDIA', 'gravityforms') => "IN" , - __('INDONESIA', 'gravityforms') => "ID" , - __('IRAN', 'gravityforms') => "IR" , - __('IRAQ', 'gravityforms') => "IQ" , - __('IRELAND', 'gravityforms') => "IE" , - __('ISRAEL', 'gravityforms') => "IL" , - __('ITALY', 'gravityforms') => "IT" , - __('JAMAICA', 'gravityforms') => "JM" , - __('JAPAN', 'gravityforms') => "JP" , - __('JORDAN', 'gravityforms') => "JO" , - __('KAZAKHSTAN', 'gravityforms') => "KZ" , - __('KENYA', 'gravityforms') => "KE" , - __('KIRIBATI', 'gravityforms') => "KI" , - __('NORTH KOREA', 'gravityforms') => "KP" , - __('SOUTH KOREA', 'gravityforms') => "KR" , - __('KOSOVO', 'gravityforms') => "KV" , - __('KUWAIT', 'gravityforms') => "KW" , - __('KYRGYZSTAN', 'gravityforms') => "KG" , - __('LAOS', 'gravityforms') => "LA" , - __('LATVIA', 'gravityforms') => "LV" , - __('LEBANON', 'gravityforms') => "LB" , - __('LESOTHO', 'gravityforms') => "LS" , - __('LIBERIA', 'gravityforms') => "LR" , - __('LIBYA', 'gravityforms') => "LY" , - __('LIECHTENSTEIN', 'gravityforms') => "LI" , - __('LITHUANIA', 'gravityforms') => "LT" , - __('LUXEMBOURG', 'gravityforms') => "LU" , - __('MACEDONIA', 'gravityforms') => "MK" , - __('MADAGASCAR', 'gravityforms') => "MG" , - __('MALAWI', 'gravityforms') => "MW" , - __('MALAYSIA', 'gravityforms') => "MY" , - __('MALDIVES', 'gravityforms') => "MV" , - __('MALI', 'gravityforms') => "ML" , - __('MALTA', 'gravityforms') => "MT" , - __('MARSHALL ISLANDS', 'gravityforms') => "MH" , - __('MAURITANIA', 'gravityforms') => "MR" , - __('MAURITIUS', 'gravityforms') => "MU" , - __('MEXICO', 'gravityforms') => "MX" , - __('MICRONESIA', 'gravityforms') => "FM" , - __('MOLDOVA', 'gravityforms') => "MD" , - __('MONACO', 'gravityforms') => "MC" , - __('MONGOLIA', 'gravityforms') => "MN" , - __('MONTENEGRO', 'gravityforms') => "ME" , - __('MOROCCO', 'gravityforms') => "MA" , - __('MOZAMBIQUE', 'gravityforms') => "MZ" , - __('MYANMAR', 'gravityforms') => "MM" , - __('NAMIBIA', 'gravityforms') => "NA" , - __('NAURU', 'gravityforms') => "NR" , - __('NEPAL', 'gravityforms') => "NP" , - __('NETHERLANDS', 'gravityforms') => "NL" , - __('NEW ZEALAND', 'gravityforms') => "NZ" , - __('NICARAGUA', 'gravityforms') => "NI" , - __('NIGER', 'gravityforms') => "NE" , - __('NIGERIA', 'gravityforms') => "NG" , - __('NORTHERN MARIANA ISLANDS', 'gravityforms') => "MP" , - __('NORWAY', 'gravityforms') => "NO" , - __('OMAN', 'gravityforms') => "OM" , - __('PAKISTAN', 'gravityforms') => "PK" , - __('PALAU', 'gravityforms') => "PW" , - __('PALESTINE', 'gravityforms') => "PS" , - __('PANAMA', 'gravityforms') => "PA" , - __('PAPUA NEW GUINEA', 'gravityforms') => "PG" , - __('PARAGUAY', 'gravityforms') => "PY" , - __('PERU', 'gravityforms') => "PE" , - __('PHILIPPINES', 'gravityforms') => "PH" , - __('POLAND', 'gravityforms') => "PL" , - __('PORTUGAL', 'gravityforms') => "PT" , - __('PUERTO RICO', 'gravityforms') => "PR" , - __('QATAR', 'gravityforms') => "QA" , - __('ROMANIA', 'gravityforms') => "RO" , - __('RUSSIA', 'gravityforms') => "RU" , - __('RWANDA', 'gravityforms') => "RW" , - __('SAINT KITTS AND NEVIS', 'gravityforms') => "KN" , - __('SAINT LUCIA', 'gravityforms') => "LC" , - __('SAINT VINCENT AND THE GRENADINES', 'gravityforms') => "VC" , - __('SAMOA', 'gravityforms') => "WS" , - __('SAN MARINO', 'gravityforms') => "SM" , - __('SAO TOME AND PRINCIPE', 'gravityforms') => "ST" , - __('SAUDI ARABIA', 'gravityforms') => "SA" , - __('SENEGAL', 'gravityforms') => "SN" , - __('SERBIA AND MONTENEGRO', 'gravityforms') => "RS" , - __('SEYCHELLES', 'gravityforms') => "SC" , - __('SIERRA LEONE', 'gravityforms') => "SL" , - __('SINGAPORE', 'gravityforms') => "SG" , - __('SLOVAKIA', 'gravityforms') => "SK" , - __('SLOVENIA', 'gravityforms') => "SI" , - __('SOLOMON ISLANDS', 'gravityforms') => "SB" , - __('SOMALIA', 'gravityforms') => "SO" , - __('SOUTH AFRICA', 'gravityforms') => "ZA" , - __('SPAIN', 'gravityforms') => "ES" , - __('SRI LANKA', 'gravityforms') => "LK" , - __('SUDAN', 'gravityforms') => "SD" , - __('SUDAN, SOUTH', 'gravityforms') => "SS" , - __('SURINAME', 'gravityforms') => "SR" , - __('SWAZILAND', 'gravityforms') => "SZ" , - __('SWEDEN', 'gravityforms') => "SE" , - __('SWITZERLAND', 'gravityforms') => "CH" , - __('SYRIA', 'gravityforms') => "SY" , - __('TAIWAN', 'gravityforms') => "TW" , - __('TAJIKISTAN', 'gravityforms') => "TJ" , - __('TANZANIA', 'gravityforms') => "TZ" , - __('THAILAND', 'gravityforms') => "TH" , - __('TOGO', 'gravityforms') => "TG" , - __('TONGA', 'gravityforms') => "TO" , - __('TRINIDAD AND TOBAGO', 'gravityforms') => "TT" , - __('TUNISIA', 'gravityforms') => "TN" , - __('TURKEY', 'gravityforms') => "TR" , - __('TURKMENISTAN', 'gravityforms') => "TM" , - __('TUVALU', 'gravityforms') => "TV" , - __('UGANDA', 'gravityforms') => "UG" , - __('UKRAINE', 'gravityforms') => "UA" , - __('UNITED ARAB EMIRATES', 'gravityforms') => "AE" , - __('UNITED KINGDOM', 'gravityforms') => "GB" , - __('UNITED STATES', 'gravityforms') => "US" , - __('URUGUAY', 'gravityforms') => "UY" , - __('UZBEKISTAN', 'gravityforms') => "UZ" , - __('VANUATU', 'gravityforms') => "VU" , - __('VATICAN CITY', 'gravityforms') => "" , - __('VENEZUELA', 'gravityforms') => "VE" , - __('VIRGIN ISLANDS, BRITISH', 'gravityforms') => "VG" , - __('VIRGIN ISLANDS, U.S.', 'gravityforms') => "VI" , - __('VIETNAM', 'gravityforms') => "VN" , - __('YEMEN', 'gravityforms') => "YE" , - __('ZAMBIA', 'gravityforms') => "ZM" , - __('ZIMBABWE', 'gravityforms') => "ZW" ); - - return rgar($codes, strtoupper($country_name)); - } + $choices .= sprintf( "", esc_attr( $field_value ), $selected, esc_html( $choice['text'] ) ); + } + } - public static function get_us_states(){ - return apply_filters("gform_us_states", array( - __("Alabama","gravityforms"),__("Alaska","gravityforms"),__("Arizona","gravityforms"),__("Arkansas","gravityforms"), - __("California","gravityforms"),__("Colorado","gravityforms"),__("Connecticut","gravityforms"),__("Delaware","gravityforms"), - __("District of Columbia", "gravityforms"), __("Florida","gravityforms"),_x("Georgia","US State","gravityforms"), - __("Hawaii","gravityforms"),__("Idaho","gravityforms"),__("Illinois","gravityforms"),__("Indiana","gravityforms"), - __("Iowa","gravityforms"),__("Kansas","gravityforms"),__("Kentucky","gravityforms"),__("Louisiana","gravityforms"), - __("Maine","gravityforms"),__("Maryland","gravityforms"),__("Massachusetts","gravityforms"),__("Michigan","gravityforms"), - __("Minnesota","gravityforms"),__("Mississippi","gravityforms"),__("Missouri","gravityforms"),__("Montana","gravityforms"), - __("Nebraska","gravityforms"),__("Nevada","gravityforms"),__("New Hampshire","gravityforms"),__("New Jersey","gravityforms"), - __("New Mexico","gravityforms"),__("New York","gravityforms"),__("North Carolina","gravityforms"), - __("North Dakota","gravityforms"),__("Ohio","gravityforms"),__("Oklahoma","gravityforms"),__("Oregon","gravityforms"), - __("Pennsylvania","gravityforms"),__("Rhode Island","gravityforms"),__("South Carolina","gravityforms"), - __("South Dakota","gravityforms"),__("Tennessee","gravityforms"),__("Texas","gravityforms"),__("Utah","gravityforms"), - __("Vermont","gravityforms"),__("Virginia","gravityforms"),__("Washington","gravityforms"),__("West Virginia","gravityforms"), - __("Wisconsin","gravityforms"),__("Wyoming","gravityforms"), __("Armed Forces Americas","gravityforms"), - __("Armed Forces Europe","gravityforms"),__("Armed Forces Pacific","gravityforms")) - ); - } + return $choices; + } - public static function get_us_state_code($state_name){ - $states = array( - strtoupper(__("Alabama","gravityforms")) => "AL", - strtoupper(__("Alaska","gravityforms")) => "AK", - strtoupper(__("Arizona","gravityforms")) => "AZ", - strtoupper(__("Arkansas","gravityforms")) => "AR", - strtoupper(__("California","gravityforms")) => "CA", - strtoupper(__("Colorado","gravityforms")) => "CO", - strtoupper(__("Connecticut","gravityforms")) => "CT", - strtoupper(__("Delaware","gravityforms")) => "DE", - strtoupper(__("District of Columbia", "gravityforms")) => "DC", - strtoupper(__("Florida","gravityforms")) => "FL", - strtoupper(_x("Georgia","US State","gravityforms")) => "GA", - strtoupper(__("Hawaii","gravityforms")) => "HI", - strtoupper(__("Idaho","gravityforms")) => "ID", - strtoupper(__("Illinois","gravityforms")) => "IL", - strtoupper(__("Indiana","gravityforms")) => "IN", - strtoupper(__("Iowa","gravityforms")) => "IA", - strtoupper(__("Kansas","gravityforms")) => "KS", - strtoupper(__("Kentucky","gravityforms")) => "KY", - strtoupper(__("Louisiana","gravityforms")) => "LA", - strtoupper(__("Maine","gravityforms")) => "ME", - strtoupper(__("Maryland","gravityforms")) => "MD", - strtoupper(__("Massachusetts","gravityforms")) => "MA", - strtoupper(__("Michigan","gravityforms")) => "MI", - strtoupper(__("Minnesota","gravityforms")) => "MN", - strtoupper(__("Mississippi","gravityforms")) => "MS", - strtoupper(__("Missouri","gravityforms")) => "MO", - strtoupper(__("Montana","gravityforms")) => "MT", - strtoupper(__("Nebraska","gravityforms")) => "NE", - strtoupper(__("Nevada","gravityforms")) => "NV", - strtoupper(__("New Hampshire","gravityforms")) => "NH", - strtoupper(__("New Jersey","gravityforms")) => "NJ", - strtoupper(__("New Mexico","gravityforms")) => "NM", - strtoupper(__("New York","gravityforms")) => "NY", - strtoupper(__("North Carolina","gravityforms")) => "NC", - strtoupper(__("North Dakota","gravityforms")) => "ND", - strtoupper(__("Ohio","gravityforms")) => "OH", - strtoupper(__("Oklahoma","gravityforms")) => "OK", - strtoupper(__("Oregon","gravityforms")) => "OR", - strtoupper(__("Pennsylvania","gravityforms")) => "PA", - strtoupper(__("Rhode Island","gravityforms")) => "RI", - strtoupper(__("South Carolina","gravityforms")) => "SC", - strtoupper(__("South Dakota","gravityforms")) => "SD", - strtoupper(__("Tennessee","gravityforms")) => "TN", - strtoupper(__("Texas","gravityforms")) => "TX", - strtoupper(__("Utah","gravityforms")) => "UT", - strtoupper(__("Vermont","gravityforms")) => "VT", - strtoupper(__("Virginia","gravityforms")) => "VA", - strtoupper(__("Washington","gravityforms")) => "WA", - strtoupper(__("West Virginia","gravityforms")) => "WV", - strtoupper(__("Wisconsin","gravityforms")) => "WI", - strtoupper(__("Wyoming","gravityforms")) => "WY", - strtoupper(__("Armed Forces Americas","gravityforms")) => "AA", - strtoupper(__("Armed Forces Europe","gravityforms")) => "AE", - strtoupper(__("Armed Forces Pacific","gravityforms")) => "AP" - ); - - $code = isset($states[strtoupper($state_name)]) ? $states[strtoupper($state_name)] : strtoupper($state_name); - - return $code; - } + public static function is_section_empty( $section_field, $form, $entry ) { + $cache_key = "GFCommon::is_section_empty_{$form['id']}_{$section_field['id']}"; + $value = GFCache::get( $cache_key ); - public static function get_canadian_provinces(){ - return array(__("Alberta","gravityforms"),__("British Columbia","gravityforms"),__("Manitoba","gravityforms"),__("New Brunswick","gravityforms"),__("Newfoundland & Labrador","gravityforms"),__("Northwest Territories","gravityforms"),__("Nova Scotia","gravityforms"),__("Nunavut","gravityforms"),__("Ontario","gravityforms"),__("Prince Edward Island","gravityforms"),__("Quebec","gravityforms"),__("Saskatchewan","gravityforms"),__("Yukon","gravityforms")); + if ( $value !== false ) { + return $value == true; + } - } + $fields = self::get_section_fields( $form, $section_field['id'] ); + if ( ! is_array( $fields ) ) { + GFCache::set( $cache_key, 1 ); - public static function get_state_dropdown($states, $selected_state=""){ - $str = ""; - foreach($states as $code => $state){ - if(is_numeric($code)) - $code = $state; + return true; + } - $selected = $code == $selected_state ? "selected='selected'" : ""; - $str .= ""; - } - return $str; - } + foreach ( $fields as $field ) { - public static function get_us_state_dropdown($selected_state = ""){ - $states = array_merge(array(''), self::get_us_states()); - foreach($states as $code => $state){ - if(is_numeric($code)) - $code = $state; + $value = GFFormsModel::get_lead_field_value( $entry, $field ); + $value = GFCommon::get_lead_field_display( $field, $value, rgar( $entry, 'currency' ) ); - $selected = $code == $selected_state ? "selected='selected'" : ""; - $str .= ""; - } - return $str; - } + if ( rgblank( $value ) ) { + continue; + } - public static function get_canadian_provinces_dropdown($selected_province = ""){ - $states = array_merge(array(''), self::get_canadian_provinces()); - foreach($states as $state){ - $selected = $state == $selected_province ? "selected='selected'" : ""; - $str .= ""; - } - return $str; - } + // most fields are displayed in the section by default, exceptions are handled below + $is_field_displayed_in_section = true; - public static function get_country_dropdown($selected_country = ""){ - $str = ""; - $countries = array_merge(array(''), self::get_countries()); - foreach($countries as $code => $country){ - if(is_numeric($code)) - $code = $country; + // by default, product fields are not displayed in their containing section (displayed in a product summary table) + // if the filter is used to disable this, product fields are displayed in the section like other fields + if ( self::is_product_field( $field['type'] ) ) { - $selected = $code == $selected_country ? "selected='selected'" : ""; - $str .= ""; - } - return $str; - } + $display_product_summary = apply_filters( 'gform_display_product_summary', true, $field, $form, $entry ); - public static function is_post_field($field){ - return in_array($field["type"], array("post_title", "post_tags", "post_category", "post_custom_field", "post_content", "post_excerpt", "post_image")); - } + $is_field_displayed_in_section = ! $display_product_summary; + } - public static function get_range_message($field){ - $min = $field["rangeMin"]; - $max = $field["rangeMax"]; - $message = ""; - - if(is_numeric($min) && is_numeric($max)) - $message = sprintf(__("Please enter a value between %s and %s.", "gravityforms"), "$min", "$max") ; - else if(is_numeric($min)) - $message = sprintf(__("Please enter a value greater than or equal to %s.", "gravityforms"), "$min"); - else if(is_numeric($max)) - $message = sprintf(__("Please enter a value less than or equal to %s.", "gravityforms"), "$max"); - else if($field["failed_validation"]) - $message = __("Please enter a valid number", "gravityforms"); - - return $message; - } + if ( $is_field_displayed_in_section ) { + GFCache::set( $cache_key, 0 ); - public static function get_fields_by_type($form, $types){ - $fields = array(); - if(!is_array(rgar($form,"fields"))) - return $fields; + return false; + } + } - foreach($form["fields"] as $field){ - if(in_array(rgar($field,"type"), $types)) - $fields[] = $field; - } - return $fields; - } + GFCache::set( $cache_key, 1 ); - public static function has_pages($form){ - return sizeof(self::get_fields_by_type($form, array("page"))) > 0; - } + return true; + } - public static function get_product_fields_by_type($form, $types, $product_id){ - global $_product_fields; - $key = json_encode($types) . "_" . $product_id . "_" . $form["id"]; - if(!isset($_product_fields[$key])){ - $fields = array(); - for($i=0, $count=sizeof($form["fields"]); $i<$count; $i++){ - $field = $form["fields"][$i]; - if(in_array($field["type"], $types) && $field["productField"] == $product_id){ - $fields[] = $field; - } - } - $_product_fields[$key] = $fields; - } - return $_product_fields[$key]; - } + public static function get_section_fields( $form, $section_field_id ) { + $fields = array(); + $in_section = false; + foreach ( $form['fields'] as $field ) { + if ( in_array( $field->type, array( 'section', 'page' ) ) && $in_section ) { + return $fields; + } - private static function get_month_dropdown($name="", $id="", $selected_value="", $tabindex="", $disabled_text=""){ - return self::get_number_dropdown($name, $id, $selected_value, $tabindex, $disabled_text, __("Month", "gravityforms"), 1, 12); - } + if ( $field->id == $section_field_id ) { + $in_section = true; + } - private static function get_day_dropdown($name="", $id="", $selected_value="", $tabindex="", $disabled_text=""){ - return self::get_number_dropdown($name, $id, $selected_value, $tabindex, $disabled_text, __("Day", "gravityforms"), 1, 31); - } + if ( $in_section ) { + $fields[] = $field; + } + } - private static function get_year_dropdown($name="", $id="", $selected_value="", $tabindex="", $disabled_text=""){ - $year_min = apply_filters("gform_date_min_year", "1920"); - $year_max = apply_filters("gform_date_max_year", date("Y") + 1); - return self::get_number_dropdown($name, $id, $selected_value, $tabindex, $disabled_text, __("Year", "gravityforms"), $year_max, $year_min); - } + return $fields; + } - private static function get_number_dropdown($name, $id, $selected_value, $tabindex, $disabled_text, $placeholder, $start_number, $end_number){ - $str = ""; - return $str; - } + public static function get_country_code( $country_name ) { + if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { + _deprecated_function( 'GFCommon::get_country_code', '1.9', 'GF_Field_Address::get_country_code' ); + } - private static function get_logic_event($field, $event){ - if(empty($field["conditionalLogicFields"]) || IS_ADMIN) - return ""; + return GF_Fields::get( 'address' )->get_country_code( $country_name ); + } - switch($event){ - case "keyup" : - return "onchange='gf_apply_rules(" . $field["formId"] . "," . GFCommon::json_encode($field["conditionalLogicFields"]) . ");' onkeyup='clearTimeout(__gf_timeout_handle); __gf_timeout_handle = setTimeout(\"gf_apply_rules(" . $field["formId"] . "," . GFCommon::json_encode($field["conditionalLogicFields"]) . ")\", 300);'"; - break; + public static function get_us_states() { + if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { + _deprecated_function( 'GFCommon::get_us_states', '1.9', 'GF_Field_Address::get_us_states' ); + } - case "click" : - return "onclick='gf_apply_rules(" . $field["formId"] . "," . GFCommon::json_encode($field["conditionalLogicFields"]) . ");'"; - break; + return GF_Fields::get( 'address' )->get_us_states(); + } - case "change" : - return "onchange='gf_apply_rules(" . $field["formId"] . "," . GFCommon::json_encode($field["conditionalLogicFields"]) . ");'"; - break; - } - } + public static function get_canadian_provinces() { + if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { + _deprecated_function( 'GFCommon::get_canadian_provinces', '1.9', 'GF_Field_Address::get_canadian_provinces' ); + } - public static function has_field_calculation($field) { + return GF_Fields::get( 'address' )->get_canadian_provinces(); + } - if($field['type'] == 'number') { - return rgar($field, 'enableCalculation') && rgar($field, 'calculationFormula'); - } - return RGFormsModel::get_input_type($field) == 'calculation'; - } + public static function is_post_field( $field ) { + return in_array( $field->type, array( 'post_title', 'post_tags', 'post_category', 'post_custom_field', 'post_content', 'post_excerpt', 'post_image' ) ); + } - public static function get_field_input($field, $value="", $lead_id=0, $form_id=0){ - - $id = $field["id"]; - $field_id = IS_ADMIN || $form_id == 0 ? "input_$id" : "input_" . $form_id . "_$id"; - $form_id = IS_ADMIN && empty($form_id) ? rgget("id") : $form_id; - - $size = rgar($field, "size"); - $disabled_text = (IS_ADMIN && RG_CURRENT_VIEW != "entry") ? "disabled='disabled'" : ""; - $class_suffix = RG_CURRENT_VIEW == "entry" ? "_admin" : ""; - $class = $size . $class_suffix; - - $currency = ""; - if(RG_CURRENT_VIEW == "entry"){ - $lead = RGFormsModel::get_lead($lead_id); - $post_id = $lead["post_id"]; - $post_link = ""; - if(is_numeric($post_id) && self::is_post_field($field)){ - $post_link = "You can edit this post from the post page."; - } - $currency = $lead["currency"]; - } + public static function get_fields_by_type( $form, $types ) { + $fields = array(); + if ( ! is_array( rgar( $form, 'fields' ) ) ) { + return $fields; + } - $field_input = apply_filters("gform_field_input", "", $field, $value, $lead_id, $form_id); - if($field_input) - return $field_input; + foreach ( $form['fields'] as $field ) { + if ( in_array( $field->type, $types ) ) { + $fields[] = $field; + } + } - //product fields are not editable - if(RG_CURRENT_VIEW == "entry" && self::is_product_field($field["type"])) - return "
    " . __("Product fields are not editable", "gravityforms") . "
    "; + return $fields; + } - else if(RG_CURRENT_VIEW == "entry" && $field["type"] == "donation") - return "
    " . __("Donations are not editable", "gravityforms") . "
    "; + public static function has_pages( $form ) { + return sizeof( self::get_fields_by_type( $form, array( 'page' ) ) ) > 0; + } - // add categories as choices for Post Category field - if($field['type'] == 'post_category'){ - $field = self::add_categories_as_choices($field, $value); + public static function get_product_fields_by_type( $form, $types, $product_id ) { + global $_product_fields; + $key = json_encode( $types ) . '_' . $product_id . '_' . $form['id']; + if ( ! isset( $_product_fields[ $key ] ) ) { + $fields = array(); + for ( $i = 0, $count = sizeof( $form['fields'] ); $i < $count; $i ++ ) { + $field = $form['fields'][ $i ]; + if ( in_array( $field->type, $types ) && $field->productField == $product_id ) { + $fields[] = $field; + } + } + $_product_fields[ $key ] = $fields; } - $max_length = ""; - $html5_attributes = ""; + return $_product_fields[ $key ]; + } - switch(RGFormsModel::get_input_type($field)){ + private static function get_logic_event( $field, $event ) { + _deprecated_function( 'GFCommon::get_logic_event', '1.9', 'GF_Field::get_logic_event' ); - case "total" : - if(RG_CURRENT_VIEW == "entry") - return "
    "; - else - return "
    " . self::to_money("0") . "
    "; - break; + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; - case "calculation" : - case "singleproduct" : + if ( empty( $field->conditionalLogicFields ) || $is_admin ) { + return ''; + } - $product_name = !is_array($value) || empty($value[$field["id"] . ".1"]) ? esc_attr($field["label"]) : esc_attr($value[$field["id"] . ".1"]); - $price = !is_array($value) || empty($value[$field["id"] . ".2"]) ? rgget("basePrice", $field) : esc_attr($value[$field["id"] . ".2"]); - $quantity = is_array($value) ? esc_attr($value[$field["id"] . ".3"]) : ""; + switch ( $event ) { + case 'keyup' : + return "onchange='gf_apply_rules(" . $field->formId . ',' . GFCommon::json_encode( $field->conditionalLogicFields ) . ");' onkeyup='clearTimeout(__gf_timeout_handle); __gf_timeout_handle = setTimeout(\"gf_apply_rules(" . $field->formId . ',' . GFCommon::json_encode( $field->conditionalLogicFields ) . ")\", 300);'"; + break; - if(empty($price)) - $price = 0; + case 'click' : + return "onclick='gf_apply_rules(" . $field->formId . ',' . GFCommon::json_encode( $field->conditionalLogicFields ) . ");'"; + break; - $form = RGFormsModel::get_form_meta($form_id); - $has_quantity = sizeof(GFCommon::get_product_fields_by_type($form, array("quantity"), $field["id"])) > 0; - if($has_quantity) - $field["disableQuantity"] = true; + case 'change' : + return "onchange='gf_apply_rules(" . $field->formId . ',' . GFCommon::json_encode( $field->conditionalLogicFields ) . ");'"; + break; + } + } - $quantity_field = ""; + /** + * @deprecated + * + * @param GF_Field $field + * + * @return mixed + */ + public static function has_field_calculation( $field ) { + _deprecated_function( 'has_field_calculation', '1.7', 'GF_Field::has_calculation' ); + + return $field->has_calculation(); + } - $qty_input_type = GFFormsModel::is_html5_enabled() ? "number" : "text"; + /** + * @param GF_Field $field + * @param string $value + * @param int $lead_id + * @param int $form_id + * @param null $form + * + * @return mixed|string|void + */ + public static function get_field_input( $field, $value = '', $lead_id = 0, $form_id = 0, $form = null ) { + + if ( ! $field instanceof GF_Field ) { + $field = GF_Fields::create( $field ); + } - if(IS_ADMIN){ - $style = rgget("disableQuantity", $field) ? "style='display:none;'" : ""; - $quantity_field = " " . apply_filters("gform_product_quantity_{$form_id}",apply_filters("gform_product_quantity",__("Quantity:", "gravityforms"), $form_id), $form_id) . " "; - } - else if(!rgget("disableQuantity", $field)){ - $tabindex = self::get_tabindex(); - $quantity_field .= " " . apply_filters("gform_product_quantity_{$form_id}",apply_filters("gform_product_quantity",__("Quantity:", "gravityforms"), $form_id), $form_id) . " "; - } - else{ - if(!is_numeric($quantity)) - $quantity = 1; + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; - if(!$has_quantity){ - $quantity_field .= ""; - } - } + $id = intval( $field->id ); + $field_id = $is_admin || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; + $form_id = $is_admin && empty( $form_id ) ? rgget( 'id' ) : $form_id; - return "
    " . apply_filters("gform_product_price_{$form_id}", apply_filters("gform_product_price",__("Price", "gravityforms"), $form_id), $form_id) . ": " . esc_html(GFCommon::to_money($price, $currency)) ."{$quantity_field}
    "; + if ( RG_CURRENT_VIEW == 'entry' ) { + $lead = RGFormsModel::get_lead( $lead_id ); + $post_id = $lead['post_id']; + $post_link = ''; + if ( is_numeric( $post_id ) && self::is_post_field( $field ) ) { + $post_link = "
    You can edit this post from the post page.
    "; + } + } - break; + $field_input = apply_filters( 'gform_field_input', '', $field, $value, $lead_id, $form_id ); + if ( $field_input ) { + return $field_input; + } - case "hiddenproduct" : + //product fields are not editable + if ( RG_CURRENT_VIEW == 'entry' && self::is_product_field( $field->type ) ) { + return "
    " . __( 'Product fields are not editable' , 'gravityforms' ) . '
    '; + } else if ( RG_CURRENT_VIEW == 'entry' && $field->type == 'donation' ) { + return "
    " . __( 'Donations are not editable' , 'gravityforms' ) . '
    '; + } - $form = RGFormsModel::get_form_meta($form_id); - $has_quantity_field = sizeof(GFCommon::get_product_fields_by_type($form, array("quantity"), $field["id"])) > 0; + // add categories as choices for Post Category field + if ( $field->type == 'post_category' ) { + $field = self::add_categories_as_choices( $field, $value ); + } - $product_name = !is_array($value) || empty($value[$field["id"] . ".1"]) ? esc_attr($field["label"]) : esc_attr($value[$field["id"] . ".1"]); - $quantity = is_array($value) ? esc_attr($value[$field["id"] . ".3"]) : "1"; - $price = !is_array($value) || empty($value[$field["id"] . ".2"]) ? rgget("basePrice", $field) : esc_attr($value[$field["id"] . ".2"]); - if(empty($price)) - $price = 0; + $type = RGFormsModel::get_input_type( $field ); + switch ( $type ) { - $quantity_field = $has_quantity_field ? "" : ""; - $product_name_field = ""; + case 'honeypot': + $autocomplete = RGFormsModel::is_html5_enabled() ? "autocomplete='off'" : ''; - $field_type = IS_ADMIN ? "text" : "hidden"; + return "
    "; + break; - return $quantity_field . $product_name_field . sprintf("", $id, esc_attr($price), $disabled_text); + case 'adminonly_hidden' : + if ( ! is_array( $field->inputs ) ) { + if ( is_array( $value ) ) { + $value = json_encode( $value ); + } - break; + return sprintf( "", $id, $field_id, esc_attr( $value ) ); + } - case "singleshipping" : - $price = !empty($value) ? $value : rgget("basePrice", $field); - if(empty($price)) - $price = 0; + $fields = ''; + foreach ( $field->inputs as $input ) { + $fields .= sprintf( "", $input['id'], esc_attr( rgar( $value, strval( $input['id'] ) ) ) ); + } - return "
    " . GFCommon::to_money($price, $currency) ."
    "; + return $fields; + break; - break; + default : - case "website": - $is_html5 = RGFormsModel::is_html5_enabled(); - $value = empty($value) && !$is_html5 ? "http://" : $value; - $html_input_type = $is_html5 ? "url" : "text"; - $html5_attributes = $is_html5 ? "placeholder='http://'" : ""; - case "text": - if(empty($html_input_type)) - $html_input_type = "text"; + if ( ! empty( $post_link ) ) { + return $post_link; + } - if(rgget("enablePasswordInput", $field) && RG_CURRENT_VIEW != "entry") - $html_input_type = "password"; + if ( ! isset( $lead ) ) { + $lead = null; + } - if(is_numeric(rgget("maxLength", $field))) - $max_length = "maxlength='{$field["maxLength"]}'"; + return $field->get_field_input( $form, $value, $lead ); - if(!empty($post_link)) - return $post_link; + break; - $logic_event = self::get_logic_event($field, "keyup"); + } + } - $tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, $html_input_type, esc_attr($value), esc_attr($class), $disabled_text); - break; + public static function is_ssl() { + global $wordpress_https; + $is_ssl = false; - case "email": + $has_https_plugin = class_exists( 'WordPressHTTPS' ) && isset( $wordpress_https ); + $has_is_ssl_method = $has_https_plugin && method_exists( 'WordPressHTTPS', 'is_ssl' ); + $has_isSsl_method = $has_https_plugin && method_exists( 'WordPressHTTPS', 'isSsl' ); - if(!empty($post_link)) - return $post_link; + //Use the WordPress HTTPs plugin if installed + if ( $has_https_plugin && $has_is_ssl_method ) { + $is_ssl = $wordpress_https->is_ssl(); + } else if ( $has_https_plugin && $has_isSsl_method ) { + $is_ssl = $wordpress_https->isSsl(); + } else { + $is_ssl = is_ssl(); + } - $html_input_type = RGFormsModel::is_html5_enabled() ? "email" : "text"; - if(IS_ADMIN && RG_CURRENT_VIEW != "entry"){ - $single_style = rgget("emailConfirmEnabled", $field) ? "style='display:none;'" : ""; - $confirm_style = rgget("emailConfirmEnabled", $field) ? "" : "style='display:none;'"; - return "
    "; - } - else{ - $logic_event = self::get_logic_event($field, "keyup"); + if ( ! $is_ssl && isset( $_SERVER['HTTP_CF_VISITOR'] ) && strpos( $_SERVER['HTTP_CF_VISITOR'], 'https' ) ) { + $is_ssl = true; + } - if(rgget("emailConfirmEnabled", $field) && RG_CURRENT_VIEW != "entry"){ - $first_tabindex = self::get_tabindex(); - $last_tabindex = self::get_tabindex(); - return "
    "; - } - else{ - $tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, $html_input_type, esc_attr($value), esc_attr($class), $disabled_text); - } - } + return apply_filters( 'gform_is_ssl', $is_ssl ); + } - break; - case "honeypot": - $autocomplete = RGFormsModel::is_html5_enabled() ? "autocomplete='off'" : ""; - return "
    "; - break; + public static function is_preview() { + $url_info = parse_url( RGFormsModel::get_current_page_url() ); + $file_name = basename( $url_info['path'] ); - case "hidden" : - if(!empty($post_link)) - return $post_link; + return $file_name == 'preview.php' || rgget( 'gf_page', $_GET ) == 'preview'; + } - $field_type = IS_ADMIN ? "text" : "hidden"; - $class_attribute = IS_ADMIN ? "" : "class='gform_hidden'"; + public static function clean_extensions( $extensions ) { + $count = sizeof( $extensions ); + for ( $i = 0; $i < $count; $i ++ ) { + $extensions[ $i ] = str_replace( '.', '', str_replace( ' ', '', $extensions[ $i ] ) ); + } - return sprintf("", $id, $field_id, esc_attr($value), $disabled_text); - break; + return $extensions; + } - case "html" : - $content = IS_ADMIN ? "
    " . __("HTML Content", "gravityforms") . "" . __("This is a content placeholder. HTML content is not displayed in the form admin. Preview this form to view the content.", "gravityforms") . "
    " : $field["content"]; - $content = GFCommon::replace_variables_prepopulate($content); //adding support for merge tags - $content = do_shortcode($content); //adding support for shortcodes - return $content; - break; + public static function get_disallowed_file_extensions() { + return array( 'php', 'asp', 'exe', 'com', 'htaccess', 'phtml', 'php3', 'php4', 'php5', 'php6' ); + } - case "adminonly_hidden" : - if(!is_array($field["inputs"])){ - if(is_array($value)) - $value = json_encode($value); - return sprintf("", $id, $field_id, esc_attr($value)); - } + public static function match_file_extension( $file_name, $extensions ) { + if ( empty ( $extensions ) || ! is_array( $extensions ) ) { + return false; + } + $ext = strtolower( pathinfo( $file_name, PATHINFO_EXTENSION ) ); + if ( in_array( $ext, $extensions ) ) { + return true; + } - $fields = ""; - foreach($field["inputs"] as $input){ - $fields .= sprintf("", $input["id"], esc_attr(rgar($value, strval($input["id"])))); - } - return $fields; - break; + return false; + } - case "number" : - if(!empty($post_link)) - return $post_link; + public static function file_name_has_disallowed_extension( $file_name ) { - $instruction = ""; - $read_only = ""; + return self::match_file_extension( $file_name, self::get_disallowed_file_extensions() ) || strpos( strtolower( $file_name ), '.php.' ) !== false; + } - if(!IS_ADMIN){ + public static function to_money( $number, $currency_code = '' ) { + if ( ! class_exists( 'RGCurrency' ) ) { + require_once( 'currency.php' ); + } - if(GFCommon::has_field_calculation($field)) { + if ( empty( $currency_code ) ) { + $currency_code = self::get_currency(); + } - // calculation-enabled fields should be read only - $read_only = 'readonly="readonly"'; + $currency = new RGCurrency( $currency_code ); - } else { + return $currency->to_money( $number ); + } - $message = self::get_range_message($field); - $validation_class = $field["failed_validation"] ? "validation_message" : ""; + public static function to_number( $text, $currency_code = '' ) { + if ( ! class_exists( 'RGCurrency' ) ) { + require_once( 'currency.php' ); + } - if(!$field["failed_validation"] && !empty($message) && empty($field["errorMessage"])) - $instruction = "
    " . $message . "
    "; + if ( empty( $currency_code ) ) { + $currency_code = self::get_currency(); + } - } + $currency = new RGCurrency( $currency_code ); - } - else if( RG_CURRENT_VIEW == "entry" ){ - $value = GFCommon::format_number($value, rgar($field, "numberFormat")); - } + return $currency->to_number( $text ); + } - $is_html5 = RGFormsModel::is_html5_enabled(); - $html_input_type = $is_html5 && !GFCommon::has_field_calculation($field) && ($field["numberFormat"] != "currency" && $field["numberFormat"] != "decimal_comma" ) ? "number" : "text"; // chrome does not allow number fields to have commas, calculations and currency values display numbers with commas - $step_attr = $is_html5 ? "step='any'" : ""; + public static function get_currency() { + $currency = get_option( 'rg_gforms_currency' ); + $currency = empty( $currency ) ? 'USD' : $currency; - $logic_event = self::get_logic_event($field, "keyup"); + return apply_filters( 'gform_currency', $currency ); + } - $value = GFCommon::format_number($value, $field["numberFormat"]); - - $tabindex = self::get_tabindex(); - return sprintf("
    %s
    ", $id, $field_id, esc_attr($value), esc_attr($class), $disabled_text, $instruction); - - case "donation" : - $tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, esc_attr($value), esc_attr($class), $disabled_text); - - case "price" : - $logic_event = self::get_logic_event($field, "keyup"); - - $tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, esc_attr($value), esc_attr($class), $disabled_text); - - case "phone" : - if(!empty($post_link)) - return $post_link; - - $instruction = $field["phoneFormat"] == "standard" ? __("Phone format:", "gravityforms") . " (###)###-####" : ""; - $instruction_div = rgget("failed_validation", $field) && !empty($instruction) ? "
    $instruction
    " : ""; - $html_input_type = RGFormsModel::is_html5_enabled() ? "tel" : "text"; - $logic_event = self::get_logic_event($field, "keyup"); + public static function get_simple_captcha() { + _deprecated_function( 'GFCommon::get_simple_captcha', '1.9', 'GFField_CAPTCHA::get_simple_captcha' ); + $captcha = new ReallySimpleCaptcha(); + $captcha->tmp_dir = RGFormsModel::get_upload_path( 'captcha' ) . '/'; - $tabindex = self::get_tabindex(); - return sprintf("
    {$instruction_div}
    ", $id, $field_id, esc_attr($value), esc_attr($class), $disabled_text); + return $captcha; + } - case "textarea": - $max_chars = ""; - $logic_event = self::get_logic_event($field, "keyup"); + /** + * @deprecated + * + * @param GF_Field_CAPTCH $field + * + * @return mixed + */ + public static function get_captcha( $field ) { + _deprecated_function( 'GFCommon::get_captcha', '1.9', 'GFField_CAPTCHA::get_captcha' ); + + return $field->get_captcha(); + } - $tabindex = self::get_tabindex(); - return sprintf("
    {$max_chars}", $id, $field_id, esc_attr($class), $disabled_text, esc_html($value)); + /** + * @deprecated + * + * @param $field + * @param $pos + * + * @return mixed + */ + public static function get_math_captcha( $field, $pos ) { + _deprecated_function( 'GFCommon::get_math_captcha', '1.9', 'GFField_CAPTCHA::get_math_captcha' ); + + return $field->get_math_captcha( $pos ); + } - case "post_title": - case "post_tags": - case "post_custom_field": - $tabindex = self::get_tabindex(); - $logic_event = self::get_logic_event($field, "keyup"); + private static function hex2rgb( $color ) { + if ( $color[0] == '#' ) { + $color = substr( $color, 1 ); + } - return !empty($post_link) ? $post_link : sprintf("
    ", $id, $field_id, esc_attr($value), esc_attr($class), $disabled_text); - break; + if ( strlen( $color ) == 6 ) { + list( $r, $g, $b ) = array( + $color[0] . $color[1], + $color[2] . $color[3], + $color[4] . $color[5], + ); + } elseif ( strlen( $color ) == 3 ) { + list( $r, $g, $b ) = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] ); + } else { + return false; + } - case "post_content": - case "post_excerpt": - $max_chars = ""; - $logic_event = self::get_logic_event($field, "keyup"); + $r = hexdec( $r ); + $g = hexdec( $g ); + $b = hexdec( $b ); - $tabindex = self::get_tabindex(); - return !empty($post_link) ? $post_link : sprintf("
    {$max_chars}", $id, $field_id, esc_attr($class), $disabled_text, esc_html($value)); - break; + return array( $r, $g, $b ); + } - case "post_category" : - if(!empty($post_link)) - return $post_link; + /** + * @param GF_Field $field + * @param $value + * @param string $currency + * @param bool $use_text + * @param string $format + * @param string $media + * + * @return array|mixed|string + */ + public static function get_lead_field_display( $field, $value, $currency = '', $use_text = false, $format = 'html', $media = 'screen' ) { + + if ( ! $field instanceof GF_Field ) { + $field = GF_Fields::create( $field ); + } - if(rgget("displayAllCategories", $field) && !IS_ADMIN){ - $default_category = rgget("categoryInitialItemEnabled", $field) ? "-1" : get_option('default_category'); - $selected = empty($value) ? $default_category : $value; - $args = array('echo' => 0, 'selected' => $selected, "class" => esc_attr($class) . " gfield_select", 'hide_empty' => 0, 'name' => "input_$id", 'orderby' => 'name', 'hierarchical' => true ); - if(self::$tab_index > 0) - $args["tab_index"] = self::$tab_index++; + if ( $field->type == 'post_category' ) { + $value = self::prepare_post_category_value( $value, $field ); + } - if(rgget("categoryInitialItemEnabled", $field)){ - $args["show_option_none"] = empty($field["categoryInitialItem"]) ? " " : $field["categoryInitialItem"]; - } + return $field->get_value_entry_detail( $value, $currency, $use_text, $format, $media ); + } - $args = apply_filters("gform_post_category_args_{$field["id"]}", apply_filters("gform_post_category_args", $args, $field), $field); + public static function get_product_fields( $form, $lead, $use_choice_text = false, $use_admin_label = false ) { + $products = array(); - return "
    " . wp_dropdown_categories($args) . "
    "; - } - else{ - $tabindex = self::get_tabindex(); - if(is_array(rgar($field, "choices"))) - usort($field["choices"], create_function('$a,$b', 'return strcmp($a["text"], $b["text"]);')); + $product_info = null; + // retrieve static copy of product info (only for 'real' entries) + if ( ! rgempty( 'id', $lead ) ) { + $product_info = gform_get_meta( rgar( $lead, 'id' ), "gform_product_info_{$use_choice_text}_{$use_admin_label}" ); + } - $choices = self::get_select_choices($field, $value); + // if no static copy, generate from form/lead info + if ( ! $product_info ) { - //Adding first option - if(rgget("categoryInitialItemEnabled", $field)){ - $selected = empty($value) ? "selected='selected'" : ""; - $choices = "" . $choices; - } + foreach ( $form['fields'] as $field ) { + $id = $field->id; + $lead_value = RGFormsModel::get_lead_field_value( $lead, $field ); - return sprintf("
    ", $id, $field_id, esc_attr($class), $disabled_text, $choices); - } - break; + $quantity_field = self::get_product_fields_by_type( $form, array( 'quantity' ), $id ); + $quantity = sizeof( $quantity_field ) > 0 && ! RGFormsModel::is_field_hidden( $form, $quantity_field[0], array(), $lead ) ? RGFormsModel::get_lead_field_value( $lead, $quantity_field[0] ) : 1; - case "post_image" : - if(!empty($post_link)) - return $post_link; + switch ( $field->type ) { - $title = esc_attr(rgget($field["id"] . ".1", $value)); - $caption = esc_attr(rgget($field["id"] . ".4", $value)); - $description = esc_attr(rgget($field["id"] . ".7", $value)); + case 'product' : - //hidding meta fields for admin - $hidden_style = "style='display:none;'"; - $title_style = !rgget("displayTitle", $field) && IS_ADMIN ? $hidden_style : ""; - $caption_style = !rgget("displayCaption", $field) && IS_ADMIN ? $hidden_style : ""; - $description_style = !rgget("displayDescription", $field) && IS_ADMIN ? $hidden_style : ""; - $file_label_style = IS_ADMIN && !(rgget("displayTitle", $field) || rgget("displayCaption", $field) || rgget("displayDescription", $field)) ? $hidden_style : ""; - - $hidden_class = $preview = ""; - $file_info = RGFormsModel::get_temp_filename($form_id, "input_{$id}"); - if($file_info){ - $hidden_class = " gform_hidden"; - $file_label_style = $hidden_style; - $preview = "" . esc_html($file_info["uploaded_filename"]) . " | " . __("delete", "gravityforms") . ""; - } - - //in admin, render all meta fields to allow for immediate feedback, but hide the ones not selected - $file_label = (IS_ADMIN || rgget("displayTitle", $field) || rgget("displayCaption", $field) || rgget("displayDescription", $field)) ? "" : ""; - - $tabindex = self::get_tabindex(); - $upload = sprintf("{$preview}$file_label", $id, $field_id, esc_attr($value), esc_attr($class . $hidden_class), $disabled_text); - - $tabindex = self::get_tabindex(); - $title_field = rgget("displayTitle", $field) || IS_ADMIN ? sprintf("", $id, $field_id, $title, $disabled_text, $field_id) : ""; - - $tabindex = self::get_tabindex(); - $caption_field = rgget("displayCaption", $field) || IS_ADMIN ? sprintf("", $id, $field_id, $caption, $disabled_text, $field_id) : ""; - - $tabindex = self::get_tabindex(); - $description_field = rgget("displayDescription", $field) || IS_ADMIN? sprintf("", $id, $field_id, $description, $disabled_text, $field_id) : ""; - - return "
    " . $upload . $title_field . $caption_field . $description_field . "
    "; - - break; - - case "multiselect" : - if(!empty($post_link)) - return $post_link; - - $placeholder = rgar($field, "enableEnhancedUI") ? "data-placeholder='" . esc_attr(apply_filters("gform_multiselect_placeholder_{$form_id}", apply_filters("gform_multiselect_placeholder", __("Click to select...", "gravityforms"), $form_id), $form_id)) . "'" : ""; - $logic_event = self::get_logic_event($field, "keyup"); - $css_class = trim(esc_attr($class) . " gfield_select"); - $size = rgar($field, "multiSelectSize"); - if(empty($size)) - $size = 7; - - $tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, $css_class, $disabled_text, self::get_select_choices($field, $value)); - - break; - - case "select" : - if(!empty($post_link)) - return $post_link; - - $logic_event = self::get_logic_event($field, "change"); - $css_class = trim(esc_attr($class) . " gfield_select"); - $tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, $css_class, $disabled_text, self::get_select_choices($field, $value)); - - case "checkbox" : - if(!empty($post_link)) - return $post_link; - - return sprintf("
    ", $field_id, self::get_checkbox_choices($field, $value, $disabled_text)); - - case "radio" : - if(!empty($post_link)) - return $post_link; - - return sprintf("
    ", $field_id, self::get_radio_choices($field, $value, $disabled_text)); - - case "password" : - - $first_tabindex = self::get_tabindex(); - $last_tabindex = self::get_tabindex(); - - $strength_style = !rgar($field,"passwordStrengthEnabled") ? "style='display:none;'" : ""; - $strength = rgar($field,"passwordStrengthEnabled") || IS_ADMIN ? "
    " . __("Strength indicator", "gravityforms") . "
    " : ""; - - $action = !IS_ADMIN ? "gformShowPasswordStrength(\"$field_id\");" : ""; - $onchange= rgar($field,"passwordStrengthEnabled") ? "onchange='{$action}'" : ""; - $onkeyup = rgar($field,"passwordStrengthEnabled") ? "onkeyup='{$action}'" : ""; - - $pass = is_array( $value ) ? rgar( $value, $id ) : $value; - $confirm_pass = RGForms::post("input_" . $id ."_2"); - return sprintf("
    {$strength}", $id, $field_id, esc_attr($pass), $disabled_text, $field_id, $id, $field_id, esc_attr($confirm_pass), $disabled_text, $field_id); - - case "name" : - $prefix = ""; - $first = ""; - $last = ""; - $suffix = ""; - if(is_array($value)){ - $prefix = esc_attr(RGForms::get($field["id"] . ".2", $value)); - $first = esc_attr(RGForms::get($field["id"] . ".3", $value)); - $last = esc_attr(RGForms::get($field["id"] . ".6", $value)); - $suffix = esc_attr(RGForms::get($field["id"] . ".8", $value)); - } - switch(rgget("nameFormat", $field)){ - - case "extended" : - $prefix_tabindex = self::get_tabindex(); - $first_tabindex = self::get_tabindex(); - $last_tabindex = self::get_tabindex(); - $suffix_tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, $prefix, $disabled_text, $field_id, $id, $field_id, $first, $disabled_text, $field_id, $id, $field_id, $last, $disabled_text, $field_id, $id, $field_id, $suffix, $disabled_text, $field_id); - - case "simple" : - $tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, esc_attr($value), esc_attr($class), $disabled_text); - - default : - $first_tabindex = self::get_tabindex(); - $last_tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, $first, $disabled_text, $field_id, $id, $field_id, $last, $disabled_text, $field_id); - } - - case "address" : - $street_value =""; - $street2_value =""; - $city_value =""; - $state_value =""; - $zip_value =""; - $country_value =""; - - if(is_array($value)){ - $street_value = esc_attr(rgget($field["id"] . ".1",$value)); - $street2_value = esc_attr(rgget($field["id"] . ".2",$value)); - $city_value = esc_attr(rgget($field["id"] . ".3",$value)); - $state_value = esc_attr(rgget($field["id"] . ".4",$value)); - $zip_value = esc_attr(rgget($field["id"] . ".5",$value)); - $country_value = esc_attr(rgget($field["id"] . ".6",$value)); - } - - $address_types = self::get_address_types($form_id); - $addr_type = empty($field["addressType"]) ? "international" : $field["addressType"]; - $address_type = $address_types[$addr_type]; - - $state_label = empty($address_type["state_label"]) ? __("State", "gravityforms") : $address_type["state_label"]; - $zip_label = empty($address_type["zip_label"]) ? __("Zip Code", "gravityforms") : $address_type["zip_label"]; - $hide_country = !empty($address_type["country"]) || rgget("hideCountry", $field); - - if(empty($country_value)) - $country_value = rgget("defaultCountry", $field); - - if(empty($state_value)) - $state_value = rgget("defaultState", $field); - - $country_list = self::get_country_dropdown($country_value); - - //changing css classes based on field format to ensure proper display - $address_display_format = apply_filters("gform_address_display_format", "default"); - $city_location = $address_display_format == "zip_before_city" ? "right" : "left"; - $zip_location = $address_display_format != "zip_before_city" && rgar($field,"hideState") ? "right" : "left"; - $state_location = $address_display_format == "zip_before_city" ? "left" : "right"; - $country_location = rgar($field,"hideState") ? "left" : "right"; - - //address field - $tabindex = self::get_tabindex(); - $street_address = sprintf("", $id, $field_id, $street_value, $disabled_text, $field_id); - - //address line 2 field - $street_address2 = ""; - $style = (IS_ADMIN && rgget("hideAddress2", $field)) ? "style='display:none;'" : ""; - if(IS_ADMIN || !rgget("hideAddress2", $field)){ - $tabindex = self::get_tabindex(); - $street_address2 = sprintf("", $id, $field_id, $street2_value, $disabled_text, $field_id); - } - - if($address_display_format == "zip_before_city"){ - //zip field - $tabindex = self::get_tabindex(); - $zip = sprintf("", $id, $field_id, $zip_value, $disabled_text, $field_id); - - //city field - $tabindex = self::get_tabindex(); - $city = sprintf("", $id, $field_id, $city_value, $disabled_text, $field_id); - - //state field - $style = (IS_ADMIN && rgget("hideState", $field)) ? "style='display:none;'" : ""; - if(IS_ADMIN || !rgget("hideState", $field)){ - $state_field = self::get_state_field($field, $id, $field_id, $state_value, $disabled_text, $form_id); - $state = sprintf("$state_field", $field_id); - } - else{ - $state = sprintf("", $id, $field_id, $state_value); - } - } - else{ - - //city field - $tabindex = self::get_tabindex(); - $city = sprintf("", $id, $field_id, $city_value, $disabled_text, $field_id); - - //state field - $style = (IS_ADMIN && rgget("hideState", $field)) ? "style='display:none;'" : ""; - if(IS_ADMIN || !rgget("hideState", $field)){ - $state_field = self::get_state_field($field, $id, $field_id, $state_value, $disabled_text, $form_id); - $state = sprintf("$state_field", $field_id); - } - else{ - $state = sprintf("", $id, $field_id, $state_value); - } - - //zip field - $tabindex = self::get_tabindex(); - $zip = sprintf("", $id, $field_id, $zip_value, $disabled_text, $field_id); - - } - - if(IS_ADMIN || !$hide_country){ - $style = $hide_country ? "style='display:none;'" : ""; - $tabindex = self::get_tabindex(); - $country = sprintf("", $id, $field_id, $disabled_text, $country_list, $field_id); - } - else{ - $country = sprintf("", $id, $field_id, $country_value); - } - - $inputs = $address_display_format == "zip_before_city" ? $street_address . $street_address2 . $zip . $city . $state . $country : $street_address . $street_address2 . $city . $state . $zip . $country; - - return "
    " . $inputs . "
    "; - - case "date" : - if(!empty($post_link)) - return $post_link; - - $format = empty($field["dateFormat"]) ? "mdy" : esc_attr($field["dateFormat"]); - $field_position = substr($format, 0, 3); - if(IS_ADMIN && RG_CURRENT_VIEW != "entry"){ - $datepicker_display = in_array(rgget("dateType", $field), array("datefield", "datedropdown")) ? "none" : "inline"; - $datefield_display = rgget("dateType", $field) == "datefield" ? "inline" : "none"; - $dropdown_display = rgget("dateType", $field) == "datedropdown" ? "inline" : "none"; - $icon_display = rgget("calendarIconType", $field) == "calendar" ? "inline" : "none"; - - $month_field = "
    "; - $day_field = "
    "; - $year_field = "
    "; - - $month_dropdown = "
    " . self::get_month_dropdown("","","","","disabled='disabled'") . "
    "; - $day_dropdown = "
    " . self::get_day_dropdown("","","","","disabled='disabled'") . "
    "; - $year_dropdown = "
    " . self::get_year_dropdown("","","","","disabled='disabled'") . "
    "; - - $field_string ="
    "; - - switch($field_position){ - case "dmy" : - $field_string .= $day_field . $month_field . $year_field . $day_dropdown . $month_dropdown . $year_dropdown; - break; - - case "ymd" : - $field_string .= $year_field . $month_field . $day_field . $year_dropdown . $month_dropdown . $day_dropdown; - break; - - default : - $field_string .= $month_field . $day_field . $year_field . $month_dropdown . $day_dropdown . $year_dropdown; - break; - } - - return $field_string; - } - else{ - $date_info = self::parse_date($value, $format); - $date_type = rgget("dateType", $field); - if(in_array($date_type, array("datefield", "datedropdown"))) - { - switch($field_position){ - - case "dmy" : - $tabindex = self::get_tabindex(); - $field_str = $date_type == "datedropdown" - ? "
    " . self::get_day_dropdown("input_{$id}[]", "{$field_id}_2", rgar($date_info,"day"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgget("day", $date_info)), $disabled_text, $field_id); - - $tabindex = self::get_tabindex(); - $field_str .= $date_type == "datedropdown" - ? "
    " . self::get_month_dropdown("input_{$id}[]", "{$field_id}_1", rgar($date_info,"month"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgget("month", $date_info)), $disabled_text, $field_id); - - $tabindex = self::get_tabindex(); - $field_str .= $date_type == "datedropdown" - ? "
    " . self::get_year_dropdown("input_{$id}[]", "{$field_id}_3", rgar($date_info,"year"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgget("year", $date_info)), $disabled_text, $field_id); - - break; - - case "ymd" : - $tabindex = self::get_tabindex(); - $field_str = $date_type == "datedropdown" - ? "
    " . self::get_year_dropdown("input_{$id}[]", "{$field_id}_3", rgar($date_info,"year"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgget("year", $date_info)), $disabled_text, $field_id); - - $field_str .= $date_type == "datedropdown" - ? "
    " . self::get_month_dropdown("input_{$id}[]", "{$field_id}_1", rgar($date_info,"month"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgar($date_info,"month")), $disabled_text, $field_id); - - $tabindex = self::get_tabindex(); - $field_str .= $date_type == "datedropdown" - ? "
    " . self::get_day_dropdown("input_{$id}[]", "{$field_id}_2", rgar($date_info,"day"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgar($date_info,"day")), $disabled_text, $field_id); - - break; - - default : - $tabindex = self::get_tabindex(); - - $field_str = $date_type == "datedropdown" - ? "
    " . self::get_month_dropdown("input_{$id}[]", "{$field_id}_1", rgar($date_info,"month"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgar($date_info,"month")), $disabled_text, $field_id); - - $tabindex = self::get_tabindex(); - $field_str .= $date_type == "datedropdown" - ? "
    " . self::get_day_dropdown("input_{$id}[]", "{$field_id}_2", rgar($date_info,"day"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgar($date_info,"day")), $disabled_text, $field_id); - - $tabindex = self::get_tabindex(); - $field_str .= $date_type == "datedropdown" - ? "
    " . self::get_year_dropdown("input_{$id}[]", "{$field_id}_3", rgar($date_info,"year"), $tabindex, $disabled_text) . "
    " - : sprintf("
    ", $field_id, $id, $field_id, esc_attr(rgget("year", $date_info)), $disabled_text, $field_id); - - break; - } - - return $field_str; - } - else - { - $value = GFCommon::date_display($value, $format); - $icon_class = $field["calendarIconType"] == "none" ? "datepicker_no_icon" : "datepicker_with_icon"; - $icon_url = empty($field["calendarIconUrl"]) ? GFCommon::get_base_url() . "/images/calendar.png" : $field["calendarIconUrl"]; - $tabindex = self::get_tabindex(); - return sprintf("
    ", $id, $field_id, esc_attr($value), esc_attr($class), $format, $icon_class, $disabled_text); - } - } - - case "time" : - if(!empty($post_link)) - return $post_link; - - $hour = $minute = $am_selected = $pm_selected = ""; - - if(!is_array($value) && !empty($value)){ - preg_match('/^(\d*):(\d*) ?(.*)$/', $value, $matches); - $hour = esc_attr($matches[1]); - $minute = esc_attr($matches[2]); - $am_selected = rgar($matches,3) == "am" ? "selected='selected'" : ""; - $pm_selected = rgar($matches,3) == "pm" ? "selected='selected'" : ""; - } - else if(is_array($value)){ - $hour = esc_attr($value[0]); - $minute = esc_attr($value[1]); - $am_selected = rgar($value,2) == "am" ? "selected='selected'" : ""; - $pm_selected = rgar($value,2) == "pm" ? "selected='selected'" : ""; - } - $hour_tabindex = self::get_tabindex(); - $minute_tabindex = self::get_tabindex(); - $ampm_tabindex = self::get_tabindex(); - - $ampm_field_style = is_admin() && rgar($field, "timeFormat") == "24" ? "style='display:none;'" : ""; - $ampm_field = is_admin() || rgar($field, "timeFormat") != "24" ? "
    " : ""; - - return sprintf("
    :
    {$ampm_field}
    ", $field_id, $id, $field_id, $hour, $disabled_text, $field_id, $id, $field_id, $minute, $disabled_text, $field_id); - - case "fileupload" : - $tabindex = self::get_tabindex(); - $multiple_files = rgar($field, "multipleFiles"); - $file_list_id = "gform_preview_" . $form_id . "_". $id; - $max_upload_size = ! IS_ADMIN && isset($field["maxFileSize"]) && $field["maxFileSize"] > 0 ? $field["maxFileSize"] * 1048576: wp_max_upload_size(); - if($multiple_files){ - $upload_action_url = trailingslashit(site_url()) . "?gf_page=upload"; - $max_files = isset($field["maxFiles"]) && $field["maxFiles"] > 0 ? $field["maxFiles"]: 0; - $browse_button_id = 'gform_browse_button_' . $form_id . "_" . $id; - $container_id = 'gform_multifile_upload_' . $form_id . "_" . $id; - $drag_drop_id = 'gform_drag_drop_area_' . $form_id . "_" . $id; - - $messages_id = "gform_multifile_messages_{$form_id}_{$id}"; - $allowed_extensions = isset($field["allowedExtensions"]) && !empty($field["allowedExtensions"]) ? join(",", GFCommon::clean_extensions(explode(",", strtolower($field["allowedExtensions"])))) : array(); - if(empty($allowed_extensions)) - $allowed_extensions="*"; - $disallowed_extensions = GFCommon::get_disallowed_file_extensions(); - - if( defined('DOING_AJAX') && DOING_AJAX && "rg_change_input_type" === rgpost('action')){ - $plupload_init = array(); - } else { - $plupload_init = array( - 'runtimes' => 'html5,flash,html4', - 'browse_button' => $browse_button_id, - 'container' => $container_id, - 'drop_element' => $drag_drop_id, - 'filelist' => $file_list_id, - 'unique_names' => true, - 'file_data_name' => 'file', - /*'chunk_size' => '10mb',*/ // chunking doesn't currently have very good cross-browser support - 'url' => $upload_action_url, - 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), - 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), - 'filters' => array( - 'mime_types' => array(array('title' => __( 'Allowed Files', 'gravityforms' ), 'extensions' => $allowed_extensions)), - 'max_file_size' => $max_upload_size . 'b' - ), - 'multipart' => true, - 'urlstream_upload' => false, - 'multipart_params' => array( - "form_id" => $form_id, - "field_id" => $id - ), - 'gf_vars' => array( - 'max_files' => $max_files, - 'message_id' => $messages_id, - 'disallowed_extensions' => $disallowed_extensions - ) - ); - - // plupload 2 was introduced in WordPress 3.9. Plupload 1 accepts a slightly different init array. - if (version_compare(get_bloginfo('version'), "3.9-RC1", "<")) { - $plupload_init['max_file_size'] = $max_upload_size . 'b'; - $plupload_init['filters'] = array(array('title' => __('Allowed Files', 'gravityforms'), 'extensions' => $allowed_extensions)); - } - } - - - $plupload_init = apply_filters("gform_plupload_settings_{$form_id}", apply_filters('gform_plupload_settings', $plupload_init, $form_id, $field), $form_id, $field); - - // Multi-file uploading doesn't currently work in iOS Safari, - // single-file allows the built-in camera to be used as source for images - if ( wp_is_mobile() ) - $plupload_init['multi_selection'] = false; - - $plupload_init_json = htmlspecialchars(json_encode($plupload_init), ENT_QUOTES, 'UTF-8'); - $upload = sprintf("
    %s
    ",$container_id, $plupload_init_json, $drag_drop_id, __("Drop files here or" ,"gravityforms"), $browse_button_id, __("Select files", "gravityforms") ) ; - if(!IS_ADMIN) - $upload .= "
    "; - - if(IS_ADMIN && RG_CURRENT_VIEW === "entry") - $upload .= sprintf('', $id, esc_attr($value)); - - } else { - $upload = ''; - if ( $max_upload_size <= 2047 * 1048576 ) { - // MAX_FILE_SIZE > 2048MB fails. The file size is checked anyway once uploaded, so it's not necessary. - $upload = sprintf( "", $max_upload_size ); - } - $upload .= sprintf("", $id, $field_id, esc_attr($class), $disabled_text); - } - - if(IS_ADMIN && RG_CURRENT_VIEW === "entry" && !empty($value)){ // edit entry - $file_urls = $multiple_files ? json_decode($value) : array($value); - $upload_display = $multiple_files ? "" : "style='display:none'"; - $preview = "
    $upload
    "; - $preview .= sprintf("
    ", $file_list_id); - $preview .= sprintf("
    ", $id); - - foreach($file_urls as $file_index => $file_url){ - if(self::is_ssl() && strpos($file_url, "http:") !== false ){ - $file_url = str_replace("http:", "https:", $file_url); - } - $file_url = esc_attr($file_url); - $preview .= sprintf("", $file_index, $file_url, $file_url, $file_url, GFCommon::truncate_url($file_url), $file_url, GFCommon::get_base_url() . "/images/download.png", $lead_id, $id, GFCommon::get_base_url() . "/images/delete.png"); - } - - $preview .="
    "; - - return $preview; - } else { - $input_name = "input_{$id}"; - $uploaded_files = isset(GFFormsModel::$uploaded_files[$form_id][$input_name]) ? GFFormsModel::$uploaded_files[$form_id][$input_name] : array(); - $file_infos = $multiple_files ? $uploaded_files : RGFormsModel::get_temp_filename($form_id, $input_name); - - if(!empty($file_infos)){ - $preview = sprintf("
    ", $file_list_id); - $file_infos = $multiple_files ? $uploaded_files : array($file_infos); - foreach($file_infos as $file_info){ - $preview .= "
    " . esc_html($file_info["uploaded_filename"]) . "
    "; - } - $preview .= "
    "; - if(!$multiple_files) - $upload = str_replace(" class='", " class='gform_hidden ", $upload); - return "
    " . $upload . " {$preview}
    "; - } - else{ - - $preview = $multiple_files ? sprintf("
    ", $file_list_id) : ""; - - return "
    $upload
    " . $preview; - } - } - - case "captcha" : - - switch(rgget("captchaType", $field)){ - case "simple_captcha" : - $size = rgempty("simpleCaptchaSize", $field) ? "medium" : $field["simpleCaptchaSize"]; - $captcha = self::get_captcha($field); - - $tabindex = self::get_tabindex(); - - $dimensions = IS_ADMIN ? "" : "width='" . rgar($captcha,"width") . "' height='" . rgar($captcha,"height") . "'"; - return "
    "; - break; - - case "math" : - $size = empty($field["simpleCaptchaSize"]) ? "medium" : $field["simpleCaptchaSize"]; - $captcha_1 = self::get_math_captcha($field, 1); - $captcha_2 = self::get_math_captcha($field, 2); - $captcha_3 = self::get_math_captcha($field, 3); - - $tabindex = self::get_tabindex(); - - $dimensions = IS_ADMIN ? "" : "width='{$captcha_1["width"]}' height='{$captcha_1["height"]}'"; - return "
    "; - break; - - default: - - if(!function_exists("recaptcha_get_html")){ - require_once(GFCommon::get_base_path() . '/recaptchalib.php'); - } - - $theme = empty($field["captchaTheme"]) ? "red" : esc_attr($field["captchaTheme"]); - $publickey = get_option("rg_gforms_captcha_public_key"); - $privatekey = get_option("rg_gforms_captcha_private_key"); - if(IS_ADMIN){ - if(empty($publickey) || empty($privatekey)){ - return "
    " . __("To use the reCaptcha field you must first do the following:", "gravityforms") . "
    1 - " . sprintf(__("Sign up%s for a free reCAPTCHA account", "gravityforms"), "") . "
    2 - " . sprintf(__("Enter your reCAPTCHA keys in the %ssettings page%s", "gravityforms"), "", "") . "
    "; - } - else{ - return "
    reCAPTCHA
    "; - } - } - else{ - $language = empty($field["captchaLanguage"]) ? "en" : esc_attr($field["captchaLanguage"]); - - if(empty(self::$tab_index)) - self::$tab_index = 1; - - $options = ""; - - $is_ssl = !empty($_SERVER['HTTPS']); - return $options . "
    " . recaptcha_get_html($publickey, null, $is_ssl, $language) . "
    "; - } - } - break; - - case "creditcard" : - - $card_number = ""; - $card_name = ""; - $expiration_date = ""; - $expiration_month = ""; - $expiration_year = ""; - $security_code = ""; - $autocomplete = RGFormsModel::is_html5_enabled() ? "autocomplete='off'" : ""; - - if(is_array($value)){ - $card_number = esc_attr(rgget($field["id"] . ".1",$value)); - $card_name = esc_attr(rgget($field["id"] . ".5",$value)); - $expiration_date = rgget($field["id"] . ".2",$value); - if(!is_array($expiration_date) && !empty($expiration_date)) - $expiration_date = explode("/", $expiration_date); - - if(is_array($expiration_date) && count($expiration_date) == 2){ - $expiration_month = $expiration_date[0]; - $expiration_year = $expiration_date[1]; - } - - $security_code = esc_attr(rgget($field["id"] . ".3",$value)); - } - - $action = !IS_ADMIN ? "gformMatchCard(\"{$field_id}_1\");" : ""; - - $onchange= "onchange='{$action}'"; - $onkeyup = "onkeyup='{$action}'"; - - $card_icons = ''; - $cards = GFCommon::get_card_types(); - $card_style = rgar($field, 'creditCardStyle') ? rgar($field, 'creditCardStyle') : 'style1'; - - foreach($cards as $card) { + //ignore products that have been hidden by conditional logic + $is_hidden = RGFormsModel::is_field_hidden( $form, $field, array(), $lead ); + if ( $is_hidden ) { + continue; + } - $style = ""; - if(self::is_card_supported($field, $card["slug"])){ - $print_card = true; - } - else if (IS_ADMIN){ - $print_card = true; - $style = "style='display:none;'"; - } - else{ - $print_card = false; - } - - if($print_card){ - $card_icons .= "
    {$card['name']}
    "; - } - } - - $payment_methods = apply_filters("gform_payment_methods", array(), $field, $form_id); - $payment_options = ""; - if(is_array($payment_methods)){ - foreach($payment_methods as $payment_method){ - $checked = rgpost("gform_payment_method") == $payment_method["key"] ? "checked='checked'" : ""; - $payment_options .="
    {$payment_method["label"]}
    "; - } - } - $checked = rgpost("gform_payment_method") == "creditcard" || rgempty("gform_payment_method") ? "checked='checked'" : ""; - $card_radio_button = empty($payment_options) ? "" : ""; - $card_icons = "{$payment_options}
    {$card_radio_button}{$card_icons}
    "; - - - - //card number fields - $tabindex = self::get_tabindex(); - $html5_output = ! is_admin() && GFFormsModel::is_html5_enabled() ? "pattern='[0-9]*' title='" . __("Only digits are allowed", "gravityforms") . "'" : ""; - $card_field = sprintf("{$card_icons}", $id, $field_id, $card_number, $disabled_text, $field_id); - - //expiration date field - $expiration_field = "". - - "". - - "". - - // month selector - "". - - // year selector - "". - - // label for the expiration fields - "". - - "". - ""; - - //security code field - $tabindex = self::get_tabindex(); - $html5_output = GFFormsModel::is_html5_enabled() ? "pattern='[0-9]*' title='" . __("Only digits are allowed", "gravityforms") . "'" : ""; - $security_field = "". - "". - " ". - "". - "". - ""; - - $tabindex = self::get_tabindex(); - $card_name_field = sprintf("", $id, $field_id, $card_name, $disabled_text, $field_id); - - return "
    " . $card_field . $expiration_field . $security_field . $card_name_field . "
    "; - - break; + //if single product, get values from the multiple inputs + if ( is_array( $lead_value ) ) { + $product_quantity = sizeof( $quantity_field ) == 0 && ! $field->disableQuantity ? rgget( $id . '.3', $lead_value ) : $quantity; + if ( empty( $product_quantity ) ) { + continue; + } - case "list" : + if ( ! rgget( $id, $products ) ) { + $products[ $id ] = array(); + } - if(!empty($value)) - $value = maybe_unserialize($value); + $products[ $id ]['name'] = $use_admin_label && ! rgempty( 'adminLabel', $field ) ? $field->adminLabel : $lead_value[ $id . '.1' ]; + $products[ $id ]['price'] = rgar( $lead_value, $id . '.2' ); + $products[ $id ]['quantity'] = $product_quantity; + } else if ( ! empty( $lead_value ) ) { - if(!is_array($value)) - $value = array(array()); + if ( empty( $quantity ) ) { + continue; + } - $has_columns = is_array(rgar($field, "choices")); - $columns = $has_columns ? rgar($field, "choices") : array(array()); + if ( ! rgar( $products, $id ) ) { + $products[ $id ] = array(); + } - $shim_style = is_rtl() ? 'position:absolute;left:999em;' : 'position:absolute;left:-999em;'; - $label_target_shim = sprintf( '', $form_id, $field['id'], $shim_style ); + if ( $field->inputType == 'price' ) { + $name = $field->label; + $price = $lead_value; + } else { + list( $name, $price ) = explode( '|', $lead_value ); + } - $list = "
    " . - $label_target_shim . - ""; + $products[ $id ]['name'] = ! $use_choice_text ? $name : RGFormsModel::get_choice_text( $field, $name ); + $products[ $id ]['price'] = $price; + $products[ $id ]['quantity'] = $quantity; + $products[ $id ]['options'] = array(); + } - $class_attr = ""; - if($has_columns){ + if ( isset( $products[ $id ] ) ) { + $options = self::get_product_fields_by_type( $form, array( 'option' ), $id ); + foreach ( $options as $option ) { + $option_value = RGFormsModel::get_lead_field_value( $lead, $option ); + $option_label = empty( $option['adminLabel'] ) ? $option['label'] : $option['adminLabel']; + if ( is_array( $option_value ) ) { + foreach ( $option_value as $value ) { + $option_info = self::get_option_info( $value, $option, $use_choice_text ); + if ( ! empty( $option_info ) ) { + $products[ $id ]['options'][] = array( 'field_label' => rgar( $option, 'label' ), 'option_name' => rgar( $option_info, 'name' ), 'option_label' => $option_label . ': ' . rgar( $option_info, 'name' ), 'price' => rgar( $option_info, 'price' ) ); + } + } + } else if ( ! empty( $option_value ) ) { + $option_info = self::get_option_info( $option_value, $option, $use_choice_text ); + $products[ $id ]['options'][] = array( 'field_label' => rgar( $option, 'label' ), 'option_name' => rgar( $option_info, 'name' ), 'option_label' => $option_label . ': ' . rgar( $option_info, 'name' ), 'price' => rgar( $option_info, 'price' ) ); + } + } + } + break; + } + } - $list .= ''; - for( $colnum = 1; $colnum <= count( $columns ) + 1; $colnum++ ) { - $odd_even = ( $colnum % 2 ) == 0 ? 'even' : 'odd'; - $list .= sprintf( "", $field['id'], $colnum, $odd_even ); - } - $list .= ''; + $shipping_field = self::get_fields_by_type( $form, array( 'shipping' ) ); + $shipping_price = $shipping_name = ''; + $shipping_field_id = ''; + if ( ! empty( $shipping_field ) && ! RGFormsModel::is_field_hidden( $form, $shipping_field[0], array(), $lead ) ) { + $shipping_price = RGFormsModel::get_lead_field_value( $lead, $shipping_field[0] ); + $shipping_name = $shipping_field[0]['label']; + $shipping_field_id = $shipping_field[0]['id']; + if ( $shipping_field[0]['inputType'] != 'singleshipping' ) { + list( $shipping_method, $shipping_price ) = explode( '|', $shipping_price ); + $shipping_name = $shipping_field[0]['label'] . " ($shipping_method)"; + } + } + $shipping_price = self::to_number( $shipping_price ); - $list .= ""; - foreach($columns as $column){ - $list .= ""; - } - $list .= ""; - } - else{ - $list .= - '' . - "" . - "" . - ''; - } + $product_info = array( 'products' => $products, 'shipping' => array( 'id' => $shipping_field_id, 'name' => $shipping_name, 'price' => $shipping_price ) ); - $delete_display = count($value) == 1 ? "visibility:hidden;" : ""; - $maxRow = intval(rgar($field, "maxRows")); - $disabled_icon_class = !empty($maxRow) && count($value) >= $maxRow ? "gfield_icon_disabled" : ""; + $product_info = apply_filters( "gform_product_info_{$form['id']}", apply_filters( 'gform_product_info', $product_info, $form, $lead ), $form, $lead ); - $list .= ""; - $rownum = 1; - foreach($value as $item){ + // save static copy of product info (only for 'real' entries) + if ( ! rgempty( 'id', $lead ) && ! empty( $product_info['products'] ) ) { + gform_update_meta( $lead['id'], "gform_product_info_{$use_choice_text}_{$use_admin_label}", $product_info ); + } + } - $odd_even = ($rownum % 2) == 0 ? "even" : "odd"; + return $product_info; + } - $list .= ""; - $colnum = 1; - foreach($columns as $column){ + public static function get_order_total( $form, $lead ) { - //getting value. taking into account columns being added/removed from form meta - if(is_array($item)){ - if($has_columns){ - $val = rgar($item, $column["text"]); - } - else{ - $vals = array_values($item); - $val = rgar($vals, 0); - } - } - else{ - $val = $colnum == 1 ? $item : ""; - } + $products = self::get_product_fields( $form, $lead, false ); - $list .= ""; - $colnum++; - } + return self::get_total( $products ); + } - $add_icon = !rgempty("addIconUrl", $field) ? $field["addIconUrl"] : GFCommon::get_base_url() . "/images/add.png"; - $delete_icon = !rgempty("deleteIconUrl", $field) ? $field["deleteIconUrl"] : GFCommon::get_base_url() . "/images/remove.png"; + public static function get_total( $products ) { - $on_click = IS_ADMIN && RG_CURRENT_VIEW != "entry" ? "" : "onclick='gformAddListItem(this, {$maxRow})'"; + $total = 0; + foreach ( $products['products'] as $product ) { - if(rgar($field, "maxRows") != 1){ + $price = self::to_number( $product['price'] ); + if ( is_array( rgar( $product, 'options' ) ) ) { + foreach ( $product['options'] as $option ) { + $price += self::to_number( $option['price'] ); + } + } + $subtotal = floatval( $product['quantity'] ) * $price; + $total += $subtotal; - // can't replace these icons with the webfont versions since they appear on the front end. + } - $list .=""; - } + return $total; + } - $list .= ""; + public static function get_option_info( $value, $option, $use_choice_text ) { + if ( empty( $value ) ) { + return array(); + } - if(!empty($maxRow) && $rownum >= $maxRow) - break; + list( $name, $price ) = explode( '|', $value ); + if ( $use_choice_text ) { + $name = RGFormsModel::get_choice_text( $option, $name ); + } - $rownum++; - } + return array( 'name' => $name, 'price' => $price ); + } - $list .="
    " . esc_html($column["text"]) . " 
    " . self::get_list_input($field, $has_columns, $column, $val, $form_id) . ""; - $list .=" " . __("Add a row", "gravityforms") . "" . - " " . __("Remove this row", "gravityforms") . ""; + $total += floatval( $products['shipping']['price'] ); - $list .="
    "; + public static function gform_do_shortcode( $content ) { - return $list; - break; - } - } + $is_ajax = false; + $forms = GFFormDisplay::get_embedded_forms( $content, $is_ajax ); - public static function is_ssl(){ - global $wordpress_https; - $is_ssl = false; + foreach ( $forms as $form ) { + if ( headers_sent() ) { + GFFormDisplay::print_form_scripts( $form, $is_ajax ); + } else { + GFFormDisplay::enqueue_form_scripts( $form, $is_ajax ); + } + } - $has_https_plugin = class_exists('WordPressHTTPS') && isset($wordpress_https); - $has_is_ssl_method = $has_https_plugin && method_exists('WordPressHTTPS', 'is_ssl'); - $has_isSsl_method = $has_https_plugin && method_exists('WordPressHTTPS', 'isSsl'); + return do_shortcode( $content ); + } - //Use the WordPress HTTPs plugin if installed - if ($has_https_plugin && $has_is_ssl_method){ - $is_ssl = $wordpress_https->is_ssl(); - } - else if ($has_https_plugin && $has_isSsl_method){ - $is_ssl = $wordpress_https->isSsl(); - } - else{ - $is_ssl = is_ssl(); - } + public static function spam_enabled( $form_id ) { + $spam_enabled = self::akismet_enabled( $form_id ) || has_filter( 'gform_entry_is_spam' ) || has_filter( "gform_entry_is_spam_{$form_id}" ); + return $spam_enabled; + } - if(!$is_ssl && isset($_SERVER["HTTP_CF_VISITOR"]) && strpos($_SERVER["HTTP_CF_VISITOR"], "https")){ - $is_ssl=true; - } + public static function has_akismet() { + $akismet_exists = function_exists( 'akismet_http_post' ) || function_exists( 'Akismet::http_post' ); - return apply_filters("gform_is_ssl", $is_ssl); - } + return $akismet_exists; + } - public static function is_card_supported($field, $card_slug){ - $supported_cards = rgar($field, 'creditCards'); - $default_cards = array('amex', 'discover', 'mastercard', 'visa'); + public static function akismet_enabled( $form_id ) { - if(!empty($supported_cards) && in_array($card_slug, $supported_cards)) { - return true; - } - else if(empty($supported_cards) && in_array($card_slug, $default_cards)) { - return true; - } + if ( ! self::has_akismet() ) { + return false; + } - return false; + // if no option is set, leave akismet enabled; otherwise, use option value true/false + $enabled_by_setting = get_option( 'rg_gforms_enable_akismet' ) === false ? true : get_option( 'rg_gforms_enable_akismet' ) == true; + $enabled_by_filter = apply_filters( "gform_akismet_enabled_$form_id", apply_filters( 'gform_akismet_enabled', $enabled_by_setting ) ); - } + return $enabled_by_filter; - public static function is_preview(){ - $url_info = parse_url(RGFormsModel::get_current_page_url()); - $file_name = basename($url_info["path"]); - return $file_name == "preview.php" || rgget("gf_page", $_GET) == "preview"; - } + } - private static function get_expiration_months($selected_month){ - $str = ""; - for($i=1; $i<13; $i++){ - $selected = intval($selected_month) == $i ? "selected='selected'" : ""; - $month = str_pad($i, 2, "0", STR_PAD_LEFT); - $str .= ""; - } - return $str; - } + public static function is_akismet_spam( $form, $lead ) { - private static function get_expiration_years($selected_year){ - $str = ""; - $year = intval(date("Y")); - for($i=$year; $i < ($year + 20); $i++){ - $selected = intval($selected_year) == $i ? "selected='selected'" : ""; - $str .= ""; - } - return $str; - } + global $akismet_api_host, $akismet_api_port; - private static function get_list_input($field, $has_columns, $column, $value, $form_id){ + $fields = self::get_akismet_fields( $form, $lead ); - $tabindex = GFCommon::get_tabindex(); + //Submitting info to Akismet + if ( defined( 'AKISMET_VERSION' ) && AKISMET_VERSION < 3.0 ) { + //Akismet versions before 3.0 + $response = akismet_http_post( $fields, $akismet_api_host, '/1.1/comment-check', $akismet_api_port ); + } else { + $response = Akismet::http_post( $fields, 'comment-check' ); + } + $is_spam = trim( rgar( $response, 1 ) ) == 'true'; - $column_index = 1; - if($has_columns && is_array(rgar($field, "choices"))){ - foreach($field["choices"] as $choice){ - if($choice["text"] == $column["text"]) - break; + return $is_spam; + } - $column_index++; - } - } - $input_info = array("type" => "text"); - - $input_info = apply_filters("gform_column_input_{$form_id}_{$field["id"]}_{$column_index}", apply_filters("gform_column_input", $input_info, $field, rgar($column, "text"), $value, $form_id), $field, rgar($column, "text"), $value, $form_id); - - switch($input_info["type"]){ - - case "select" : - $input = ""; - - break; - - default : - $input = ""; - break; - } + public static function mark_akismet_spam( $form, $lead, $is_spam ) { - return apply_filters("gform_column_input_content_{$form_id}_{$field["id"]}_{$column_index}", - apply_filters("gform_column_input_content", $input, $input_info, $field, rgar($column, "text"), $value, $form_id), - $input_info, $field, rgar($column, "text"), $value, $form_id); + global $akismet_api_host, $akismet_api_port; - } + $fields = self::get_akismet_fields( $form, $lead ); + $as = $is_spam ? 'spam' : 'ham'; - public static function clean_extensions($extensions){ - $count = sizeof($extensions); - for($i=0; $i<$count; $i++){ - $extensions[$i] = str_replace(".", "",str_replace(" ", "", $extensions[$i])); - } - return $extensions; - } + //Submitting info to Akismet + if ( defined( 'AKISMET_VERSION' ) && AKISMET_VERSION < 3.0 ) { + //Akismet versions before 3.0 + akismet_http_post( $fields, $akismet_api_host, '/1.1/submit-' . $as, $akismet_api_port ); + } else { + Akismet::http_post( $fields, 'submit-' . $as ); + } + } - public static function get_disallowed_file_extensions(){ - return array("php", "asp", "exe", "com", "htaccess", "phtml", "php3", "php4", "php5", "php6"); - } + private static function get_akismet_fields( $form, $lead ) { + + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; + + //Gathering Akismet information + $akismet_info = array(); + $akismet_info['comment_type'] = 'gravity_form'; + $akismet_info['comment_author'] = self::get_akismet_field( 'name', $form, $lead ); + $akismet_info['comment_author_email'] = self::get_akismet_field( 'email', $form, $lead ); + $akismet_info['comment_author_url'] = self::get_akismet_field( 'website', $form, $lead ); + $akismet_info['comment_content'] = self::get_akismet_field( 'textarea', $form, $lead ); + $akismet_info['contact_form_subject'] = $form['title']; + $akismet_info['comment_author_IP'] = $lead['ip']; + $akismet_info['permalink'] = $lead['source_url']; + $akismet_info['user_ip'] = preg_replace( '/[^0-9., ]/', '', $lead['ip'] ); + $akismet_info['user_agent'] = $lead['user_agent']; + $akismet_info['referrer'] = $is_admin ? '' : $_SERVER['HTTP_REFERER']; + $akismet_info['blog'] = get_option( 'home' ); + + $akismet_info = apply_filters( "gform_akismet_fields_{$form['id']}", apply_filters( 'gform_akismet_fields', $akismet_info, $form, $lead ), $form, $lead ); + + return http_build_query( $akismet_info ); + } - public static function match_file_extension( $file_name, $extensions ) { - if ( empty ( $extensions ) || ! is_array( $extensions ) ) { - return false; + private static function get_akismet_field( $field_type, $form, $lead ) { + $fields = GFCommon::get_fields_by_type( $form, array( $field_type ) ); + if ( empty( $fields ) ) { + return ''; } - $ext = strtolower( pathinfo( $file_name, PATHINFO_EXTENSION ) ); - if ( in_array( $ext, $extensions ) ) { - return true; + $value = RGFormsModel::get_lead_field_value( $lead, $fields[0] ); + switch ( $field_type ) { + case 'name' : + $value = GFCommon::get_lead_field_display( $fields[0], $value ); + break; } - return false; + return $value; } - public static function file_name_has_disallowed_extension( $file_name ) { + public static function get_other_choice_value() { + $value = apply_filters( 'gform_other_choice_value', __( 'Other' , 'gravityforms' ) ); - return self::match_file_extension( $file_name, self::get_disallowed_file_extensions() ) || strpos( strtolower( $file_name ), '.php.' ) !== false; + return $value; } - public static function to_money($number, $currency_code=""){ - if(!class_exists("RGCurrency")) - require_once("currency.php"); - - if(empty($currency_code)) - $currency_code = self::get_currency(); - - $currency = new RGCurrency($currency_code); - return $currency->to_money($number); - } - - public static function to_number($text, $currency_code=""){ - if(!class_exists("RGCurrency")) - require_once("currency.php"); - - if(empty($currency_code)) - $currency_code = self::get_currency(); - - $currency = new RGCurrency($currency_code); - - return $currency->to_number($text); - } - - public static function get_currency(){ - $currency = get_option("rg_gforms_currency"); - $currency = empty($currency) ? "USD" : $currency; - - return apply_filters("gform_currency", $currency); - } - - - public static function get_simple_captcha(){ - $captcha = new ReallySimpleCaptcha(); - $captcha->tmp_dir = RGFormsModel::get_upload_path("captcha") . "/"; - return $captcha; - } - - public static function get_captcha($field){ - if(!class_exists("ReallySimpleCaptcha")) - return array(); - - $captcha = self::get_simple_captcha(); - - //If captcha folder does not exist and can't be created, return an empty captcha - if(!wp_mkdir_p($captcha->tmp_dir)) - return array(); - - $captcha->char_length = 5; - switch(rgar($field,"simpleCaptchaSize")){ - case "small" : - $captcha->img_size = array( 100, 28 ); - $captcha->font_size = 18; - $captcha->base = array( 8, 20 ); - $captcha->font_char_width = 17; - - break; - - case "large" : - $captcha->img_size = array( 200, 56 ); - $captcha->font_size = 32; - $captcha->base = array( 18, 42 ); - $captcha->font_char_width = 35; - break; - - default : - $captcha->img_size = array( 150, 42 ); - $captcha->font_size = 26; - $captcha->base = array( 15, 32 ); - $captcha->font_char_width = 25; - break; - } - - if(!empty($field["simpleCaptchaFontColor"])){ - $captcha->fg = self::hex2rgb($field["simpleCaptchaFontColor"]); - } - if(!empty($field["simpleCaptchaBackgroundColor"])){ - $captcha->bg = self::hex2rgb($field["simpleCaptchaBackgroundColor"]); - } - - $word = $captcha->generate_random_word(); - $prefix = mt_rand(); - $filename = $captcha->generate_image($prefix, $word); - $url = RGFormsModel::get_upload_url("captcha") . "/" . $filename; - $path = $captcha->tmp_dir . $filename; - - if(self::is_ssl() && strpos($url, "http:") !== false ){ - $url = str_replace("http:", "https:", $url); - } - - return array("path"=>$path, "url"=> $url, "height" => $captcha->img_size[1], "width" => $captcha->img_size[0], "prefix" => $prefix); - } - - public static function get_math_captcha($field, $pos){ - if(!class_exists("ReallySimpleCaptcha")) - return array(); - - $captcha = self::get_simple_captcha(); - - //If captcha folder does not exist and can't be created, return an empty captcha - if(!wp_mkdir_p($captcha->tmp_dir)) - return array(); - - $captcha->char_length = 1; - if($pos == 1 || $pos == 3) - $captcha->chars = '0123456789'; - else - $captcha->chars = '+'; - - switch(rgar($field,"simpleCaptchaSize")){ - case "small" : - $captcha->img_size = array( 23, 28 ); - $captcha->font_size = 18; - $captcha->base = array( 6, 20 ); - $captcha->font_char_width = 17; - - break; - - case "large" : - $captcha->img_size = array( 36, 56 ); - $captcha->font_size = 32; - $captcha->base = array( 10, 42 ); - $captcha->font_char_width = 35; - break; - - default : - $captcha->img_size = array( 30, 42 ); - $captcha->font_size = 26; - $captcha->base = array( 9, 32 ); - $captcha->font_char_width = 25; - break; - } - - if(!empty($field["simpleCaptchaFontColor"])){ - $captcha->fg = self::hex2rgb($field["simpleCaptchaFontColor"]); - } - if(!empty($field["simpleCaptchaBackgroundColor"])){ - $captcha->bg = self::hex2rgb($field["simpleCaptchaBackgroundColor"]); - } - - $word = $captcha->generate_random_word(); - $prefix = mt_rand(); - $filename = $captcha->generate_image($prefix, $word); - $url = RGFormsModel::get_upload_url("captcha") . "/" . $filename; - $path = $captcha->tmp_dir . $filename; - - return array("path"=>$path, "url"=> $url, "height" => $captcha->img_size[1], "width" => $captcha->img_size[0], "prefix" => $prefix); - } - - private static function hex2rgb($color){ - if ($color[0] == '#') - $color = substr($color, 1); - - if (strlen($color) == 6) - list($r, $g, $b) = array($color[0].$color[1], - $color[2].$color[3], - $color[4].$color[5]); - elseif (strlen($color) == 3) - list($r, $g, $b) = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]); - else - return false; - - $r = hexdec($r); $g = hexdec($g); $b = hexdec($b); - - return array($r, $g, $b); - } - - public static function get_address_types($form_id){ - - $addressTypes = array( - "international" => array("label" => __("International", "gravityforms"),"zip_label" => apply_filters("gform_address_zip_{$form_id}",apply_filters("gform_address_zip", __("ZIP / Postal Code", "gravityforms"), $form_id), $form_id),"state_label" => apply_filters("gform_address_state_{$form_id}",apply_filters("gform_address_state",__("State / Province / Region", "gravityforms"), $form_id), $form_id)), - "us" => array("label" => __("United States", "gravityforms"),"zip_label" => apply_filters("gform_address_zip_{$form_id}",apply_filters("gform_address_zip", __("ZIP Code", "gravityforms"), $form_id), $form_id), "state_label" => apply_filters("gform_address_state_{$form_id}",apply_filters("gform_address_state",__("State", "gravityforms"), $form_id), $form_id), "country" => "United States", "states" => array_merge(array(''), GFCommon::get_us_states())), - "canadian" => array("label" => __("Canadian", "gravityforms"), "zip_label" => apply_filters("gform_address_zip_{$form_id}",apply_filters("gform_address_zip", __("Postal Code", "gravityforms"), $form_id), $form_id), "state_label" => apply_filters("gform_address_state_{$form_id}",apply_filters("gform_address_state",__("Province", "gravityforms"), $form_id), $form_id),"country" => "Canada", "states" => array_merge(array(''), GFCommon::get_canadian_provinces())) - ); - - return apply_filters("gform_address_types_{$form_id}", apply_filters("gform_address_types", $addressTypes, $form_id), $form_id); - } + public static function get_browser_class() { + global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $post; + + $classes = array(); + + //adding browser related class + if ( $is_lynx ) { + $classes[] = 'gf_browser_lynx'; + } else if ( $is_gecko ) { + $classes[] = 'gf_browser_gecko'; + } else if ( $is_opera ) { + $classes[] = 'gf_browser_opera'; + } else if ( $is_NS4 ) { + $classes[] = 'gf_browser_ns4'; + } else if ( $is_safari ) { + $classes[] = 'gf_browser_safari'; + } else if ( $is_chrome ) { + $classes[] = 'gf_browser_chrome'; + } else if ( $is_IE ) { + $classes[] = 'gf_browser_ie'; + } else { + $classes[] = 'gf_browser_unknown'; + } - private static function get_state_field($field, $id, $field_id, $state_value, $disabled_text, $form_id){ - $state_dropdown_class = $state_text_class = $state_style = $text_style = $state_field_id = ""; - if(empty($state_value)){ - $state_value = rgget("defaultState", $field); + //adding IE version + if ( $is_IE ) { + if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 6' ) !== false ) { + $classes[] = 'gf_browser_ie6'; + } else if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) !== false ) { + $classes[] = 'gf_browser_ie7'; + } + if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) !== false ) { + $classes[] = 'gf_browser_ie8'; + } + if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) !== false ) { + $classes[] = 'gf_browser_ie9'; + } + } - //for backwards compatibility (canadian address type used to store the default state into the defaultProvince property) - if (rgget("addressType", $field) == "canadian" && !rgempty("defaultProvince", $field)) - $state_value = $field["defaultProvince"]; - } + if ( $is_iphone ) { + $classes[] = 'gf_browser_iphone'; + } - $address_type = rgempty("addressType", $field) ? "international" : $field["addressType"]; - $address_types = self::get_address_types($form_id); - $has_state_drop_down = isset($address_types[$address_type]["states"]) && is_array($address_types[$address_type]["states"]); + return implode( ' ', $classes ); + } - if(IS_ADMIN && RG_CURRENT_VIEW != "entry"){ - $state_dropdown_class = "class='state_dropdown'"; - $state_text_class = "class='state_text'"; - $state_style = !$has_state_drop_down ? "style='display:none;'" : ""; - $text_style = $has_state_drop_down ? "style='display:none;'" : ""; - $state_field_id = ""; - } - else{ - //id only displayed on front end - $state_field_id = "id='" . $field_id . "_4'"; - } + public static function create_post( $form, &$lead ) { + $disable_post = apply_filters( "gform_disable_post_creation_{$form['id']}", apply_filters( 'gform_disable_post_creation', false, $form, $lead ), $form, $lead ); + $post_id = 0; + if ( ! $disable_post ) { + //creates post if the form has any post fields + $post_id = RGFormsModel::create_post( $form, $lead ); + } - $tabindex = self::get_tabindex(); - $states = empty($address_types[$address_type]["states"]) ? array() : $address_types[$address_type]["states"]; - $state_dropdown = sprintf("", $id, $state_field_id, $disabled_text, GFCommon::get_state_dropdown($states, $state_value)); + return $post_id; + } - $tabindex = self::get_tabindex(); - $state_text = sprintf("", $id, $state_field_id, $state_value, $disabled_text); + public static function evaluate_conditional_logic( $logic, $form, $lead ) { - if(IS_ADMIN && RG_CURRENT_VIEW != "entry") - return $state_dropdown . $state_text; - else if($has_state_drop_down) - return $state_dropdown; - else - return $state_text; - } + if ( ! $logic || ! is_array( rgar( $logic, 'rules' ) ) ) { + return true; + } - public static function get_lead_field_display($field, $value, $currency="", $use_text=false, $format="html", $media="screen"){ - - if($field['type'] == 'post_category') - $value = self::prepare_post_category_value($value, $field); - - switch(RGFormsModel::get_input_type($field)){ - case "name" : - if(is_array($value)){ - $prefix = trim(rgget($field["id"] . ".2", $value)); - $first = trim(rgget($field["id"] . ".3", $value)); - $last = trim(rgget($field["id"] . ".6", $value)); - $suffix = trim(rgget($field["id"] . ".8", $value)); - - $name = $prefix; - $name .= !empty($name) && !empty($first) ? " $first" : $first; - $name .= !empty($name) && !empty($last) ? " $last" : $last; - $name .= !empty($name) && !empty($suffix) ? " $suffix" : $suffix; - - return $name; - } - else{ - return $value; - } - - break; - case "creditcard" : - if(is_array($value)){ - $card_number = trim(rgget($field["id"] . ".1", $value)); - $card_type = trim(rgget($field["id"] . ".4", $value)); - $separator = $format == "html" ? "
    " : "\n"; - return empty($card_number) ? "" : $card_type . $separator . $card_number; - } - else{ - return ""; - } - break; - - case "address" : - if(is_array($value)){ - $street_value = trim(rgget($field["id"] . ".1", $value)); - $street2_value = trim(rgget($field["id"] . ".2", $value)); - $city_value = trim(rgget($field["id"] . ".3", $value)); - $state_value = trim(rgget($field["id"] . ".4", $value)); - $zip_value = trim(rgget($field["id"] . ".5", $value)); - $country_value = trim(rgget($field["id"] . ".6", $value)); - - $line_break = $format == "html" ? "
    " : "\n"; - - $address_display_format = apply_filters("gform_address_display_format", "default"); - if($address_display_format == "zip_before_city"){ - /* - Sample: - 3333 Some Street - suite 16 - 2344 City, State - Country - */ - - $addr_ary = array(); - $addr_ary[] = $street_value; - - if(!empty($street2_value)) - $addr_ary[] = $street2_value; - - $zip_line = trim($zip_value . " " . $city_value); - $zip_line .= !empty($zip_line) && !empty($state_value) ? ", {$state_value}" : $state_value; - $zip_line = trim($zip_line); - if(!empty($zip_line)) - $addr_ary[] = $zip_line; - - if(!empty($country_value)) - $addr_ary[] = $country_value; - - $address = implode("
    ", $addr_ary); - - } - else{ - $address = $street_value; - $address .= !empty($address) && !empty($street2_value) ? $line_break . $street2_value : $street2_value; - $address .= !empty($address) && (!empty($city_value) || !empty($state_value)) ? $line_break. $city_value : $city_value; - $address .= !empty($address) && !empty($city_value) && !empty($state_value) ? ", $state_value" : $state_value; - $address .= !empty($address) && !empty($zip_value) ? " $zip_value" : $zip_value; - $address .= !empty($address) && !empty($country_value) ? $line_break . $country_value : $country_value; - } - - //adding map link - if(!empty($address) && $format == "html"){ - $address_qs = str_replace($line_break, " ", $address); //replacing
    and \n with spaces - $address_qs = urlencode($address_qs); - $address .= "
    Map It"; - } - - return $address; - } - else{ - return ""; - } - break; - - case "email" : - return GFCommon::is_valid_email($value) && $format == "html" ? "$value" : $value; - break; - - case "website" : - return GFCommon::is_valid_url($value) && $format == "html" ? "$value" : $value; - break; - - case "checkbox" : - if(is_array($value)){ - - $items = ''; - - foreach($value as $key => $item){ - if(!empty($item)){ - switch($format){ - case "text" : - $items .= GFCommon::selection_display($item, $field, $currency, $use_text) . ", "; - break; - - default: - $items .= "
  • " . GFCommon::selection_display($item, $field, $currency, $use_text) . "
  • "; - break; - } - } - } - if(empty($items)){ - return ""; - } - else if($format == "text"){ - return substr($items, 0, strlen($items)-2); //removing last comma - } - else{ - return ""; - } - } - else{ - return $value; - } - break; - - case "post_image" : - $ary = explode("|:|", $value); - $url = count($ary) > 0 ? $ary[0] : ""; - $title = count($ary) > 1 ? $ary[1] : ""; - $caption = count($ary) > 2 ? $ary[2] : ""; - $description = count($ary) > 3 ? $ary[3] : ""; - - if(!empty($url)){ - $url = str_replace(" ", "%20", $url); - - switch($format){ - case "text" : - $value = $url; - $value .= !empty($title) ? "\n\n" . $field["label"] . " (" . __("Title", "gravityforms") . "): " . $title : ""; - $value .= !empty($caption) ? "\n\n" . $field["label"] . " (" . __("Caption", "gravityforms") . "): " . $caption : ""; - $value .= !empty($description) ? "\n\n" . $field["label"] . " (" . __("Description", "gravityforms") . "): " . $description : ""; - break; - - default : - $value = ""; - $value .= !empty($title) ? "
    Title: $title
    " : ""; - $value .= !empty($caption) ? "
    Caption: $caption
    " : ""; - $value .= !empty($description) ? "
    Description: $description
    ": ""; - - break; - } - } - return $value; - - case "fileupload" : - $output = ""; - if(!empty($value)){ - $output_arr = array(); - $file_paths = rgar($field,"multipleFiles") ? json_decode($value) : array($value); - foreach($file_paths as $file_path){ - $info = pathinfo($file_path); - if(self::is_ssl() && strpos($file_path, "http:") !== false ){ - $file_path = str_replace("http:", "https:", $file_path); - } - $file_path = esc_attr(str_replace(" ", "%20", $file_path)); - $output_arr[] = $format == "text" ? $file_path . PHP_EOL: "
  • " . $info["basename"] . "
  • "; - } - $output = join(PHP_EOL, $output_arr); - } - $output = empty($output) || $format == "text" ? $output : sprintf("", $output); - return $output; - break; - - case "date" : - return GFCommon::date_display($value, rgar($field, "dateFormat")); - break; - - case "radio" : - case "select" : - return GFCommon::selection_display($value, $field, $currency, $use_text); - break; - - case "multiselect" : - if(empty($value) || $format == "text") - return $value; - - $value = explode(",", $value); - - $items = ''; - foreach($value as $item){ - $items .= "
  • " . GFCommon::selection_display($item, $field, $currency, $use_text) . "
  • "; - } - - return ""; - - break; - - case "calculation" : - case "singleproduct" : - if(is_array($value) && !empty($value)){ - $product_name = trim($value[$field["id"] . ".1"]); - $price = trim($value[$field["id"] . ".2"]); - $quantity = trim($value[$field["id"] . ".3"]); - - $product = $product_name . ", " . __("Qty: ", "gravityforms") . $quantity . ", " . __("Price: ", "gravityforms") . $price; - return $product; - } - else{ - return ""; - } - break; - - case "number" : - return GFCommon::format_number($value, rgar($field, "numberFormat")); - break; - - case "singleshipping" : - case "donation" : - case "total" : - case "price" : - return GFCommon::to_money($value, $currency); - - case "list" : - if(empty($value)) - return ""; - $value = unserialize($value); - - $has_columns = is_array($value[0]); - - if(!$has_columns){ - $items = ''; - foreach($value as $key => $item){ - if(!empty($item)){ - switch($format){ - case "text" : - $items .= $item . ", "; - break; - case "url" : - $items .= $item . ","; - break; - default : - if($media == "email"){ - $items .= "
  • {$item}
  • "; - } - else{ - $items .= "
  • {$item}
  • "; - } - break; - } - } - } - - if(empty($items)){ - return ""; - } - else if($format == "text"){ - return substr($items, 0, strlen($items)-2); //removing last comma - } - else if($format == "url"){ - return substr($items, 0, strlen($items)-1); //removing last comma - } - else if($media == "email"){ - return ""; - } - else{ - return ""; - } - } - else if(is_array($value)){ - $columns = array_keys($value[0]); - - $list = ""; - - switch($format){ - case "text" : - $is_first_row = true; - foreach($value as $item){ - if(!$is_first_row) - $list .= "\n\n" . $field["label"] . ": "; - $list .= implode(",", array_values($item)); - - $is_first_row = false; - } - break; - - case "url" : - foreach($value as $item){ - $list .= implode("|", array_values($item)) . ","; - } - if(!empty($list)) - $list = substr($list, 0, strlen($list)-1); - break; - - default : - if($media == "email"){ - $list = "\n"; - - //reading columns from entry data - foreach($columns as $column){ - $list .= "\n"; - } - $list .= "\n"; - - $list .= ""; - foreach($value as $item){ - $list .= ""; - foreach($columns as $column){ - $val = rgar($item, $column); - $list .= "\n"; - } - - $list .="\n"; - } - - $list .="
    " . esc_html($column) . "
    {$val}
    \n"; - } - else{ - $list = "\n"; - - //reading columns from entry data - foreach($columns as $column){ - $list .= "\n"; - } - $list .= "\n"; - - $list .= ""; - foreach($value as $item){ - $list .= ""; - foreach($columns as $column){ - $val = rgar($item, $column); - $list .= "\n"; - } - - $list .="\n"; - } - - $list .="
    " . esc_html($column) . "
    {$val}
    \n"; - } - break; - } - - return $list; - } - return ""; - break; - - default : - if (!is_array($value)){ - return $format == "html" ? nl2br($value) : $value; + $entry_meta_keys = array_keys( GFFormsModel::get_entry_meta( $form['id'] ) ); + $match_count = 0; + if ( is_array( $logic['rules'] ) ) { + foreach ( $logic['rules'] as $rule ) { + + if ( in_array( $rule['fieldId'], $entry_meta_keys ) ) { + $is_value_match = GFFormsModel::is_value_match( rgar( $lead, $rule['fieldId'] ), $rule['value'], $rule['operator'], $rule, $form ); + } else { + $source_field = GFFormsModel::get_field( $form, $rule['fieldId'] ); + $field_value = empty( $lead ) ? GFFormsModel::get_field_value( $source_field, array() ) : GFFormsModel::get_lead_field_value( $lead, $source_field ); + $is_value_match = GFFormsModel::is_value_match( $field_value, $rule['value'], $rule['operator'], $source_field, $rule, $form ); } - break; - } - } - - public static function get_product_fields($form, $lead, $use_choice_text=false, $use_admin_label=false){ - $products = array(); - - $product_info = null; - // retrieve static copy of product info (only for "real" entries) - if(!rgempty("id", $lead)){ - $product_info = gform_get_meta(rgar($lead,'id'), "gform_product_info_{$use_choice_text}_{$use_admin_label}"); - } - - // if no static copy, generate from form/lead info - if(!$product_info) { - - foreach($form["fields"] as $field){ - $id = $field["id"]; - $lead_value = RGFormsModel::get_lead_field_value($lead, $field); - - $quantity_field = self::get_product_fields_by_type($form, array("quantity"), $id); - $quantity = sizeof($quantity_field) > 0 && !RGFormsModel::is_field_hidden($form, $quantity_field[0], array(), $lead) ? RGFormsModel::get_lead_field_value($lead, $quantity_field[0]) : 1; - - switch($field["type"]){ - - case "product" : - - //ignore products that have been hidden by conditional logic - $is_hidden = RGFormsModel::is_field_hidden($form, $field, array(), $lead); - if($is_hidden) - continue; - - //if single product, get values from the multiple inputs - if(is_array($lead_value)){ - $product_quantity = sizeof($quantity_field) == 0 && !rgar($field,"disableQuantity") ? rgget($id . ".3", $lead_value) : $quantity; - if(empty($product_quantity)) - continue; - - if(!rgget($id, $products)) - $products[$id] = array(); - - $products[$id]["name"] = $use_admin_label && !rgempty("adminLabel", $field) ? $field["adminLabel"] : $lead_value[$id . ".1"]; - $products[$id]["price"] = rgar($lead_value, $id . ".2"); - $products[$id]["quantity"] = $product_quantity; - } - else if(!empty($lead_value)){ - - if(empty($quantity)) - continue; - - if(!rgar($products,$id)) - $products[$id] = array(); - - if($field["inputType"] == "price"){ - $name = $field["label"]; - $price = $lead_value; - } - else{ - list($name, $price) = explode("|", $lead_value); - } - - $products[$id]["name"] = !$use_choice_text ? $name : RGFormsModel::get_choice_text($field, $name); - $products[$id]["price"] = $price; - $products[$id]["quantity"] = $quantity; - $products[$id]["options"] = array(); - } - - if(isset($products[$id])){ - $options = self::get_product_fields_by_type($form, array("option"), $id); - foreach($options as $option){ - $option_value = RGFormsModel::get_lead_field_value($lead, $option); - $option_label = empty($option["adminLabel"]) ? $option["label"] : $option["adminLabel"]; - if(is_array($option_value)){ - foreach($option_value as $value){ - $option_info = self::get_option_info($value, $option, $use_choice_text); - if(!empty($option_info)) - $products[$id]["options"][] = array("field_label" => rgar($option, "label"), "option_name"=> rgar($option_info, "name"), "option_label" => $option_label . ": " . rgar($option_info, "name"), "price" => rgar($option_info,"price")); - } - } - else if(!empty($option_value)){ - $option_info = self::get_option_info($option_value, $option, $use_choice_text); - $products[$id]["options"][] = array("field_label" => rgar($option, "label"), "option_name"=> rgar($option_info, "name"), "option_label" => $option_label . ": " . rgar($option_info, "name"), "price" => rgar($option_info,"price")); - } - - } - } - break; - } - } - - $shipping_field = self::get_fields_by_type($form, array("shipping")); - $shipping_price = $shipping_name = ""; - $shipping_field_id = ""; - if(!empty($shipping_field) && !RGFormsModel::is_field_hidden($form, $shipping_field[0], array(), $lead)){ - $shipping_price = RGFormsModel::get_lead_field_value($lead, $shipping_field[0]); - $shipping_name = $shipping_field[0]["label"]; - $shipping_field_id = $shipping_field[0]["id"]; - if($shipping_field[0]["inputType"] != "singleshipping"){ - list($shipping_method, $shipping_price) = explode("|", $shipping_price); - $shipping_name = $shipping_field[0]["label"] . " ($shipping_method)"; - } - } - $shipping_price = self::to_number($shipping_price); - - $product_info = array("products" => $products, "shipping" => array("id"=> $shipping_field_id, "name" => $shipping_name, "price" => $shipping_price)); - - $product_info = apply_filters("gform_product_info_{$form["id"]}", apply_filters("gform_product_info", $product_info, $form, $lead), $form, $lead); - - // save static copy of product info (only for "real" entries) - if(!rgempty("id", $lead) && !empty($product_info["products"])){ - gform_update_meta($lead['id'], "gform_product_info_{$use_choice_text}_{$use_admin_label}", $product_info); - } - } - - return $product_info; - } - - public static function get_order_total($form, $lead) { - - $products = self::get_product_fields($form, $lead, false); - return self::get_total($products); - } - - public static function get_total($products) { - - $total = 0; - foreach($products["products"] as $product){ - - $price = self::to_number($product["price"]); - if(is_array(rgar($product,"options"))){ - foreach($product["options"] as $option){ - $price += self::to_number($option["price"]); - } - } - $subtotal = floatval($product["quantity"]) * $price; - $total += $subtotal; - - } - - $total += floatval($products["shipping"]["price"]); - - return $total; - } - - public static function get_option_info($value, $option, $use_choice_text){ - if(empty($value)) - return array(); - - list($name, $price) = explode("|", $value); - if($use_choice_text) - $name = RGFormsModel::get_choice_text($option, $name); - - return array("name" => $name, "price" => $price); - } - - public static function gform_do_shortcode($content){ - - $is_ajax = false; - $forms = GFFormDisplay::get_embedded_forms($content, $is_ajax); - foreach($forms as $form){ - if( headers_sent() ) { - GFFormDisplay::print_form_scripts( $form, $is_ajax ); - } else { - GFFormDisplay::enqueue_form_scripts( $form, $is_ajax ); - } - } + if ( $is_value_match ) { + $match_count ++; + } + } + } - return do_shortcode($content); - } + $do_action = ( $logic['logicType'] == 'all' && $match_count == sizeof( $logic['rules'] ) ) || ( $logic['logicType'] == 'any' && $match_count > 0 ); - public static function spam_enabled( $form_id ) { - $spam_enabled = self::akismet_enabled( $form_id ) || has_filter( 'gform_entry_is_spam' ) || has_filter( "gform_entry_is_spam_{$form_id}" ); + return $do_action; + } - return $spam_enabled; + public static function get_card_types() { + $cards = array( + + array( + 'name' => 'American Express', + 'slug' => 'amex', + 'lengths' => '15', + 'prefixes' => '34,37', + 'checksum' => true, + ), + array( + 'name' => 'Discover', + 'slug' => 'discover', + 'lengths' => '16', + 'prefixes' => '6011,622,64,65', + 'checksum' => true, + ), + array( + 'name' => 'MasterCard', + 'slug' => 'mastercard', + 'lengths' => '16', + 'prefixes' => '51,52,53,54,55', + 'checksum' => true, + ), + array( + 'name' => 'Visa', + 'slug' => 'visa', + 'lengths' => '13,16', + 'prefixes' => '4,417500,4917,4913,4508,4844', + 'checksum' => true, + ), + array( + 'name' => 'JCB', + 'slug' => 'jcb', + 'lengths' => '16', + 'prefixes' => '35', + 'checksum' => true, + ), + array( + 'name' => 'Maestro', + 'slug' => 'maestro', + 'lengths' => '12,13,14,15,16,18,19', + 'prefixes' => '5018,5020,5038,6304,6759,6761', + 'checksum' => true, + ), + ); + + $cards = apply_filters( 'gform_creditcard_types', $cards ); + + return $cards; } - public static function has_akismet(){ - $akismet_exists = function_exists('akismet_http_post') || function_exists('Akismet::http_post'); - return $akismet_exists; - } + public static function get_card_type( $number ) { - public static function akismet_enabled($form_id) { + //removing spaces from number + $number = str_replace( ' ', '', $number ); - if(!self::has_akismet()){ - return false; + if ( empty( $number ) ) { + return false; } - // if no option is set, leave akismet enabled; otherwise, use option value true/false - $enabled_by_setting = get_option('rg_gforms_enable_akismet') === false ? true : get_option('rg_gforms_enable_akismet') == true; - $enabled_by_filter = apply_filters("gform_akismet_enabled_$form_id", apply_filters("gform_akismet_enabled", $enabled_by_setting)); - - return $enabled_by_filter; + $cards = self::get_card_types(); - } - - public static function is_akismet_spam($form, $lead){ - - global $akismet_api_host, $akismet_api_port; - - $fields = self::get_akismet_fields($form, $lead); - - //Submitting info to Akismet - if (defined("AKISMET_VERSION") && AKISMET_VERSION < 3.0 ) { - //Akismet versions before 3.0 - $response = akismet_http_post($fields, $akismet_api_host, '/1.1/comment-check', $akismet_api_port ); - } - else{ - $response = Akismet::http_post($fields, 'comment-check'); + $matched_card = false; + foreach ( $cards as $card ) { + if ( self::matches_card_type( $number, $card ) ) { + $matched_card = $card; + break; + } } - $is_spam = trim(rgar($response, 1)) == "true"; - - return $is_spam; - } - - public static function mark_akismet_spam($form, $lead, $is_spam){ - - global $akismet_api_host, $akismet_api_port; - $fields = self::get_akismet_fields($form, $lead); - $as = $is_spam ? "spam" : "ham"; - - //Submitting info to Akismet - if (defined("AKISMET_VERSION") && AKISMET_VERSION < 3.0 ) { - //Akismet versions before 3.0 - akismet_http_post($fields, $akismet_api_host, '/1.1/submit-'.$as, $akismet_api_port ); - } - else{ - Akismet::http_post($fields, 'submit-'.$as); + if ( $matched_card && $matched_card['checksum'] && ! self::is_valid_card_checksum( $number ) ) { + $matched_card = false; } - } - private static function get_akismet_fields($form, $lead){ - //Gathering Akismet information - $akismet_info = array(); - $akismet_info['comment_type'] = 'gravity_form'; - $akismet_info['comment_author'] = self::get_akismet_field("name", $form, $lead); - $akismet_info['comment_author_email'] = self::get_akismet_field("email", $form, $lead); - $akismet_info['comment_author_url'] = self::get_akismet_field("website", $form, $lead); - $akismet_info['comment_content'] = self::get_akismet_field("textarea", $form, $lead); - $akismet_info['contact_form_subject'] = $form["title"]; - $akismet_info['comment_author_IP'] = $lead["ip"]; - $akismet_info['permalink'] = $lead["source_url"]; - $akismet_info['user_ip'] = preg_replace( '/[^0-9., ]/', '', $lead["ip"] ); - $akismet_info['user_agent'] = $lead["user_agent"]; - $akismet_info['referrer'] = is_admin() ? "" : $_SERVER['HTTP_REFERER']; - $akismet_info['blog'] = get_option('home'); - - $akismet_info = apply_filters("gform_akismet_fields_{$form["id"]}", apply_filters("gform_akismet_fields", $akismet_info, $form, $lead), $form, $lead); - - return http_build_query($akismet_info); - } - - private static function get_akismet_field($field_type, $form, $lead){ - $fields = GFCommon::get_fields_by_type($form, array($field_type)); - if(empty($fields)) - return ""; + return $matched_card ? $matched_card : false; - $value = RGFormsModel::get_lead_field_value($lead, $fields[0]); - switch($field_type){ - case "name" : - $value = GFCommon::get_lead_field_display($fields[0], $value); - break; - } + } - return $value; - } + private static function matches_card_type( $number, $card ) { - public static function get_other_choice_value(){ - $value = apply_filters('gform_other_choice_value', __("Other", "gravityforms")); - return $value; - } + //checking prefix + $prefixes = explode( ',', $card['prefixes'] ); + $matches_prefix = false; + foreach ( $prefixes as $prefix ) { + if ( preg_match( "|^{$prefix}|", $number ) ) { + $matches_prefix = true; + break; + } + } - public static function get_browser_class() { - global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $post; - - $classes = array(); - - //adding browser related class - if($is_lynx) $classes[] = 'gf_browser_lynx'; - else if($is_gecko) $classes[] = 'gf_browser_gecko'; - else if($is_opera) $classes[] = 'gf_browser_opera'; - else if($is_NS4) $classes[] = 'gf_browser_ns4'; - else if($is_safari) $classes[] = 'gf_browser_safari'; - else if($is_chrome) $classes[] = 'gf_browser_chrome'; - else if($is_IE) $classes[] = 'gf_browser_ie'; - else $classes[] = 'gf_browser_unknown'; - - - //adding IE version - if($is_IE){ - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false) - $classes[] = 'gf_browser_ie6'; - else if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false) - $classes[] = 'gf_browser_ie7'; - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') !== false) - $classes[] = 'gf_browser_ie8'; - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 9') !== false) - $classes[] = 'gf_browser_ie9'; - } + //checking length + $lengths = explode( ',', $card['lengths'] ); + $matches_length = false; + foreach ( $lengths as $length ) { + if ( strlen( $number ) == absint( $length ) ) { + $matches_length = true; + break; + } + } - if($is_iphone) $classes[] = 'gf_browser_iphone'; + return $matches_prefix && $matches_length; - return implode(" " , $classes); - } + } - public static function create_post($form, &$lead) { - $disable_post = apply_filters("gform_disable_post_creation_{$form["id"]}", apply_filters("gform_disable_post_creation", false, $form, $lead), $form, $lead); - $post_id = 0; - if(!$disable_post){ - //creates post if the form has any post fields - $post_id = RGFormsModel::create_post($form, $lead); - } + private static function is_valid_card_checksum( $number ) { + $checksum = 0; + $num = 0; + $multiplier = 1; - return $post_id; - } + // Process each character starting at the right + for ( $i = strlen( $number ) - 1; $i >= 0; $i -- ) { - public static function evaluate_conditional_logic($logic, $form, $lead) { + //Multiply current digit by multiplier (1 or 2) + $num = $number{$i} * $multiplier; - if(!$logic || !is_array(rgar($logic,"rules"))) - return true; + // If the result is in greater than 9, add 1 to the checksum total + if ( $num >= 10 ) { + $checksum ++; + $num -= 10; + } - $entry_meta_keys = array_keys(GFFormsModel::get_entry_meta($form["id"])); - $match_count = 0; - if(is_array($logic["rules"])){ - foreach($logic["rules"] as $rule) { + //Update checksum + $checksum += $num; - if (in_array($rule["fieldId"], $entry_meta_keys)){ - $is_value_match = GFFormsModel::is_value_match(rgar($lead,$rule["fieldId"]), $rule["value"], $rule["operator"], null, $rule, $form ); - } else { - $source_field = GFFormsModel::get_field($form, $rule["fieldId"]); - $field_value = empty($lead) ? GFFormsModel::get_field_value($source_field, array()) : GFFormsModel::get_lead_field_value($lead, $source_field); - $is_value_match = GFFormsModel::is_value_match( $field_value, $rule["value"], $rule["operator"], $source_field, $rule, $form ); - } + //Update multiplier + $multiplier = $multiplier == 1 ? 2 : 1; + } - if($is_value_match) - $match_count++; + return $checksum % 10 == 0; - } - } + } - $do_action = ($logic["logicType"] == "all" && $match_count == sizeof($logic["rules"]) ) || ($logic["logicType"] == "any" && $match_count > 0); - return $do_action; - } + public static function is_wp_version( $min_version ) { + return ! version_compare( get_bloginfo( 'version' ), "{$min_version}.dev1", '<' ); + } - public static function get_card_types(){ - $cards = array ( - - array ( 'name' => 'American Express', - 'slug' => 'amex', - 'lengths' => '15', - 'prefixes' => '34,37', - 'checksum' => true - ), - array ( 'name' => 'Discover', - 'slug' => 'discover', - 'lengths' => '16', - 'prefixes' => '6011,622,64,65', - 'checksum' => true - ), - array ( 'name' => 'MasterCard', - 'slug' => 'mastercard', - 'lengths' => '16', - 'prefixes' => '51,52,53,54,55', - 'checksum' => true - ), - array ( 'name' => 'Visa', - 'slug' => 'visa', - 'lengths' => '13,16', - 'prefixes' => '4,417500,4917,4913,4508,4844', - 'checksum' => true - ), - array ( 'name' => 'JCB', - 'slug' => 'jcb', - 'lengths' => '16', - 'prefixes' => '35', - 'checksum' => true - ), - array ( 'name' => 'Maestro', - 'slug' => 'maestro', - 'lengths' => '12,13,14,15,16,18,19', - 'prefixes' => '5018,5020,5038,6304,6759,6761', - 'checksum' => true - ) - - ); - - $cards = apply_filters("gform_creditcard_types", $cards); - - return $cards; - } + public static function add_categories_as_choices( $field, $value ) { - public static function get_card_type($number){ + $choices = $inputs = array(); + $is_post = isset( $_POST['gform_submit'] ); + $has_placeholder = $field->categoryInitialItemEnabled && RGFormsModel::get_input_type( $field ) == 'select'; - //removing spaces from number - $number = str_replace (' ', '', $number); + if ( $has_placeholder ) { + $choices[] = array( 'text' => $field->categoryInitialItem, 'value' => '', 'isSelected' => true ); + } - if(empty($number)) - return false; + $display_all = $field->displayAllCategories; - $cards = self::get_card_types(); + $args = array( 'hide_empty' => false, 'orderby' => 'name' ); - $matched_card = false; - foreach($cards as $card){ - if(self::matches_card_type($number, $card)){ - $matched_card = $card; - break; - } - } + if ( ! $display_all ) { + foreach ( $field->choices as $field_choice_to_include ) { + $args['include'][] = $field_choice_to_include['value']; + } + } - if($matched_card && $matched_card["checksum"] && !self::is_valid_card_checksum($number)) - $matched_card = false; + $args = apply_filters( "gform_post_category_args_{$field->id}", apply_filters( 'gform_post_category_args', $args, $field ), $field ); + $terms = get_terms( 'category', $args ); + + $terms_copy = unserialize( serialize( $terms ) ); // deep copy the terms to avoid repeating GFCategoryWalker on previously cached terms. + $walker = new GFCategoryWalker(); + $categories = $walker->walk( $terms_copy, 0, array( 0 ) ); // 3rd parameter prevents notices triggered by $walker::display_element() function which checks $args[0] + + foreach ( $categories as $category ) { + if ( $display_all ) { + $selected = $value == $category->term_id || + ( + empty( $value ) && + get_option( 'default_category' ) == $category->term_id && + RGFormsModel::get_input_type( $field ) == 'select' && // only preselect default category on select fields + ! $is_post && + ! $has_placeholder + ); + $choices[] = array( 'text' => $category->name, 'value' => $category->term_id, 'isSelected' => $selected ); + } else { + foreach ( $field->choices as $field_choice ) { + if ( $field_choice['value'] == $category->term_id ) { + $choices[] = array( 'text' => $category->name, 'value' => $category->term_id ); + break; + } + } + } + } - return $matched_card ? $matched_card : false; + if ( empty( $choices ) ) { + $choices[] = array( 'text' => 'You must select at least one category.', 'value' => '' ); + } - } + $choice_number = 1; + foreach ( $choices as $choice ) { - private static function matches_card_type($number, $card){ + if ( $choice_number % 10 == 0 ) { + //hack to skip numbers ending in 0. so that 5.1 doesn't conflict with 5.10 + $choice_number ++; + } - //checking prefix - $prefixes = explode(',',$card['prefixes']); - $matches_prefix = false; - foreach($prefixes as $prefix){ - if(preg_match("|^{$prefix}|", $number)){ - $matches_prefix = true; - break; - } - } + $input_id = $field->id . '.' . $choice_number; + $inputs[] = array( 'id' => $input_id, 'label' => $choice['text'], 'name' => '' ); + $choice_number ++; + } - //checking length - $lengths = explode(',',$card['lengths']); - $matches_length = false; - foreach($lengths as $length){ - if(strlen($number) == absint($length)){ - $matches_length = true; - break; - } - } + $field->choices = $choices; - return $matches_prefix && $matches_length; + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; - } + $form_id = $is_admin ? rgget( 'id' ) : $field->formId; - private static function is_valid_card_checksum($number){ - $checksum = 0; - $num = 0; - $multiplier = 1; + $field->choices = apply_filters( 'gform_post_category_choices', $field->choices, $field, $form_id ); + $field->choices = apply_filters( "gform_post_category_choices_{$form_id}_{$field->id}", $field->choices, $field, $form_id ); - // Process each character starting at the right - for ($i = strlen($number) - 1; $i >= 0; $i--) { + if ( RGFormsModel::get_input_type( $field ) == 'checkbox' ) { + $field->inputs = $inputs; + } - //Multiply current digit by multiplier (1 or 2) - $num = $number{$i} * $multiplier; + return $field; + } - // If the result is in greater than 9, add 1 to the checksum total - if ($num >= 10) { - $checksum++; - $num -= 10; - } + public static function prepare_post_category_value( $value, $field, $mode = 'entry_detail' ) { - //Update checksum - $checksum += $num; + if ( ! is_array( $value ) ) { + $value = explode( ',', $value ); + } - //Update multiplier - $multiplier = $multiplier == 1 ? 2 : 1; - } + $cat_names = array(); + $cat_ids = array(); + foreach ( $value as $cat_string ) { + $ary = explode( ':', $cat_string ); + $cat_name = count( $ary ) > 0 ? $ary[0] : ''; + $cat_id = count( $ary ) > 1 ? $ary[1] : $ary[0]; - return $checksum % 10 == 0; + if ( ! empty( $cat_name ) ) { + $cat_names[] = $cat_name; + } - } + if ( ! empty( $cat_id ) ) { + $cat_ids[] = $cat_id; + } + } - public static function is_wp_version($min_version){ - return !version_compare(get_bloginfo("version"), "{$min_version}.dev1", '<'); - } + sort( $cat_names ); - public static function add_categories_as_choices($field, $value) { + switch ( $mode ) { + case 'entry_list': + $value = self::implode_non_blank( ', ', $cat_names ); + break; + case 'entry_detail': + $value = RGFormsModel::get_input_type( $field ) == 'checkbox' ? $cat_names : self::implode_non_blank( ', ', $cat_names ); + break; + case 'conditional_logic': + $value = array_values( $cat_ids ); + break; + } - $choices = $inputs = array(); - $is_post = isset($_POST["gform_submit"]); - $has_placeholder = rgar($field, 'categoryInitialItemEnabled') && RGFormsModel::get_input_type($field) == 'select'; + return $value; + } - if($has_placeholder) - $choices[] = array('text' => rgar($field, 'categoryInitialItem'), 'value' => '', 'isSelected' => true); + public static function calculate( $field, $form, $lead ) { - $display_all = rgar($field, "displayAllCategories"); + $formula = (string) apply_filters( 'gform_calculation_formula', $field->calculationFormula, $field, $form, $lead ); - $args = array('hide_empty' => false, 'orderby' => 'name'); + // replace multiple spaces and new lines with single space + // @props: http://stackoverflow.com/questions/3760816/remove-new-lines-from-string + $formula = trim( preg_replace( '/\s+/', ' ', $formula ) ); - if(!$display_all){ - foreach($field["choices"] as $field_choice_to_include){ - $args["include"][] = $field_choice_to_include["value"]; - } - } + preg_match_all( '/{[^{]*?:(\d+(\.\d+)?)(:(.*?))?}/mi', $formula, $matches, PREG_SET_ORDER ); - $args = apply_filters("gform_post_category_args_{$field["id"]}", apply_filters("gform_post_category_args", $args, $field), $field); - $terms = get_terms('category', $args); - - $terms_copy = unserialize(serialize($terms)); // deep copy the terms to avoid repeating GFCategoryWalker on previously cached terms. - $walker = new GFCategoryWalker(); - $categories = $walker->walk($terms_copy, 0, array(0)); // 3rd parameter prevents notices triggered by $walker::display_element() function which checks $args[0] - - foreach($categories as $category) { - if($display_all) { - $selected = $value == $category->term_id || - ( - empty($value) && - get_option('default_category') == $category->term_id && - RGFormsModel::get_input_type($field) == 'select' && // only preselect default category on select fields - !$is_post && - !$has_placeholder - ); - $choices[] = array('text' => $category->name, 'value' => $category->term_id, 'isSelected' => $selected); - } else { - foreach($field["choices"] as $field_choice){ - if($field_choice["value"] == $category->term_id){ - $choices[] = array('text' => $category->name, 'value' => $category->term_id); - break; - } - } - } - } + if ( is_array( $matches ) ) { + foreach ( $matches as $match ) { - if(empty($choices)) - $choices[] = array('text' => 'You must select at least one category.', 'value' => ''); + list( $text, $input_id ) = $match; + $value = self::get_calculation_value( $input_id, $form, $lead ); + $value = apply_filters( 'gform_merge_tag_value_pre_calculation', $value, $input_id, rgar( $match, 4 ), $field, $form, $lead ); + $formula = str_replace( $text, $value, $formula ); - $choice_number = 1; - foreach($choices as $choice) { + } + } - if($choice_number % 10 == 0) //hack to skip numbers ending in 0. so that 5.1 doesn't conflict with 5.10 - $choice_number++; + $result = preg_match( '/^[0-9 -\/*\(\)]+$/', $formula ) ? eval( "return {$formula};" ) : false; + $result = apply_filters( 'gform_calculation_result', $result, $formula, $field, $form, $lead ); - $input_id = $field["id"] . '.' . $choice_number; - $inputs[] = array('id' => $input_id, 'label' => $choice['text'], 'name' => ''); - $choice_number++; - } + return $result; + } - $field['choices'] = $choices; + public static function round_number( $number, $rounding ) { + if ( is_numeric( $rounding ) && $rounding >= 0 ) { + $number = round( $number, $rounding ); + } - $form_id = IS_ADMIN ? rgget("id") : rgar($field,"formId"); + return $number; + } - $field['choices'] = apply_filters("gform_post_category_choices", $field["choices"], $field, $form_id); - $field['choices'] = apply_filters("gform_post_category_choices_{$form_id}_{$field["id"]}", $field["choices"], $field, $form_id); + public static function get_calculation_value( $field_id, $form, $lead ) { - if(RGFormsModel::get_input_type($field) == 'checkbox') - $field['inputs'] = $inputs; + $filters = array( 'price', 'value', '' ); + $value = false; - return $field; - } + foreach ( $filters as $filter ) { + if ( is_numeric( $value ) ) { + //value found, exit loop + break; + } + $value = GFCommon::to_number( GFCommon::replace_variables( "{:{$field_id}:$filter}", $form, $lead ) ); + } - public static function prepare_post_category_value($value, $field, $mode = 'entry_detail') { + if ( ! $value || ! is_numeric( $value ) ) { + GFCommon::log_debug( "GFCommon::get_calculation_value(): No value or non-numeric value available for field #{$field_id}. Returning zero instead." ); + $value = 0; + } - if(!is_array($value)) - $value = explode(',', $value); + return $value; + } - $cat_names = array(); - $cat_ids = array(); - foreach($value as $cat_string) { - $ary = explode(":", $cat_string); - $cat_name = count($ary) > 0 ? $ary[0] : ""; - $cat_id = count($ary) > 1 ? $ary[1] : $ary[0]; + public static function conditional_shortcode( $attributes, $content = null ) { - if(!empty($cat_name)) - $cat_names[] = $cat_name; + extract( + shortcode_atts( + array( + 'merge_tag' => '', + 'condition' => '', + 'value' => '', + ), $attributes + ) + ); - if(!empty($cat_id)) - $cat_ids[] = $cat_id; - } + return RGFormsModel::matches_operation( $merge_tag, $value, $condition ) ? do_shortcode( $content ) : ''; - sort($cat_names); - - switch($mode) { - case 'entry_list': - $value = self::implode_non_blank(', ', $cat_names); - break; - case 'entry_detail': - $value = RGFormsModel::get_input_type($field) == 'checkbox' ? $cat_names : self::implode_non_blank(', ', $cat_names); - break; - case 'conditional_logic': - $value = array_values($cat_ids); - break; - } + } - return $value; - } + public static function is_valid_for_calcuation( $field ) { - public static function calculate($field, $form, $lead) { + $supported_input_types = array( 'text', 'select', 'number', 'checkbox', 'radio', 'hidden', 'singleproduct', 'price', 'hiddenproduct', 'calculation', 'singleshipping' ); + $unsupported_field_types = array( 'category' ); + $input_type = RGFormsModel::get_input_type( $field ); - $formula = (string) apply_filters( 'gform_calculation_formula', rgar( $field, 'calculationFormula' ), $field, $form, $lead ); + return in_array( $input_type, $supported_input_types ) && ! in_array( $input_type, $unsupported_field_types ); + } - // replace multiple spaces and new lines with single space - // @props: http://stackoverflow.com/questions/3760816/remove-new-lines-from-string - $formula = trim( preg_replace( '/\s+/', ' ', $formula ) ); + public static function log_error( $message ) { + if ( class_exists( 'GFLogging' ) ) { + GFLogging::include_logger(); + GFLogging::log_message( 'gravityforms', $message, KLogger::ERROR ); + } + } - preg_match_all( '/{[^{]*?:(\d+(\.\d+)?)(:(.*?))?}/mi', $formula, $matches, PREG_SET_ORDER ); + public static function log_debug( $message ) { + if ( class_exists( 'GFLogging' ) ) { + GFLogging::include_logger(); + GFLogging::log_message( 'gravityforms', $message, KLogger::DEBUG ); + } + } - if( is_array( $matches ) ) { - foreach( $matches as $match ) { + public static function echo_if( $condition, $text ) { - list( $text, $input_id ) = $match; - $value = self::get_calculation_value( $input_id, $form, $lead); - $formula = str_replace( $text, $value, $formula); + switch ( $text ) { + case 'checked': + $text = 'checked="checked"'; + break; + case 'selected': + $text = 'selected="selected"'; + } - } - } + echo $condition ? $text : ''; + } - $result = preg_match( '/^[0-9 -\/*\(\)]+$/', $formula ) ? eval( "return {$formula};" ) : false; - $result = apply_filters( 'gform_calculation_result', $result, $formula, $field, $form, $lead ); + public static function gf_global( $echo = true ) { - return $result; - } + require_once( GFCommon::get_base_path() . '/currency.php' ); - public static function round_number($number, $rounding ){ - if(is_numeric($rounding) && $rounding >= 0){ - $number = round($number, $rounding); - } - return $number; - } + $gf_global = array(); + $gf_global['gf_currency_config'] = RGCurrency::get_currency( GFCommon::get_currency() ); + $gf_global['base_url'] = GFCommon::get_base_url(); + $gf_global['number_formats'] = array(); + $gf_global['spinnerUrl'] = GFCommon::get_base_url() . '/images/spinner.gif'; - public static function get_calculation_value($field_id, $form, $lead) { + $gf_global_json = 'var gf_global = ' . json_encode( $gf_global ) . ';'; - $filters = array('price', 'value', ''); - $value = false; + if ( ! $echo ) { + return $gf_global_json; + } - foreach($filters as $filter) { - if (is_numeric($value)){ - //value found, exit loop - break; - } - $value = GFCommon::to_number(GFCommon::replace_variables("{:{$field_id}:$filter}", $form, $lead)); - } + echo $gf_global_json; + } - if(!$value || !is_numeric($value)) - $value = 0; + public static function gf_vars( $echo = true ) { + if ( ! class_exists( 'RGCurrency' ) ) { + require_once( 'currency.php' ); + } - return $value; - } + $gf_vars = array(); + $gf_vars['active'] = __( 'Active' , 'gravityforms' ); + $gf_vars['inactive'] = __( 'Inactive' , 'gravityforms' ); + $gf_vars['save'] = __( 'Save' , 'gravityforms' ); + $gf_vars['update'] = __( 'Update' , 'gravityforms' ); + $gf_vars['previousLabel'] = __( 'Previous' , 'gravityforms' ); + $gf_vars['selectFormat'] = __( 'Select a format' , 'gravityforms' ); + $gf_vars['editToViewAll'] = __( '5 of %d items shown. Edit field to view all' , 'gravityforms' ); + $gf_vars['enterValue'] = __( 'Enter a value' , 'gravityforms' ); + $gf_vars['formTitle'] = __( 'Untitled Form' , 'gravityforms' ); + $gf_vars['formDescription'] = __( 'We would love to hear from you! Please fill out this form and we will get in touch with you shortly.' , 'gravityforms' ); + $gf_vars['formConfirmationMessage'] = __( 'Thanks for contacting us! We will get in touch with you shortly.' , 'gravityforms' ); + $gf_vars['buttonText'] = __( 'Submit' , 'gravityforms' ); + $gf_vars['loading'] = __( 'Loading...' , 'gravityforms' ); + $gf_vars['thisFieldIf'] = __( 'this field if', 'gravityforms' ); + $gf_vars['thisPage'] = __( 'this page' , 'gravityforms' ); + $gf_vars['thisFormButton'] = __( 'this form button if', 'gravityforms' ); + $gf_vars['show'] = __( 'Show', 'gravityforms' ); + $gf_vars['hide'] = __( 'Hide', 'gravityforms' ); + $gf_vars['all'] = __( 'All', 'gravityforms' ); + $gf_vars['any'] = __( 'Any', 'gravityforms' ); + $gf_vars['ofTheFollowingMatch'] = __( 'of the following match:', 'gravityforms' ); + $gf_vars['is'] = __( 'is', 'gravityforms' ); + $gf_vars['isNot'] = __( 'is not', 'gravityforms' ); + $gf_vars['greaterThan'] = __( 'greater than', 'gravityforms' ); + $gf_vars['lessThan'] = __( 'less than', 'gravityforms' ); + $gf_vars['contains'] = __( 'contains', 'gravityforms' ); + $gf_vars['startsWith'] = __( 'starts with', 'gravityforms' ); + $gf_vars['endsWith'] = __( 'ends with', 'gravityforms' ); + + $gf_vars['thisConfirmation'] = __( 'Use this confirmation if', 'gravityforms' ); + $gf_vars['thisNotification'] = __( 'Send this notification if', 'gravityforms' ); + $gf_vars['confirmationSave'] = __( 'Save', 'gravityforms' ); + $gf_vars['confirmationSaving'] = __( 'Saving...', 'gravityforms' ); + $gf_vars['confirmationAreYouSure'] = __( 'Are you sure you wish to cancel these changes?', 'gravityforms' ); + $gf_vars['confirmationIssueSaving'] = __( 'There was an issue saving this confirmation.', 'gravityforms' ); + $gf_vars['confirmationConfirmDelete'] = __( 'Are you sure you wish to delete this confirmation?', 'gravityforms' ); + $gf_vars['confirmationIssueDeleting'] = __( 'There was an issue deleting this confirmation.', 'gravityforms' ); + $gf_vars['confirmationConfirmDiscard'] = __( 'There are unsaved changes to the current confirmation. Would you like to discard these changes?', 'gravityforms' ); + $gf_vars['confirmationDefaultName'] = __( 'Untitled Confirmation', 'gravityforms' ); + $gf_vars['confirmationDefaultMessage'] = __( 'Thanks for contacting us! We will get in touch with you shortly.', 'gravityforms' ); + $gf_vars['confirmationInvalidPageSelection'] = __( 'Please select a page.', 'gravityforms' ); + $gf_vars['confirmationInvalidRedirect'] = __( 'Please enter a URL.', 'gravityforms' ); + $gf_vars['confirmationInvalidName'] = __( 'Please enter a confirmation name.', 'gravityforms' ); + + $gf_vars['conditionalLogicDependency'] = __( 'This form contains conditional logic dependent upon this field. Are you sure you want to delete this field? \'OK\' to delete, \'Cancel\' to abort.', 'gravityforms' ); + $gf_vars['conditionalLogicDependencyChoice'] = __( 'This form contains conditional logic dependent upon this choice. Are you sure you want to delete this choice? \'OK\' to delete, \'Cancel\' to abort.', 'gravityforms' ); + $gf_vars['conditionalLogicDependencyChoiceEdit'] = __( 'This form contains conditional logic dependent upon this choice. Are you sure you want to modify this choice? \'OK\' to delete, \'Cancel\' to abort.', 'gravityforms' ); + + $gf_vars['mergeTagsTooltip'] = __( '
    Merge Tags
    Merge tags allow you to dynamically populate submitted field values in your form content wherever this merge tag icon is present.', 'gravityforms' ); + + $gf_vars['baseUrl'] = GFCommon::get_base_url(); + $gf_vars['gf_currency_config'] = RGCurrency::get_currency( GFCommon::get_currency() ); + $gf_vars['otherChoiceValue'] = GFCommon::get_other_choice_value(); + $gf_vars['isFormTrash'] = false; + $gf_vars['currentlyAddingField'] = false; + + $gf_vars['addFieldFilter'] = __( 'Add a condition' , 'gravityforms' ); + $gf_vars['removeFieldFilter'] = __( 'Remove a condition' , 'gravityforms' ); + $gf_vars['filterAndAny'] = __( 'Include results if {0} match:' , 'gravityforms' ); + + $gf_vars['customChoices'] = __( 'Custom Choices', 'gravityforms' ); + $gf_vars['predefinedChoices'] = __( 'Predefined Choices', 'gravityforms' ); + + + if ( is_admin() && rgget( 'id' ) ) { + $form = RGFormsModel::get_form_meta( rgget( 'id' ) ); + $gf_vars['mergeTags'] = GFCommon::get_merge_tags( $form['fields'], '', false ); + } - public static function conditional_shortcode($attributes, $content = null) { + $gf_vars_json = 'var gf_vars = ' . json_encode( $gf_vars ) . ';'; - extract(shortcode_atts(array( - 'merge_tag' => '', - 'condition' => '', - 'value' => '' - ), $attributes)); + if ( ! $echo ) { + return $gf_vars_json; + } else { + echo $gf_vars_json; + } + } - return RGFormsModel::matches_operation($merge_tag, $value, $condition) ? do_shortcode($content) : ''; + public static function is_bp_active() { + return defined( 'BP_VERSION' ) ? true : false; + } - } + public static function add_message( $message, $is_error = false ) { + if ( $is_error ) { + self::$errors[] = $message; + } else { + self::$messages[] = $message; + } + } - public static function is_valid_for_calcuation($field) { + public static function add_error_message( $message ) { + self::add_message( $message, true ); + } - $supported_input_types = array('text', 'select', 'number', 'checkbox', 'radio', 'hidden', 'singleproduct', 'price', 'hiddenproduct', 'calculation', 'singleshipping'); - $unsupported_field_types = array('category'); - $input_type = RGFormsModel::get_input_type($field); + public static function display_admin_message( $errors = false, $messages = false ) { - return in_array($input_type, $supported_input_types) && !in_array($input_type, $unsupported_field_types); - } + if ( ! $errors ) { + $errors = self::$errors; + } - public static function log_error($message){ - if(class_exists("GFLogging")) - { - GFLogging::include_logger(); - GFLogging::log_message("gravityforms", $message, KLogger::ERROR); - } - } + if ( ! $messages ) { + $messages = self::$messages; + } - public static function log_debug($message){ - if(class_exists("GFLogging")) - { - GFLogging::include_logger(); - GFLogging::log_message("gravityforms", $message, KLogger::DEBUG); - } - } + $errors = apply_filters( 'gform_admin_error_messages', $errors ); + $messages = apply_filters( 'gform_admin_messages', $messages ); + + if ( ! empty( $errors ) ) { + ?> +
    + 1 ) { ?> + + +

    + +
    + +
    + 1 ) { ?> + + +

    + +
    + ' . self::gf_vars( false ) . ''; + } + } - require_once(GFCommon::get_base_path() . '/currency.php'); + public static function maybe_add_leading_zero( $value ) { + $first_char = GFCommon::safe_substr( $value, 0, 1, 'utf-8' ); + if ( in_array( $first_char, array( '.', ',' ) ) ) { + $value = '0' . $value; + } - $gf_global = array(); - $gf_global["gf_currency_config"] = RGCurrency::get_currency(GFCommon::get_currency()); - $gf_global["base_url"] = GFCommon::get_base_url(); - $gf_global["number_formats"] = array(); - $gf_global["spinnerUrl"] = GFCommon::get_base_url() . '/images/spinner.gif'; + return $value; + } - $gf_global_json = 'var gf_global = ' . json_encode($gf_global) . ';'; + // used by the gfFieldFilterUI() jQuery plugin + public static function get_field_filter_settings( $form ) { + + $all_fields = $form['fields']; + + // set up filters + $fields = $all_fields; + $exclude_types = array( 'rank', 'page', 'html' ); + + $operators_by_input_type = array( + 'default' => array( 'is', 'isnot', '>', '<', ), + 'name' => array( 'is', 'isnot', '>', '<', 'contains' ), + 'address' => array( 'is', 'isnot', '>', '<', 'contains' ), + 'text' => array( 'is', 'isnot', '>', '<', 'contains' ), + 'textarea' => array( 'is', 'isnot', '>', '<', 'contains' ), + 'checkbox' => array( 'is' ), + 'multiselect' => array( 'contains' ), + 'number' => array( 'is', 'isnot', '>', '<' ), + 'select' => array( 'is', 'isnot', '>', '<' ), + 'likert' => array( 'is', 'isnot' ), + 'list' => array( 'contains' ) + ); + + for ( $i = 0; $i < count( $all_fields ); $i ++ ) { + $input_type = GFFormsmodel::get_input_type( $all_fields[ $i ] ); + if ( in_array( $input_type, $exclude_types ) ) { + unset( $fields[ $i ] ); + } + } + $fields = array_values( $fields ); - if(!$echo) - return $gf_global_json; + $field_filters = array( + array( + 'key' => '0', + 'text' => __( 'Any form field' , 'gravityforms' ), + 'operators' => array( 'contains', 'is' ), + 'preventMultiple' => false, + ), + ); - echo $gf_global_json; - } + foreach ( $fields as $field ) { - public static function gf_vars($echo = true) { - if(!class_exists("RGCurrency")) - require_once("currency.php"); - - $gf_vars = array(); - $gf_vars["active"] = __("Active", "gravityforms"); - $gf_vars["inactive"] = __("Inactive", "gravityforms"); - $gf_vars["save"] = __("Save", "gravityforms"); - $gf_vars["update"] = __("Update", "gravityforms"); - $gf_vars["previousLabel" ] = __("Previous", "gravityforms"); - $gf_vars["selectFormat" ] = __("Select a format", "gravityforms"); - $gf_vars["editToViewAll" ] = __("5 of %d items shown. Edit field to view all", "gravityforms"); - $gf_vars["enterValue" ] = __("Enter a value", "gravityforms"); - $gf_vars["formTitle" ] = __("Untitled Form", "gravityforms"); - $gf_vars["formDescription" ] = __("We would love to hear from you! Please fill out this form and we will get in touch with you shortly.", "gravityforms"); - $gf_vars["formConfirmationMessage" ] = __("Thanks for contacting us! We will get in touch with you shortly.", "gravityforms"); - $gf_vars["buttonText" ] = __("Submit", "gravityforms"); - $gf_vars["loading" ] = __("Loading...", "gravityforms"); - $gf_vars["thisFieldIf"] = __('this field if', 'gravityforms'); - $gf_vars["thisPage"] = __("this page", "gravityforms"); - $gf_vars["thisFormButton"] = __('this form button', 'gravityforms'); - $gf_vars["show"] = __('Show', 'gravityforms'); - $gf_vars["hide"] = __('Hide', 'gravityforms'); - $gf_vars["all"] = __('All', 'gravityforms'); - $gf_vars["any"] = __('Any', 'gravityforms'); - $gf_vars["ofTheFollowingMatch"] = __('of the following match:', 'gravityforms'); - $gf_vars["is"] = __('is', 'gravityforms'); - $gf_vars["isNot"] = __('is not', 'gravityforms'); - $gf_vars["greaterThan"] = __('greater than', 'gravityforms'); - $gf_vars["lessThan"] = __('less than', 'gravityforms'); - $gf_vars["contains"] = __('contains', 'gravityforms'); - $gf_vars["startsWith"] = __('starts with', 'gravityforms'); - $gf_vars["endsWith"] = __('ends with', 'gravityforms'); - - $gf_vars["thisConfirmation"] = __('Use this confirmation if', 'gravityforms'); - $gf_vars["thisNotification"] = __('Send this notification if', 'gravityforms'); - $gf_vars["confirmationSave"] = __('Save', 'gravityforms'); - $gf_vars["confirmationSaving"] = __('Saving...', 'gravityforms'); - $gf_vars["confirmationAreYouSure"] = __('Are you sure you wish to cancel these changes?', 'gravityforms'); - $gf_vars["confirmationIssueSaving"] = __('There was an issue saving this confirmation.', 'gravityforms'); - $gf_vars["confirmationConfirmDelete"] = __('Are you sure you wish to delete this confirmation?', 'gravityforms'); - $gf_vars["confirmationIssueDeleting"] = __('There was an issue deleting this confirmation.', 'gravityforms'); - $gf_vars["confirmationConfirmDiscard"] = __('There are unsaved changes to the current confirmation. Would you like to discard these changes?', 'gravityforms'); - $gf_vars["confirmationDefaultName"] = __('Untitled Confirmation', 'gravityforms'); - $gf_vars["confirmationDefaultMessage"] = __('Thanks for contacting us! We will get in touch with you shortly.', 'gravityforms'); - $gf_vars["confirmationInvalidPageSelection"] = __('Please select a page.', "gravityforms"); - $gf_vars["confirmationInvalidRedirect"] = __('Please enter a URL.', "gravityforms"); - $gf_vars["confirmationInvalidName"] = __('Please enter a confirmation name.', "gravityforms"); - - $gf_vars["conditionalLogicDependency"] = __('This form contains conditional logic dependent upon this field. Are you sure you want to delete this field? \'OK\' to delete, \'Cancel\' to abort.', 'gravityforms'); - $gf_vars["conditionalLogicDependencyChoice"] = __('This form contains conditional logic dependent upon this choice. Are you sure you want to delete this choice? \'OK\' to delete, \'Cancel\' to abort.', 'gravityforms'); - $gf_vars["conditionalLogicDependencyChoiceEdit"] = __('This form contains conditional logic dependent upon this choice. Are you sure you want to modify this choice? \'OK\' to delete, \'Cancel\' to abort.', 'gravityforms'); - - $gf_vars["mergeTagsTooltip"] = __('
    Merge Tags
    Merge tags allow you to dynamically populate submitted field values in your form content wherever this merge tag icon is present.', 'gravityforms'); - - $gf_vars["baseUrl"] = GFCommon::get_base_url(); - $gf_vars["gf_currency_config"] = RGCurrency::get_currency(GFCommon::get_currency()); - $gf_vars["otherChoiceValue"] = GFCommon::get_other_choice_value(); - $gf_vars["isFormTrash"] = false; - $gf_vars["currentlyAddingField"] = false; - - $gf_vars["addFieldFilter"] = __("Add a condition", "gravityforms"); - $gf_vars["removeFieldFilter"] = __("Remove a condition", "gravityforms"); - $gf_vars["filterAndAny"] = __("Include results if {0} match:", "gravityforms"); - - if(is_admin() && rgget('id')) { - $form = RGFormsModel::get_form_meta(rgget('id')); - $gf_vars["mergeTags"] = GFCommon::get_merge_tags($form['fields'], '', false); - } + $input_type = GFFormsModel::get_input_type( $field ); - $gf_vars_json = 'var gf_vars = ' . json_encode($gf_vars) . ';'; + $operators = isset( $operators_by_input_type[ $input_type ] ) ? $operators_by_input_type[ $input_type ] : $operators_by_input_type['default']; - if(!$echo){ - return $gf_vars_json; - } - else { - echo $gf_vars_json; - } - } + if ( $field->type == 'product' && in_array( $input_type, array( 'radio', 'select' ) ) ) { + $operators = array( 'is' ); + } elseif ( ! isset( $field->choices ) && ! in_array( 'contains', $operators ) ) { + $operators[] = 'contains'; + } - public static function is_bp_active() { - return defined('BP_VERSION') ? true : false; - } + $field_filter = array(); + $key = $field->id; + if ( $input_type == 'likert' && $field->gsurveyLikertEnableMultipleRows ) { + // multi-row likert fields + $field_filter['key'] = $key; + $field_filter['group'] = true; + $field_filter['text'] = GFFormsModel::get_label( $field ); + $sub_filters = array(); + $rows = $field->gsurveyLikertRows; + foreach ( $rows as $row ) { + $sub_filter = array(); + $sub_filter['key'] = $key . '|' . rgar( $row, 'value' ); + $sub_filter['text'] = rgar( $row, 'text' ); + $sub_filter['type'] = 'field'; + $sub_filter['preventMultiple'] = false; + $sub_filter['operators'] = $operators; + $sub_filter['values'] = $field->choices; + $sub_filters[] = $sub_filter; + } + $field_filter['filters'] = $sub_filters; + } elseif ( $input_type == 'name' && $field->nameFormat == '' || $input_type == 'address' ) { + // standard two input name field + $field_filter['key'] = $key; + $field_filter['group'] = true; + $field_filter['text'] = GFFormsModel::get_label( $field ); + $sub_filters = array(); + $inputs = $field->inputs; + foreach ( $inputs as $input ) { + $sub_filter = array(); + $sub_filter['key'] = rgar( $input, 'id' ); + $sub_filter['text'] = rgar( $input, 'label' ); + $sub_filter['preventMultiple'] = false; + $sub_filter['operators'] = $operators; + $sub_filters[] = $sub_filter; + } + $field_filter['filters'] = $sub_filters; + } else { + $field_filter['key'] = $key; + $field_filter['preventMultiple'] = false; + $field_filter['text'] = GFFormsModel::get_label( $field ); - public static function add_message($message, $is_error = false) { - if($is_error) { - self::$errors[] = $message; - } else { - self::$messages[] = $message; - } - } + $field_filter['operators'] = $operators; - public static function add_error_message($message) { - self::add_message($message, true); - } + if ( isset( $field->choices ) ) { + $field_filter['values'] = $field->choices; + } + } + $field_filters[] = $field_filter; - public static function display_admin_message($errors = false, $messages = false) { - - if(!$errors) - $errors = self::$errors; - - if(!$messages) - $messages = self::$messages; - - $errors = apply_filters('gform_admin_error_messages', $errors); - $messages = apply_filters('gform_admin_messages', $messages); - - if(!empty($errors)) { ?> -
    - 1) { ?> - - -

    - -
    - -
    - 1) { ?> - - -

    - -
    - $info_column ) { + $info_column['key'] = $key; + $info_column['preventMultiple'] = false; + $settings[] = $info_column; + } - private static function requires_gf_vars() { - $dependent_scripts = array( 'gform_form_admin', 'gform_gravityforms', 'gform_form_editor', 'gform_field_filter' ); - foreach( $dependent_scripts as $script ) { - if( wp_script_is( $script ) ) - return true; - } - return false; - } + return $settings; + } - public static function maybe_output_gf_vars() { - if( self::requires_gf_vars() ){ - echo ''; - } - } + public static function get_entry_info_filter_columns( $get_users = true ) { + $account_choices = array(); + if ( $get_users ) { + $args = apply_filters( 'gform_filters_get_users', array( 'number' => 200 ) ); + $accounts = get_users( $args ); + $account_choices = array(); + foreach ( $accounts as $account ) { + $account_choices[] = array( 'text' => $account->user_login, 'value' => $account->ID ); + } + } - public static function maybe_add_leading_zero($value){ - $first_char = GFCommon::safe_substr($value, 0, 1, 'utf-8'); - if(in_array($first_char, array(".", ","))) - $value = "0" . $value; - return $value; - } + return array( + 'entry_id' => array( + 'text' => __( 'Entry ID' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot', '>', '<' ) + ), + 'date_created' => array( + 'text' => __( 'Entry Date' , 'gravityforms' ), + 'operators' => array( 'is', '>', '<' ), + 'placeholder' => __( 'yyyy-mm-dd' , 'gravityforms' ) + ), + 'is_starred' => array( + 'text' => __( 'Starred' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot' ), + 'values' => array( + array( + 'text' => 'Yes', + 'value' => '1', + ), + array( + 'text' => 'No', + 'value' => '0', + ), + ) + ), + 'ip' => array( + 'text' => __( 'IP Address' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot', '>', '<', 'contains' ) + ), + 'source_url' => array( + 'text' => __( 'Source URL' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot', '>', '<', 'contains' ) + ), + 'payment_status' => array( + 'text' => __( 'Payment Status' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot' ), + 'values' => array( + array( + 'text' => 'Paid', + 'value' => 'Paid', + ), + array( + 'text' => 'Processing', + 'value' => 'Processing', + ), + array( + 'text' => 'Failed', + 'value' => 'Failed', + ), + array( + 'text' => 'Active', + 'value' => 'Active', + ), + array( + 'text' => 'Cancelled', + 'value' => 'Cancelled', + ), + ) + ), + 'payment_date' => array( + 'text' => __( 'Payment Date' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot', '>', '<' ) + ), + 'payment_amount' => array( + 'text' => __( 'Payment Amount' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot', '>', '<', 'contains' ) + ), + 'transaction_id' => array( + 'text' => __( 'Transaction ID' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot', '>', '<', 'contains' ) + ), + 'created_by' => array( + 'text' => __( 'User' , 'gravityforms' ), + 'operators' => array( 'is', 'isnot' ), + 'values' => $account_choices, + ) + ); + } - // used by the gfFieldFilterUI() jQuery plugin - public static function get_field_filter_settings($form) { + public static function get_entry_meta_filter_settings( $form_id ) { + $filters = array(); + $entry_meta = GFFormsModel::get_entry_meta( $form_id ); + if ( empty( $entry_meta ) ) { + return $filters; + } - $all_fields = $form["fields"]; + foreach ( $entry_meta as $key => $meta ) { + if ( isset( $meta['filter'] ) ) { + $filter = array(); + $filter['key'] = $key; + $filter['preventMultiple'] = isset( $meta['filter']['preventMultiple'] ) ? $meta['filter']['preventMultiple'] : false; + $filter['text'] = rgar( $meta, 'label' ); + $filter['operators'] = isset( $meta['filter']['operators'] ) ? $meta['filter']['operators'] : array( 'is', 'isnot' ); + if ( isset( $meta['filter']['choices'] ) ) { + $filter['values'] = $meta['filter']['choices']; + } + $filters[] = $filter; + } + } - // set up filters - $fields = $all_fields; - $exclude_types = array("rank", "page", "html"); + return $filters; + } - $operators_by_field_type = array( - "default" => array("is", "isnot", ">", "<"), - "checkbox" => array("is"), - "multiselect" => array("contains"), - "number" => array("is", "isnot", ">", "<"), - "likert" => array("is", "isnot"), - "list" => array("contains") - ); - for ($i = 0; $i < count($all_fields); $i++) { - $field_type = GFFormsmodel::get_input_type($all_fields[$i]); - if (in_array($field_type, $exclude_types)) - unset($fields[$i]); - } - $fields = array_values($fields); - - $field_filters = array( - array( - "key"=> "0", - "text" => __("Any form field", "gravityforms"), - "operators" => array("contains", "is") - ) - ); - - foreach ($fields as $field) { - - $input_type = GFFormsModel::get_input_type( $field ); - - $field_type = GFFormsModel::get_input_type($field); - - $operators = isset($operators_by_field_type[$field_type]) ? $operators_by_field_type[$field_type] : $operators_by_field_type["default"]; - - if ( $field['type'] == 'product' && in_array( $input_type, array( 'radio', 'select' ) ) ) { - $operators = array( 'is' ); - } elseif (!isset($field["choices"]) && !in_array("contains", $operators)){ - $operators[] = "contains"; - } - - $field_filter = array(); - $key = $field["id"]; - if ($field_type == "likert" && rgar($field, "gsurveyLikertEnableMultipleRows")) { - // multi-row likert fields - $field_filter["key"] = $key; - $field_filter["group"] = true; - $field_filter["text"] = GFFormsModel::get_label($field); - $sub_filters = array(); - $rows = rgar($field, "gsurveyLikertRows"); - foreach ($rows as $row) { - $sub_filter = array(); - $sub_filter["key"] = $key . "|" . rgar($row, "value"); - $sub_filter["text"] = rgar($row, "text"); - $sub_filter["type"] = "field"; - $sub_filter["preventMultiple"] = false; - $sub_filter["operators"] = $operators; - $sub_filter["values"] = $field["choices"]; - $sub_filters[] = $sub_filter; - } - $field_filter["filters"] = $sub_filters; - } elseif ($field_type == "name" && rgar($field, "nameFormat") == "" || $field_type == "address") { - // standard two input name field - $field_filter["key"] = $key; - $field_filter["group"] = true; - $field_filter["text"] = GFFormsModel::get_label($field); - $sub_filters = array(); - $inputs = rgar($field, "inputs"); - foreach ($inputs as $input) { - $sub_filter = array(); - $sub_filter["key"] = rgar($input, "id"); - $sub_filter["text"] = rgar($input, "label"); - $sub_filter["preventMultiple"] = false; - $sub_filter["operators"] = $operators; - $sub_filters[] = $sub_filter; - } - $field_filter["filters"] = $sub_filters; - } else { - $field_filter["key"] = $key; - $field_filter["preventMultiple"] = false; - $field_filter["text"] = GFFormsModel::get_label($field); - - $field_filter["operators"] = $operators; - - if (isset($field["choices"])) - $field_filter["values"] = $field["choices"]; - - - } - $field_filters[] = $field_filter; + public static function get_field_filters_from_post( $form ) { + $field_filters = array(); + $filter_fields = rgpost( 'f' ); + if ( is_array( $filter_fields ) ) { + $filter_operators = rgpost( 'o' ); + $filter_values = rgpost( 'v' ); + for ( $i = 0; $i < count( $filter_fields ); $i ++ ) { + $field_filter = array(); + $key = $filter_fields[ $i ]; + if ( 'entry_id' == $key ) { + $key = 'id'; + } + $operator = $filter_operators[ $i ]; + $val = $filter_values[ $i ]; + $strpos_row_key = strpos( $key, '|' ); + if ( $strpos_row_key !== false ) { //multi-row likert + $key_array = explode( '|', $key ); + $key = $key_array[0]; + $val = $key_array[1] . ':' . $val; + } + $field_filter['key'] = $key; - } - $form_id = $form["id"]; - $entry_meta_filters = self::get_entry_meta_filter_settings($form_id); - $field_filters = array_merge($field_filters, $entry_meta_filters); - $field_filters = array_values($field_filters); // reset the numeric keys in case some filters have been unset - $info_filters = self::get_entry_info_filter_settings(); - $field_filters = array_merge($field_filters, $info_filters); - $field_filters = array_values($field_filters); - return $field_filters; - } + $field = GFFormsModel::get_field( $form, $key ); + if ( $field ) { + $input_type = GFFormsModel::get_input_type( $field ); + if ( $field->type == 'product' && in_array( $input_type, array( 'radio', 'select' ) ) ) { + $operator = 'contains'; + } + } - public static function get_entry_info_filter_settings() { - $settings = array(); - $info_columns = self::get_entry_info_filter_columns(); - foreach($info_columns as $key => $info_column){ - $info_column["key"] = $key; - $info_column["preventMultiple"] = false; - $settings[] = $info_column; - } + $field_filter['operator'] = $operator; + $field_filter['value'] = $val; + $field_filters[] = $field_filter; + } + } + $field_filters['mode'] = rgpost( 'mode' ); - return $settings; - } + return $field_filters; + } - public static function get_entry_info_filter_columns($get_users = true){ - $account_choices = array(); - if($get_users){ - $args = apply_filters("gform_filters_get_users", array("number" => 200)); - $accounts = get_users($args); - $account_choices = array(); - foreach ($accounts as $account) { - $account_choices[] = array("text" => $account->user_login, "value" => $account->ID); - } - } - return array( - "entry_id" => array( - "text" => __("Entry ID", "gravityforms"), - "operators" => array( "is", "isnot", ">", "<") - ), - "date_created" => array( - "text" => __("Entry Date", "gravityforms"), - "operators" => array( "is", ">", "<"), - "placeholder" => __("yyyy-mm-dd", "gravityforms") - ), - "is_starred" => array( - "text" => __("Starred", "gravityforms"), - "operators" => array( "is", "isnot"), - "values" => array( - array( - "text" => "Yes", - "value" => "1" - ), - array( - "text" => "No", - "value" => "0" - ) - ) - ), - "ip" => array( - "text" => __("IP Address", "gravityforms"), - "operators" => array( "is", "isnot", ">", "<", "contains") - ), - "source_url" => array( - "text" => __("Source URL", "gravityforms"), - "operators" => array( "is", "isnot", ">", "<", "contains") - ), - "payment_status" => array( - "text" => __("Payment Status", "gravityforms"), - "operators" => array( "is", "isnot"), - "values" => array( - array( - "text" => "Paid", - "value" => "Paid" - ), - array( - "text" => "Processing", - "value" => "Processing" - ), - array( - "text" => "Failed", - "value" => "Failed" - ), - array( - "text" => "Active", - "value" => "Active" - ), - array( - "text" => "Cancelled", - "value" => "Cancelled" - ) - ) - ), - "payment_date" => array( - "text" => __("Payment Date", "gravityforms"), - "operators" => array( "is", "isnot", ">", "<") - ), - "payment_amount" => array( - "text" => __("Payment Amount", "gravityforms"), - "operators" => array( "is", "isnot", ">", "<", "contains") - ), - "transaction_id" => array( - "text" => __("Transaction ID", "gravityforms"), - "operators" => array( "is", "isnot", ">", "<", "contains") - ), - "created_by" => array( - "text" => __("User", "gravityforms"), - "operators" => array( "is", "isnot"), - "values" => $account_choices - ) - ); - } + public static function has_multifile_fileupload_field( $form ) { + $fileupload_fields = GFCommon::get_fields_by_type( $form, array( 'fileupload', 'post_custom_field' ) ); + if ( is_array( $fileupload_fields ) ) { + foreach ( $fileupload_fields as $field ) { + if ( $field->multipleFiles ) { + return true; + } + } + } - public static function get_entry_meta_filter_settings($form_id) { - $filters = array(); - $entry_meta = GFFormsModel::get_entry_meta($form_id); - if (empty($entry_meta)) - return $filters; - - foreach ($entry_meta as $key => $meta) { - if (isset($meta["filter"])) { - $filter = array(); - $filter["key"] = $key; - $filter["preventMultiple"] = isset($meta["filter"]["preventMultiple"]) ? $meta["filter"]["preventMultiple"] : false; - $filter["text"] = rgar($meta, "label"); - $filter["operators"] = isset($meta["filter"]["operators"]) ? $meta["filter"]["operators"] : array("is", "isnot"); - if (isset($meta["filter"]["choices"])) - $filter["values"] = $meta["filter"]["choices"]; - $filters[] = $filter; - } + return false; + } - } + public static function localize_gform_gravityforms_multifile() { + wp_localize_script( + 'gform_gravityforms', 'gform_gravityforms', array( + 'strings' => array( + 'invalid_file_extension' => __( 'This type of file is not allowed. Must be one of the following: ' , 'gravityforms' ), + 'delete_file' => __( 'Delete this file' , 'gravityforms' ), + 'in_progress' => __( 'in progress' , 'gravityforms' ), + 'file_exceeds_limit' => __( 'File exceeds size limit' , 'gravityforms' ), + 'illegal_extension' => __( 'This type of file is not allowed.' , 'gravityforms' ), + 'max_reached' => __( 'Maximum number of files reached' , 'gravityforms' ), + 'unknown_error' => __( 'There was a problem while saving the file on the server' , 'gravityforms' ), + 'currently_uploading' => __( 'Please wait for the uploading to complete' , 'gravityforms' ), + 'cancel' => __( 'Cancel' , 'gravityforms' ), + 'cancel_upload' => __( 'Cancel this upload' , 'gravityforms' ), + 'cancelled' => __( 'Cancelled' , 'gravityforms' ) + ), + 'vars' => array( + 'images_url' => GFCommon::get_base_url() . '/images' + ) + ) + ); + } - return $filters; - } + public static function send_resume_link( $message, $subject, $email, $embed_url, $resume_token ) { + $from = get_bloginfo( 'admin_email' ); + $from_name = get_bloginfo( 'name' ); - public static function get_field_filters_from_post($form){ - $field_filters = array(); - $filter_fields = rgpost("f"); - if (is_array($filter_fields)) { - $filter_operators = rgpost("o"); - $filter_values = rgpost("v"); - for ($i = 0; $i < count($filter_fields); $i++) { - $field_filter = array(); - $key = $filter_fields[$i]; - if("entry_id" == $key){ - $key = "id"; - } - $operator = $filter_operators[$i]; - $val = $filter_values[$i]; - $strpos_row_key = strpos($key, "|"); - if ($strpos_row_key !== false) { //multi-row likert - $key_array = explode("|", $key); - $key = $key_array[0]; - $val = $key_array[1] . ":" . $val; - } - $field_filter["key"] = $key; - - $field = GFFormsModel::get_field( $form, $key ); - if ( $field ) { - $input_type = GFFormsModel::get_input_type( $field ); - if ( $field['type'] == 'product' && in_array( $input_type, array( 'radio', 'select' ) ) ) { - $operator = 'contains'; - } - } - - $field_filter["operator"] = $operator; - $field_filter["value"] = $val; - $field_filters[] = $field_filter; - } - } - $field_filters["mode"] = rgpost("mode"); - return $field_filters; - } + $message_format = 'html'; - public static function has_multifile_fileupload_field($form){ - $fileupload_fields = GFCommon::get_fields_by_type($form, array("fileupload", "post_custom_field")); - if(is_array($fileupload_fields)){ - foreach($fileupload_fields as $field){ - if(rgar($field, "multipleFiles")) - return true; - } - } - return false; - } + $resume_url = add_query_arg( array( 'gf_token' => $resume_token ), $embed_url ); + $resume_link = "{$resume_url}"; + $message .= $resume_link; - public static function localize_gform_gravityforms_multifile(){ - wp_localize_script( 'gform_gravityforms', 'gform_gravityforms', array( - 'strings' => array( - 'invalid_file_extension' => __("This type of file is not allowed. Must be one of the following: ", "gravityforms" ), - 'delete_file' => __("Delete this file", "gravityforms"), - 'in_progress' => __("in progress", "gravityforms"), - 'file_exceeds_limit' => __("File exceeds size limit", "gravityforms"), - 'illegal_extension' => __("This type of file is not allowed." , "gravityforms"), - "max_reached" => __("Maximum number of files reached", "gravityforms"), - "unknown_error" => __("There was a problem while saving the file on the server", "gravityforms"), - "currently_uploading" => __("Please wait for the uploading to complete", "gravityforms"), - "cancel" => __("Cancel", "gravityforms"), - "cancel_upload" => __("Cancel this upload", "gravityforms"), - "cancelled" => __("Cancelled", "gravityforms") - ), - 'vars' => array( - 'images_url' => GFCommon::get_base_url() . "/images" - ) - ) ); - } + self::send_email( $from, $email, '', $from, $subject, $message, $from_name, $message_format ); + } - public static function safe_strlen($string){ + public static function safe_strlen( $string ) { - if(function_exists("mb_strlen")) - return mb_strlen($string); - else - return strlen($string); + if ( function_exists( 'mb_strlen' ) ) { + return mb_strlen( $string ); + } else { + return strlen( $string ); + } - } + } - public static function safe_substr($string, $start, $length = null){ - if(function_exists("mb_substr")) - return mb_substr($string, $start, $length); - else - return substr($string, $start, $length); - } + public static function safe_substr( $string, $start, $length = null ) { + if ( function_exists( 'mb_substr' ) ) { + return mb_substr( $string, $start, $length ); + } else { + return substr( $string, $start, $length ); + } + } - /** - * Reliablty compare floats. - * @param [float] $float1 - * @param [float] $float2 - * @param [string] $operator Supports: '<', '<=', '>', '>=', '==', '=', '!=' - * @return [bool] - */ - public static function compare_floats( $float1, $float2, $operator ) { - - $epsilon = 0.00001; - $is_equal = abs( floatval( $float1 ) - floatval( $float2 ) ) < $epsilon; - $is_greater = floatval( $float1 ) > floatval( $float2 ); - $is_less = floatval( $float1 ) < floatval( $float2 ); - - switch( $operator ) { - case '<': - return $is_less; - case '<=': - return $is_less || $is_equal; - case '>' : - return $is_greater; - case '>=': - return $is_greater || $is_equal; - case '==': - case '=': - return $is_equal; - case '!=': - return ! $is_equal; - } + /** + * Reliably compare floats. + * + * @param float $float1 + * @param float $float2 + * @param string $operator Supports: '<', '<=', '>', '>=', '==', '=', '!=' + * + * @return bool + */ + public static function compare_floats( $float1, $float2, $operator ) { + + $epsilon = 0.00001; + $is_equal = abs( floatval( $float1 ) - floatval( $float2 ) ) < $epsilon; + $is_greater = floatval( $float1 ) > floatval( $float2 ); + $is_less = floatval( $float1 ) < floatval( $float2 ); + + switch ( $operator ) { + case '<': + return $is_less; + case '<=': + return $is_less || $is_equal; + case '>' : + return $is_greater; + case '>=': + return $is_greater || $is_equal; + case '==': + case '=': + return $is_equal; + case '!=': + return ! $is_equal; + } - } + } - public static function encrypt( $text ) { + public static function encrypt( $text ) { $use_mcrypt = apply_filters('gform_use_mcrypt', function_exists( 'mcrypt_encrypt' ) ); if ( $use_mcrypt ){ @@ -5998,7 +4057,7 @@ public static function encrypt( $text ) { return $encrypted_value; } - public static function decrypt( $text ) { + public static function decrypt( $text ) { $use_mcrypt = apply_filters('gform_use_mcrypt', function_exists( 'mcrypt_decrypt' ) ); @@ -6014,7 +4073,7 @@ public static function decrypt( $text ) { } return $decrypted_value; - } + } public static function esc_like( $value ) { global $wpdb; @@ -6028,41 +4087,58 @@ public static function esc_like( $value ) { return $value; } + public static function is_form_editor(){ + return GFForms::get_page() == 'form_editor' || ( defined( 'DOING_AJAX' ) && DOING_AJAX && in_array( rgpost( 'action' ), array( 'rg_add_field', 'rg_refresh_field_preview', 'rg_duplicate_field', 'rg_delete_field', 'rg_change_input_type' ) ) ); + } + + public static function is_entry_detail(){ + return GFForms::get_page() == 'entry_detail_edit' || GFForms::get_page() == 'entry_detail' ; + } + + public static function is_entry_detail_view(){ + return GFForms::get_page() == 'entry_detail' ; + } + + public static function is_entry_detail_edit(){ + return GFForms::get_page() == 'entry_detail_edit'; + } } class GFCategoryWalker extends Walker { - /** - * @see Walker::$tree_type - * @since 2.1.0 - * @var string - */ - var $tree_type = 'category'; - - /** - * @see Walker::$db_fields - * @since 2.1.0 - * @todo Decouple this - * @var array - */ - var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); - - /** - * @see Walker::start_el() - * @since 2.1.0 - * - * @param string $output Passed by reference. Used to append additional content. - * @param object $category Category data object. - * @param int $depth Depth of category. Used for padding. - * @param array $args Uses 'selected' and 'show_count' keys, if they exist. - */ - function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0) { - //$pad = str_repeat(' ', $depth * 3); - $pad = str_repeat('─', $depth); - if(!empty($pad)) - $pad .= " "; - $object->name = "{$pad}{$object->name}"; - $output[] = $object; - } + /** + * @see Walker::$tree_type + * @since 2.1.0 + * @var string + */ + var $tree_type = 'category'; + + /** + * @see Walker::$db_fields + * @since 2.1.0 + * @todo Decouple this + * @var array + */ + var $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' ); + + /** + * @see Walker::start_el() + * @since 2.1.0 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $object Category data object. + * @param int $depth Depth of category. Used for padding. + * @param array $args Uses 'selected' and 'show_count' keys, if they exist. + * @param int $current_object_id + */ + function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) { + //$pad = str_repeat(' ', $depth * 3); + $pad = str_repeat( '─', $depth ); + if ( ! empty( $pad ) ) { + $pad .= ' '; + } + $object->name = "{$pad}{$object->name}"; + $output[] = $object; + } } /** @@ -6078,128 +4154,137 @@ function start_el( &$output, $object, $depth = 0, $args = array(), $current_obje * */ class GFCache { - private static $_transient_prefix = "GFCache_"; - private static $_cache = array(); + private static $_transient_prefix = 'GFCache_'; + private static $_cache = array(); - public static function get($key, &$found = null) { - global $blog_id; - if (is_multisite()) - $key = $blog_id . ':' . $key; + public static function get( $key, &$found = null ) { + global $blog_id; + if ( is_multisite() ) { + $key = $blog_id . ':' . $key; + } - if (isset(self::$_cache[$key])) { - $found = true; - $data = rgar(self::$_cache[$key], "data"); + if ( isset( self::$_cache[ $key ] ) ) { + $found = true; + $data = rgar( self::$_cache[ $key ], 'data' ); - return $data; - } + return $data; + } - $data = self::get_transient($key); + $data = self::get_transient( $key ); - if (false === ($data)) { - $found = false; + if ( false === ( $data ) ) { + $found = false; - return false; - } else { - self::$_cache[$key] = array("data" => $data, "is_persistent" => true); - $found = true; + return false; + } else { + self::$_cache[ $key ] = array( 'data' => $data, 'is_persistent' => true ); + $found = true; - return $data; - } + return $data; + } - } + } - public static function set($key, $data, $is_persistent = false, $expiration = 0) { - global $blog_id; - $success = true; + public static function set( $key, $data, $is_persistent = false, $expiration = 0 ) { + global $blog_id; + $success = true; - if (is_multisite()) - $key = $blog_id . ':' . $key; + if ( is_multisite() ) { + $key = $blog_id . ':' . $key; + } - if ($is_persistent) - $success = self::set_transient($key, $data, $expiration); + if ( $is_persistent ) { + $success = self::set_transient( $key, $data, $expiration ); + } - self::$_cache[$key] = array("data" => $data, "is_persistent" => $is_persistent); + self::$_cache[ $key ] = array( 'data' => $data, 'is_persistent' => $is_persistent ); - return $success; - } + return $success; + } - public static function delete($key) { - global $blog_id; - $success = true; + public static function delete( $key ) { + global $blog_id; + $success = true; - if (is_multisite()) - $key = $blog_id . ':' . $key; + if ( is_multisite() ) { + $key = $blog_id . ':' . $key; + } - if (isset(self::$_cache[$key])) { - if (self::$_cache[$key]["is_persistent"]) - $success = self::delete_transient($key); + if ( isset( self::$_cache[ $key ] ) ) { + if ( self::$_cache[ $key ]['is_persistent'] ) { + $success = self::delete_transient( $key ); + } - unset(self::$_cache[$key]); - } else { - $success = self::delete_transient($key); + unset( self::$_cache[ $key ] ); + } else { + $success = self::delete_transient( $key ); - } + } - return $success; - } + return $success; + } - public static function flush($flush_persistent = false) { - global $wpdb; + public static function flush( $flush_persistent = false ) { + global $wpdb; - self::$_cache = array(); + self::$_cache = array(); - if(false === $flush_persistent) - return true; + if ( false === $flush_persistent ) { + return true; + } - if (is_multisite()) { - $sql = " + if ( is_multisite() ) { + $sql = " DELETE FROM $wpdb->sitemeta WHERE meta_key LIKE '_site_transient_timeout_GFCache_%' OR meta_key LIKE '_site_transient_GFCache_%' "; - } else { - $sql = " + } else { + $sql = " DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_GFCache_%' OR option_name LIKE '_transient_GFCache_%' "; - } - $rows_deleted = $wpdb->query($sql); + } + $rows_deleted = $wpdb->query( $sql ); - $success = $rows_deleted !== false ? true : false; + $success = $rows_deleted !== false ? true : false; - return $success; - } + return $success; + } - private static function delete_transient($key) { - $key = self::$_transient_prefix . wp_hash($key); - if (is_multisite()) - $success = delete_site_transient($key); - else - $success = delete_transient($key); + private static function delete_transient( $key ) { + $key = self::$_transient_prefix . wp_hash( $key ); + if ( is_multisite() ) { + $success = delete_site_transient( $key ); + } else { + $success = delete_transient( $key ); + } - return $success; - } + return $success; + } - private static function set_transient($key, $data, $expiration) { - $key = self::$_transient_prefix . wp_hash($key); - if (is_multisite()) - $success = set_site_transient($key, $data, $expiration); - else - $success = set_transient($key, $data, $expiration); + private static function set_transient( $key, $data, $expiration ) { + $key = self::$_transient_prefix . wp_hash( $key ); + if ( is_multisite() ) { + $success = set_site_transient( $key, $data, $expiration ); + } else { + $success = set_transient( $key, $data, $expiration ); + } - return $success; - } + return $success; + } - private static function get_transient($key) { - $key = self::$_transient_prefix . wp_hash($key); - if (is_multisite()) - $data = get_site_transient($key); - else - $data = get_transient($key); + private static function get_transient( $key ) { + $key = self::$_transient_prefix . wp_hash( $key ); + if ( is_multisite() ) { + $data = get_site_transient( $key ); + } else { + $data = get_transient( $key ); + } - return $data; - } + return $data; + } -} +} \ No newline at end of file diff --git a/css/admin.css b/css/admin.css index efa6d75..32b2756 100644 --- a/css/admin.css +++ b/css/admin.css @@ -1,18 +1,19 @@ @import url('datepicker.css'); @import url('jquery-ui.custom.css'); @import url('font-awesome.css'); +@import url('gravityfont.css'); @import url('rtl.css'); /* ---------------------------------------------------------------- admin.css -Gravity Forms Administration Form Styles +Gravity Forms Administration Styles http: //www.gravityforms.com -updated: December 12, 2013 12:14 PM +updated: January 22, 2015 9:27 AM Gravity Forms is a Rocketgenius project -copyright 2013 Rocketgenius Inc. +copyright 2008-2015 Rocketgenius Inc. http: //www.rocketgenius.com this may not be re-distrubited without the express written permission of the author. @@ -35,9 +36,8 @@ AND ANY CHANGES MADE HERE WILL BE OVERWRITTEN. input, textarea { outline-style: none; - font-family: sans-serif; - font-size: 12px; - padding: 2px 0; + font-family: inherit; + font-size: inherit; } ul { @@ -64,12 +64,13 @@ ul#gform_fields { } select { - font-size: 12px !important; + font-size: inherit; font-family: verdana,sans-serif; padding: 2px 0; } -/* As of 3.7.1, datepicker container shows up at the bottom of the page. This is quick fix to hide it. */ +/* As of 3.7.1, datepicker container shows up at the bottom of the page. This is quick fix to hide it. -----------------------------------------------------------------*/ + .ui-datepicker { display: none; } @@ -158,7 +159,6 @@ div.gforms_code pre { z-index: 100; position: relative; white-space: pre-wrap; - white-space: 0; word-wrap: break-word; padding: 6px 10px 6px 0; } @@ -199,7 +199,7 @@ div.delete-alert input.button:active { display: block; } -.settings_control_container{ +.settings_control_container { height: 18px; } @@ -223,7 +223,6 @@ li.field_setting select { display: -moz-inline-stack !important; display: inline-block !important; zoom: 1 !important; - *display: inline !important; } label.float_label { @@ -232,12 +231,17 @@ label.float_label { padding: 2px 0 0; } -#gform_fields li{ +#gform_fields li { border: 1px solid transparent; padding: 0px 10px 10px 10px; overflow-y: visible; } +.field_sublabel_hidden_label .ginput_complex.ginput_container input[type=text], +.field_sublabel_hidden_label .ginput_complex.ginput_container select { + margin-bottom: 0.750em; +} + #gform_fields li ul li { padding: 2px 0 4px 0; } @@ -278,6 +282,11 @@ label.float_label { margin-bottom: 4px; } +.gfield_time_hour i { + font-style: normal !important; + font-family: sans-serif !important; +} + .selectable.gfield { margin-bottom: 10px; } @@ -357,13 +366,14 @@ div#gform_last_page_settings.gform_settings_container .settings_control_containe } .field_name_first, +.field_name_middle, .field_name_last { - width: 50%; + width: 33.3%; float: left; } .field_name_first input,.ginput_complex .ginput_left input { - width: 90% !important; + width: 98% !important; } .field_name_last input { @@ -395,38 +405,70 @@ img#gfield_input_datepicker_icon { margin-top: 5px; } -.ginput_complex .ginput_left, -.ginput_complex .ginput_right { +.ginput_complex .ginput_left { width: 48%; float: left; } +.ginput_complex .ginput_right { + width: 48%; + float: right; + margin-right: .75%; +} + .ginput_complex input, .ginput_complex select { - width: 92% !important; + width: 99%; } .ginput_complex label, -.gfield_time_hour label,.gfield_time_minute label { +.gfield_time_hour label, +.gfield_time_minute label, +.gfield_time_ampm label { display: block; margin: 4px 0; + font-size: .8em; } .ginput_complex .name_prefix { - float: left; - width: 30px !important; - margin-right: 14px; + display: block; + width: auto; + clear: right; +} + +.ginput_complex .name_prefix select { + width: 4em; +} + +.ginput_complex .name_first, +.ginput_complex .name_middle, +.ginput_complex .name_last { + width: 32%; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; +} + +.ginput_complex .name_first, +.ginput_complex .name_middle, +.ginput_complex .name_last { + width: 32%; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; } .ginput_complex .name_suffix { - float: left; - width: 30px !important; + display: block; + width: auto; + clear: right; } -.ginput_complex .name_first,.ginput_complex .name_last { - float: left; - width: 100px; - margin-right: 8px; +.ginput_complex .name_suffix input[type=text] { + width: 4em !important; + display: block; + width: auto; + clear: left; } .top_label .gfield_label { @@ -450,7 +492,37 @@ img#gfield_input_datepicker_icon { text-align: right; } -.left_label ul.gfield_checkbox,.right_label ul.gfield_checkbox,.left_label ul.gfield_radio,.right_label ul.gfield_radio { +.right_label .gform_fileupload_multifile, +.left_label .gform_fileupload_multifile { + margin-left: 31%; +} + +/* Field Label Placement Overrides */ + +.hidden_label .gfield_label { + visibility:hidden; + line-height:0; +} + +.gfield.right_label .gfield_admin_icons, +.gfield.left_label .gfield_admin_icons { + padding-bottom:10px; +} + +.gfield label.hidden_sub_label { + display:none; +} + +.gfield .copy_values_option_container { + padding-bottom: 10px; +} +.gfield .copy_values_option_container .copy_values_enabled { + width:auto!important; +} + + +.left_label ul.gfield_checkbox,.right_label ul.gfield_checkbox, +.left_label ul.gfield_radio,.right_label ul.gfield_radio { margin-left: 32%; } @@ -466,7 +538,10 @@ img#gfield_input_datepicker_icon { .top_label input.large, .top_label select.large, -.top_label textarea.textarea { +.top_label textarea.textarea, +.hidden_label input.large, +.hidden_label select.large, +.hidden_label textarea.textarea { width: 96%; } @@ -583,7 +658,8 @@ table.gfield_list th { padding: 0 0 0.5em 0.7em !important } -.gform_wrapper .left_label .gfield_list, .gform_wrapper .right_label .gfield_list { +.gform_wrapper .left_label .gfield_list, +.gform_wrapper .right_label .gfield_list { width: 64% } @@ -591,7 +667,8 @@ table.gfield_list th { width: 96% } -.gform_wrapper .left_label .gf_list_one_column, .gform_wrapper .right_label .gf_list_one_column { +.gform_wrapper .left_label .gf_list_one_column, +.gform_wrapper .right_label .gf_list_one_column { width: 45% } @@ -616,7 +693,7 @@ table.gfield_list th { } -/* radio and checkbox styling - justifies lenghty labels ------------------------------------------------------*/ +/* radio and checkbox styling - justifies lengthy labels ------------------------------------------------------*/ ul.gfield_checkbox, ul.gfield_radio { @@ -643,27 +720,32 @@ ul.gfield_checkbox, ul.gfield_radio { .gfield_radio li input[type="radio"], .gfield_checkbox li input { float: left; - margin-top: 2px + margin-top: 2px; } -.description,.instruction, +.description, +.instruction, .gfield_description { - font-size: 11px; + font-size: .8em; line-height: 1.5; clear: both; padding: 10px 0 0 0; - font-family: verdana,sans-serif + font-family: inherit; } .description_above .gfield_description { - padding: 0 0 10px 0 + padding: 0 0 10px 0; +} + +.field_description_below .gfield_description { + padding: 10px 0 0 0; } .right_label .gfield_description, .left_label .gfield_description, .left_label .instruction, .right_label .instruction { - margin-left: 32.5% + margin-left: 32.5%; } .left_label .gsection .gsection_description, @@ -671,39 +753,35 @@ ul.gfield_checkbox, ul.gfield_radio { margin-left: 0; padding-left: 0; padding-top: 10px; - line-height: 1.5 -} - -.ginput_complex + .gfield_description { - padding-top: 0 !important + line-height: 1.5; } .gfield_required { color: #9E0B0F; - margin-left: 4px + margin-left: 4px; } textarea.small { - height: 80px + height: 80px; } textarea.medium { - height: 150px + height: 150px; } textarea.large { - height: 250px + height: 250px; } .gform_footer { padding: 10px 0 10px 10px; margin: 6px 0 0; - border-top: 1px dotted #CCC !important + border-top: 1px dotted #CCC !important; } .gform_wrapper .gform_footer+.right_label, .gform_wrapper .gform_footer+.left_label { - padding: 16px 0 10px 31% + padding: 16px 0 10px 31%; } div.gfield_admin_icons { @@ -713,17 +791,17 @@ div.gfield_admin_icons { } div.gform_admin_icons { - height: 20px + height: 20px; } ul#gform_fields.left_label div.gfield_admin_icons, ul#gform_fields.right_label div.gfield_admin_icons { - height: 30px + height: 30px; } div.gfield_admin_icons div.gfield_admin_header_title, div.gform_admin_icons div.gform_admin_header_title { - display: none + display: none; } .field_hover div.gfield_admin_icons div.gfield_admin_header_title, @@ -738,19 +816,6 @@ div.gform_admin_icons div.gform_admin_header_title { letter-spacing: 0.025em; } -a.close_icon { - position: absolute; - left: 100%; - margin-left: -27px; - top: 9px; - width: 16px; - height: 16px; - background-image: url(../images/close.png); - background-repeat: no-repeat; - text-indent: -9000px; - text-shadow: 0 1px 1px #FFF; -} - .gfield { position: relative } @@ -850,16 +915,16 @@ a.close_icon { img.gtitle_icon { float: left; - margin: 15px 7px 0 0 + margin: 15px 7px 0 0; } td.pad_top { - padding-top: 10px + padding-top: 10px; } #form_settings { padding: 0 5px 5px 5px; - margin-top: 10px + margin-top: 10px; } #form_settings h3 span i[class^="fa-"], @@ -871,11 +936,11 @@ td.pad_top { .input_size_a, .textarea_size_a { - width: 375px + width: 375px; } .form_button_options { - margin: 8px 0 + margin: 8px 0; } #form_button_text_container, @@ -884,16 +949,16 @@ td.pad_top { } .captcha_message { - padding: 5px + padding: 5px; } #after_insert_dialog div { - padding-bottom: 10px + padding-bottom: 10px; } #simplemodal-overlay { background-color: #000; - cursor: default + cursor: default; } #simplemodal-container { @@ -905,7 +970,7 @@ td.pad_top { -moz-border-radius: 8px; -webkit-border-radius: 8px; -khtml-border-radius: 8px; - border-radius: 8px + border-radius: 8px; } #simplemodal-container a.modalCloseImg { @@ -918,7 +983,7 @@ td.pad_top { position: absolute; top: -14px; right: -18px; - cursor: pointer + cursor: pointer; } div#after_insert_dialog h3 { @@ -930,7 +995,7 @@ div#after_insert_dialog h3 { -webkit-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; - margin: 0 0 4px + margin: 0 0 4px; } div.gold_notice { @@ -941,11 +1006,11 @@ div.gold_notice { -webkit-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; - margin: 0 0 4px + margin: 0 0 4px; } div#after_insert_dialog p { - text-align: center + text-align: center; } div.new-form-option a { @@ -964,7 +1029,7 @@ div.new-form-option a { border-radius: 4px; margin-bottom: 4px; background-image: url(../images/gf-new-option-bg.png); - background-repeat: repeat-x + background-repeat: repeat-x; } div.new-form-option a:hover { @@ -972,11 +1037,11 @@ div.new-form-option a:hover { border: 1px solid #D2E0EB; box-shadow: 0px 0px 5px #D2E0EB; -moz-box-shadow: 0px 0px 5px #D2E0EB; - -webkit-box-shadow: 0px 0px 5px #D2E0EB + -webkit-box-shadow: 0px 0px 5px #D2E0EB; } .installation_item_cell { - width: 40px + width: 40px; } .installation_item_message { @@ -986,44 +1051,34 @@ div.new-form-option a:hover { } div#wpbody { - position: relative + position: relative; } #add_fields { width: 285px; padding: 0; - text-align: left + text-align: left; } #floatMenu { width: 280px; z-index: 99; - padding-bottom: 20px + padding-bottom: 20px; } .button-title-link div.add-buttons-title { - height: 24px; + min-height: 24px; overflow: hidden; cursor: pointer; position: relative; - font-size: 15px; + font-size: 14px; border-width: 1px; border-style: solid; border-color: #DFDFDF; margin: 0 !important; - padding: 8px 10px 0; + padding: 8px 12px 5px; white-space: nowrap; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - background: #f8f8f8; - background: -moz-linear-gradient(top, #f8f8f8 0%, #eeeeee 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#eeeeee)); - background: -webkit-linear-gradient(top, #f8f8f8 0%,#eeeeee 100%); - background: -o-linear-gradient(top, #f8f8f8 0%,#eeeeee 100%); - background: -ms-linear-gradient(top, #f8f8f8 0%,#eeeeee 100%); - background: linear-gradient(to bottom, #f8f8f8 0%,#eeeeee 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8f8f8', endColorstr='#eeeeee',GradientType=0 ); + background: #FFF; -webkit-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); -moz-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); @@ -1038,37 +1093,21 @@ div#wpbody { } .button-title-link.gf_button_title_active div.add-buttons-title { - -webkit-border-radius: 4px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius: 4px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - border-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0 } .button-title-link { color: #464646; text-shadow: none; - font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif; - font-weight: normal; - cursor: text !important + font-weight: bold; + cursor: text !important; + font-family: "Open Sans",sans-serif; + line-height: 1.4; } .add-buttons { border-width: 0 1px 1px; border-style: none solid solid; - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -khtml-border-bottom-right-radius: 4px; - -khtml-border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; - background-color: #FCFCFC; + background-color: #FFF; border-color: #DFDFDF; padding: 12px; -webkit-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); @@ -1077,7 +1116,7 @@ div#wpbody { } ul.menu li { - margin-bottom: 10px + margin-bottom: 10px; } ol.field_type { @@ -1085,7 +1124,7 @@ ol.field_type { visibility: visible !important; overflow: hidden; margin: 0; - padding: 0 + padding: 0; } div.push-alert-gold { @@ -1099,7 +1138,7 @@ div.push-alert-gold { font-size: 1.1em; background-color: #FFFBCC; border-top: 1px solid #E6DB55; - border-bottom: 1px solid #E6DB55 + border-bottom: 1px solid #E6DB55; } div.push-alert-green { @@ -1113,7 +1152,7 @@ div.push-alert-green { min-width: 800px; padding: 10px 6px; text-align: center; - visibility: visible !important + visibility: visible !important; } div.push-alert-blue { @@ -1127,7 +1166,7 @@ div.push-alert-blue { min-width: 800px; padding: 10px 6px; text-align: center; - visibility: visible !important + visibility: visible !important; } div.push-alert-red { @@ -1141,14 +1180,15 @@ div.push-alert-red { min-width: 800px; padding: 10px 6px; text-align: center; - visibility: visible !important + visibility: visible !important; } #gfield_settings_category_container, -#gfield_settings_choices_container { +#gfield_settings_choices_container, +.gfield_settings_input_choices_container { border: 1px solid #DFDFDF; overflow: auto; - padding: 2px 0 6px + padding: 2px 0 6px; } .field-choice-handle { @@ -1158,150 +1198,159 @@ div.push-alert-red { #gfield_settings_category_container { margin: 8px 0 0; - max-height: 230px + max-height: 230px; } table td.gfield_category_cell { padding-top: 3px } -#gfield_settings_choices_container { +#gfield_settings_choices_container, +.gfield_settings_input_choices_container { margin: 8px 0 14px; - max-height: 230px + max-height: 230px; } -#field_choices li { +#field_choices li, +.field_input_choices li{ padding: 0 10px !important; - margin: 0 !important + margin: 0 !important; } #field_columns li { padding: 0 !important; - margin: 0 !important + margin: 0 !important; } #field_columns { padding: 10px 0 !important; - margin: 0 !important + margin: 0 !important; +} + +.input_active_icon { + cursor: pointer; + margin:15px 5px 0 0; } /* hidden value field ------------------------------------------------------*/ -#field_choices li input.field-choice-text { - width: 312px +#field_choices li input.field-choice-text, +.field_input_choices li input.field-choice-text { + width: 312px; } -#field_choices li input.field-choice-value { - display: none +#field_choices li input.field-choice-value, +.field_input_choices li input.field-choice-value { + display: none; } #field_choices li input.field-choice-price { - display: none + display: none; } .gfield_choice_header_label { padding-left: 51px; - display: none !important + display: none !important; } .gfield_choice_header_value { - display: none !important + display: none !important; } .gfield_choice_header_price { - display: none !important + display: none !important; } /* visible value field without price ------------------------------------------------------*/ .choice_with_value li input.field-choice-value { width: 155px !important; - display: inline !important + display: inline !important; } .choice_with_value li input.field-choice-text { - width: 155px !important + width: 155px !important; } .choice_with_value .gfield_choice_header_label { - display: inline !important + display: inline !important; } .choice_with_value .gfield_choice_header_value { padding-left: 120px; - display: inline !important + display: inline !important; } /* visible value field with price ------------------------------------------------------*/ .choice_with_value_and_price li input.field-choice-text { - width: 103px !important + width: 103px !important; } .choice_with_value_and_price li input.field-choice-value { width: 103px !important; - display: inline !important + display: inline !important; } .choice_with_value_and_price li input.field-choice-price { width: 103px !important; - display: inline !important + display: inline !important; } .choice_with_value_and_price .gfield_choice_header_label { - display: inline !important + display: inline !important; } .choice_with_value_and_price .gfield_choice_header_value { padding-left: 70px; - display: inline !important + display: inline !important; } .choice_with_value_and_price .gfield_choice_header_price { padding-left: 70px; - display: inline !important + display: inline !important; } /* visible price and no value ------------------------------------------------------*/ .choice_with_price li input.field-choice-text { - width: 155px !important + width: 155px !important; } .choice_with_price li input.field-choice-price { width: 155px !important; - display: inline !important + display: inline !important; } .choice_with_price .gfield_choice_header_label { - display: inline !important + display: inline !important; } .choice_with_price .gfield_choice_header_price { padding-left: 120px; - display: inline !important + display: inline !important; } /* columns (no price, value or default selection) ------------------------------------------------------*/ #field_columns li input.field-choice-value { - display: none + display: none; } #field_columns li input.field-choice-price { - display: none + display: none; } #field_columns li input.gfield_choice_radio { - display: none + display: none; } #field_columns li input.gfield_choice_checkbox { - display: none + display: none; } #field_columns li input.field-choice-text { - width: 312px !important + width: 312px !important; } /* view form styles ------------------------------------------------------*/ @@ -1360,47 +1409,30 @@ div.note-avatar { h6.note-author { font-weight: bold; - font-size: 13px; + font-size: 1.1em; + line-height: 1; margin: 0; padding: 0; } -p.note-author-email { +p.note-email { line-height: 1.3; margin: 0 !important; padding: 0 !important; text-align: left; } -div.detail-note-content:before { - content: " "; - width: 100%; - height: 30px; - position: absolute; - top: 0; - left: 0; - z-index: -1; - display: block; - background-color:#FFF; -} - div.detail-note-content { - margin: 10px 6px 10px 0; - padding: 20px 14px; - line-height: 1.8; - border: 1px solid #E6DB55; - border-bottom: 2px solid #E6DB55; + margin: 1.8em 1em 1.8em 0; + padding: 1.8em; + position: relative; + line-height: 1.8em; + border-left: 4px solid #E6DB55; background-color: #FFFBCC; - background-image: url(../images/top-highlight.png); - background-position: 0 0; - background-repeat: repeat-x; - -webkit-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); - -moz-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); - box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); } div.detail-note-content p { - line-height: 1.8; + line-height: 30px; } div.detail-note-content.gforms_note_success{ @@ -1413,64 +1445,67 @@ div.detail-note-content.gforms_note_error{ border: 1px solid #CC0000; } + /* edit details form styles ------------------------------------------------------*/ -#namediv_admin { - position: relative; - min-width: 500px; + +body.forms_page_gf_entries table.entry-details td.detail-view label.detail-label,.ginput_full_admin label { + display: block; + font-weight: bold; + font-size: 13px; + margin-bottom: 4px } -body #namediv table.entry-details td.detail-view label.detail-label,.ginput_full_admin label {display: block; font-weight: bold; font-size: 13px; margin-bottom: 4px} -body #namediv div.ginput_complex_admin .ginput_full_admin label { +body.forms_page_gf_entries div.ginput_complex_admin .ginput_full_admin label { font-weight: normal; font-size: 11px; } -body #namediv table.entry-details input[type="text"], -body #namediv table.entry-details input { +body.forms_page_gf_entries table.entry-details input[type="text"], +body.forms_page_gf_entries table.entry-details input { width: 99%; } -body #namediv .ginput_complex_admin.ginput_container span.ginput_left, -body #namediv .ginput_complex_admin.ginput_container span.ginput_left_admin, -body #namediv .ginput_complex_admin.ginput_container span.ginput_right, -body #namediv .ginput_complex_admin.ginput_container span.ginput_right_admin { +body.forms_page_gf_entries .ginput_complex_admin.ginput_container span.ginput_left, +body.forms_page_gf_entries .ginput_complex_admin.ginput_container span.ginput_left_admin, +body.forms_page_gf_entries .ginput_complex_admin.ginput_container span.ginput_right, +body.forms_page_gf_entries .ginput_complex_admin.ginput_container span.ginput_right_admin { width: 49%; display: -moz-inline-stack; display: inline-block; zoom: 1; } -body #namediv .ginput_complex_admin.ginput_container span.ginput_left, -body #namediv .ginput_complex_admin.ginput_container span.ginput_left_admin { +body.forms_page_gf_entries .ginput_complex_admin.ginput_container span.ginput_left, +body.forms_page_gf_entries .ginput_complex_admin.ginput_container span.ginput_left_admin { margin-right: 1em; } -body #namediv .ginput_left_admin label, -body #namediv .ginput_right_admin label { +body.forms_page_gf_entries .ginput_left_admin label, +body.forms_page_gf_entries .ginput_right_admin label { display: block; } -body #namediv .ginput_container ul.gfield_radio li input, -body #namediv .ginput_container ul.gfield_checkbox li input { +body.forms_page_gf_entries .ginput_container ul.gfield_radio li input, +body.forms_page_gf_entries .ginput_container ul.gfield_checkbox li input { width: auto !important; } -body #namediv .ginput_left_admin input[type="text"] { +body.forms_page_gf_entries .ginput_left_admin input[type="text"] { width: 99% !important; } -body #namediv select.medium_admin { +body.forms_page_gf_entries select.medium_admin { max-width: 400px; } -body #namediv textarea.medium_admin { +body.forms_page_gf_entries textarea.medium_admin { width: 98%; min-width: 475px; min-height: 250px; } -body #namediv h2.detail_gsection_title { +body.forms_page_gf_entries h2.detail_gsection_title { font-family: helvetica,arial,sans-serif; font-size: 16px; font-style: normal !important; @@ -1480,6 +1515,14 @@ body #namediv h2.detail_gsection_title { padding: 0 !important; } + +body.forms_page_gf_entries div.ginput_complex_admin span label, +body.forms_page_gf_entries div.ginput_complex_admin span label { + display: block; + font-size: .8em; + margin: 4px 0; +} + /* notifications page styles ------------------------------------------------------*/ ul#form_notification_container,ul#form_autoresponder_container { @@ -1498,7 +1541,7 @@ ul#form_autoresponder_container li label { } #confirmation_list_form .check-column, -#notification_list_form .check-column{ +#notification_list_form .check-column { width:50px; } @@ -1597,9 +1640,9 @@ a.bulk-choice:first-child { .bulk-arrow-mid { float: left; - width: 40px; + width: 48px; height: 330px; - background-image: url(../images/arrow-right.jpg); + background-image: url(../images/arrow-right.png); background-position: 100% 50%; background-repeat: no-repeat; } @@ -1662,7 +1705,7 @@ table.form-table td .updated_base { font-size: 13px; } -#gform_no_product_field_message{ +#gform_no_product_field_message { background-color: #FFEBE8; border-color: #CC0000; border-width: 1px; @@ -1712,8 +1755,7 @@ table.form-table td .error_base { zoom: 1; } - -/*html block ------------------------------------------------------*/ +/* HTML block ------------------------------------------------------*/ li.gfield_html label.gfield_label { height: 18px; @@ -1721,7 +1763,7 @@ li.gfield_html label.gfield_label { /* simple captcha fields ------------------------------------------------------*/ -.gfield_captcha_input_container{ +.gfield_captcha_input_container { padding-top: 3px; } @@ -1974,7 +2016,6 @@ h3.gf_progressbar_title { display: -moz-inline-stack; display: inline-block; zoom: 1; - *display: inline } .gform_wrapper .gf_step span.gf_step_number { @@ -1998,19 +2039,26 @@ h3.gf_progressbar_title { margin: 12px 5px 5px 1px; padding: 3px 5px; text-align: center; - width: 200px; + width: 96%; + line-height: 1.8; background-color: #EEE; - border-color: #DDD !important + border-color: #DDD !important; +} + +ul.left_label .gfield_password_strength, +ul.right_label .gfield_password_strength { + margin-left: 32.5%; } /* tidy up the title area ----------------------------------------------------*/ p.search-box { - margin: 12px 0 0 0 + margin: 12px 0 0 0; } /* addonform settings ----------------------------------------------------*/ -#gform-settings .column-is_active{ + +#gform-settings .column-is_active { width:19px; } @@ -2021,7 +2069,7 @@ div#gform_heading.selectable.field_selected { background-position: 0 0; background-repeat: repeat-x; background-color: #F6FBFD; - padding-top: 8px + padding-top: 8px; } /* upgrade and renewal styles for settings page ----------------------------------------------------*/ @@ -2030,7 +2078,7 @@ div.gf_renew_license { border: 1px solid #CFADB3; color: #832525; background-color: #FAF2F5; - padding: 10px 0 20px 20px + padding: 10px 0 20px 20px; } p.gform_renew_expired strong { @@ -2040,13 +2088,13 @@ p.gform_renew_expired strong { div.gf_upgrade_license h4 { font-size: 14px; margin: 0; - padding: 0 + padding: 0; } div.gf_upgrade_developer_license, div.gf_upgrade_business_license { padding: 14px 0 0 140px; - min-height: 135px; + min-height: 175px; background-repeat: no-repeat; background-position: 0 0; } @@ -2054,11 +2102,13 @@ div.gf_upgrade_business_license { div.gf_upgrade_developer_license { background-image: url(../images/gravityforms-developer-upgrade.png); margin: 30px 0 0 0; + background-size: 133px 169px; } div.gf_upgrade_business_license { background-image: url(../images/gravityforms-business-upgrade.png); margin: 0; + background-size: 133px 169px; } p.gform_renew_expired, @@ -2066,7 +2116,28 @@ p.gform_renew_not_expired { background-position: 0 0; background-repeat: no-repeat; font-size: 1.4em; +} + +a.gf_upgrade_link { + -webkit-border-radius: 4; + -moz-border-radius: 4; + border-radius: 4px; + text-shadow: 1px 1px 2px #c24319; + font-family: Arial; + color: #ffffff; + font-size: 16px; + background: #D54E21; + padding: 10px 20px 11px 20px; + border: solid #c4461c 4px; + text-decoration: none; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; +} +a.gf_upgrade_link:hover { + background: #db5428; + text-decoration: none; } /* update page status styles ----------------------------------------------------*/ @@ -2283,20 +2354,10 @@ ul#gf_form_toolbar_links { padding: 0 0 0 6px; border: 1px solid #DFDFDF; margin: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -webkit-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); -moz-box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.1); - background: #ffffff; - background: -moz-linear-gradient(top, #ffffff 0%, #f8f8f8 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f8f8f8)); - background: -webkit-linear-gradient(top, #ffffff 0%,#f8f8f8 100%); - background: -o-linear-gradient(top, #ffffff 0%,#f8f8f8 100%); - background: -ms-linear-gradient(top, #ffffff 0%,#f8f8f8 100%); - background: linear-gradient(to bottom, #ffffff 0%,#f8f8f8 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f8f8f8',GradientType=0 ); + background: #FFF; } @@ -2474,16 +2535,13 @@ div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:hover, div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:focus, div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:active { - -webkit-border-radius: 4px !important; - -moz-border-radius: 4px !important; - border-radius: 4px !important; + -webkit-border-radius: 3px !important; + -moz-border-radius: 3px !important; + border-radius: 3px !important; } div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:hover { border-color: #CCC; - background-image:url(../images/gf-hovergrad-bg.png); - background-position: 0 0; - background-repeat: repeat-x; } div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:focus, @@ -2556,7 +2614,7 @@ div#gravity-settings-icon, div#gravity-export-icon, div#gravity-import-icon, div#gravity-update-icon, -div#gravity-help-icon{ +div#gravity-help-icon { background-image:url(../images/gf-32-iconsprite.png); background-repeat: no-repeat; } @@ -2602,7 +2660,10 @@ div#major-publishing-actions { } html body.wp-admin div#wpwrap div#wpcontent div#wpbody div#wpbody-content div.wrap table.widefat thead tr th.manage-column, -html body.wp-admin div#wpwrap div#wpcontent div#wpbody div#wpbody-content div.wrap table.widefat tfoot tr th.manage-column {font-size: 13px !important} +html body.wp-admin div#wpwrap div#wpcontent div#wpbody div#wpbody-content div.wrap table.widefat tfoot tr th.manage-column { + font-size: 13px !important +} + th.manage-column.column-cb.check-column { vertical-align: top; } @@ -2885,7 +2946,7 @@ div.gform_card_icon { .ginput_complex select.ginput_card_expiration.ginput_card_expiration_month, .ginput_complex select.ginput_card_expiration.ginput_card_expiration_year { - width: 48% !important; + width: 47% !important; display: -moz-inline-stack; display: inline-block; zoom: 1; @@ -3270,14 +3331,16 @@ ul#gf_merge_tag_list a:hover { background-color: #EEE; } -.mt-gform_notification_message { +.mt-gform_notification_message, +.mt-form_confirmation_message { float: right; position: relative; right: 10px; top: 90px; } -#wp-gform_notification_message-wrap { +#wp-gform_notification_message-wrap, +#wp-form_confirmation_message-wrap { margin-right: 12px; } @@ -3539,6 +3602,30 @@ h3+h4.gf_settings_subheader { margin: 30px 0 30px 0 !important; } +#gform_fields .field-drop-zone { + border: 1px dashed #bbb; + background-color: #FFF; + margin: 0 auto 10px; + height: 75px; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + + +.gform_fields_empty{ + height:600px; +} + +.ui-draggable-dragging { + -webkit-transition: width .1s; + transition: width .1s; + width:120px; + z-index:9999; + color: #424242 !important; +} + ul.gforms_form_settings li { margin: 0; } @@ -3781,10 +3868,9 @@ h2.gf_admin_page_title span.gf_admin_page_subtitle { h2.gf_admin_page_title span.gf_admin_page_subtitle span.gf_admin_page_formid, h2.gf_admin_page_title span.gf_admin_page_subtitle span.gf_admin_page_formname { - background-color: #0074A2; color: #FFF; letter-spacing: 0.1em; - padding: 0 5px 1px 6px; + padding: 1px 8px 2px 9px; font-size: 11px !important; font-weight: normal !important; line-height: 1.8em !important; @@ -3800,11 +3886,11 @@ h2.gf_admin_page_title span.gf_admin_page_subtitle span.gf_admin_page_formname { } h2.gf_admin_page_title span.gf_admin_page_subtitle span.gf_admin_page_formid { - background-color: #0074A2; + background-color: #D54E21; } h2.gf_admin_page_title span.gf_admin_page_subtitle span.gf_admin_page_formname { - background-color: #333; + background-color: #0074A2; } #gform_notification_to_routing_container table { @@ -3813,6 +3899,9 @@ h2.gf_admin_page_title span.gf_admin_page_subtitle span.gf_admin_page_formname { /* Override the default jQuery UI styles for the editor tabs ------------------------------------------------------*/ +.ui-tabs>.ui-tabs-nav>.ui-state-disabled{ + display:none; +} ul#gform_fields li div#field_settings.ui-tabs div#gform_pagination div#pagination_settings.ui-tabs, @@ -3857,7 +3946,7 @@ input:checked+label { font-weight: 400; } -/* better float clearing in the formm builder ------------------------------------------------------*/ +/* better float clearing in the form builder ------------------------------------------------------*/ div.gf_clear { clear: both !important; @@ -3927,7 +4016,6 @@ div.gf_clear.gf_clear_complex { .gform-filter-field, .gform-filter-operator { height: 2em; - padding: 4px 2px 0 2px; box-sizing: border-box; -ms-box-sizing: border-box; -moz-box-sizing: border-box; @@ -3989,153 +4077,6 @@ tr.gf-locking.wp-locked img.gform_active_icon { display: none; } -/* Safari & Google Chrome (webkit) specific styles ------------------------------------------------------*/ - -@media screen and -webkit-min-device-pixel-ratio0#gfield_settings_category_container, -#gfield_settings_choices_container { - max-height: 222px -} - -/* Safari specific styles ----------------------------------------------------*/ - -div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button, -div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:hover, -div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:focus, -div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:active { - padding-top: 6px; - padding-bottom: 6px; -} - -div.wrap.gf_browser_safari .ginput_complex .ginput_cardinfo_right span.ginput_card_security_code_icon { - top: -2px; -} - -div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button, -div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:hover, -div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:focus, -div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:active { - line-height: 10px; -} - -div.wrap.gf_browser_safari .ui-tabs-panel ul li label.inline { - margin-bottom: 0 !important; -} - -/* Firefox specific styles ----------------------------------------------------*/ - -div.wrap.gf_browser_gecko div.new-form-option a { - padding: 16px 16px 14px 16px; -} - -div.wrap.gf_browser_gecko .ginput_complex .ginput_cardinfo_right span.ginput_card_security_code_icon { - top: -4px; -} - -div.wrap.gf_browser_gecko .ui-tabs-panel ul li label.inline { - margin-bottom: 0 !important; - margin-top: 1px !important; -} - - -div.wrap.gf_browser_gecko li.gf_form_switcher select#form_switcher { - max-width: 200px; - height: 24px; -} - -/* Internet Explorer specific styles ----------------------------------------------------*/ - -div.wrap.gf_browser_ie .menu.collapsible ol.field_type li { - width: 48%; -} - -div.wrap.gf_browser_ie .menu.collapsible ol.field_type li input.button { - width: 96% !important; -} - -div.wrap.gf_browser_ie .menu.collapsible li { - min-width: 20% !important; -} - -div.wrap.gf_browser_ie .gfield_checkbox li input[type="checkbox"], -div.wrap.gf_browser_ie .gfield_radio li input[type="radio"], -div.wrap.gf_browser_ie .gfield_checkbox li input { - margin-top: 0; -} - -.bulk-arrow-mid { - height: 300px; -} - -textarea#gfield_bulk_add_input { - width: 320px; - height: 290px; -} - -#TB_ajaxContent { - height: 400px !important; -} - -div.wrap.gf_browser_ie .ginput_complex .ginput_cardinfo_right input.ginput_card_security_code { - top: 0; -} - -div.wrap.gf_browser_ie .ginput_complex .ginput_cardinfo_right span.ginput_card_security_code_icon { - position: relative; - top: -2px; -} - -div.wrap.gf_browser_ie .menu.collapsible ol.field_type li { - width: 50%; - overflow: hidden; -} - -div.wrap.gf_browser_ie.gf_browser_ie8 .menu.collapsible ol.field_type li input.button, -div.wrap.gf_browser_ie.gf_browser_ie9 .menu.collapsible ol.field_type li input.button { - width: 92% !important; -} - -div.wrap.gf_browser_ie input.button-primary.gfbutton, -div.wrap.gf_browser_ie input.button-primary, -div.wrap.gf_browser_ie input.gfbutton { - padding: 0 6px; - line-height: 1em; -} - -div.wrap.gf_browser_ie ol.field_type { - width: 100% !important; -} - -div.wrap.gf_browser_ie ol.field_type li { - padding: 0 !important; -} - -div.wrap.gf_browser_ie ol.field_type input.button[type="button"] { - width: 140px !important; -} - -/* Google Chrome specific styles ----------------------------------------------------*/ - -body .gf_browser_chrome input.button-primary.gfbutton, -body .gf_browser_chrome button.button-primary.gfbutton, -body .gf_browser_chrome a.button-primary.gfbutton { - line-height: 1em !important; -} - -body .gf_browser_chrome h2.gf_admin_page_title span.gf_admin_page_subtitle { - margin-top: 2px; -} - -body .gf_browser_chrome .ui-tabs-panel ul li label.inline { - margin-bottom: 0 !important; - margin-top: 1px !important; -} - -div.wrap.gf_browser_chrome .gfield_checkbox li input[type="checkbox"], -div.wrap.gf_browser_chrome .gfield_radio li input[type="radio"], -div.wrap.gf_browser_chrome .gfield_checkbox li input { - margin-left: 2px !important; -} - /* new pagebreak styles ----------------------------------------------------*/ div.gf-pagebreak-container { @@ -4254,16 +4195,11 @@ body.mp6 #namediv input[type=radio] { width: auto !important; } - - - - span.gf_settings_description { display: block; margin-top: 6px; } - div.gf-html-container { border: 1px solid #E4E4E4; padding: 20px; @@ -4279,6 +4215,11 @@ div.gf-html-container span.gf_blockheader { line-height: 16px; } +ul.gform_fields.left_label li.gfield.gfield_html label.gfield_label, +ul.gform_fields.right_label li.gfield.gfield_html label.gfield_label { + float: none !important; +} + a.gf_insert_field_choice, a.gf_delete_field_choice { color: #9B9B9B; @@ -4325,4 +4266,172 @@ a.gf_delete_field_choice:active { .gaddon-section .settings-field-map-table tbody tr td { border-bottom: 1px dotted #eee !important; +} + +/* resize the sub-settings tables for more verbose inputs ----------------------------------------------------*/ + +table tbody tr#gform_notification_to_email_container.notification_to_container td.gf_sub_settings_cell div.gf_animate_sub_settings table th, +table tbody tr#gform_notification_to_field_container.notification_to_container td.gf_sub_settings_cell div.gf_animate_sub_settings table tbody tr th { + padding-left: 10px; + width: 175px !important; +} + +table tbody tr#gform_notification_to_email_container.notification_to_container td.gf_sub_settings_cell div.gf_animate_sub_settings table { + width: 100% !important; +} + +div#gform_notification_to_routing_rules div input:first-child { + min-width: 50%; +} + +/* Safari specific styles ----------------------------------------------------*/ + +div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button, +div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:hover, +div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:focus, +div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:active { + padding-top: 6px; + padding-bottom: 6px; +} + +div.wrap.gf_browser_safari .ginput_complex .ginput_cardinfo_right span.ginput_card_security_code_icon { + top: -2px; +} + +div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button, +div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:hover, +div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:focus, +div.wrap.gf_browser_safari div#add_fields div#floatMenu ul#sidebarmenu1.menu li.add_field_button_container ul li.add-buttons ol.field_type li input.button:active { + line-height: 10px; +} + +div.wrap.gf_browser_safari .ui-tabs-panel ul li label.inline { + margin-bottom: 0 !important; +} + +#gfield_settings_category_container, +#gfield_settings_choices_container, +.gfield_settings_input_choices_container { + max-height: 222px +} + +/* Firefox specific styles ----------------------------------------------------*/ + +div.wrap.gf_browser_gecko div.new-form-option a { + padding: 16px 16px 14px 16px; +} + +div.wrap.gf_browser_gecko .ginput_complex .ginput_cardinfo_right span.ginput_card_security_code_icon { + top: -4px; +} + +div.wrap.gf_browser_gecko .ui-tabs-panel ul li label.inline { + margin-bottom: 0 !important; + margin-top: 1px !important; +} + + +div.wrap.gf_browser_gecko li.gf_form_switcher select#form_switcher { + max-width: 200px; + height: 24px; +} + +/* Internet Explorer specific styles ----------------------------------------------------*/ + +div.wrap.gf_browser_ie .menu.collapsible ol.field_type li { + width: 48%; +} + +div.wrap.gf_browser_ie .menu.collapsible ol.field_type li input.button { + width: 96% !important; +} + +div.wrap.gf_browser_ie .menu.collapsible li { + min-width: 20% !important; +} + +div.wrap.gf_browser_ie .gfield_checkbox li input[type="checkbox"], +div.wrap.gf_browser_ie .gfield_radio li input[type="radio"], +div.wrap.gf_browser_ie .gfield_checkbox li input { + margin-top: 0; +} + +.bulk-arrow-mid { + height: 300px; +} + +textarea#gfield_bulk_add_input { + width: 320px; + height: 290px; +} + +#TB_ajaxContent { + height: 400px !important; +} + +div.wrap.gf_browser_ie .ginput_complex .ginput_cardinfo_right input.ginput_card_security_code { + top: 0; +} + +div.wrap.gf_browser_ie .ginput_complex .ginput_cardinfo_right span.ginput_card_security_code_icon { + position: relative; + top: -2px; +} + +div.wrap.gf_browser_ie .menu.collapsible ol.field_type li { + width: 50%; + overflow: hidden; +} + +div.wrap.gf_browser_ie.gf_browser_ie8 .menu.collapsible ol.field_type li input.button, +div.wrap.gf_browser_ie.gf_browser_ie9 .menu.collapsible ol.field_type li input.button { + width: 92% !important; +} + +div.wrap.gf_browser_ie input.button-primary.gfbutton, +div.wrap.gf_browser_ie input.button-primary, +div.wrap.gf_browser_ie input.gfbutton { + padding: 0 6px; + line-height: 1em; +} + +div.wrap.gf_browser_ie ol.field_type { + width: 100% !important; +} + +div.wrap.gf_browser_ie ol.field_type li { + padding: 0 !important; +} + +div.wrap.gf_browser_ie ol.field_type input.button[type="button"] { + width: 140px !important; +} + +/* Google Chrome specific styles ----------------------------------------------------*/ + +body .gf_browser_chrome input.button-primary.gfbutton, +body .gf_browser_chrome button.button-primary.gfbutton, +body .gf_browser_chrome a.button-primary.gfbutton { + line-height: 1em !important; +} + +body .gf_browser_chrome h2.gf_admin_page_title span.gf_admin_page_subtitle { + margin-top: 2px; +} + +body .gf_browser_chrome .ui-tabs-panel ul li label.inline { + margin-bottom: 0 !important; + margin-top: 1px !important; +} + +div.wrap.gf_browser_chrome .gfield_checkbox li input[type="checkbox"], +div.wrap.gf_browser_chrome .gfield_radio li input[type="radio"], +div.wrap.gf_browser_chrome .gfield_checkbox li input { + margin-left: 2px !important; +} + +#gfield_settings_category_container, +#gfield_settings_choices_container, +.gfield_settings_input_choices_container { + max-height: 222px } \ No newline at end of file diff --git a/css/browsers.css b/css/browsers.css index f1ac34e..a0c7897 100644 --- a/css/browsers.css +++ b/css/browsers.css @@ -4,10 +4,10 @@ browsers.css Gravity Forms Browser-Specific CSS http://www.gravityforms.com -updated: June 3, 2013 5:39 PM +updated: January 28, 2015 2:05 PM Gravity Forms is a Rocketgenius project -copyright 2013 Rocketgenius Inc. +copyright 2008-2015 Rocketgenius Inc. http: //www.rocketgenius.com this may not be redistributed without the express written permission of the author. @@ -43,7 +43,21 @@ to no. .gform_wrapper.gf_browser_safari .gfield_checkbox li input[type=checkbox], .gform_wrapper.gf_browser_safari .gfield_radio li input[type=radio], .gform_wrapper.gf_browser_safari .gfield_checkbox li input { - margin-top: 4px; + margin-top: 0.250em; +} + +.gform_wrapper.gf_browser_safari.fixdrop_wrapper select { + height: 2.250em; + line-height: 2.125em; + background: inherit !important; + border-color: #A6A6A6; + border-style: solid; + margin-top: 1px; + margin-bottom: 1px; +} + +.gform_wrapper.gf_browser_safari select[multiple=multiple] { + height: auto !important; } /* Chrome specific rules ------------------------------------------------------*/ @@ -66,14 +80,48 @@ to no. .gform_wrapper.gf_browser_chrome .ginput_complex select, .gform_wrapper.gf_browser_chrome .ginput_complex .ginput_right select { - padding: 5px 0 5px; - margin-bottom: 5px; + text-indent: 0.188em; + line-height: 1.5em; + margin-bottom: 0.313em; } .gform_wrapper.gf_browser_chrome .gfield_checkbox li input[type=checkbox], .gform_wrapper.gf_browser_chrome .gfield_radio li input[type=radio], .gform_wrapper.gf_browser_chrome .gfield_checkbox li input { - margin-top: 4px; + margin-top: 0.375em; +} + +.gform_wrapper.gf_browser_chrome ul.gform_fields li.gfield div.ginput_complex span.ginput_left select, +.gform_wrapper.gf_browser_chrome ul.gform_fields li.gfield div.ginput_complex span.ginput_right select, +.gform_wrapper.gf_browser_chrome ul.gform_fields li.gfield select { + margin-left: 0.063em; +} + +.gform_wrapper.gf_browser_chrome ul.gform_fields li.gfield input[type=radio] { + margin-left: 0.063em; +} + +.gform_wrapper.gf_browser_chrome ul.gform_fields li.gfield span.name_first, +.gform_wrapper.gf_browser_chrome ul.gform_fields li.gfield span.name_middle, +.gform_wrapper.gf_browser_chrome ul.gform_fields li.gfield span.name_last { + padding-top: 2px; +} + +.gform_wrapper.gf_browser_chrome.fixdrop_wrapper select { + height: 2.250em; + line-height: 2.125em; + background: inherit !important; + border-style: solid; +} + +.gform_wrapper.gf_browser_chrome select[multiple=multiple] { + height: auto !important; +} + +@media all and (max-width: 480px), all and (max-device-width: 480px) { + body .gform_wrapper.gf_browser_chrome select { + width: 93.75% !important; + } } /* Firefox specific rules ------------------------------------------------------*/ @@ -88,15 +136,21 @@ to no. .gform_wrapper.gf_browser_gecko ul.gform_fields li.gfield div.ginput_complex span.ginput_left select, .gform_wrapper.gf_browser_gecko ul.gform_fields li.gfield div.ginput_complex span.ginput_right select, .gform_wrapper.gf_browser_gecko ul.gform_fields li.gfield select { - margin-left: 2px; + margin-left: 0.063em; } .gform_wrapper.gf_browser_gecko .ginput_complex .ginput_cardinfo_left select.ginput_card_expiration.ginput_card_expiration_month { - margin-right: 2px; + margin-right: 0.063em; +} + +.gform_wrapper.gf_browser_gecko .gfield_checkbox li input[type=checkbox], +.gform_wrapper.gf_browser_gecko .gfield_radio li input[type=radio], +.gform_wrapper.gf_browser_gecko .gfield_checkbox li input { + margin-top: 0.438em; } .gform_wrapper.gf_browser_gecko select { - padding: 5px 0 0 0; + padding: 0.188em 0 0.188em 0; } /* Opera specific rules ------------------------------------------------------*/ @@ -109,8 +163,8 @@ to no. } .gform_wrapper.gf_browser_opera .ginput_complex .ginput_right select { - padding: 5px 0 5px; - margin-bottom: 5px; + padding: 0.313em 0 0.313em 0; + margin-bottom: 0.313em; } .gform_wrapper.gf_browser_opera .gform_body ul.gform_fields li.gfield .ginput_container #recaptcha_widget_div #recaptcha_area { @@ -122,6 +176,21 @@ to no. margin-left: 32%; } +.gform_wrapper.gf_browser_opera.fixdrop_wrapper select { + height: 2.225em; + line-height: 2.125em; + background: inherit !important; + border-color: #A6A6A6; + border-style: solid; + border-collapse: collapse; + border-size: 1px; + margin-top: 1px; + margin-bottom: 1px; +} + +.gform_wrapper.gf_browser_opera select[multiple=multiple] { + height: auto !important; +} /* IE specific rules ------------------------------------------------------*/ @@ -133,15 +202,15 @@ to no. } .gform_wrapper.gf_browser_ie .gfield_time_hour { - width: 80px; + width: 5.00em; } .gform_wrapper.gf_browser_ie .gfield_time_minute { - width: 70px; + width: 4.375em; } .gform_wrapper.gf_browser_ie .gfield_time_ampm { - padding-top: 2px; + padding-top: 0.125em; } .gform_wrapper.gf_browser_ie .gfield_time_hour input, @@ -151,11 +220,11 @@ to no. .gform_wrapper.gf_browser_ie .ginput_complex .ginput_left label, .gform_wrapper.gf_browser_ie .ginput_complex .ginput_right label { - margin: 3px 0 5px 0; + margin: 0.188em 0 0.313em 0; } .gform_wrapper.gf_browser_ie .gform_footer input.button { - padding: 3px; + padding: 0.188em; } .gform_wrapper.gf_browser_ie ul.top_label .clear-multi { @@ -175,14 +244,17 @@ to no. .gform_wrapper.gf_browser_ie .ginput_complex .ginput_left select, .gform_wrapper.gf_browser_ie .ginput_complex .ginput_right select { - padding: 2px 0 2px 0; + padding: 0.125em 0 0.125em 0; +} + +.gform_wrapper.gf_browser_ie .gform_body ul.gform_fields li.gfield .ginput_container #recaptcha_widget_div #recaptcha_area { + width: 99%!important; } .gform_wrapper.gf_browser_ie .gform_body ul.gform_fields li.gfield .ginput_container #recaptcha_widget_div #recaptcha_area { width: 99%!important; } -.gform_wrapper.gf_browser_ie .gform_body ul.gform_fields li.gfield .ginput_container #recaptcha_widget_div #recaptcha_area {width: 99%!important} .gform_wrapper.gf_browser_ie .left_label #recaptcha_area #recaptcha_table, .gform_wrapper.gf_browser_ie .right_label #recaptcha_area #recaptcha_table { margin-left: 32%; @@ -194,6 +266,13 @@ to no. left: 4px; } +.gform_wrapper.gf_browser_ie img.add_list_item, +.gform_wrapper.gf_browser_ie img.delete_list_item { + width: 16px !important; + height: 16px !important; + background-size: 16px 16px !important; +} + /* iPhone specific rules ------------------------------------------------------*/ .gform_wrapper.gf_browser_iphone ul li:before, diff --git a/css/forms.css b/css/forms.css index 63b2b12..05ee1c9 100644 --- a/css/forms.css +++ b/css/forms.css @@ -3,4 +3,13 @@ @import url('formsmain.css'); @import url('readyclass.css'); @import url('browsers.css'); -@import url('rtl.css'); \ No newline at end of file +@import url('rtl.css'); + + +/* + +Note: October 2, 2014 3:51 PM +All CSS files are now enqueued directly for better minification support. +This file has been left in place temporarily for anyone who may have manually referenced this file in their theme. + +*/ \ No newline at end of file diff --git a/css/formsmain.css b/css/formsmain.css index 841111d..b330c17 100644 --- a/css/formsmain.css +++ b/css/formsmain.css @@ -2,12 +2,12 @@ ---------------------------------------------------------------- Gravity Forms Front End Form Styles -Version 1.8 +Version 1.9 http: //www.gravityforms.com -updated: January 31, 2014 3:35 PM +updated: January 28, 2015 1:28 PM Gravity Forms is a Rocketgenius project -copyright 2008-2014 Rocketgenius Inc. +copyright 2008-2015 Rocketgenius Inc. http: //www.rocketgenius.com this may not be redistributed without the express written permission of the author. @@ -27,8 +27,8 @@ to no. .gform_wrapper { overflow: inherit; - margin: 10px 0; - max-width: 98% + margin: 1em 0; + max-width: 98%; } .gform_wrapper h1, @@ -55,10 +55,11 @@ to no. .gform_wrapper input[type=number], .gform_wrapper input[type=password] { outline-style: none; - font-size: 11px; + font-size: inherit; font-family: inherit; - padding: 5px 2px 5px 2px; + padding: 0.313em 0 0.313em 0; letter-spacing: normal; + text-indent: 0.250em; } .gform_wrapper input[type=image] { @@ -69,10 +70,10 @@ to no. .gform_wrapper textarea { outline-style: none; - font-size: 11px; + font-size: inherit; font-family: inherit; letter-spacing: normal; - padding: 4px 2px 4px 2px; + padding: 0.250em 0.125em 0.250em 0.125em; resize: none; } @@ -131,14 +132,13 @@ html>body .entry ul, } .gform_wrapper select { - font-size: 11px; + font-size: inherit; font-family: inherit; - padding: 5px 0 5px 0; letter-spacing: normal; } .gform_wrapper select option { - padding: 2px 2px; + padding: 0.125em 0.125em; display: block; } @@ -148,7 +148,7 @@ html>body .entry ul, .gform_wrapper .gform_heading { width: 98%; - margin-bottom: 18px; + margin-bottom: 1.125em; } .gform_wrapper .gfield_time_hour, @@ -156,17 +156,26 @@ html>body .entry ul, .gform_wrapper .gfield_date_month, .gform_wrapper .gfield_date_day, .gform_wrapper .gfield_date_year { - width: 70px; + width: 4.688em; vertical-align: top; display: -moz-inline-stack; display: inline-block; zoom: 1; } +.gform_wrapper .gfield_time_hour i { + font-style: normal !important; + font-family: sans-serif !important; + width: 0.625em; + text-align: center; + float: right; + margin-top: 9%; +} + .gform_wrapper .gfield_date_month, .gform_wrapper .gfield_date_day, .gform_wrapper .gfield_date_year { - margin-right: 12px; + margin-right: 0.750em; } .gform_wrapper .gfield_date_dropdown_month, @@ -181,7 +190,7 @@ html>body .entry ul, .gform_wrapper .gfield_date_dropdown_month, .gform_wrapper .gfield_date_dropdown_day, .gform_wrapper .gfield_date_dropdown_year { - margin-right: 6px; + margin-right: 0.375em; } .gform_wrapper .gfield_time_ampm { @@ -192,7 +201,7 @@ html>body .entry ul, } .gform_wrapper .gfield_time_ampm select { - width: 60px !important; + width: 4.688em !important; } .gform_wrapper .gfield_time_hour input, @@ -206,7 +215,7 @@ html>body .entry ul, .gform_wrapper .gfield_date_month, .gform_wrapper .gfield_date_day, .gform_wrapper .gfield_date_year { - width: 50px; + width: 3.125em; float: left; } @@ -227,21 +236,16 @@ html>body .entry ul, } .gform_wrapper .field_name_first, +.gform_wrapper .field_name_middle, .gform_wrapper .field_name_last { - width: 50%; + width: 49.5%; float: left; } -.gform_wrapper .ginput_complex { +.gform_wrapper .ginput_complex.ginput_container { overflow: hidden; } -.gform_wrapper .ginput_left input:focus+label, -.gform_wrapper .ginput_right input:focus+label, -.gform_wrapper .ginput_full input:focus+label { - font-weight: bold; -} - .gform_wrapper .field_name_first input, .gform_wrapper .ginput_complex .ginput_left input { width: 95% !important; @@ -252,22 +256,23 @@ html>body .entry ul, } .gform_wrapper .datepicker { - width: 100px !important; + width: 6.750em !important; } .gform_wrapper .ginput_complex .ginput_left { - width: 50%; + width: 49.5%; float: left; } .gform_wrapper .ginput_complex .ginput_right { - width: 49%; + width: 49.5%; float: right; + margin-right: .5%; } .gform_wrapper .gfield_error .ginput_complex .ginput_left, .gform_wrapper .gfield_error .ginput_complex .ginput_right { - width: 50%; + width: 49.5%; } .gform_wrapper .gfield_error .ginput_complex .ginput_left input[type=text], @@ -311,58 +316,164 @@ html>body .entry ul, .gform_wrapper .ginput_complex label, .gform_wrapper .gfield_time_hour label, .gform_wrapper .gfield_time_minute label, +.gform_wrapper .gfield_time_ampm label, .gform_wrapper .gfield_date_month label, .gform_wrapper .gfield_date_day label, .gform_wrapper .gfield_date_year label, .gform_wrapper .instruction { display: block; - margin: 3px 0; - font-size: 11px; + font-size: 0.875em; letter-spacing: 0.5pt; } -.gform_wrapper .ginput_complex .name_prefix { - float: left; - width: 30px !important; - margin-right: 14px; +.gform_wrapper .ginput_complex label, +.gform_wrapper .gfield_time_hour label, +.gform_wrapper .gfield_time_minute label, +.gform_wrapper .gfield_time_ampm label, +.gform_wrapper .gfield_date_month label, +.gform_wrapper .gfield_date_day label, +.gform_wrapper .gfield_date_year label, +.gform_wrapper .instruction { + margin: 0.188em 0 0.750em 0; } -.gform_wrapper .ginput_complex .name_suffix { - float: left; - width: 30px !important; +.gform_wrapper .field_sublabel_above .ginput_complex label, +.gform_wrapper .field_sublabel_above .gfield_time_hour label, +.gform_wrapper .field_sublabel_above .gfield_time_minute label, +.gform_wrapper .field_sublabel_above .gfield_time_ampm label, +.gform_wrapper .field_sublabel_above .gfield_date_month label, +.gform_wrapper .field_sublabel_above .gfield_date_day label, +.gform_wrapper .field_sublabel_above .gfield_date_year label, +.gform_wrapper .field_sublabel_above .instruction { + margin: 0.750em 0 0.188em 0 ; } -.gform_wrapper .ginput_complex .name_first, -.gform_wrapper .ginput_complex .name_last { - float: left; - width: 100px; - margin-right: 8px; +.gform_wrapper .ginput_complex span.name_prefix, +.gform_wrapper .ginput_complex span.name_suffix { + display: block; + clear: right; + overflow: hidden; +} + +.gform_wrapper .ginput_complex span.name_prefix { + min-height: 2.20em +} + +.gform_wrapper .ginput_complex span.name_prefix select { + width: auto !important; +} + +.gform_wrapper .ginput_complex.has_middle span.name_suffix input[type=text] { + width: 32%; +} + +.gform_wrapper .ginput_complex span.name_first, +.gform_wrapper .ginput_complex span.name_middle, +.gform_wrapper .ginput_complex span.name_last { + vertical-align: bottom; + min-height: 2.813em; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; +} + +.gform_wrapper .ginput_complex span.name_first, +.gform_wrapper .ginput_complex span.name_middle { + margin-right: 0.313em; +} + +.gform_wrapper .field_sublabel_above .ginput_complex .name_prefix, +.gform_wrapper .field_sublabel_above .ginput_complex span.name_suffix, +.gform_wrapper .field_sublabel_above .ginput_complex span.name_first, +.gform_wrapper .field_sublabel_above .ginput_complex span.name_middle, +.gform_wrapper .field_sublabel_above .ginput_complex span.name_last { + vertical-align: top; +} + +.gform_wrapper .ginput_complex.ginput_container.has_first_name span, +.gform_wrapper .ginput_complex.ginput_container.has_middle_name span, +.gform_wrapper .ginput_complex.ginput_container.has_last_name span { + width: 99.5% +} + +.gform_wrapper .ginput_complex.ginput_container.has_first_name.has_last_name span { + width: 49% +} + +.gform_wrapper .ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span { + width: 32% } .gform_wrapper .top_label .gfield_label { - margin: 10px 0 4px 0; + margin: 0.625em 0 0.500em 0; font-weight: bold; display: -moz-inline-stack; display: inline-block; - line-height: 1.3em; + line-height: 1.30em; clear: both; } .gform_wrapper .left_label .gfield_label { float: left; - margin: 0 15px 0 0; + margin: 0.75em 15px 0 0; width: 29%; font-weight: bold; } +.gform_wrapper .left_label li.field_sublabel_below .gfield_label { + margin: 0 1em 0 0; +} + .gform_wrapper .right_label .gfield_label { float: left; - margin: 0 15px 0 0; + margin: 0.75em 1em 0 0; width: 29%; font-weight: bold; text-align: right; } +.gform_wrapper .right_label li.field_sublabel_below .gfield_label { + margin: 0 1em 0 0; +} + +.gform_wrapper .left_label li.hidden_label input, +.gform_wrapper .right_label li.hidden_label input { + margin-left: 30.7%; +} + +.gform_wrapper .left_label li.gfield .gfield_password_strength, +.gform_wrapper .right_label li.gfield .gfield_password_strength { + margin-left: 30.7%; +} + +body .gform_wrapper label.gfield_label + div.ginput_container { + margin-top: 0.375em; +} + +/* Field Label Placement Overrides ------------------------------------------------------*/ + +.gform_wrapper .hidden_label .gfield_label { + display: none !important; +} + +.gfield.right_label, +.gfield.left_label{ + padding-top:10px; +} + +.gform_wrapper li.hidden_label input { + margin-top: 0.75em; +} + +.gform_wrapper label.hidden_sub_label{ + display:none; +} + +.gform_wrapper .field_sublabel_hidden_label .ginput_complex.ginput_container input[type=text], +.gform_wrapper .field_sublabel_hidden_label .ginput_complex.ginput_container select { + margin-bottom: 0.750em; +} + .gform_wrapper .left_label ul.gfield_checkbox, .gform_wrapper .right_label ul.gfield_checkbox, .gform_wrapper .left_label ul.gfield_radio, @@ -387,7 +498,10 @@ html>body .entry ul, .gform_wrapper .top_label input.large, .gform_wrapper .top_label select.large, -.gform_wrapper .top_label textarea.textarea { +.gform_wrapper .top_label textarea.textarea, +.gform_wrapper .hidden_label input.large, +.gform_wrapper .hidden_label select.large, +.gform_wrapper .hidden_label textarea.textarea { width: 99.2%; } @@ -433,23 +547,17 @@ html>body .entry ul, .gform_wrapper h3.gform_title { letter-spacing: normal !important; - margin: 10px 0 6px 0; + margin: 0.625em 0 0.375em 0; } .gform_wrapper span.gform_description { font-weight: normal; } -.gform_wrapper h2.gsection_title, -.gform_wrapper .gsection_description, -.gform_wrapper h3.gform_title { - width: 98%; -} - .gform_wrapper .gsection { border-bottom: 1px dotted #CCC; - padding: 0 0 8px 0; - margin: 16px 0; + padding: 0 0 .5em 0; + margin: 1.8em 0; clear: both; } @@ -493,7 +601,7 @@ html>body .entry ul, .gform_wrapper .gfield_description, .gform_wrapper .gsection_description, .gform_wrapper .instruction { - font-size: 0.85em; + font-size: 0.875em; line-height: 1.5em; clear: both; font-family: sans-serif; @@ -503,21 +611,29 @@ html>body .entry ul, .gform_wrapper .description, .gform_wrapper .gfield_description, .gform_wrapper .gsection_description { - padding: 4px 0 8px 0; + padding: 0.5em 0; } .gform_wrapper .gfield_description { - padding: 10px 0 0 0; + padding: 0.625em 0 0 0; width: 99.8%; } +.gform_wrapper li.field_description_above .gfield_description { + margin-bottom: 0.75em; +} + .gform_wrapper .left_label .gfield_description, .gform_wrapper .right_label .gfield_description { width: 63%; } .gform_wrapper .description_above .gfield_description { - padding: 0 0 10px 0; + padding: 0 0 0.625em 0; +} + +.gform_wrapper .field_description_below .gfield_description { + padding: 0.625em 0 1em 0; } .gfield_date_year+.gfield_description { @@ -528,32 +644,32 @@ html>body .entry ul, .gform_wrapper .left_label .gfield_description, .gform_wrapper .left_label .instruction, .gform_wrapper .right_label .instruction { - margin-left: 31%; + margin-left: 30%; } .gform_wrapper .left_label .gsection .gsection_description, .gform_wrapper .right_label .gsection .gsection_description { margin-left: 0; - padding-top: 4px; + padding-top: 0.250em; padding-left: 0; line-height: 1.5em; } .gform_wrapper .gfield_required { color: #790000; - margin-left: 4px; + margin-left: 0.250em; } .gform_wrapper textarea.small { - height: 80px; + height: 5em; } .gform_wrapper textarea.medium { - height: 150px; + height: 9.375em; } .gform_wrapper textarea.large { - height: 250px; + height: 15.625em; } .gform_wrapper li.gfield.gfield_error, @@ -576,9 +692,6 @@ html>body .entry ul, font-family: "Lucida Grande", "Lucida Sans", "Lucida Sans Unicode", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans-serif; padding: 10px 20px 10px 45px; min-height: 25px; - background-image: url(../images/stopbanner.png); - background-repeat: no-repeat; - background-position: 0 0; background-color: #790000; border-bottom: 1px solid #620101; color: #FFF; @@ -626,32 +739,29 @@ li.gfield + li.gfield.gfield_creditcard_warning { .gform_wrapper li.gfield.gfield_error.gfield_contains_required label.gfield_label, .gform_wrapper li.gfield.gfield_error.gfield_contains_required div.ginput_container { - margin-top: 12px; -} - -.gform_wrapper div.validation_error { - color: #790000; - font-size: 1.2em; - font-weight: bold; - margin-bottom: 1.6em; + margin-top: 0.750em; } .gform_wrapper div.validation_error { color: #790000; - font-size: 1.2em; + font-size: 1.200em; font-weight: bold; + margin-bottom: 1.600em; + border-top: 2px solid #790000; + border-bottom: 2px solid #790000; + padding: 1em 0 1em 0; } div.gf_page_steps+div.validation_error { - margin-top: 16px; + margin-top: 1em; } .gform_wrapper div.gfield_description.validation_error { color: #790000; font-weight: bold; - font-size: 14px; - line-height: 1.2em; - margin-bottom: 16px; + font-size: 0.875em; + line-height: 1.200em; + margin-bottom: 1em; } .gform_wrapper .validation_message { @@ -677,14 +787,14 @@ div.gf_page_steps+div.validation_error { } .gform_wrapper .gform_footer { - padding: 16px 0 10px 0; - margin: 16px 0 0 0; + padding: 1em 0 0.625em 0; + margin: 1em 0 0 0; clear: both; } .gform_wrapper .gform_footer.right_label, .gform_wrapper .gform_footer.left_label { - padding: 16px 0 10px 31%; + padding: 1em 0 0.625em 30.5%; } .gform_wrapper .gform_footer input.button, @@ -692,6 +802,11 @@ div.gf_page_steps+div.validation_error { font-size: 1em; } +.gform_wrapper .gform_footer a.gform_save_link { + font-size: 1em; + margin-left: 1em; +} + .gform_wrapper .gform_footer input[type=image] { padding: 0; width: auto !important; @@ -702,7 +817,7 @@ div.gf_page_steps+div.validation_error { .gform_wrapper .ginput_complex .ginput_left, .gform_wrapper .ginput_complex .ginput_right, .gform_wrapper .ginput_complex .ginput_full { - min-height: 43px; + min-height: 2.813em; display: block; overflow: hidden; } @@ -718,8 +833,8 @@ div.gf_page_steps+div.validation_error { .gform_wrapper .gfield_checkbox li, .gform_wrapper .gfield_radio li { - margin: 0 0 8px 0; - line-height: 1.3em; + margin: 0 0 0.500em 0; + line-height: 1.300em; } .gform_wrapper ul.gfield_radio li input[type="radio"]:checked+label, @@ -728,7 +843,7 @@ div.gf_page_steps+div.validation_error { } .gform_wrapper input.datepicker.datepicker_with_icon { - margin-right: 4px !important; + margin-right: 0.250em !important; display: -moz-inline-stack; display: inline-block; zoom: 1; @@ -761,35 +876,40 @@ div.gf_page_steps+div.validation_error { } .gform_wrapper ul.gfield_radio li input+input { - margin-left: 4px; + margin-left: 0.250em; } .gform_wrapper ul.gfield_radio li input[value=gf_other_choice] { - margin-right: 6px; - margin-top: 4px; + margin-right: 0.375em; + margin-top: 0.250em; } .gform_wrapper .top_label .gfield_description, { - padding: 10px 0 0 0; + padding: 0.625em 0 0 0; } .gform_wrapper .top_label .gfield_description.validation_message, .gform_wrapper .gfield_description.validation_message { - padding: 10px 0 !important; + padding: 0.625em 0 !important; } .gform_wrapper .ginput_container + .gfield_description.validation_message { - margin-top: 6px; + margin-top: 0.375em; } .gform_wrapper .gfield_description + .gform_wrapper .gfield_description.validation_message { - margin-top: 6px; + margin-top: 0.375em; } .gform_wrapper .ginput_container.ginput_list + .gfield_description.validation_message { margin-top: 0; } +.gform_wrapper .left_label .ginput_container.ginput_list, +.gform_wrapper .right_label .ginput_container.ginput_list { + padding-top: 0.750em !important; +} + /* HTML field default margins -----------------------------------------------------*/ @@ -799,14 +919,20 @@ div.gf_page_steps+div.validation_error { } .gform_wrapper .gfield_html.gfield_no_follows_desc { - margin-top: 10px; + margin-top: 0.625em; +} + +/* HTML field max image width -----------------------------------------------------*/ + +body .gform_wrapper ul li.gfield.gfield_html img { + max-width: 98% !important; } /* ajax forms ------------------------------------------------------*/ .gform_wrapper .gform_ajax_spinner { - padding-left: 10px; + padding-left: 0.625em; } /* hide the honeypot field ------------------------------------------------------*/ @@ -826,19 +952,19 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { .gform_wrapper .gfield_captcha_input_container { - padding-top: 3px; + padding-top: 0.188em; } .gform_wrapper .simple_captcha_small input { - width: 100px; + width: 6.250em; } .gform_wrapper .simple_captcha_medium input { - width: 150px; + width: 9.375em; } .gform_wrapper .simple_captcha_large input { - width: 200px; + width: 12.500em; } .gform_wrapper .gform_wrapper .left_label .simple_captcha_small, @@ -862,15 +988,15 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { .gform_wrapper .math_small input { - width: 69px; + width: 4.313em; } .gform_wrapper .math_medium input { - width: 90px; + width: 5.625em; } .gform_wrapper .math_large input { - width: 108px; + width: 6.750em; } .gform_wrapper .left_label .math_small, @@ -886,8 +1012,8 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { .gform_wrapper div.charleft { - font-size: 11px; - margin-top: 4px; + font-size: 0.688em; + margin-top: 0.250em; color: #B7B7B7; width: 92% !important; white-space: nowrap !important; @@ -933,11 +1059,11 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { } .gform_wrapper .top_label span.ginput_total { - margin: 8px 0; + margin: 0.5em 0; } .gform_wrapper span.ginput_product_price_label { - margin-right: 2px; + margin-right: 0.125em; } .gform_wrapper span.ginput_product_price { @@ -945,25 +1071,27 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { } .gform_wrapper span.ginput_quantity_label { - margin-left: 10px; - margin-right: 2px; + margin-left: 0.625em; + margin-right: .125em; } .gform_wrapper input.ginput_quantity { - width: 40px; + width: 2.500em; } /* multi-page form paging ------------------------------------------------------*/ .gform_wrapper .gform_page_footer { - margin: 20px 0; + margin: 1.250em 0; width: 99%; border-top: 1px dotted #CCC; - padding: 16px 0 0 0; + padding: 1em 0 0 0; + clear: both; } +.gform_wrapper .gform_page_footer .button.gform_next_button, .gform_wrapper .gform_page_footer .button.gform_button { - margin-right: 10px; + margin-right: 0.625em; } /* multi-page progress bar ------------------------------------------------------*/ @@ -972,15 +1100,15 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { .gform_wrapper .gf_progressbar_wrapper { clear: both; width: 99%; - margin: 0 0 8px 0; - padding: 0 0 16px 0; + margin: 0 0 0.5em 0; + padding: 0 0 1em 0; border-bottom: 1px dotted #CCC; } .gform_wrapper .gf_progressbar_wrapper h3.gf_progressbar_title { - font-size: 13px; + font-size: 0.813em; line-height: 1em !important; - margin: 0 0 6px 0 !important; + margin: 0 0 0.375em 0 !important; padding: 0 !important; clear: both; filter: alpha(opacity=60); @@ -1073,17 +1201,17 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { .gform_wrapper .gf_page_steps { width: 99%; - margin: 0 0 8px 0; - padding: 0 0 4px 0; + margin: 0 0 0.50em 0; + padding: 0 0 0.250em 0; border-bottom: 1px dotted #CCC; } .gform_wrapper .gf_step { width: auto !important; - margin: 0 10px 10px 0; - font-size: 14px; - height: 20px; - line-height: 20px !important; + margin: 0 1em 0.625em 0; + font-size: 1em; + height: 1.250em; + line-height: 1.250em !important; filter: alpha(opacity=20); -moz-opacity: 0.2; -khtml-opacity: 0.2; @@ -1095,7 +1223,7 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { } .gform_wrapper .gf_step span.gf_step_number { - font-size: 20px; + font-size: 1.250em; float: left; font-family: arial,sans-serif; } @@ -1116,16 +1244,27 @@ body .gform_wrapper ul.gform_fields li.gfield.gform_validation_container { /* password strength indicator -----------------------------------------------------------------*/ - .gform_wrapper .gfield_password_strength { border: 1px solid #DDD; - margin: 0; - padding: 3px 5px; + margin-top: 1.150em; + margin-bottom: 1.150em; + line-height: 1.8; + padding: 0.313em 0.313em; text-align: center; - width: 200px; background-color: #EEE; } +.gform_wrapper ul.top_label li.gfield .gfield_password_strength { + width: 97%; +} + +.gform_wrapper ul.left_label li.gfield .gfield_password_strength, +.gform_wrapper ul.right_label li.gfield .gfield_password_strength { + margin-top: 1.150em; + margin-bottom: 1.150em; + width: 60%; +} + .gform_wrapper .gfield_password_strength.bad { background-color: #FFB78C; border-color: #FF853C; @@ -1253,7 +1392,7 @@ body .gform_wrapper div.gform_body ul.gform_fields li.gfield.gfield_html dl dd { .gform_wrapper table.gfield_list th + th, .gform_wrapper table.gfield_list td + td { - padding:0 0 0.5em 0.7em; + padding:0 0 0 0.7em; } .gform_wrapper .left_label .gfield_list, .gform_wrapper .right_label .gfield_list { @@ -1285,403 +1424,432 @@ body .gform_wrapper div.gform_body ul.gform_fields li.gfield.gfield_html dl dd { } .gform_wrapper table.gfield_list td.gfield_list_icons { - min-width: 45px !important; + width: 5%; + min-width: 3.750em !important; } -/* enhanced UI/select styles updated in v.1.8.12 -----------------------------------------------------------------*/ +.gform_wrapper table.gfield_list td.gfield_list_cell { + width: auto !important; +} +/* enhanced UI/select styles updated in v.1.9 -----------------------------------------------------------------*/ + + +.gform_wrapper select.chosen-select { + visibility: hidden; + height: 28px !important; + min-height: 28px !important; +} .gform_wrapper .chosen-container { - position: relative; - display: inline-block; - vertical-align: middle; - font-size: 13px; - zoom: 1; - *display: inline; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; + position: relative; + display: inline-block; + vertical-align: middle; + font-size: 13px; + zoom: 1; + *display: inline; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } .gform_wrapper .chosen-container .chosen-drop { - position: absolute; - top: 100%; - left: -9999px; - z-index: 1010; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - width: 100%; - border: 1px solid #aaa; - border-top: 0; - background: #fff; - box-shadow: 0 4px 5px rgba(0, 0, 0, .15); + position: absolute; + top: 100%; + left: -9999px; + z-index: 1010; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + width: 100%; + border: 1px solid #aaa; + border-top: 0; + background: #fff; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); } .gform_wrapper .chosen-container.chosen-with-drop .chosen-drop { - left: 0; + left: 0; } .gform_wrapper .chosen-container a { - cursor: pointer; + cursor: pointer; } + .gform_wrapper .chosen-container-single .chosen-single { - position: relative; - display: block; - overflow: hidden; - padding: 0 0 0 8px; - height: 23px; - border: 1px solid #aaa; - border-radius: 5px; - background-color: #fff; - background: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee), color-stop(100%, #f4f4f4)); - background: -webkit-linear-gradient(top, #fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%); - background: -moz-linear-gradient(top, #fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%); - background: -o-linear-gradient(top, #fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%); - background: linear-gradient(top, #fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%); - background-clip: padding-box; - box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, .1); - color: #444; - text-decoration: none; - white-space: nowrap; - line-height: 24px; + position: relative; + display: block; + overflow: hidden; + padding: 0 0 0 8px; + height: 23px; + border: 1px solid #aaa; + border-radius: 5px; + background-color: #fff; + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); + background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background-clip: padding-box; + box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1); + color: #444; + text-decoration: none; + white-space: nowrap; + line-height: 24px; } .gform_wrapper .chosen-container-single .chosen-default { - color: #999; + color: #999; } .gform_wrapper .chosen-container-single .chosen-single span { - display: block; - overflow: hidden; - margin-right: 26px; - text-overflow: ellipsis; - white-space: nowrap; + display: block; + overflow: hidden; + margin-right: 26px; + text-overflow: ellipsis; + white-space: nowrap; } .gform_wrapper .chosen-container-single .chosen-single-with-deselect span { - margin-right: 38px; + margin-right: 38px; } .gform_wrapper .chosen-container-single .chosen-single abbr { - position: absolute; - top: 6px; - right: 26px; - display: block; - width: 12px; - height: 12px; - background: url(../images/chosen-sprite.png) -42px 1px no-repeat; - font-size: 1px; + position: absolute; + top: 6px; + right: 26px; + display: block; + width: 12px; + height: 12px; + background: url('../images/chosen-sprite.png') -42px 1px no-repeat; + font-size: 1px; } .gform_wrapper .chosen-container-single .chosen-single abbr:hover { - background-position: -42px -10px; + background-position: -42px -10px; } .gform_wrapper .chosen-container-single.chosen-disabled .chosen-single abbr:hover { - background-position: -42px -10px; + background-position: -42px -10px; } .gform_wrapper .chosen-container-single .chosen-single div { - position: absolute; - top: 0; - right: 0; - display: block; - width: 18px; - height: 100%} + position: absolute; + top: 0; + right: 0; + display: block; + width: 18px; + height: 100%; +} .gform_wrapper .chosen-container-single .chosen-single div b { - display: block; - width: 100%; - height: 100%; - background: url(../images/chosen-sprite.png) no-repeat 0 2px; + display: block; + width: 100%; + height: 100%; + background: url('../images/chosen-sprite.png') no-repeat 0px 2px; } .gform_wrapper .chosen-container-single .chosen-search { - position: relative; - z-index: 1010; - margin: 0; - padding: 3px 4px; - white-space: nowrap; -} -.gform_wrapper .chosen-container-single .chosen-search input[type=text] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - margin: 1px 0; - padding: 4px 20px 4px 5px; - width: 100%; - height: auto; - outline: 0; - border: 1px solid #aaa; - background: #fff url(../images/chosen-sprite.png) no-repeat 100% -20px; - background: url(../images/chosen-sprite.png) no-repeat 100% -20px; - font-size: 1em; - font-family: sans-serif; - line-height: normal; - border-radius: 0; + position: relative; + z-index: 1010; + margin: 0; + padding: 3px 4px; + white-space: nowrap; +} +.gform_wrapper .chosen-container-single .chosen-search input[type="text"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 1px 0; + padding: 4px 20px 4px 5px; + width: 100%; + height: auto; + outline: 0; + border: 1px solid #aaa; + background: white url('../images/chosen-sprite.png') no-repeat 100% -20px; + background: url('../images/chosen-sprite.png') no-repeat 100% -20px; + font-size: 1em; + font-family: sans-serif; + line-height: normal; + border-radius: 0; } .gform_wrapper .chosen-container-single .chosen-drop { - margin-top: -1px; - border-radius: 0 0 4px 4px; - background-clip: padding-box; + margin-top: -1px; + border-radius: 0 0 4px 4px; + background-clip: padding-box; } .gform_wrapper .chosen-container-single.chosen-container-single-nosearch .chosen-search { - position: absolute; - left: -9999px; + position: absolute; + left: -9999px; } + .gform_wrapper .chosen-container .chosen-results { - position: relative; - overflow-x: hidden; - overflow-y: auto; - margin: 0 4px 4px 0; - padding: 0 0 0 4px; - max-height: 240px; - -webkit-overflow-scrolling: touch; + position: relative; + overflow-x: hidden; + overflow-y: auto; + margin: 0 4px 4px 0; + padding: 0 0 0 4px; + max-height: 240px; + -webkit-overflow-scrolling: touch; } .gform_wrapper .chosen-container .chosen-results li { - display: none; - margin: 0; - padding: 5px 6px; - list-style: none; - line-height: 15px; - -webkit-touch-callout: none; + display: none; + margin: 0; + padding: 5px 6px; + list-style: none; + line-height: 15px; + -webkit-touch-callout: none; } .gform_wrapper .chosen-container .chosen-results li.active-result { - display: list-item; - cursor: pointer; + display: list-item; + cursor: pointer; } .gform_wrapper .chosen-container .chosen-results li.disabled-result { - display: list-item; - color: #ccc; - cursor: default; + display: list-item; + color: #ccc; + cursor: default; } + .gform_wrapper .chosen-container .chosen-results li.highlighted { - background-color: #3875d7; - background-image: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); - background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%); - background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%); - background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%); - background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); - color: #fff; + background-color: #3875d7; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); + background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); + color: #fff; } + .gform_wrapper .chosen-container .chosen-results li.no-results { - display: list-item; - background: #f4f4f4; + display: list-item; + background: #f4f4f4; } + .gform_wrapper .chosen-container .chosen-results li.group-result { - display: list-item; - font-weight: 700; - cursor: default; + display: list-item; + font-weight: bold; + cursor: default; } + .gform_wrapper .chosen-container .chosen-results li.group-option { - padding-left: 15px; + padding-left: 15px; } .gform_wrapper .chosen-container .chosen-results li em { - font-style: normal; - text-decoration: underline; + font-style: normal; + text-decoration: underline; } .gform_wrapper .chosen-container-multi .chosen-choices { - position: relative; - overflow: hidden; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - margin: 0; - padding: 0; - width: 100%; - height: auto!important; - height: 1%; - border: 1px solid #aaa; - background-color: #fff; - background-image: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(1%, #eee), color-stop(15%, #fff)); - background-image: -webkit-linear-gradient(#eee 1%, #fff 15%); - background-image: -moz-linear-gradient(#eee 1%, #fff 15%); - background-image: -o-linear-gradient(#eee 1%, #fff 15%); - background-image: linear-gradient(#eee 1%, #fff 15%); - cursor: text; + position: relative; + overflow: hidden; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 0; + padding: 0; + width: 100%; + height: auto !important; + height: 1%; + border: 1px solid #aaa; + background-color: #fff; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: linear-gradient(#eeeeee 1%, #ffffff 15%); + cursor: text; } .gform_wrapper .chosen-container-multi .chosen-choices li { - float: left; - list-style: none; + float: left; + list-style: none; } .gform_wrapper .chosen-container-multi .chosen-choices li.search-field { - margin: 0; - padding: 0; - white-space: nowrap; -} -.gform_wrapper .chosen-container-multi .chosen-choices li.search-field input[type=text] { - margin: 1px 0; - padding: 5px; - height: 15px; - outline: 0; - border: 0!important; - background: transparent!important; - box-shadow: none; - color: #666; - font-size: 100%; - font-family: sans-serif; - line-height: normal; - border-radius: 0; + margin: 0; + padding: 0; + white-space: nowrap; +} +.gform_wrapper .chosen-container-multi .chosen-choices li.search-field input[type="text"] { + margin: 1px 0; + padding: 5px; + height: 15px; + outline: 0; + border: 0 !important; + background: transparent !important; + box-shadow: none; + color: #666; + font-size: 100%; + font-family: sans-serif; + line-height: normal; + border-radius: 0; } .gform_wrapper .chosen-container-multi .chosen-choices li.search-field .default { - color: #999; + color: #999; } .gform_wrapper .chosen-container-multi .chosen-choices li.search-choice { - position: relative; - margin: 3px 0 3px 5px !important; - padding: 3px 20px 3px 5px; - border: 1px solid #aaa; - border-radius: 3px; - background-color: #e4e4e4; - background-image: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); - background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-clip: padding-box; - box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, .05); - color: #333; - line-height: 13px; - cursor: default; + position: relative; + margin: 3px 0 3px 5px; + padding: 3px 20px 3px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background-color: #e4e4e4; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-clip: padding-box; + box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05); + color: #333; + line-height: 13px; + cursor: default; } .gform_wrapper .chosen-container-multi .chosen-choices li.search-choice .search-choice-close { - position: absolute; - top: 4px; - right: 3px; - display: block; - width: 12px; - height: 12px; - background: url(../images/chosen-sprite.png) -42px 1px no-repeat; - font-size: 1px; + position: absolute; + top: 4px; + right: 3px; + display: block; + width: 12px; + height: 12px; + background: url('../images/chosen-sprite.png') -42px 1px no-repeat; + font-size: 1px; } .gform_wrapper .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover { - background-position: -42px -10px; + background-position: -42px -10px; } .gform_wrapper .chosen-container-multi .chosen-choices li.search-choice-disabled { - padding-right: 5px; - border: 1px solid #ccc; - background-color: #e4e4e4; - background-image: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); - background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - color: #666; + padding-right: 5px; + border: 1px solid #ccc; + background-color: #e4e4e4; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + color: #666; } .gform_wrapper .chosen-container-multi .chosen-choices li.search-choice-focus { - background: #d4d4d4; + background: #d4d4d4; } .gform_wrapper .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close { - background-position: -42px -10px; + background-position: -42px -10px; } .gform_wrapper .chosen-container-multi .chosen-results { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } .gform_wrapper .chosen-container-multi .chosen-drop .result-selected { - display: list-item; - color: #ccc; - cursor: default; + display: list-item; + color: #ccc; + cursor: default; } + .gform_wrapper .chosen-container-active .chosen-single { - border: 1px solid #5897fb; - box-shadow: 0 0 5px rgba(0, 0, 0, .3); + border: 1px solid #5897fb; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); } .gform_wrapper .chosen-container-active.chosen-with-drop .chosen-single { - border: 1px solid #aaa; - -moz-border-radius-bottomright: 0; - border-bottom-right-radius: 0; - -moz-border-radius-bottomleft: 0; - border-bottom-left-radius: 0; - background-image: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(20%, #eee), color-stop(80%, #fff)); - background-image: -webkit-linear-gradient(#eee 20%, #fff 80%); - background-image: -moz-linear-gradient(#eee 20%, #fff 80%); - background-image: -o-linear-gradient(#eee 20%, #fff 80%); - background-image: linear-gradient(#eee 20%, #fff 80%); - box-shadow: 0 1px 0 #fff inset; + border: 1px solid #aaa; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); + background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: linear-gradient(#eeeeee 20%, #ffffff 80%); + box-shadow: 0 1px 0 #fff inset; } .gform_wrapper .chosen-container-active.chosen-with-drop .chosen-single div { - border-left: 0; - background: transparent; + border-left: none; + background: transparent; } .gform_wrapper .chosen-container-active.chosen-with-drop .chosen-single div b { - background-position: -18px 2px; + background-position: -18px 2px; } .gform_wrapper .chosen-container-active .chosen-choices { - border: 1px solid #5897fb; - box-shadow: 0 0 5px rgba(0, 0, 0, .3); + border: 1px solid #5897fb; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); } -.gform_wrapper .chosen-container-active .chosen-choices li.search-field input[type=text] { - color: #111!important; +.gform_wrapper .chosen-container-active .chosen-choices li.search-field input[type="text"] { + color: #111 !important; } + .gform_wrapper .chosen-disabled { - opacity: .5!important; - cursor: default; + opacity: 0.5 !important; + cursor: default; } .gform_wrapper .chosen-disabled .chosen-single { - cursor: default; + cursor: default; } .gform_wrapper .chosen-disabled .chosen-choices .search-choice .search-choice-close { - cursor: default; + cursor: default; } + .gform_wrapper .chosen-rtl { - text-align: right; + text-align: right; } .gform_wrapper .chosen-rtl .chosen-single { - overflow: visible; - padding: 0 8px 0 0; + overflow: visible; + padding: 0 8px 0 0; } .gform_wrapper .chosen-rtl .chosen-single span { - margin-right: 0; - margin-left: 26px; - direction: rtl; + margin-right: 0; + margin-left: 26px; + direction: rtl; } .gform_wrapper .chosen-rtl .chosen-single-with-deselect span { - margin-left: 38px; + margin-left: 38px; } .gform_wrapper .chosen-rtl .chosen-single div { - right: auto; - left: 3px; + right: auto; + left: 3px; } .gform_wrapper .chosen-rtl .chosen-single abbr { - right: auto; - left: 26px; + right: auto; + left: 26px; } .gform_wrapper .chosen-rtl .chosen-choices li { - float: right; + float: right; } -.gform_wrapper .chosen-rtl .chosen-choices li.search-field input[type=text] { - direction: rtl; +.gform_wrapper .chosen-rtl .chosen-choices li.search-field input[type="text"] { + direction: rtl; } .gform_wrapper .chosen-rtl .chosen-choices li.search-choice { - margin: 3px 5px 3px 0; - padding: 3px 5px 3px 19px; + margin: 3px 5px 3px 0; + padding: 3px 5px 3px 19px; } .gform_wrapper .chosen-rtl .chosen-choices li.search-choice .search-choice-close { - right: auto; - left: 4px; + right: auto; + left: 4px; } -.gform_wrapper .chosen-rtl.chosen-container-single-nosearch .chosen-search.gform_wrapper .chosen-rtl .chosen-drop { - left: 9999px; +.gform_wrapper .chosen-rtl.chosen-container-single-nosearch .chosen-search, +.gform_wrapper .chosen-rtl .chosen-drop { + left: 9999px; } .gform_wrapper .chosen-rtl.chosen-container-single .chosen-results { - margin: 0 0 4px 4px; - padding: 0 4px 0 0; + margin: 0 0 4px 4px; + padding: 0 4px 0 0; } .gform_wrapper .chosen-rtl .chosen-results li.group-option { - padding-right: 15px; - padding-left: 0; + padding-right: 15px; + padding-left: 0; } .gform_wrapper .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div { - border-right: 0; + border-right: none; } -.gform_wrapper .chosen-rtl .chosen-search input[type=text] { - padding: 4px 5px 4px 20px; - background: #fff url(../images/chosen-sprite.png) no-repeat -30px -20px; - background: url(../images/chosen-sprite.png) no-repeat -30px -20px; - direction: rtl; +.gform_wrapper .chosen-rtl .chosen-search input[type="text"] { + padding: 4px 5px 4px 20px; + background: white url('../images/chosen-sprite.png') no-repeat -30px -20px; + background: url('../images/chosen-sprite.png') no-repeat -30px -20px; + direction: rtl; } .gform_wrapper .chosen-rtl.chosen-container-single .chosen-single div b { - background-position: 6px 2px; + background-position: 6px 2px; } .gform_wrapper .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b { - background-position: -12px 2px; + background-position: -12px 2px; } -@media only screen and (-webkit-min-device-pixel-ratio:2), only screen and (min-resolution:144dpi) { - .gform_wrapper .chosen-rtl .chosen-search input[type=text].gform_wrapper .chosen-container-single .chosen-single abbr.gform_wrapper .chosen-container-single .chosen-single div b.gform_wrapper .chosen-container-single .chosen-search input[type=text].gform_wrapper .chosen-container-multi .chosen-choices .search-choice .search-choice-close.gform_wrapper .chosen-container .chosen-results-scroll-down span.gform_wrapper .chosen-container .chosen-results-scroll-up span { - background-image: url(../images/chosen-sprite@2x.png)!important; - background-size: 52px 37px!important; - background-repeat: no-repeat!important; - } + +@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) { + .gform_wrapper .chosen-rtl .chosen-search input[type="text"], + .gform_wrapper .chosen-container-single .chosen-single abbr, + .gform_wrapper .chosen-container-single .chosen-single div b, + .gform_wrapper .chosen-container-single .chosen-search input[type="text"], + .gform_wrapper .chosen-container-multi .chosen-choices .search-choice .search-choice-close, + .gform_wrapper .chosen-container .chosen-results-scroll-down span, + .gform_wrapper .chosen-container .chosen-results-scroll-up span { + background-image: url('../images/chosen-sprite@2x.png') !important; + background-size: 52px 37px !important; + background-repeat: no-repeat !important; + } } /* credit card icons ------------------------------------------------------*/ @@ -1889,7 +2057,7 @@ body .gform_wrapper div.gform_body ul.gform_fields li.gfield.gfield_html dl dd { .gform_wrapper .ginput_complex select.ginput_card_expiration.ginput_card_expiration_month, .gform_wrapper .ginput_complex select.ginput_card_expiration.ginput_card_expiration_year { - width: 48% !important; + width: 47% !important; display: -moz-inline-stack; display: inline-block; zoom: 1; @@ -1927,7 +2095,7 @@ body .gform_wrapper div.gform_body ul.gform_fields li.gfield.gfield_html dl dd { .right_label .gform_fileupload_multifile, .left_label .gform_fileupload_multifile{ - margin-left: 31%; + margin-left: 30.5%; } .gform_delete{ @@ -1935,9 +2103,362 @@ body .gform_wrapper div.gform_body ul.gform_fields li.gfield.gfield_html dl dd { cursor:pointer; } +.gform_wrapper .copy_values_option_container .copy_values_enabled{ + width:auto; +} + +.gform_wrapper li.field_sublabel_above .ginput_complex input[type=text] { + margin-bottom: 1px; +} + +/* simple confirmation message styling ------------------------------------------------------*/ + +.gform_confirmation_message { + margin: 1em 0 1em 0; + padding: 1em; + font-size: 1em; + border: 2px solid #CFE2C0; + background-color: #E9FFD9; + text-align: center; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} + +/* saved message confirmation ------------------------------------------------------*/ + +.form_saved_message { + fmargin: 1em 0 1em 0; + padding: 2.5em 1em 2.5em 1em; + font-size: 1em; + line-height: 1.8; + border: 2px solid #91AFC7; + background-color: #E3F3F3; + text-align: center; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} + +.form_saved_message a { + word-wrap: break-word; +} + +.form_saved_message br + br { + display: none; +} + +.form_saved_message .form_saved_message_emailform { + margin: 1em 0 0 0; +} + +div.form_saved_message div.form_saved_message_emailform form input[type=text] { + line-height: 2.25em; + height: 2.25em; + margin-bottom: 0.250em; +} + +div.form_saved_message div.form_saved_message_emailform form input[type=submit] { + line-height: 2.25em; + min-height: 2.25em; +} + +.form_saved_message .form_saved_message_emailform .validation_message { + color:red; +} + +.form_saved_message_sent { + margin: 1em 0 1em 0; + padding: 1em; + font-size: 1em; + border: 2px solid #CFE2C0; + background-color: #E9FFD9; + text-align: center; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} + /* fix recaptcha line height issue ------------------------------------------------------*/ body #content .entry-content .gform_wrapper form .gform_body .gform_fields .gfield .ginput_container #recaptcha_widget_div #recaptcha_area .recaptchatable tbody tr td .recaptcha_input_area, body .gform_wrapper form .gform_body .gform_fields .gfield .ginput_container #recaptcha_widget_div #recaptcha_area .recaptchatable tbody tr td .recaptcha_input_area { line-height: 1em !important; +} + +/* define datepicker image size to override generic theme image styles ------------------------------------------------------*/ + +body .gform_wrapper img.ui-datepicker-trigger { + width: 17px !important; + height: 16px !important; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; +} + +body .gform_wrapper img.add_list_item, +body .gform_wrapper img.delete_list_item { + display: -moz-inline-stack; display: inline-block; zoom: 1; +} + + +/* Responsive Layout Changes -------------------------------------------------------*/ + +@media screen and (max-width: 570px) and (min-width: 480px) { + + body .gform_wrapper .ginput_complex.ginput_container.has_first_name span, + body .gform_wrapper .ginput_complex.ginput_container.has_middle_name span, + body .gform_wrapper .ginput_complex.ginput_container.has_last_name span { + width: 95% + } + + body .gform_wrapper .ginput_complex.ginput_container.has_first_name.has_last_name span { + width: 46% + } + + body .gform_wrapper .ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span { + width: 30% + } + +} + +@media all and (max-width: 480px), all and (max-device-width: 480px) { + + body .gform_wrapper ul li.gfield, + body .gform_wrapper .ginput_container, + body .gform_wrapper div.ginput_complex, + body .gform_wrapper div.ginput_complex span, + body .gform_wrapper div.ginput_complex span.ginput_left, + body .gform_wrapper div.ginput_complex span.ginput_right, + body .gform_wrapper div.gfield_password_strength, + body .gform_wrapper div.gf_page_steps, + body .gform_wrapper div.gf_page_steps div { + display: block !important; + float: none !important; + clear: both !important; + margin-left: 0 !important; + margin-right: 0 !important; + } + + body .gform_wrapper .ginput_container, + body .gform_wrapper div.ginput_complex, + body .gform_wrapper div.gf_page_steps, + body .gform_wrapper div.gf_page_steps div { + width: 95% !important; + } + + body .gform_wrapper div.gfield_password_strength { + width: 90% !important; + } + + body .gform_wrapper ul li.gfield, + body .gform_wrapper div.ginput_complex span, + body .gform_wrapper div.ginput_complex span.ginput_left, + body .gform_wrapper div.ginput_complex span.ginput_right { + width: 100% !important; + } + + body .gform_wrapper .ginput_complex .ginput_right input[type=text], + body .gform_wrapper .ginput_complex .ginput_right input[type=url], + body .gform_wrapper .ginput_complex .ginput_right input[type=email], + body .gform_wrapper .ginput_complex .ginput_right input[type=tel], + body .gform_wrapper .ginput_complex .ginput_right input[type=number], + body .gform_wrapper .ginput_complex .ginput_right input[type=password], + body .gform_wrapper .ginput_complex .ginput_left input[type=text], + body .gform_wrapper .ginput_complex .ginput_left input[type=url], + body .gform_wrapper .ginput_complex .ginput_left input[type=email], + body .gform_wrapper .ginput_complex .ginput_left input[type=tel], + body .gform_wrapper .ginput_complex .ginput_left input[type=number], + body .gform_wrapper .ginput_complex .ginput_left input[type=password], + body .gform_wrapper .ginput_complex .ginput_full input[type=text], + body .gform_wrapper .ginput_complex .ginput_full input[type=url], + body .gform_wrapper .ginput_complex .ginput_full input[type=email], + body .gform_wrapper .ginput_complex .ginput_full input[type=tel], + body .gform_wrapper .ginput_complex .ginput_full input[type=number], + body .gform_wrapper .ginput_complex .ginput_full input[type=password], + body .gform_wrapper .ginput_complex .ginput_full select, + body .gform_wrapper input.gform_button.button, + body .gform_wrapper input[type=submit] { + width: 95% !important; + } + + body .gform_wrapper .ginput_container input.small, + body .gform_wrapper .ginput_container input.medium, + body .gform_wrapper .ginput_container input.large, + body .gform_wrapper .ginput_container select.small, + body .gform_wrapper .ginput_container select.medium, + body .gform_wrapper .ginput_container select.large, + body .gform_wrapper .ginput_container textarea.small, + body .gform_wrapper .ginput_container textarea.medium, + body .gform_wrapper .ginput_container textarea.large { + width: 95% !important; + } + + body .gform_wrapper div.chosen-container.chosen-container-single[style] { + width: 95% !important; + } + + body .gform_wrapper img.ui-datepicker-trigger { + display: none !important; + } + + body .gform_wrapper .gfield_time_hour input, + body .gform_wrapper .gfield_time_minute input, + body .gform_wrapper .gfield_date_month input, + body .gform_wrapper .gfield_date_day input, + body .gform_wrapper .gfield_date_year input { + width: 95% !important; + } + + body .gform_wrapper .gfield_time_hour i { + display: none !important; + } + + body .gform_wrapper .ginput_complex input[type=text], + body .gform_wrapper .ginput_complex input[type=url], + body .gform_wrapper .ginput_complex input[type=email], + body .gform_wrapper .ginput_complex input[type=tel], + body .gform_wrapper .ginput_complex input[type=number], + body .gform_wrapper .ginput_complex input[type=password] { + width: 95% !important; + } + + body .gform_wrapper .ginput_complex .ginput_right input[type=text], + body .gform_wrapper .ginput_complex .ginput_right input[type=url], + body .gform_wrapper .ginput_complex .ginput_right input[type=email], + body .gform_wrapper .ginput_complex .ginput_right input[type=tel], + body .gform_wrapper .ginput_complex .ginput_right input[type=number], + body .gform_wrapper .ginput_complex .ginput_right input[type=password] { + width: 95% !important; + } + + body .gform_wrapper .gfield_error .ginput_complex .ginput_left input[type=text], + body .gform_wrapper .gfield_error .ginput_complex .ginput_left input[type=url], + body .gform_wrapper .gfield_error .ginput_complex .ginput_left input[type=email], + body .gform_wrapper .gfield_error .ginput_complex .ginput_left input[type=tel], + body .gform_wrapper .gfield_error .ginput_complex .ginput_left input[type=number], + body .gform_wrapper .gfield_error .ginput_complex .ginput_left input[type=password], + body .gform_wrapper .gfield_error .ginput_complex .ginput_right input[type=text], + body .gform_wrapper .gfield_error .ginput_complex .ginput_right input[type=url], + body .gform_wrapper .gfield_error .ginput_complex .ginput_right input[type=email], + body .gform_wrapper .gfield_error .ginput_complex .ginput_right input[type=tel], + body .gform_wrapper .gfield_error .ginput_complex .ginput_right input[type=number], + body .gform_wrapper .gfield_error .ginput_complex .ginput_right input[type=password], + body .gform_wrapper .gfield_error .ginput_complex .ginput_full input[type=text], + body .gform_wrapper .gfield_error .ginput_complex .ginput_full input[type=url], + body .gform_wrapper .gfield_error .ginput_complex .ginput_full input[type=email], + body .gform_wrapper .gfield_error .ginput_complex .ginput_full input[type=tel], + body .gform_wrapper .gfield_error .ginput_complex .ginput_full input[type=number], + body .gform_wrapper .gfield_error .ginput_complex .ginput_full input[type=password] { + width: 95% !important; + } + + body .gform_wrapper .ginput_complex span.name_suffix input[type=text] { + width: 97.5% !important; + } + + body .gform_wrapper .ginput_complex .ginput_right select, + body .gform_wrapper .ginput_complex .ginput_left select, + body .gform_wrapper .ginput_complex span.name_prefix.name_prefix_select select, + body .gform_wrapper .gfield_time_ampm select, + body .gform_wrapper .ginput_complex select, + body .gform_wrapper .ginput_complex .ginput_right select { + width: 97% !important; + } + + body .gform_wrapper .right_label .gfield_description, + body .gform_wrapper .left_label .gfield_description, + body .gform_wrapper .left_label .instruction, + body .gform_wrapper .right_label .instruction { + margin-left: 0 !important; + } + + body .gform_wrapper .gform_footer.right_label, + body .gform_wrapper .gform_footer.left_label { + padding-left: 0 !important; + padding-right: 0 !important; + } + + body .gform_wrapper .gfield_description, + body .gform_wrapper .gsection_description, + body .gform_wrapper .gfield_description p, + body .gform_wrapper .gsection_description p { + width: 95% !important; + text-align: justify; + } + + body .gform_wrapper label.gfield_label + div.ginput_container { + margin-top: 0; + } + + body .gform_wrapper .gfield .ginput_complex.has_suffix span.name_suffix { + width: 98% !important; + } + + body .gform_wrapper .gfield .ginput_complex.has_suffix span.name_suffix input { + width: 97.5%; + } + + body .gform_wrapper ul.gform_fields.left_label li.gfield label.gfield_label, + body .gform_wrapper ul.gform_fields.right_label li.gfield label.gfield_label { + margin-left: 0 !important; + float: none !important; + } + + body .gform_wrapper ul li.gfield.gfield_html img { + max-width: 95% !important; + } + + body .gform_wrapper .gform_footer a.gform_save_link { + display: block; + margin: 1em 0 1em 0; + text-align: center; + } + + body .gform_wrapper ul li.gfield.gfield_html h1, + body .gform_wrapper ul li.gfield.gfield_html h2, + body .gform_wrapper ul li.gfield.gfield_html h3, + body .gform_wrapper ul li.gfield.gfield_html h4, + body .gform_wrapper ul li.gfield.gfield_html h5, + body .gform_wrapper ul li.gfield.gfield_html h6 { + white-space: normal !important + } + + body .gform_wrapper .top_label .gfield_error { + width: 90% !important; + } + + body .form_saved_message { + font-size: 0.813em; + } + + body .form_saved_message_sent { + font-size: 0.813em; + } + + body .gform_wrapper div.validation_error { + font-size: 1em; + } + + body .form_saved_message .form_saved_message_emailform input, + body .form_saved_message .form_saved_message_emailform input[type=submit] { + width: 95% !important; + } + +} + +@media all and (max-device-width: 480px) { + + body .gform_wrapper { + font-size: 2.60em; + } + + body .gform_wrapper .gfield_checkbox li input[type=checkbox], + body .gform_wrapper .gfield_radio li input[type=radio], + body .gform_wrapper .gfield_checkbox li input { + margin-top: 2.50em !important; + width: auto !important; + height: auto !important; + } + } \ No newline at end of file diff --git a/css/gravityfont.css b/css/gravityfont.css new file mode 100644 index 0000000..b44fddb --- /dev/null +++ b/css/gravityfont.css @@ -0,0 +1,340 @@ +@font-face { + font-family: 'gravityfont'; + src: url('fonts/gravityfont.eot'); +} +@font-face { + font-family: 'gravityfont'; + src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMghi/PMAAAC8AAAAYGNtYXDmeObuAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZkL6K2kAAAF4AAA0HGhlYWQC4c4EAAA1lAAAADZoaGVhA+ECHwAANcwAAAAkaG10eHF7AO0AADXwAAABAGxvY2Gn7Zs2AAA28AAAAIJtYXhwAE8A1AAAN3QAAAAgbmFtZf6nqNIAADeUAAACZ3Bvc3QAAwAAAAA5/AAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmPQHg/+AAIAHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEAEAAAAAMAAgAAgAEAAEAIOY25j3//f//AAAAAAAg5gDmOf/9//8AAf/jGgQaAgADAAEAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACAAD/6QHRAdcAGAA/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AAAAAAAAAAAAAAAAAAAA=) format('truetype'), + url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAADpoAAsAAAAAOhwAAQACAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgCGL882NtYXAAAAFoAAAAVAAAAFTmeObuZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAANBwAADQcQvoraWhlYWQAADXgAAAANgAAADYC4c4EaGhlYQAANhgAAAAkAAAAJAPhAh9obXR4AAA2PAAAAQAAAAEAcXsA7WxvY2EAADc8AAAAggAAAIKn7Zs2bWF4cAAAN8AAAAAgAAAAIABPANRuYW1lAAA34AAAAmcAAAJn/qeo0nBvc3QAADpIAAAAIAAAACAAAwAAAAMCAAGQAAUAAAFMAWYAAABHAUwBZgAAAPUAGQCEAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA5j0B4P/gACAB4AAgAAAAAQAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABABAAAAADAAIAAIABAABACDmNuY9//3//wAAAAAAIOYA5jn//f//AAH/4xoEGgIAAwABAAAAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAgAA/+kB0QHXABgAPwAAATQmLwEmIg8BDgEdARQWHwEWMj8BPgE9AQ8BDgErASImNTQ2NTc+ATsBMhYPAQ4BKwEiBg8BBhQVFBY7ATIWBwHRFg+fDysPnw8WFg+fDysPnw8WZgQBBgbbFxkBDAQeH9sGBQEEAQYGzQoLAgkBCQjNBgUBATwRJglbCQlbCSYRuBEmCVsJCVsJJhG4mhUGBhcVAwYETBseBgYVBgYKCjwBAwEHCAYGAAMAAP/pAdEB1wAWAC8ARgAAATwBNTQmKwEiBg8BHAEVFBY7ATI2PwE3NCYvASYiDwEOAR0BFBYfARYyPwE+AT0BByMiJjU0Nj8BPg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wD4AAEAAAAAAAoANAE9AAEAAAAAAAsANgCWAAEAAAAAAAwANgBgAAMAAQQJAAAASgAWAAMAAQQJAAEAFgAAAAMAAQQJAAIADgEZAAMAAQQJAAMAFgDiAAMAAQQJAAQAFgEnAAMAAQQJAAUAFgDMAAMAAQQJAAYAFgEDAAMAAQQJAAoANAE9AAMAAQQJAAsANgCWAAMAAQQJAAwANgBgAGcAcgBhAHYAaQB0AHkAZgBvAG4AdABDAG8AcAB5AHIAaQBnAGgAdAAgADIAMAAxADQALQAyADAAMQA1ACAAUgBvAGMAawBlAHQAZwBlAG4AaQB1AHMAIABJAG4AYwAuAGgAdAB0AHAAOgAvAC8AdwB3AHcALgByAG8AYwBrAGUAdABnAGUAbgBpAHUAcwAuAGMAbwBtAGgAdAB0AHAAOgAvAC8AdwB3AHcALgBnAHIAYQB2AGkAdAB5AGYAbwByAG0AcwAuAGMAbwBtAFYAZQByAHMAaQBvAG4AIAAxAC4AMgBnAHIAYQB2AGkAdAB5AGYAbwBuAHRncmF2aXR5Zm9udABnAHIAYQB2AGkAdAB5AGYAbwBuAHQAUgBlAGcAdQBsAGEAcgBnAHIAYQB2AGkAdAB5AGYAbwBuAHQARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('woff'); + font-weight: normal; + font-style: normal; +} + +[class^="gficon-"], [class*=" gficon-"] { + font-family: 'gravityfont'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.gficon-gravityforms-locked-icon:before { + content: "\e627"; +} + +.gficon-gravityforms-logo-icon:before { + content: "\e60c"; +} + +.gficon-gravitycharge-logo-icon:before { + content: "\e600"; +} + +.gficon-gravityforms-rocket-icon:before { + content: "\e614"; +} + +.gficon-gravityforms-form-icon:before { + content: "\e60b"; +} + +.gficon-gravityforms-css-alt-con:before { + content: "\e60e"; +} + +.gficon-gravityforms-markup-icon:before { + content: "\e60d"; +} + +.gficon-gravityforms-key-icon:before { + content: "\e610"; +} + +.gficon-gravityforms-upload-icon:before { + content: "\e612"; +} + +.gficon-gravityforms-download-icon:before { + content: "\e611"; +} + +.gficon-gravityforms-filter-icon:before { + content: "\e61d"; +} + +.gficon-gravityforms-settings-icon:before { + content: "\e615"; +} + +.gficon-gravityforms-eye-icon:before { + content: "\e61c"; +} + +.gficon-gravityforms-star-icon:before { + content: "\e61e"; +} + +.gficon-gravityforms-cross-icon:before { + content: "\e61f"; +} + +.gficon-gravityforms-tick-icon:before { + content: "\e620"; +} + +.gficon-gravityforms-credit-icon:before { + content: "\e621"; +} + +.gficon-gravityforms-file-icon:before { + content: "\e622"; +} + +.gficon-gravityforms-search-icon:before { + content: "\e623"; +} + +.gficon-gravityforms-bullet-icon:before { + content: "\e624"; +} + +.gficon-gravityforms-bug-icon:before { + content: "\e619"; +} + +.gficon-gravityforms-docs-icon:before { + content: "\e61a"; +} + +.gficon-gravityforms-vcard-icon:before { + content: "\e61b"; +} + +.gficon-gravityforms-info-icon:before { + content: "\e616"; +} + +.gficon-gravityforms-favorite-icon:before { + content: "\e617"; +} + +.gficon-gravityforms-chat-icon:before { + content: "\e618"; +} + +.gficon-gravityforms-zero-icon:before { + content: "\e601"; +} + +.gficon-gravityforms-nine-icon:before { + content: "\e602"; +} + +.gficon-gravityforms-eight-icon:before { + content: "\e603"; +} + +.gficon-gravityforms-seven-icon:before { + content: "\e604"; +} + +.gficon-gravityforms-six-icon:before { + content: "\e605"; +} + +.gficon-gravityforms-five-icon:before { + content: "\e606"; +} + +.gficon-gravityforms-four-icon:before { + content: "\e607"; +} + +.gficon-gravityforms-three-con:before { + content: "\e608"; +} + +.gficon-gravityforms-two-icon:before { + content: "\e609"; +} + +.gficon-gravityforms-one-icon:before { + content: "\e60a"; +} + +.gficon-gravityforms-css-icon:before { + content: "\e60f"; +} + +.gficon-gravityforms-dollar-icon:before { + content: "\e613"; +} + +.gficon-gravityforms-slideoff-icon:before { + content: "\e625"; +} + +.gficon-gravityforms-slideon-icon:before { + content: "\e626"; +} + +.gficon-settings-cog:before { + content: "\e634"; +} + +.gficon-gravityforms-spinner-icon:before { + content: "\e628"; +} + +.gficon-tick:before { + content: "\e629"; +} + +.gficon-cross:before { + content: "\e62a"; +} + +.gficon-search:before { + content: "\e62b"; +} + +.gficon-pencil:before { + content: "\e62c"; +} + +.gficon-exclamation:before { + content: "\e635"; +} + +.gficon-forbid:before { + content: "\e636"; +} + +.gficon-star:before { + content: "\e639"; +} + +.gficon-star-hollow:before { + content: "\e63a"; +} + +.gficon-trash:before { + content: "\e62d"; +} + +.gficon-arrow-up:before { + content: "\e62e"; +} + +.gficon-arrow-down:before { + content: "\e62f"; +} + +.gficon-arrow-left:before { + content: "\e630"; +} + +.gficon-arrow-right:before { + content: "\e631"; +} + +.gficon-add:before { + content: "\e632"; +} + +.gficon-subtract:before { + content: "\e633"; +} + +.gficon-close:before { + content: "\e63b"; +} + +.gficon-support:before { + content: "\e63c"; +} + +.gficon-send:before { + content: "\e63d"; +} + +/* star on */ +.gficon-star1:before { + content: "\e639"; + color: #FF9800; + font-size: 1.2em; + margin-top: 0.188em; +} + +/* star off */ +.gficon-star0:before { + content: "\e63a"; + color: #CCC; + font-size: 1.2em; + margin-top: 0.188em; +} + +/* credit card warning */ +.gfield_creditcard_warning_message .gficon-forbid { + color: #9C0F17 !important; + margin-right: 1em; +} + +/* increase sizes */ +.gficon-2x { + font-size: 2em; +} + +.gficon-3x { + font-size: 3em; +} + +/* animations */ + +@keyframes rotation { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + + @-webkit-keyframes rotation { + 0% { + -webkit-transform: rotate(0); + } + 100% { + -webkit-transform: rotate(360deg); + } + } + + @-moz-keyframes rotation { + 0% { + -moz-transform: rotate(0); + } + 100% { + -moz-transform: rotate(360deg); + } + } + +.gficon-spin { + display: inline-block; + animation: rotation 2s linear infinite; + -webkit-animation: rotation 2s linear infinite; + -moz-animation: rotation 2s linear infinite; + text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.2); + margin-left: 2px; + +} + +.gficon-gravityforms-spinner-icon.gficon-spin { + color: #D54E21; + font-size: 1.50em; +} \ No newline at end of file diff --git a/css/index.php b/css/index.php new file mode 100644 index 0000000..12c197f --- /dev/null +++ b/css/index.php @@ -0,0 +1,2 @@ + div { + margin-bottom: 10px; } +.gf-edit-shortcode-form .field-block label { + display: block; + margin-bottom: 5px; } +.gf-edit-shortcode-form .field-inline { + padding-top: 10px; } +.gf-edit-shortcode-form .field-inline label { + display: inline-block; } + + +.gf-edit-shortcode-form-standard-attrs div{ + display: inline; + margin-right:15px; +} +#gf-edit-shortcode-form-advanced-attrs div{ + margin-bottom:5px; +} + +#gf-edit-shortcode-form-advanced-attrs{ + margin-left:15px; +} + +#TB_ajaxContent { + height:92%!important; +} diff --git a/css/tooltip.css b/css/tooltip.css index ffc1dea..fd6bb87 100644 --- a/css/tooltip.css +++ b/css/tooltip.css @@ -43,7 +43,7 @@ a.tooltip_bottomleft:hover { .ui-tooltip { padding: 18px; position: absolute; - z-index: 9999; + z-index: 9999999; max-width: 300px;color: #000; text-shadow: 1px 1px 1px #fff; font-size: 1.0em; diff --git a/currency.php b/currency.php index 93da3f9..e8b7eb8 100644 --- a/currency.php +++ b/currency.php @@ -1,130 +1,142 @@ currency = $currency; - else - $this->currency = self::get_currency($currency); - } - - public function to_number($text){ - $text = strval($text); - - if(is_numeric($text)) - return floatval($text); - - //Making sure symbol is in unicode format (i.e. ᅜ) - $text = preg_replace("/&.*?;/", "", $text); - - //Removing symbol from text - $text = str_replace($this->currency["symbol_right"], "", $text); - $text = str_replace($this->currency["symbol_left"], "", $text); - - - //Removing all non-numeric characters - $array = str_split($text); - $is_negative = false; - $clean_number = ""; - foreach($array as $char){ - - if (($char >= '0' && $char <= '9') || $char == $this->currency["decimal_separator"]) - $clean_number .= $char; - else if($char == '-') - $is_negative = true; - } - - $decimal_separator = $this->currency && $this->currency["decimal_separator"] ? $this->currency["decimal_separator"] : "."; - - //Removing thousand separators but keeping decimal point - $array = str_split($clean_number); - $float_number = ""; - for($i=0, $count = sizeof($array); $i<$count; $i++) - { - $char = $array[$i]; - - if ($char >= '0' && $char <= '9') - $float_number .= $char; - else if($char == $decimal_separator) - $float_number .= "."; - } - - if($is_negative) - $float_number = "-" . $float_number; - - return is_numeric($float_number) ? floatval($float_number) : false; - } - - public function to_money($number, $do_encode=false){ - - if(!is_numeric($number)) - $number = $this->to_number($number); - - if($number === false) - return ""; - - $negative = ""; - if(strpos(strval($number), "-") !== false){ - $negative = "-"; - $number = floatval(substr($number,1)); - } - - $money = number_format($number, $this->currency["decimals"], $this->currency["decimal_separator"], $this->currency["thousand_separator"]); - $symbol_left = !empty($this->currency["symbol_left"]) ? $this->currency["symbol_left"] . $this->currency["symbol_padding"] : ""; - $symbol_right = !empty($this->currency["symbol_right"]) ? $this->currency["symbol_padding"] . $this->currency["symbol_right"] : ""; - - if($do_encode){ - $symbol_left = html_entity_decode($symbol_left); - $symbol_right = html_entity_decode($symbol_right); - } - - return $negative . $symbol_left . $money . $symbol_right; - } - - public static function get_currency($code){ - $currencies = self::get_currencies(); - return $currencies[$code]; - } - - public static function get_currencies(){ - $currencies = array( - "AUD" => array("name" => __("Australian Dollar", "gravityforms"), "symbol_left" => '$', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "BRL" => array("name" => __("Brazilian Real", "gravityforms"), "symbol_left" => 'R$', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => '.', "decimal_separator" => ',', "decimals" => 2), - "CAD" => array("name" => __("Canadian Dollar", "gravityforms"), "symbol_left" => '$', "symbol_right" => "CAD", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "CZK" => array("name" => __("Czech Koruna", "gravityforms"), "symbol_left" => '', "symbol_right" => "Kč", "symbol_padding" => " ", "thousand_separator" => ' ', "decimal_separator" => ',', "decimals" => 2), - "DKK" => array("name" => __("Danish Krone", "gravityforms"), "symbol_left" => '', "symbol_right" => "kr.", "symbol_padding" => " ", "thousand_separator" => '.', "decimal_separator" => ',', "decimals" => 2), - "EUR" => array("name" => __("Euro", "gravityforms"), "symbol_left" => '', "symbol_right" => "€", "symbol_padding" => " ", "thousand_separator" => '.', "decimal_separator" => ',', "decimals" => 2), - "HKD" => array("name" => __("Hong Kong Dollar", "gravityforms"), "symbol_left" => 'HK$', "symbol_right" => "", "symbol_padding" => "", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "HUF" => array("name" => __("Hungarian Forint", "gravityforms"), "symbol_left" => '', "symbol_right" => "Ft", "symbol_padding" => " ", "thousand_separator" => '.', "decimal_separator" => ',', "decimals" => 2), - "ILS" => array("name" => __("Israeli New Sheqel", "gravityforms"), "symbol_left" => '₪', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "JPY" => array("name" => __("Japanese Yen", "gravityforms"), "symbol_left" => '¥', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '', "decimals" => 0), - "MYR" => array("name" => __("Malaysian Ringgit", "gravityforms"), "symbol_left" => 'RM', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "MXN" => array("name" => __("Mexican Peso", "gravityforms"), "symbol_left" => '$', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "NOK" => array("name" => __("Norwegian Krone", "gravityforms"), "symbol_left" => 'Kr', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => '.', "decimal_separator" => ',', "decimals" => 2), - "NZD" => array("name" => __("New Zealand Dollar", "gravityforms"), "symbol_left" => '$', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "PHP" => array("name" => __("Philippine Peso", "gravityforms"), "symbol_left" => 'Php', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "PLN" => array("name" => __("Polish Zloty", "gravityforms"), "symbol_left" => 'zł', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => '.', "decimal_separator" => ',', "decimals" => 2), - "GBP" => array("name" => __("Pound Sterling", "gravityforms"), "symbol_left" => '£', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "SGD" => array("name" => __("Singapore Dollar", "gravityforms"), "symbol_left" => '$', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "ZAR" => array("name" => __("South African Rand", "gravityforms"), "symbol_left" => 'R', "symbol_right" => "", "symbol_padding" => "", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "SEK" => array("name" => __("Swedish Krona", "gravityforms"), "symbol_left" => '', "symbol_right" => "Kr", "symbol_padding" => " ", "thousand_separator" => ' ', "decimal_separator" => ',', "decimals" => 2), - "CHF" => array("name" => __("Swiss Franc", "gravityforms"), "symbol_left" => 'Fr.', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => "'", "decimal_separator" => '.', "decimals" => 2), - "TWD" => array("name" => __("Taiwan New Dollar", "gravityforms"), "symbol_left" => '$', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "THB" => array("name" => __("Thai Baht", "gravityforms"), "symbol_left" => '฿', "symbol_right" => "", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2), - "USD" => array("name" => __("U.S. Dollar", "gravityforms"), "symbol_left" => '$', "symbol_right" => "", "symbol_padding" => "", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 2) - - ); - - return apply_filters("gform_currencies", $currencies); - } -} +if ( ! class_exists( 'RGCurrency' ) ) { + + class RGCurrency { + private $currency; + + public function __construct( $currency ) { + if ( is_array( $currency ) ) { + $this->currency = $currency; + } else { + $this->currency = self::get_currency( $currency ); + } + } + + public function to_number( $text ) { + $text = strval( $text ); + + if ( is_numeric( $text ) ) { + return floatval( $text ); + } + + //Making sure symbol is in unicode format (i.e. ᅜ) + $text = preg_replace( '/&.*?;/', '', $text ); + + //Removing symbol from text + $text = str_replace( $this->currency['symbol_right'], '', $text ); + $text = str_replace( $this->currency['symbol_left'], '', $text ); + + + //Removing all non-numeric characters + $array = str_split( $text ); + $is_negative = false; + $clean_number = ''; + foreach ( $array as $char ) { + + if ( ( $char >= '0' && $char <= '9' ) || $char == $this->currency['decimal_separator'] ) { + $clean_number .= $char; + } else if ( $char == '-' ) { + $is_negative = true; + } + } + + $decimal_separator = $this->currency && $this->currency['decimal_separator'] ? $this->currency['decimal_separator'] : '.'; + + //Removing thousand separators but keeping decimal point + $array = str_split( $clean_number ); + $float_number = ''; + for ( $i = 0, $count = sizeof( $array ); $i < $count; $i ++ ) { + $char = $array[ $i ]; + + if ( $char >= '0' && $char <= '9' ) { + $float_number .= $char; + } else if ( $char == $decimal_separator ) { + $float_number .= '.'; + } + } + + if ( $is_negative ) { + $float_number = '-' . $float_number; + } + + return is_numeric( $float_number ) ? floatval( $float_number ) : false; + } + + public function to_money( $number, $do_encode = false ) { + + if ( ! is_numeric( $number ) ) { + $number = $this->to_number( $number ); + } + + if ( $number === false ) { + return ''; + } + + $negative = ''; + if ( strpos( strval( $number ), '-' ) !== false ) { + $negative = '-'; + $number = floatval( substr( $number, 1 ) ); + } + + $money = number_format( $number, $this->currency['decimals'], $this->currency['decimal_separator'], $this->currency['thousand_separator'] ); + + if ( $money == '0.00' ){ + $negative = ''; + } + + $symbol_left = ! empty( $this->currency['symbol_left'] ) ? $this->currency['symbol_left'] . $this->currency['symbol_padding'] : ''; + $symbol_right = ! empty( $this->currency['symbol_right'] ) ? $this->currency['symbol_padding'] . $this->currency['symbol_right'] : ''; + + if ( $do_encode ) { + $symbol_left = html_entity_decode( $symbol_left ); + $symbol_right = html_entity_decode( $symbol_right ); + } + + return $negative . $symbol_left . $money . $symbol_right; + } + + public static function get_currency( $code ) { + $currencies = self::get_currencies(); + + return $currencies[ $code ]; + } + + public static function get_currencies() { + $currencies = array( + 'AUD' => array( 'name' => __( 'Australian Dollar', 'gravityforms' ), 'symbol_left' => '$', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'BRL' => array( 'name' => __( 'Brazilian Real', 'gravityforms' ), 'symbol_left' => 'R$', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => '.', 'decimal_separator' => ',', 'decimals' => 2 ), + 'CAD' => array( 'name' => __( 'Canadian Dollar', 'gravityforms' ), 'symbol_left' => '$', 'symbol_right' => 'CAD', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'CZK' => array( 'name' => __( 'Czech Koruna', 'gravityforms' ), 'symbol_left' => '', 'symbol_right' => 'Kč', 'symbol_padding' => ' ', 'thousand_separator' => ' ', 'decimal_separator' => ',', 'decimals' => 2 ), + 'DKK' => array( 'name' => __( 'Danish Krone', 'gravityforms' ), 'symbol_left' => '', 'symbol_right' => 'kr.', 'symbol_padding' => ' ', 'thousand_separator' => '.', 'decimal_separator' => ',', 'decimals' => 2 ), + 'EUR' => array( 'name' => __( 'Euro', 'gravityforms' ), 'symbol_left' => '', 'symbol_right' => '€', 'symbol_padding' => ' ', 'thousand_separator' => '.', 'decimal_separator' => ',', 'decimals' => 2 ), + 'HKD' => array( 'name' => __( 'Hong Kong Dollar', 'gravityforms' ), 'symbol_left' => 'HK$', 'symbol_right' => '', 'symbol_padding' => '', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'HUF' => array( 'name' => __( 'Hungarian Forint', 'gravityforms' ), 'symbol_left' => '', 'symbol_right' => 'Ft', 'symbol_padding' => ' ', 'thousand_separator' => '.', 'decimal_separator' => ',', 'decimals' => 2 ), + 'ILS' => array( 'name' => __( 'Israeli New Sheqel', 'gravityforms' ), 'symbol_left' => '₪', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'JPY' => array( 'name' => __( 'Japanese Yen', 'gravityforms' ), 'symbol_left' => '¥', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '', 'decimals' => 0 ), + 'MYR' => array( 'name' => __( 'Malaysian Ringgit', 'gravityforms' ), 'symbol_left' => 'RM', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'MXN' => array( 'name' => __( 'Mexican Peso', 'gravityforms' ), 'symbol_left' => '$', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'NOK' => array( 'name' => __( 'Norwegian Krone', 'gravityforms' ), 'symbol_left' => 'Kr', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => '.', 'decimal_separator' => ',', 'decimals' => 2 ), + 'NZD' => array( 'name' => __( 'New Zealand Dollar', 'gravityforms' ), 'symbol_left' => '$', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'PHP' => array( 'name' => __( 'Philippine Peso', 'gravityforms' ), 'symbol_left' => 'Php', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'PLN' => array( 'name' => __( 'Polish Zloty', 'gravityforms' ), 'symbol_left' => 'zł', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => '.', 'decimal_separator' => ',', 'decimals' => 2 ), + 'GBP' => array( 'name' => __( 'Pound Sterling', 'gravityforms' ), 'symbol_left' => '£', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'RUB' => array( 'name' => __( 'Russian Ruble', 'gravityforms' ), 'symbol_left' => '', 'symbol_right' => 'pyб', 'symbol_padding' => ' ', 'thousand_separator' => ' ', 'decimal_separator' => '.', 'decimals' => 2 ), + 'SGD' => array( 'name' => __( 'Singapore Dollar', 'gravityforms' ), 'symbol_left' => '$', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'ZAR' => array( 'name' => __( 'South African Rand', 'gravityforms' ), 'symbol_left' => 'R', 'symbol_right' => '', 'symbol_padding' => '', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'SEK' => array( 'name' => __( 'Swedish Krona', 'gravityforms' ), 'symbol_left' => '', 'symbol_right' => 'Kr', 'symbol_padding' => ' ', 'thousand_separator' => ' ', 'decimal_separator' => ',', 'decimals' => 2 ), + 'CHF' => array( 'name' => __( 'Swiss Franc', 'gravityforms' ), 'symbol_left' => 'Fr.', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => "'", 'decimal_separator' => '.', 'decimals' => 2 ), + 'TWD' => array( 'name' => __( 'Taiwan New Dollar', 'gravityforms' ), 'symbol_left' => '$', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'THB' => array( 'name' => __( 'Thai Baht', 'gravityforms' ), 'symbol_left' => '฿', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ), + 'USD' => array( 'name' => __( 'U.S. Dollar', 'gravityforms' ), 'symbol_left' => '$', 'symbol_right' => '', 'symbol_padding' => '', 'thousand_separator' => ',', 'decimal_separator' => '.', 'decimals' => 2 ) + ); + + return apply_filters( 'gform_currencies', $currencies ); + } + } } diff --git a/entry_detail.php b/entry_detail.php index 130c514..07d28f9 100644 --- a/entry_detail.php +++ b/entry_detail.php @@ -1,1024 +1,1069 @@ - "is_starred", "value" => (bool) $star); - if(!is_null($read)) - $search_criteria["field_filters"][] = array("key" => "is_read", "value" => (bool) $read); - - $search_field_id = rgget("field_id"); - - if(isset($_GET["field_id"]) && $_GET["field_id"] !== ''){ - $key = $search_field_id; - $val = rgget("s"); - $strpos_row_key = strpos($search_field_id, "|"); - if ($strpos_row_key !== false) { //multi-row likert - $key_array = explode("|", $search_field_id); - $key = $key_array[0]; - $val = $key_array[1] . ":" . $val; - } - $type = rgget("type"); - if(empty($type)){ - $type = rgget("field_id") == "0" ? "global" : "field"; - } - - $search_criteria["field_filters"][] = array( - "key" => $key, - "type" => $type, - "operator" => rgempty("operator", $_GET) ? "is" : rgget("operator"), - "value" => $val - ); - } - - $paging = array('offset' => $position, 'page_size' => 1); - - if(!empty($sort_field)) - $sorting = array('key' => $_GET["sort"], 'direction' => $sort_direction, 'is_numeric' => $is_numeric); - else - $sorting = array(); - $total_count = 0; - $leads = GFAPI::get_entries($form['id'], $search_criteria, $sorting, $paging, $total_count); - - $prev_pos = !rgblank($position) && $position > 0 ? $position - 1 : false; - $next_pos = !rgblank($position) && $position < $total_count - 1 ? $position + 1 : false; - - // unread filter requires special handling for pagination since entries are filter out of the query as they are read - if($filter == 'unread') { - $next_pos = $position; - - if($next_pos + 1 == $total_count) - $next_pos = false; - - } - - if(!$lead_id){ - $lead = !empty($leads) ? $leads[0] : false; - } else { - $lead = GFAPI::get_entry($lead_id); - } - - - if(!$lead) { - _e("Oops! We couldn't find your entry. Please try again", "gravityforms"); - return; - } - - RGFormsModel::update_lead_property($lead["id"], "is_read", 1); - - switch(RGForms::post("action")){ - case "update" : - check_admin_referer('gforms_save_entry', 'gforms_save_entry'); - //Loading files that have been uploaded to temp folder - $files = GFCommon::json_decode(stripslashes(RGForms::post("gform_uploaded_files"))); - if(!is_array($files)) - $files = array(); - - GFFormsModel::$uploaded_files[$form_id] = $files; - GFFormsModel::save_lead($form, $lead); - - do_action("gform_after_update_entry", $form, $lead["id"]); - do_action("gform_after_update_entry_{$form["id"]}", $form, $lead["id"]); - - $lead = RGFormsModel::get_lead($lead["id"]); - $lead = GFFormsModel::set_entry_meta($lead, $form); - break; - - case "add_note" : - check_admin_referer('gforms_update_note', 'gforms_update_note'); - $user_data = get_userdata($current_user->ID); - RGFormsModel::add_note($lead["id"], $current_user->ID, $user_data->display_name, stripslashes($_POST["new_note"])); - - //emailing notes if configured - if(rgpost("gentry_email_notes_to")){ - GFCommon::log_debug( 'Preparing to email entry notes.' ); - $email_to = $_POST["gentry_email_notes_to"]; - $email_from = $current_user->user_email; - $email_subject = stripslashes($_POST["gentry_email_subject"]); - $headers = "From: \"$email_from\" <$email_from> \r\n"; - $body = stripslashes( $_POST["new_note"] ); - GFCommon::log_debug( "Emailing notes - TO: $email_to SUBJECT: $email_subject BODY: $body HEADERS: $headers" ); - $result = wp_mail( $email_to, $email_subject, $body, $headers ); - } - break; - - case "add_quick_note" : - check_admin_referer('gforms_save_entry', 'gforms_save_entry'); - $user_data = get_userdata($current_user->ID); - RGFormsModel::add_note($lead["id"], $current_user->ID, $user_data->display_name, stripslashes($_POST["quick_note"])); - break; - - case "bulk" : - check_admin_referer('gforms_update_note', 'gforms_update_note'); - if($_POST["bulk_action"] == "delete") - RGFormsModel::delete_notes($_POST["note"]); - break; - - case "trash" : - check_admin_referer('gforms_save_entry', 'gforms_save_entry'); - RGFormsModel::update_lead_property($lead["id"], "status", "trash"); - $lead = RGFormsModel::get_lead($lead["id"]); - break; - - case "restore" : - case "unspam" : - check_admin_referer('gforms_save_entry', 'gforms_save_entry'); - RGFormsModel::update_lead_property($lead["id"], "status", "active"); - $lead = RGFormsModel::get_lead($lead["id"]); - break; - - case "spam" : - check_admin_referer('gforms_save_entry', 'gforms_save_entry'); - RGFormsModel::update_lead_property($lead["id"], "status", "spam"); - $lead = RGFormsModel::get_lead($lead["id"]); - break; - - case "delete" : - check_admin_referer('gforms_save_entry', 'gforms_save_entry'); - if(!GFCommon::current_user_can_any("gravityforms_delete_entries")) - die(__("You don't have adequate permissions to delete entries.", "gravityforms")); - RGFormsModel::delete_lead($lead["id"]); - ?> - - - - - -
    - - - " /> - -
    -

    ID: lock_info($lead_id);?>

    - - -
    -
      -
    • entry of
    • -
    • -
    • -
    -
    - - - - -
    -
    - - - -
    -

    - -

    -
    -
    -
    - :

    - : -

    - : -

    - - : " alt="" title="">user_login) ?> -

    - - - : " target="_blank" alt="" title="">.../ -

    - - : " title="">post_title) ?> -

    - : -

    - : -

    - : -

    - : -

    - -
    -
    - -
    - '; - echo apply_filters("gform_entrydetail_update_button", $update_button); - if($mode == "edit") - echo '  '; - } - ?> -
    -
    -
    -
    -
    -
    - - - - - - - -
    -

    -
    - -
    - -

    - - " class="button"> - - " id="notification_" onclick="toggleNotificationOverride();" /> -

    - - - - - " class="button" style="" onclick="ResendNotifications();"/> - - - -
    -
    -
    - - - - -
    - - - - - -
    - - -
    - -
    -
    - -
    -

    - -

    - - - -
    - -
    - -
    - -
    -
    -
    -
    - - -
    - -
    - -
    -

    - -

    -
    - - - - - - - "; - - $content = apply_filters("gform_field_content", $content, $field, $value, $lead["id"], $form["id"]); - - echo $content; - break; - } - } - ?> - -
    -

    -
    " . - GFCommon::get_field_input($field, $value, $lead["id"]) . "
    -
    - -
    -
    - 0 && $is_editable && GFCommon::current_user_can_any("gravityforms_edit_entry_notes")){ - ?> -
    - - - '; - echo apply_filters("gform_notes_apply_button", $apply_button); - ?> -
    - - - - - - - - - - - = $notes_count ? true : false; - ?> - - - - - - - - - - - - -
    Notes
    - - - - "> - note_type ? " gforms_note_{$note->note_type}" : ""; - ?> -
    -
    user_id, 48), $note);?>
    -
    user_name)?>
    -

    user_email) ?>
    - date_created, false)) ?>

    -
    -
    value) ?>
    -
    - - '; - echo apply_filters("gform_addnote_button", $note_button); - - if(!empty($emails)){ ?> -    - - -    - - - - -
    - - - - - - - - - - = $field_count ? true : false; - ?> - - - - = $field_count && !$has_product_fields ? true : false; - $last_row = $is_last ? " lastrow" : ""; - - $display_value = empty($display_value) && $display_value !== "0" ? " " : $display_value; - - $content = ' - - - - - - '; - - $content = apply_filters("gform_field_content", $content, $field, $value, $lead["id"], $form["id"]); - - echo $content; - - } - break; - } - } - - $products = array(); - if($has_product_fields){ - $products = GFCommon::get_product_fields($form, $lead); - if(!empty($products["products"])){ - ?> - - - - - - - - - -
    - : - - - onclick="ToggleShowEmptyFields();"/>   - -
    ">
    ' . esc_html(GFCommon::get_label($field)) . '
    ' . $display_value . '
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
      - - > - -
    -
      
     
    -
    - $pos), remove_query_arg(array('pos', 'lid'))) . '"': ''; - $class .= ' gf_entry_pagination_link'; - $class .= $pos !== false ? ' gf_entry_pagination_link_active' : ' gf_entry_pagination_link_inactive'; - - return ''; - } - - /** - * @param $lead - * @param $form - * @return mixed - */ - public static function payment_details_box($lead, $form) - { - ?> - -
    -

    - -

    - -
    -
    -
    - -
    - : - -
    - - -
    - : - -
    - -
    - : - -
    - -
    - : - -
    - -
    -
    -
    -
    - \ No newline at end of file + 'is_starred', 'value' => (bool) $star ); + } + if ( ! is_null( $read ) ) { + $search_criteria['field_filters'][] = array( 'key' => 'is_read', 'value' => (bool) $read ); + } + + $search_field_id = rgget( 'field_id' ); + + if ( isset( $_GET['field_id'] ) && $_GET['field_id'] !== '' ) { + $key = $search_field_id; + $val = rgget( 's' ); + $strpos_row_key = strpos( $search_field_id, '|' ); + if ( $strpos_row_key !== false ) { //multi-row likert + $key_array = explode( '|', $search_field_id ); + $key = $key_array[0]; + $val = $key_array[1] . ':' . $val; + } + + $search_criteria['field_filters'][] = array( + 'key' => $key, + 'operator' => rgempty( 'operator', $_GET ) ? 'is' : rgget( 'operator' ), + 'value' => $val, + ); + + $type = rgget( 'type' ); + if ( empty( $type ) ) { + if ( rgget( 'field_id' ) == '0' ) { + $search_criteria['type'] = 'global'; + } + } + } + + $paging = array( 'offset' => $position, 'page_size' => 1 ); + + if ( ! empty( $sort_field ) ) { + $sorting = array( 'key' => $_GET['sort'], 'direction' => $sort_direction, 'is_numeric' => $is_numeric ); + } else { + $sorting = array(); + } + $total_count = 0; + $leads = GFAPI::get_entries( $form['id'], $search_criteria, $sorting, $paging, $total_count ); + + $prev_pos = ! rgblank( $position ) && $position > 0 ? $position - 1 : false; + $next_pos = ! rgblank( $position ) && $position < $total_count - 1 ? $position + 1 : false; + + // unread filter requires special handling for pagination since entries are filter out of the query as they are read + if ( $filter == 'unread' ) { + $next_pos = $position; + + if ( $next_pos + 1 == $total_count ) { + $next_pos = false; + } + } + + if ( ! $lead_id ) { + $lead = ! empty( $leads ) ? $leads[0] : false; + } else { + $lead = GFAPI::get_entry( $lead_id ); + } + + if ( ! $lead ) { + _e( "Oops! We couldn't find your entry. Please try again", 'gravityforms' ); + + return; + } + + RGFormsModel::update_lead_property( $lead['id'], 'is_read', 1 ); + + switch ( RGForms::post( 'action' ) ) { + case 'update' : + check_admin_referer( 'gforms_save_entry', 'gforms_save_entry' ); + //Loading files that have been uploaded to temp folder + $files = GFCommon::json_decode( stripslashes( RGForms::post( 'gform_uploaded_files' ) ) ); + if ( ! is_array( $files ) ) { + $files = array(); + } + + GFFormsModel::$uploaded_files[ $form_id ] = $files; + GFFormsModel::save_lead( $form, $lead ); + + do_action( 'gform_after_update_entry', $form, $lead['id'] ); + do_action( "gform_after_update_entry_{$form['id']}", $form, $lead['id'] ); + + $lead = RGFormsModel::get_lead( $lead['id'] ); + $lead = GFFormsModel::set_entry_meta( $lead, $form ); + break; + + case 'add_note' : + check_admin_referer( 'gforms_update_note', 'gforms_update_note' ); + $user_data = get_userdata( $current_user->ID ); + RGFormsModel::add_note( $lead['id'], $current_user->ID, $user_data->display_name, stripslashes( $_POST['new_note'] ) ); + + //emailing notes if configured + if ( rgpost( 'gentry_email_notes_to' ) ) { + GFCommon::log_debug( 'GFEntryDetail::lead_detail_page(): Preparing to email entry notes.' ); + $email_to = $_POST['gentry_email_notes_to']; + $email_from = $current_user->user_email; + $email_subject = stripslashes( $_POST['gentry_email_subject'] ); + $body = stripslashes( $_POST['new_note'] ); + + $headers = "From: \"$email_from\" <$email_from> \r\n"; + GFCommon::log_debug( "GFEntryDetail::lead_detail_page(): Emailing notes - TO: $email_to SUBJECT: $email_subject BODY: $body HEADERS: $headers" ); + $result = wp_mail( $email_to, $email_subject, $body, $headers ); + GFCommon::log_debug( "GFEntryDetail::lead_detail_page(): Result from wp_mail(): {$result}" ); + if ( $result ) { + GFCommon::log_debug( 'GFEntryDetail::lead_detail_page(): Mail was passed from WordPress to the mail server.' ); + } else { + GFCommon::log_error( 'GFEntryDetail::lead_detail_page(): The mail message was passed off to WordPress for processing, but WordPress was unable to send the message.' ); + } + } + break; + + case 'add_quick_note' : + check_admin_referer( 'gforms_save_entry', 'gforms_save_entry' ); + $user_data = get_userdata( $current_user->ID ); + RGFormsModel::add_note( $lead['id'], $current_user->ID, $user_data->display_name, stripslashes( $_POST['quick_note'] ) ); + break; + + case 'bulk' : + check_admin_referer( 'gforms_update_note', 'gforms_update_note' ); + if ( $_POST['bulk_action'] == 'delete' ) { + if ( ! GFCommon::current_user_can_any( 'gravityforms_edit_entry_notes' ) ) { + die( __( "You don't have adequate permission to delete notes.", 'gravityforms' ) ); + } + RGFormsModel::delete_notes( $_POST['note'] ); + } + break; + + case 'trash' : + check_admin_referer( 'gforms_save_entry', 'gforms_save_entry' ); + RGFormsModel::update_lead_property( $lead['id'], 'status', 'trash' ); + $lead = RGFormsModel::get_lead( $lead['id'] ); + break; + + case 'restore' : + case 'unspam' : + check_admin_referer( 'gforms_save_entry', 'gforms_save_entry' ); + RGFormsModel::update_lead_property( $lead['id'], 'status', 'active' ); + $lead = RGFormsModel::get_lead( $lead['id'] ); + break; + + case 'spam' : + check_admin_referer( 'gforms_save_entry', 'gforms_save_entry' ); + RGFormsModel::update_lead_property( $lead['id'], 'status', 'spam' ); + $lead = RGFormsModel::get_lead( $lead['id'] ); + break; + + case 'delete' : + check_admin_referer( 'gforms_save_entry', 'gforms_save_entry' ); + if ( ! GFCommon::current_user_can_any( 'gravityforms_delete_entries' ) ) { + die( __( "You don't have adequate permission to delete entries.", 'gravityforms' ) ); + } + RGFormsModel::delete_lead( $lead['id'] ); + ?> + + + + + +
    + + + + +
    +

    + ID: : lock_info( $lead_id ); ?>

    + + +
    +
      +
    • + entry of +
    • +
    • +
    • +
    +
    + + + + +
    +
    + + + +
    +

    + +

    + +
    +
    +
    +
    + :

    + : +

    + : +

    + + : + user_login ) ?> +

    + + + : + .../ +

    + + : + post_title ) ?> +

    + : + +

    + : +

    + : +

    + : +

    + +
    +
    + +
    + '; + echo apply_filters( 'gform_entrydetail_update_button', $update_button ); + if ( $mode == 'edit' ) { + echo '  '; + } + } + ?> +
    +
    +
    +
    +
    +
    + + + + + + + +
    +

    + +
    + +
    + +

    + + " class="button"> + + + +

    + + + + + + + + +
    +
    +
    + + + + +
    + + + + + +
    + + +
    + +
    +
    + +
    +

    + +

    + + + +
    + id ] ) ) { + $emails[] = $lead[ $email_field->id ]; + } + } + //displaying notes grid + $subject = ''; + self::notes_grid( $notes, true, $emails, $subject ); + ?> +
    + +
    + +
    +
    +
    +
    + + +
    + +
    + +
    +

    + +

    + +
    + + + id; + switch ( RGFormsModel::get_input_type( $field ) ) { + case 'section' : + ?> + + + + '; + + $content = apply_filters( 'gform_field_content', $content, $field, $value, $lead['id'], $form['id'] ); + + echo $content; + break; + } + } + ?> + +
    +
    +

    +
    +
    ' . + GFCommon::get_field_input( $field, $value, $lead['id'], $form_id, $form ) . '
    +
    + + +
    +
    + 0 && $is_editable && GFCommon::current_user_can_any( 'gravityforms_edit_entry_notes' ) ) { + ?> +
    + + + '; + echo apply_filters( 'gform_notes_apply_button', $apply_button ); + ?> +
    + + + + + + + + + + + = $notes_count ? true : false; + ?> + + + + + + + + + + + + +
    Notes
    + + + + + note_type ? " gforms_note_{$note->note_type}" : ''; + ?> +
    +
    user_id, 48 ), $note ); ?>
    +
    user_name ) ?>
    +

    + user_email ) ?>
    + date_created, false ) ) ?> +

    +
    +
    value ) ?>
    +
    + + '; + echo apply_filters( 'gform_addnote_button', $note_button ); + + if ( ! empty( $emails ) ) { + ?> +    + + +    + + + + +
    + + + + + + + + + + = $field_count ? true : false; + ?> + + + + type ) ) { + $has_product_fields = true; + continue; + } + + $value = RGFormsModel::get_lead_field_value( $lead, $field ); + $display_value = GFCommon::get_lead_field_display( $field, $value, $lead['currency'] ); + + $display_value = apply_filters( 'gform_entry_field_value', $display_value, $field, $lead, $form ); + + if ( $display_empty_fields || ! empty( $display_value ) || $display_value === '0' ) { + $count ++; + $is_last = $count >= $field_count && ! $has_product_fields ? true : false; + $last_row = $is_last ? ' lastrow' : ''; + + $display_value = empty( $display_value ) && $display_value !== '0' ? ' ' : $display_value; + + $content = ' + + + + + + '; + + $content = apply_filters( 'gform_field_content', $content, $field, $value, $lead['id'], $form['id'] ); + + echo $content; + + } + break; + } + } + + $products = array(); + if ( $has_product_fields ) { + $products = GFCommon::get_product_fields( $form, $lead ); + if ( ! empty( $products['products'] ) ) { + ?> + + + + + + + + + +
    + + + + onclick="ToggleShowEmptyFields();" />   + + +
    ' . esc_html( GFCommon::get_label( $field ) ) . '
    ' . $display_value . '
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
      + + > + +
    +
      
     
    +
    + $pos ), remove_query_arg( array( 'pos', 'lid' ) ) ) . '"' : ''; + $class .= ' gf_entry_pagination_link'; + $class .= $pos !== false ? ' gf_entry_pagination_link_active' : ' gf_entry_pagination_link_inactive'; + + return ''; + } + + public static function payment_details_box( $lead, $form ) + { + ?> + +
    +

    + +

    + +
    +
    +
    + +
    + : + +
    + + +
    + : + +
    + +
    + : + +
    + +
    + : + +
    + +
    +
    +
    +
    + -
    - ', ''); ?> -
    - id; - - self::leads_page($id); - } - } - - public static function leads_page($form_id){ - global $wpdb; - - //quit if version of wp is not supported - if(!GFCommon::ensure_wp_version()) - return; - - echo GFCommon::get_remote_message(); - $action = RGForms::post("action"); - $filter = rgget("filter"); - $search = rgget("s"); - $page_index = empty($_GET["paged"]) ? 0 : intval($_GET["paged"]) - 1; - $star = $filter == "star" ? 1 : null; - $read = $filter == "unread" ? 0 : null; - $status = in_array($filter, array("trash", "spam")) ? $filter : "active"; - $form = RGFormsModel::get_form_meta( $form_id ); - - $search_criteria["status"] = $status; - - if($star) - $search_criteria["field_filters"][] = array("key"=> "is_starred", "value" => (bool) $star); - if(!is_null($read)) - $search_criteria["field_filters"][] = array("key"=> "is_read", "value" => (bool) $read); - - $search_field_id = rgget("field_id"); - - $search_operator = rgget("operator"); - if(isset($_GET["field_id"]) && $_GET["field_id"] !== ''){ - $key = $search_field_id; - $val = rgget("s"); - $strpos_row_key = strpos($search_field_id, "|"); - if ($strpos_row_key !== false) { //multi-row likert - $key_array = explode("|", $search_field_id); - $key = $key_array[0]; - $val = $key_array[1] . ":" . $val; - } - if("entry_id" == $key){ - $key = "id"; - } - - $filter_operator = empty( $search_operator ) ? 'is' : $search_operator; - - $field = GFFormsModel::get_field( $form, $key ); - if ( $field ) { - $input_type = GFFormsModel::get_input_type( $field ); - if ( $field['type'] == 'product' && in_array( $input_type, array( 'radio', 'select' ) ) ) { - $filter_operator = 'contains'; - } - } - - $search_criteria["field_filters"][] = array( - "key" => $key, - "operator" => $filter_operator, - "value" => $val - ); - } - - $update_message = ""; - switch($action){ - case "delete" : - check_admin_referer('gforms_entry_list', 'gforms_entry_list'); - $lead_id = $_POST["action_argument"]; - if(GFCommon::current_user_can_any("gravityforms_delete_entries")){ - RGFormsModel::delete_lead($lead_id); - $update_message = __("Entry deleted.", "gravityforms"); - } else { - $update_message = __("You don't have adequate permissions to delete entries.", "gravityforms"); - } - - break; - - case "bulk": - check_admin_referer('gforms_entry_list', 'gforms_entry_list'); - - $bulk_action = !empty($_POST["bulk_action"]) ? $_POST["bulk_action"] : $_POST["bulk_action2"]; - $select_all = rgpost("all_entries"); - $leads = empty($select_all) ? $_POST["lead"] : GFFormsModel::search_lead_ids($form_id, $search_criteria); - - $entry_count = count($leads) > 1 ? sprintf(__("%d entries", "gravityforms"), count($leads)) : __("1 entry", "gravityforms"); - - switch($bulk_action) { - case "delete": - if(GFCommon::current_user_can_any("gravityforms_delete_entries")){ - RGFormsModel::delete_leads($leads); - $update_message = sprintf(__("%s deleted.", "gravityforms"), $entry_count); - } else { - $update_message = __("You don't have adequate permissions to delete entries.", "gravityforms"); - } - break; - - case "trash": - RGFormsModel::update_leads_property($leads, "status", "trash"); - $update_message = sprintf(__("%s moved to Trash.", "gravityforms"), $entry_count); - break; - - case "restore": - RGFormsModel::update_leads_property($leads, "status", "active"); - $update_message = sprintf(__("%s restored from the Trash.", "gravityforms"), $entry_count); - break; - - case "unspam": - RGFormsModel::update_leads_property($leads, "status", "active"); - $update_message = sprintf(__("%s restored from the spam.", "gravityforms"), $entry_count); - break; - - case "spam": - RGFormsModel::update_leads_property($leads, "status", "spam"); - $update_message = sprintf(__("%s marked as spam.", "gravityforms"), $entry_count); - break; - - case "mark_read": - RGFormsModel::update_leads_property($leads, "is_read", 1); - $update_message = sprintf(__("%s marked as read.", "gravityforms"), $entry_count); - break; - - case "mark_unread": - RGFormsModel::update_leads_property($leads, "is_read", 0); - $update_message = sprintf(__("%s marked as unread.", "gravityforms"), $entry_count); - break; - - case "add_star": - RGFormsModel::update_leads_property($leads, "is_starred", 1); - $update_message = sprintf(__("%s starred.", "gravityforms"), $entry_count); - break; - - case "remove_star": - RGFormsModel::update_leads_property($leads, "is_starred", 0); - $update_message = sprintf(__("%s unstarred.", "gravityforms"), $entry_count); - break; - } - break; - - case "change_columns": - check_admin_referer('gforms_entry_list', 'gforms_entry_list'); - $columns = GFCommon::json_decode(stripslashes($_POST["grid_columns"]), true); - RGFormsModel::update_grid_column_meta($form_id, $columns); - break; - } - - if(rgpost("button_delete_permanently")){ - if(GFCommon::current_user_can_any("gravityforms_delete_entries")){ - RGFormsModel::delete_leads_by_form($form_id, $filter); - } - } - - $sort_field = empty($_GET["sort"]) ? 0 : $_GET["sort"]; - $sort_direction = empty($_GET["dir"]) ? "DESC" : $_GET["dir"]; - $form = RGFormsModel::get_form_meta($form_id); - $sort_field_meta = RGFormsModel::get_field($form, $sort_field); - $is_numeric = $sort_field_meta["type"] == "number"; - - $page_size = apply_filters("gform_entry_page_size", apply_filters("gform_entry_page_size_{$form_id}", 20, $form_id), $form_id); - $first_item_index = $page_index * $page_size; - - if(!empty($sort_field)) - $sorting = array('key' => $_GET["sort"], 'direction' => $sort_direction, 'is_numeric' => $is_numeric); - else - $sorting = array(); - - $paging = array('offset' => $first_item_index, 'page_size' => $page_size); - $total_count = 0; - - $leads = GFAPI::get_entries($form_id, $search_criteria, $sorting, $paging, $total_count); - - $summary = RGFormsModel::get_form_counts($form_id); - $active_lead_count = $summary["total"]; - $unread_count = $summary["unread"]; - $starred_count = $summary["starred"]; - $spam_count = $summary["spam"]; - $trash_count = $summary["trash"]; - - $columns = RGFormsModel::get_grid_columns($form_id, true); - - $search_qs = empty($search) ? "" : "&s=" . urlencode($search); - $sort_qs = empty($sort_field) ? "" : "&sort=$sort_field"; - $dir_qs = empty($sort_field) ? "" : "&dir=$sort_direction"; - $star_qs = $star !== null ? "&star=$star" : ""; - $read_qs = $read !== null ? "&read=$read" : ""; - $filter_qs = "&filter=" . $filter; - $search_field_id_qs = ! isset($_GET["field_id"]) ? "" : "&field_id=$search_field_id"; - $search_operator_urlencoded = urlencode($search_operator); - $search_operator_qs = empty($search_operator_urlencoded) ? "" : "&operator=$search_operator_urlencoded"; - - $display_total = ceil($total_count / $page_size); - $page_links = paginate_links( array( - 'base' => admin_url("admin.php") . "?page=gf_entries&view=entries&id=$form_id&%_%" . $search_qs . $sort_qs . $dir_qs. $star_qs . $read_qs . $filter_qs . $search_field_id_qs . $search_operator_qs, - 'format' => 'paged=%#%', - 'prev_text' => __('«', 'gravityforms'), - 'next_text' => __('»', 'gravityforms'), - 'total' => $display_total, - 'current' => $page_index + 1, - 'show_all' => false - )); - - wp_print_styles(array("thickbox")); - - $field_filters = GFCommon::get_field_filter_settings($form); - - $init_field_id = empty($search_field_id) ? 0 : $search_field_id; - $init_field_operator = empty($search_operator) ? "contains" : $search_operator; - $init_filter_vars = array( - "mode" => "off", - "filters" => array( - array( - "field" => $init_field_id, - "operator" => $init_field_operator, - "value" => $search - ) - ) - ) - ?> - - - - - - -
    -

    ID: :

    - - - -
    - - - - - - - - -
    - -
    -
    -
    - -
    - - - '; - echo apply_filters("gform_entry_apply_button", $apply_button); - - if(in_array($filter, array("trash", "spam"))){ - $message = $filter == "trash" ? __("WARNING! This operation cannot be undone. Empty trash? \'Ok\' to empty trash. \'Cancel\' to abort.", "gravityforms") : __("WARNING! This operation cannot be undone. Permanently delete all spam? \'Ok\' to delete. \'Cancel\' to abort.", "gravityforms"); - $button_label = $filter == "trash" ? __("Empty Trash", "gravityforms") : __("Delete All Spam", "gravityforms"); - ?> - - - + \ No newline at end of file + public static function get_tabs() { + + $setting_tabs = array(); + if ( GFCommon::current_user_can_any( 'gravityforms_export_entries' ) ) { + $setting_tabs['10'] = array( 'name' => 'export_entry', 'label' => __( 'Export Entries', 'gravityforms' ) ); + } + + if ( GFCommon::current_user_can_any( 'gravityforms_edit_forms' ) ) { + $setting_tabs['20'] = array( 'name' => 'export_form', 'label' => __( 'Export Forms', 'gravityforms' ) ); + $setting_tabs['30'] = array( 'name' => 'import_form', 'label' => __( 'Import Forms', 'gravityforms' ) ); + } + + $setting_tabs = apply_filters( 'gform_export_menu', $setting_tabs ); + ksort( $setting_tabs, SORT_NUMERIC ); + + return $setting_tabs; + } + +} \ No newline at end of file diff --git a/fonts/gravityfont.eot b/fonts/gravityfont.eot new file mode 100755 index 0000000000000000000000000000000000000000..5652aec351e55dea947842dc99907782685fa8e9 GIT binary patch literal 13136 zcmd5@d2k$8nSZa3_qu!Tqq|3=(P$29#+GbZ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}_$fsaP^BZ!8)iy( zz!N}bp&2msqh&})6C4K;Tgx? zV;C>yH*L!2hllgmbf@$WG{e|qhh~O{w{07a=fit21ok8xsrGZ_-mzu3Xs=gPhJC)g z#O~nV=dZ$hJViW0gp0k3(CEan)1 z6G}!G@j}reGB`um@gLdrA%L6CbOed+L0lsM0I>|Z9f|8T+p|E z{nF2=Q7}ZQZ)c&fvyZw4P${SnODntzhd@r%J#y(e{mDV4h*04^cLmKU&;sS%p&t zClg&dRXEQ#o?7}5-@BMw%<;vo#c0OCJEyD-tw%nz;Zp*zmH-}|mt-Mxy?tQaQy(zZ+H!K7rhvV7H%g0;S<)x-o z!F%Im1J!|k>iug};Ql34(@32My=&b*)HIjS=nw9fjFIXF)N4PYv1kZKARBrzi zat_`r&$G9)f8_K0SK2o15k0BDUH`3dtMNHw2??yf79W#ulwYzoSns!o?dP074TVDo zLhlcsiQE+VUG(AT?_vjIkHnsjzdruugqN60oKAc)8BV@4c|OHb^Qm*GpQT@u{;s>* z{W5ZUZ^4X2$d|Ft;UfY%XgO<-H2d#1FAm@Xf`Bg^P|%xtMR{MdUPt}Uny|qc8ED1->%)Z4-9bB;V15LwG;y!%a90_z0w)8)SKC-T)5f4d7tj01oC2;9%YW4(1JD zf%WLkae{e+`e5Dw4(9Ftsl_gQOmPZ1&(rv<;yALOXIKF~%NXqbB-_%2>ZrRB?cR*6 z_A#_Lj`In$e;b}+7x3293EUY~ea~R5ZOEi + + + + +{ + "fontFamily": "gravityfont", + "majorVersion": 1, + "minorVersion": 2, + "copyright": "Copyright 2014-2015 Rocketgenius Inc.", + "designerURL": "http://www.rocketgenius.com", + "fontURL": "http://www.gravityforms.com", + "version": "Version 1.2", + "fontId": "gravityfont", + "psName": "gravityfont", + "subFamily": "Regular", + "fullName": "gravityfont", + "description": "Font generated by IcoMoon." +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/gravityfont.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HO!5Dw=J;c(s%7Fdto94DMNtPkf6 z;c(vL_^*T`>~3~~okfoGR(6V=1hfP9(@#O{XHY(YF-~F)6L>O-b#=k;_?aVjpE!H&)>9{G;awU4wPSel7WQV4=S+__ oyVXQQoDg}M{s - - - - - - - - - +class GFFormDetail { + + public static function forms_page( $form_id ) { + + global $wpdb; + + if ( ! GFCommon::ensure_wp_version() ) { + return; + } + + $update_result = ''; + if ( rgpost( 'operation' ) == 'trash' ) { + check_admin_referer( 'gforms_trash_form', 'gforms_trash_form' ); + GFFormsModel::trash_form( $form_id ); + ?> + + + + + + + + + + var form = " . json_encode( $form ) . ';'; + } else { + echo ""; + } + + ?> + + +
    + +

    + +

    + ID: : +

    + + + + + +
    + + ', '' ) ?> +
    + +
    + +
    + +
    + +
    + + + + + +
    + + +
    + + + + + + +
    + +
    +
    + +
    + + +
    +
    +
    +
    +
    + + +
    + +
      + + + + + +
    • + +
      +
      + + + +

      1.

      + +

      + +
      + + +
      + + + +

      2.

      + +

      + +
      + +
      + + + +

      3.

      + +

      + +
      + + + +
      + + + +

      4.

      + +

      + +
      + + +
      + + + +

      5.

      + +

      + +
      + + +
      + +
    • + + + +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    + + + +
    + +
    + + + + +
    +
    +
    +
    + + + +
    + + + ' . __( 'Move to Trash', 'gravityforms' ) . ''; + $trash_link = apply_filters( 'gform_form_delete_link', $trash_link ); // deprecated + echo apply_filters( 'gform_form_trash_link', $trash_link ); + } + + $button_text = rgar( $form, 'id' ) > 0 ? __( 'Update Form', 'gravityforms' ) : __( 'Save Form', 'gravityforms' ); + $isNew = rgar( $form, 'id' ) > 0 ? 0 : 1; + $save_button = ''; + $save_button = apply_filters( 'gform_save_form_button', $save_button ); + echo $save_button; + ?> + + + + + + + + - - - - - - - -
    - - "; - } - } - - //Hierarchical category functions copied from WordPress core and modified. - private static function _cat_rows( $categories, &$count, &$output, $parent = 0, $level = 0, $page = 1, $per_page = 9999999 ) { - if ( empty($categories) ) { - $args = array('hide_empty' => 0); - if ( !empty($_POST['search']) ) - $args['search'] = $_POST['search']; - $categories = get_categories( $args ); - } - - if ( !$categories ) - return false; - - $children = self::_get_term_hierarchy('category'); - - $start = ($page - 1) * $per_page; - $end = $start + $per_page; - $i = -1; - foreach ( $categories as $category ) { - if ( $count >= $end ) - break; - - $i++; - - if ( $category->parent != $parent ) - continue; - - // If the page starts in a subtree, print the parents. - if ( $count == $start && $category->parent > 0 ) { - $my_parents = array(); - while ( $my_parent) { - $my_parent = get_category($my_parent); - $my_parents[] = $my_parent; - if ( !$my_parent->parent ) - break; - $my_parent = $my_parent->parent; - } - $num_parents = count($my_parents); - while( $my_parent = array_pop($my_parents) ) { - self::_cat_row( $my_parent, $level - $num_parents, $output ); - $num_parents--; - } - } - - if ( $count >= $start ) - self::_cat_row( $category, $level, $output ); - - //unset($categories[$i]); // Prune the working set - $count++; - - if ( isset($children[$category->term_id]) ) - self::_cat_rows( $categories, $count, $output, $category->term_id, $level + 1, $page, $per_page ); - - } -} - private static function _cat_row( $category, $level, &$output, $name_override = false ) { - static $row_class = ''; - - $cat = get_category( $category, OBJECT, 'display' ); +
    + + +
    - $default_cat_id = (int) get_option( 'default_category' ); - $pad = str_repeat( '— ', $level ); - $name = ( $name_override ? $name_override : $pad . ' ' . $cat->name ); +
    +
    +
    - $cat->count = number_format_i18n( $cat->count ); +
    - $output .=" + +
    + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + +
    + + '; + } + } + + //Hierarchical category functions copied from WordPress core and modified. + private static function _cat_rows( $categories, &$count, &$output, $parent = 0, $level = 0, $page = 1, $per_page = 9999999 ) { + if ( empty( $categories ) ) { + $args = array( 'hide_empty' => 0 ); + if ( ! empty( $_POST['search'] ) ) + $args['search'] = $_POST['search']; + $categories = get_categories( $args ); + } + + if ( ! $categories ) + return false; + + $children = self::_get_term_hierarchy( 'category' ); + + $start = ( $page - 1 ) * $per_page; + $end = $start + $per_page; + $i = - 1; + foreach ( $categories as $category ) { + if ( $count >= $end ) + break; + + $i ++; + + if ( $category->parent != $parent ) + continue; + + // If the page starts in a subtree, print the parents. + if ( $count == $start && $category->parent > 0 ) { + $my_parents = array(); + while ( $my_parent ) { + $my_parent = get_category( $my_parent ); + $my_parents[] = $my_parent; + if ( ! $my_parent->parent ) + break; + $my_parent = $my_parent->parent; + } + $num_parents = count( $my_parents ); + while ( $my_parent = array_pop( $my_parents ) ) { + self::_cat_row( $my_parent, $level - $num_parents, $output ); + $num_parents --; + } + } + + if ( $count >= $start ) + self::_cat_row( $category, $level, $output ); + + //unset($categories[ $i ]); // Prune the working set + $count ++; + + if ( isset( $children[ $category->term_id ] ) ) + self::_cat_rows( $categories, $count, $output, $category->term_id, $level + 1, $page, $per_page ); + + } + } + + private static function _cat_row( $category, $level, &$output, $name_override = false ) { + static $row_class = ''; + + $cat = get_category( $category, OBJECT, 'display' ); + + $default_cat_id = (int) get_option( 'default_category' ); + $pad = str_repeat( '— ', $level ); + $name = ( $name_override ? $name_override : $pad . ' ' . $cat->name ); + + $cat->count = number_format_i18n( $cat->count ); + + $output .= " - + $name "; - } - private static function _get_term_hierarchy($taxonomy) { - if ( !is_taxonomy_hierarchical($taxonomy) ) - return array(); - $children = get_option("{$taxonomy}_children"); - if ( is_array($children) ) - return $children; - - $children = array(); - $terms = get_terms($taxonomy, 'get=all'); - foreach ( $terms as $term ) { - if ( $term->parent > 0 ) - $children[$term->parent][] = $term->term_id; - } - update_option("{$taxonomy}_children", $children); - - return $children; - } - - private static function insert_variable_prepopulate($element_id, $callback=""){ - ?> - + + + + + + + + + + + + + + id; + $type = $field->inputType; + $form_id = $_GET['id']; + $form = GFFormsModel::get_form_meta( $form_id ); + + require_once( GFCommon::get_base_path() . '/form_display.php' ); + $field_content = GFFormDisplay::get_field_content( $field, '', true, $form_id, $form ); + $args['id'] = $id; + $args['type'] = $type; + $args['fieldString'] = $field_content; + $args_json = json_encode( $args ); + die( "EndChangeInputType($args_json);" ); + } + + public static function refresh_field_preview() { + check_ajax_referer( 'rg_refresh_field_preview', 'rg_refresh_field_preview' ); + $field_json = stripslashes_deep( $_POST['field'] ); + $field_properties = GFCommon::json_decode( $field_json, true ); + $field = GF_Fields::create( $field_properties ); + $form_id = $_POST['formId']; + $form = GFFormsModel::get_form_meta( $form_id ); + + require_once( GFCommon::get_base_path() . '/form_display.php' ); + $field_content = GFFormDisplay::get_field_content( $field, '', true, $form_id, $form ); + $args['fieldString'] = $field_content; + $args_json = json_encode( $args ); + die( $args_json ); + } + + public static function delete_custom_choice() { + check_ajax_referer( 'gf_delete_custom_choice', 'gf_delete_custom_choice' ); + RGFormsModel::delete_custom_choice( rgpost( 'name' ) ); + exit(); + } + + public static function save_custom_choice() { + check_ajax_referer( 'gf_save_custom_choice', 'gf_save_custom_choice' ); + RGFormsModel::save_custom_choice( rgpost( 'previous_name' ), rgpost( 'new_name' ), GFCommon::json_decode( rgpost( 'choices' ) ) ); + exit(); + } + + /** + * Saves form meta. Note the special requirements for the meta string. + * + * @param $id + * @param string $form_json A valid JSON string. The JSON is manipulated before decoding and is designed to work together with jQuery.toJSON() rather than json_encode. Avoid using json_encode as it will convert unicode characters into their respective entities with slashes. These slashes get stripped so unicode characters won't survive intact. + * + * @return array + */ + public static function save_form_info( $id, $form_json ) { + global $wpdb; + $form_json = stripslashes( $form_json ); + $form_json = nl2br( $form_json ); + + GFCommon::log_debug( 'GFFormDetail::save_form_info(): Form meta json: ' . $form_json ); + + $form_meta = json_decode( $form_json, true ); + $form_meta = GFFormsModel::convert_field_objects( $form_meta ); + + GFCommon::log_debug( 'GFFormDetail::save_form_info(): Form meta => ' . print_r( $form_meta, true ) ); + + if ( ! $form_meta ) + return array( 'status' => 'invalid_json', 'meta' => null ); + + $form_table_name = $wpdb->prefix . 'rg_form'; + + //Making sure title is not duplicate + $forms = RGFormsModel::get_forms(); + foreach ( $forms as $form ) + if ( strtolower( $form->title ) == strtolower( $form_meta['title'] ) && rgar( $form_meta, 'id' ) != $form->id ) + return array( 'status' => 'duplicate_title', 'meta' => $form_meta ); + + if ( $id > 0 ) { + $form_meta = GFFormsModel::trim_form_meta_values( $form_meta ); + RGFormsModel::update_form_meta( $id, $form_meta ); + + //updating form title + $wpdb->query( $wpdb->prepare( "UPDATE $form_table_name SET title=%s WHERE id=%d", $form_meta['title'], $form_meta['id'] ) ); + + $form_meta = RGFormsModel::get_form_meta( $id ); + + do_action( 'gform_after_save_form', $form_meta, false ); + + return array( 'status' => $id, 'meta' => $form_meta ); + } else { + + //inserting form + $id = RGFormsModel::insert_form( $form_meta['title'] ); + + //updating object's id property + $form_meta['id'] = $id; + + //creating default notification + if ( apply_filters( 'gform_default_notification', true ) ) { + + $default_notification = array( + 'id' => uniqid(), + 'to' => '{admin_email}', + 'name' => __( 'Admin Notification', 'gravityforms' ), + 'event' => 'form_submission', + 'toType' => 'email', + 'subject' => __( 'New submission from', 'gravityforms' ) . ' {form_title}', + 'message' => '{all_fields}', + ); + + $notifications = array( $default_notification['id'] => $default_notification ); + + //updating notifications form meta + RGFormsModel::save_form_notifications( $id, $notifications ); + } + + // add default confirmation when saving a new form + $confirmation_id = uniqid(); + $confirmations = array(); + $confirmations[ $confirmation_id ] = array( + 'id' => $confirmation_id, + 'name' => __( 'Default Confirmation', 'gravityforms' ), + 'isDefault' => true, + 'type' => 'message', + 'message' => __( 'Thanks for contacting us! We will get in touch with you shortly.', 'gravityforms' ), + 'url' => '', + 'pageId' => '', + 'queryString' => '', + ); + GFFormsModel::save_form_confirmations( $id, $confirmations ); + + //updating form meta + RGFormsModel::update_form_meta( $id, $form_meta ); + + $form_meta = RGFormsModel::get_form_meta( $id ); + + do_action( 'gform_after_save_form', $form_meta, true ); + + return array( 'status' => $id * - 1, 'meta' => $form_meta ); + } + } + + public static function save_form() { + + check_ajax_referer( 'rg_save_form', 'rg_save_form' ); + $id = $_POST['id']; + $form_json = $_POST['form']; + + $result = self::save_form_info( $id, $form_json ); + + switch ( rgar( $result, 'status' ) ) { + case 'invalid_json' : + die( 'EndUpdateForm(0);' ); + break; - } - } + case 'duplicate_title' : + die( 'DuplicateTitleMessage();' ); + break; - public static function get_post_category_values(){ - $has_input_name = strtolower(rgpost("inputName")) != "false"; - - $id = !$has_input_name ? rgpost("objectType") . "_rule_value_" . rgpost("ruleIndex") : rgpost("inputName"); - $selected = rgempty("selectedValue") ? 0 : rgpost("selectedValue"); - - $dropdown = wp_dropdown_categories(array("class"=>"gfield_rule_select gfield_rule_value_dropdown gfield_category_dropdown", "orderby"=> "name", "id"=> $id, "name"=> $id, "selected"=>$selected, "hierarchical"=>true, "hide_empty"=>0, "echo"=>false)); - die($dropdown); - } -} -?> \ No newline at end of file + default : + $form_id = $result['status']; + if ( $form_id < 0 ) + die( 'EndInsertForm(' . abs( $form_id ) . ');' ); + else + die( "EndUpdateForm({$form_id});" ); + break; + + } + } + + public static function get_post_category_values() { + $has_input_name = strtolower( rgpost( 'inputName' ) ) != 'false'; + + $id = ! $has_input_name ? rgpost( 'objectType' ) . '_rule_value_' . rgpost( 'ruleIndex' ) : rgpost( 'inputName' ); + $selected = rgempty( 'selectedValue' ) ? 0 : rgpost( 'selectedValue' ); + + $dropdown = wp_dropdown_categories( array( 'class' => 'gfield_rule_select gfield_rule_value_dropdown gfield_category_dropdown', 'orderby' => 'name', 'id' => $id, 'name' => $id, 'selected' => $selected, 'hierarchical' => true, 'hide_empty' => 0, 'echo' => false ) ); + die( $dropdown ); + } + + public static function inline_scripts( $echo = true ) { + $script_str = ''; + $conditional_logic_fields = array(); + $field_settings = array(); + + foreach ( GF_Fields::get_all() as $gf_field ) { + $settings_arr = $gf_field->get_form_editor_field_settings(); + if ( ! is_array( $settings_arr ) || empty( $settings_arr ) ) { + continue; + } + $settings = join( ', .', $settings_arr ); + $settings = '.' . $settings; + $field_settings[ $gf_field->type ] = $settings; + if ( $gf_field->is_conditional_logic_supported() ) { + $conditional_logic_fields[] = $gf_field->type; + } + + $field_script = $gf_field->get_form_editor_inline_script_on_page_render(); + if ( ! empty( $field_script ) ){ + $script_str .= $field_script . PHP_EOL; + } + } + + $script_str .= sprintf( 'fieldSettings = %s;', json_encode( $field_settings ) ) . PHP_EOL; + + $script_str .= sprintf( 'function GetConditionalLogicFields(){return %s;}', json_encode( $conditional_logic_fields ) ) . PHP_EOL; + + + if ( ! empty( $script_str ) ) { + $script_str = sprintf( '', $script_str ); + if ( $echo ) { + echo $script_str; + } + } + + return $script_str; + } + +} \ No newline at end of file diff --git a/form_display.php b/form_display.php index ea0136d..ab9ae85 100644 --- a/form_display.php +++ b/form_display.php @@ -1,2800 +1,2666 @@ = $page_number){ - $failed_validation_page = $page_number; - $is_valid = self::validate($form, $field_values, $page_number, $failed_validation_page); - } + //don't validate when going to previous page or saving for later + if ( ! $saving_for_later && ( empty( $target_page ) || $target_page >= $page_number ) ) { + $is_valid = self::validate( $form, $field_values, $page_number, $failed_validation_page ); + } + + $log_is_valid = $is_valid ? 'Yes' : 'No'; + GFCommon::log_debug( "GFFormDisplay::process_form(): After validation. Is submission valid? {$log_is_valid}." ); - GFCommon::log_debug("After validation. Is submission valid? {$is_valid}"); + //Upload files to temp folder when saving for later, going to the next page or when submitting the form and it failed validation + if ( $saving_for_later || $target_page >= $page_number || ( $target_page == 0 && ! $is_valid ) ) { - //Upload files to temp folder when going to the next page or when submitting the form and it failed validation - if( $target_page >= $page_number || ($target_page == 0 && !$is_valid) ){ + GFCommon::log_debug( 'GFFormDisplay::process_form(): Uploading files...' ); - GFCommon::log_debug("Uploading files..."); + //Uploading files to temporary folder + $files = self::upload_files( $form, $files ); - //Uploading files to temporary folder - $files = self::upload_files($form, $files); - RGFormsModel::$uploaded_files[$form_id] = $files; - } + RGFormsModel::$uploaded_files[ $form_id ] = $files; + } - // Load target page if it did not fail validation or if going to the previous page - if($is_valid){ - $page_number = $target_page; - } - else - { + // Load target page if it did not fail validation or if going to the previous page + if ( ! $saving_for_later && $is_valid ) { + $page_number = $target_page; + } else { $page_number = $failed_validation_page; - } + } + + $confirmation = ''; + if ( ( $is_valid && $page_number == 0 ) || $saving_for_later ) { + + $ajax = isset( $_POST['gform_ajax'] ); + + //adds honeypot field if configured + if ( rgar( $form, 'enableHoneypot' ) ) { + $form['fields'][] = self::get_honeypot_field( $form ); + } + + $failed_honeypot = rgar( $form, 'enableHoneypot' ) && ! self::validate_honeypot( $form ); + + if ( $failed_honeypot ) { + + GFCommon::log_debug( 'GFFormDisplay::process_form(): Failed Honeypot validation. Displaying confirmation and aborting.' ); + + //display confirmation but doesn't process the form when honeypot fails + $confirmation = self::handle_confirmation( $form, $lead, $ajax ); + $is_valid = false; + } elseif ( ! $saving_for_later ) { + + GFCommon::log_debug( 'GFFormDisplay::process_form(): Submission is valid. Moving forward.' ); + + $form = self::update_confirmation( $form ); + + //pre submission action + do_action( 'gform_pre_submission', $form ); + do_action( "gform_pre_submission_{$form['id']}", $form ); + + //pre submission filter + $form = apply_filters( "gform_pre_submission_filter_{$form['id']}", apply_filters( 'gform_pre_submission_filter', $form ) ); + + //handle submission + $confirmation = self::handle_submission( $form, $lead, $ajax ); + + //after submission hook + do_action( 'gform_after_submission', $lead, $form ); + do_action( "gform_after_submission_{$form['id']}", $lead, $form ); + + } elseif ( $saving_for_later ) { + GFCommon::log_debug( 'GFFormDisplay::process_form(): Saving for later.' ); + $lead = GFFormsModel::get_current_lead(); + $form = self::update_confirmation( $form, $lead, 'form_saved' ); + + $confirmation = rgar( $form['confirmation'], 'message' ); + $nl2br = rgar( $form['confirmation'], 'disableAutoformat' ) ? false : true; + $confirmation = GFCommon::replace_variables( $confirmation, $form, $lead, false, true, $nl2br ); + + $form_unique_id = GFFormsModel::get_form_unique_id( $form_id ); + $ip = GFFormsModel::get_ip(); + $source_url = GFFormsModel::get_current_page_url(); + $resume_token = rgpost( 'gform_resume_token' ); + $resume_token = GFFormsModel::save_incomplete_submission( $form, $lead, $field_values, $page_number, $files, $form_unique_id, $ip, $source_url, $resume_token ); + + $notifications_to_send = GFCommon::get_notifications_to_send( 'form_saved', $form, $lead ); + + $log_notification_event = empty( $notifications_to_send ) ? 'No notifications to process' : 'Processing notifications'; + GFCommon::log_debug( "GFFormDisplay::process_form(): {$log_notification_event} for form_saved event." ); + + foreach ( $notifications_to_send as $notification ) { + if ( isset( $notification['isActive'] ) && ! $notification['isActive'] ) { + GFCommon::log_debug( "GFFormDisplay::process_form(): Notification is inactive, not processing notification (#{$notification['id']} - {$notification['name']})." ); + continue; + } + $notification['message'] = self::replace_save_variables( $notification['message'], $form, $resume_token ); + GFCommon::send_notification( $notification, $form, $lead ); + } + self::set_submission_if_null( $form_id, 'saved_for_later', true ); + self::set_submission_if_null( $form_id, 'resume_token', $resume_token ); + GFCommon::log_debug( 'GFFormDisplay::process_form(): Saved incomplete submission.' ); + + } + + if ( is_array( $confirmation ) && isset( $confirmation['redirect'] ) ){ + header( "Location: {$confirmation["redirect"]}" ); + do_action( 'gform_post_submission', $lead, $form ); + do_action( "gform_post_submission_{$form["id"]}", $lead, $form ); + exit; + } + } + + + + if ( ! isset( self::$submission[ $form_id ] ) ) { + self::$submission[ $form_id ] = array(); + } + + self::set_submission_if_null( $form_id, 'is_valid', $is_valid ); + self::set_submission_if_null( $form_id, 'form', $form ); + self::set_submission_if_null( $form_id, 'lead', $lead ); + self::set_submission_if_null( $form_id, 'confirmation_message', $confirmation ); + self::set_submission_if_null( $form_id, 'page_number', $page_number ); + self::set_submission_if_null( $form_id, 'source_page_number', $source_page_number ); + + do_action( 'gform_post_process', $form, $page_number, $source_page_number ); + do_action( "gform_post_process_{$form['id']}", $form, $page_number, $source_page_number ); + + } + + private static function set_submission_if_null( $form_id, $key, $val ) { + if ( ! isset( self::$submission[ $form_id ][ $key ] ) ) { + self::$submission[ $form_id ][ $key ] = $val; + } + } + + + private static function upload_files( $form, $files ) { + + //Creating temp folder if it does not exist + $target_path = RGFormsModel::get_upload_path( $form['id'] ) . '/tmp/'; + wp_mkdir_p( $target_path ); + + foreach ( $form['fields'] as $field ) { + $input_name = "input_{$field->id}"; + + //skip fields that are not file upload fields or that don't have a file to be uploaded or that have failed validation + $input_type = RGFormsModel::get_input_type( $field ); + if ( ! in_array( $input_type, array( 'fileupload', 'post_image' ) ) || $field->multipleFiles ) { + continue; + } + + if ( $field->failed_validation || empty( $_FILES[ $input_name ]['name'] )) { + GFCommon::log_debug( "GFFormDisplay::upload_files(): Skipping field: {$field->label}({$field->id} - {$field->type})." ); + continue; + } + + $file_info = RGFormsModel::get_temp_filename( $form['id'], $input_name ); + GFCommon::log_debug( 'GFFormDisplay::upload_files(): Temp file info: ' . print_r( $file_info, true ) ); + + if ( $file_info && move_uploaded_file( $_FILES[ $input_name ]['tmp_name'], $target_path . $file_info['temp_filename'] ) ) { + GFFormsModel::set_permissions( $target_path . $file_info['temp_filename'] ); + $files[ $input_name ] = $file_info['uploaded_filename']; + GFCommon::log_debug( "GFFormDisplay::upload_files(): File uploaded successfully: {$file_info['uploaded_filename']}" ); + } else { + GFCommon::log_error( "GFFormDisplay::upload_files(): File could not be uploaded: tmp_name: {$_FILES[ $input_name ]['tmp_name']} - target location: " . $target_path . $file_info['temp_filename'] ); + } + } + return $files; + } + + public static function get_state( $form, $field_values ) { + $product_fields = array(); + foreach ( $form['fields'] as $field ) { + /* @var GF_Field $field */ + if ( GFCommon::is_product_field( $field->type ) || $field->type == 'donation' ) { + $value = RGFormsModel::get_field_value( $field, $field_values, false ); + $value = $field->get_value_default_if_empty( $value ); + + switch ( $field->inputType ) { + case 'calculation' : + case 'singleproduct' : + case 'hiddenproduct' : + $price = ! is_array( $value ) || empty( $value[ $field->id . '.2' ] ) ? $field->basePrice : $value[ $field->id . '.2' ]; + if ( empty( $price ) ) { + $price = 0; + } + + $price = GFCommon::to_number( $price ); + + $product_name = ! is_array( $value ) || empty( $value[ $field->id . '.1' ] ) ? $field->label : $value[ $field->id . '.1' ]; + + $product_fields[ $field->id . '.1' ] = wp_hash( GFFormsModel::maybe_trim_input( $product_name, $form['id'], $field ) ); + $product_fields[ $field->id . '.2' ] = wp_hash( GFFormsModel::maybe_trim_input( $price, $form['id'], $field ) ); + break; + + case 'singleshipping' : + $price = ! empty( $value ) ? $value : $field->basePrice; + $price = ! empty( $price ) ? GFCommon::to_number( $price ) : 0; + + $product_fields[ $field->id ] = wp_hash( GFFormsModel::maybe_trim_input( $price, $form['id'], $field ) ); + break; + case 'radio' : + case 'select' : + $product_fields[ $field->id ] = array(); + foreach ( $field->choices as $choice ) { + $field_value = ! empty( $choice['value'] ) || $field->enableChoiceValue ? $choice['value'] : $choice['text']; + if ( $field->enablePrice ) { + $price = rgempty( 'price', $choice ) ? 0 : GFCommon::to_number( rgar( $choice, 'price' ) ); + $field_value .= '|' . $price; + } + + $product_fields[ $field->id ][] = wp_hash( GFFormsModel::maybe_trim_input( $field_value, $form['id'], $field ) ); + } + break; + case 'checkbox' : + $index = 1; + foreach ( $field->choices as $choice ) { + $field_value = ! empty( $choice['value'] ) || $field->enableChoiceValue ? $choice['value'] : $choice['text']; + if ( $field->enablePrice ) { + $price = rgempty( 'price', $choice ) ? 0 : GFCommon::to_number( rgar( $choice, 'price' ) ); + $field_value .= '|' . $price; + } + + if ( $index % 10 == 0 ) { //hack to skip numbers ending in 0. so that 5.1 doesn't conflict with 5.10 + $index ++; + } + + $product_fields[ $field->id . '.' . $index ++ ] = wp_hash( GFFormsModel::maybe_trim_input( $field_value, $form['id'], $field ) ); + } + break; + + } + } + } + + $hash = json_encode( $product_fields ); + $checksum = wp_hash( crc32( $hash ) ); + + return base64_encode( json_encode( array( $hash, $checksum ) ) ); + + } + + private static function has_pages( $form ) { + return GFCommon::has_pages( $form ); + } + + private static function has_character_counter( $form ) { + + if ( ! is_array( $form['fields'] ) ) { + return false; + } + + foreach ( $form['fields'] as $field ) { + if ( $field->maxLength && ! $field->inputMask ) { + return true; + } + } + + return false; + } + + private static function has_placeholder( $form ) { + + if ( ! is_array( $form['fields'] ) ) { + return false; + } + + foreach ( $form['fields'] as $field ) { + if ( $field->placeholder != '' ) { + return true; + } + if ( is_array( $field->inputs ) ) { + foreach ( $field->inputs as $input ) { + if ( rgar( $input, 'placeholder' ) != '' ) { + return true; + } + } + } + } + + return false; + } + + + private static function has_enhanced_dropdown( $form ) { + + if ( ! is_array( $form['fields'] ) ) { + return false; + } + + foreach ( $form['fields'] as $field ) { + if ( in_array( RGFormsModel::get_input_type( $field ), array( 'select', 'multiselect' ) ) && $field->enableEnhancedUI ) { + return true; + } + } + + return false; + } + + private static function has_password_strength( $form ) { + + if ( ! is_array( $form['fields'] ) ) { + return false; + } + + foreach ( $form['fields'] as $field ) { + if ( $field->type == 'password' && $field->passwordStrengthEnabled ) { + return true; + } + } + + return false; + } + + private static function has_other_choice( $form ) { + + if ( ! is_array( $form['fields'] ) ) { + return false; + } + + foreach ( $form['fields'] as $field ) { + if ( $field->type == 'radio' && $field->enableOtherChoice ) { + return true; + } + } + + return false; + } + + + public static function get_target_page( $form, $current_page, $field_values ) { + $page_number = RGForms::post( "gform_target_page_number_{$form['id']}" ); + $page_number = ! is_numeric( $page_number ) ? 1 : $page_number; + + $direction = $page_number >= $current_page ? 1 : - 1; + + //Finding next page that is not hidden by conditional logic + while ( RGFormsModel::is_page_hidden( $form, $page_number, $field_values ) ) { + $page_number += $direction; + } + + //If all following pages are hidden, submit the form + if ( $page_number > self::get_max_page_number( $form ) ) { + $page_number = 0; + } + + return $page_number; + } + + public static function get_source_page( $form_id ) { + $page_number = RGForms::post( "gform_source_page_number_{$form_id}" ); + + return ! is_numeric( $page_number ) ? 1 : $page_number; + } + + public static function set_current_page( $form_id, $page_number ) { + self::$submission[ $form_id ]['page_number'] = $page_number; + } + + public static function get_current_page( $form_id ) { + $page_number = isset( self::$submission[ $form_id ] ) ? intval( self::$submission[ $form_id ]['page_number'] ) : 1; + + return $page_number; + } + + private static function is_page_active( $form_id, $page_number ) { + return intval( self::get_current_page( $form_id ) ) == intval( $page_number ); + } + + /** + * Determine if the last page for the current form object is being submitted or rendered (depending on the provided $mode). + * + * @param array $form A Gravity Forms form object. + * @param string $mode Mode to check for: 'submit' or 'render' + * + * @return boolean + */ + public static function is_last_page( $form, $mode = 'submit' ) { + + $page_number = self::get_source_page( $form['id'] ); + $field_values = GFForms::post( 'gform_field_values' ); + $target_page = self::get_target_page( $form, $page_number, $field_values ); + + if ( $mode == 'render' ) { + $is_last_page = $target_page == self::get_max_page_number( $form ); + } else { + $is_last_page = (string) $target_page === '0'; + } + + return $is_last_page; + } + + private static function get_limit_period_dates( $period ) { + if ( empty( $period ) ) { + return array( 'start_date' => null, 'end_date' => null ); + } + + switch ( $period ) { + case 'day' : + return array( + 'start_date' => gmdate( 'Y-m-d' ), + 'end_date' => gmdate( 'Y-m-d 23:59:59' ) + ); + break; + + case 'week' : + return array( + 'start_date' => gmdate( 'Y-m-d', strtotime( 'Monday this week' ) ), + 'end_date' => gmdate( 'Y-m-d 23:59:59', strtotime( 'next Sunday' ) ) + ); + break; + + case 'month' : + $month_start = gmdate( 'Y-m-1' ); + + return array( + 'start_date' => $month_start, + 'end_date' => gmdate( 'Y-m-d H:i:s', strtotime( "{$month_start} +1 month -1 second" ) ) + ); + break; + + case 'year' : + return array( + 'start_date' => gmdate( 'Y-1-1' ), + 'end_date' => gmdate( 'Y-12-31 23:59:59' ) + ); + break; + } + } + + public static function get_form( $form_id, $display_title = true, $display_description = true, $force_display = false, $field_values = null, $ajax = false, $tabindex = 1 ) { + + // provides the ability to modify the options used to display the form + $form_args = apply_filters( 'gform_form_args', compact( 'form_id', 'display_title', 'display_description', 'force_display', 'field_values', 'ajax', 'tabindex' ) ); + extract( $form_args ); + + //looking up form id by form name + if ( ! is_numeric( $form_id ) ) { + $form_id = RGFormsModel::get_form_id( $form_id ); + } + + //reading form metadata + $form = RGFormsModel::get_form_meta( $form_id, true ); + + $action = remove_query_arg( 'gf_token' ); + + //disable ajax if form has a reCAPTCHA field (not supported). + if ( $ajax && self::has_recaptcha_field( $form ) ) { + $ajax = false; + } + + if ( isset( $_POST['gform_send_resume_link'] ) ) { + $save_email_confirmation = self::handle_save_email_confirmation( $form, $ajax ); + if ( is_wp_error( $save_email_confirmation ) ) { // Failed email validation + $resume_token = rgpost('gform_resume_token'); + $incomplete_submission_info = GFFormsModel::get_incomplete_submission_values( rgpost('gform_resume_token') ); + if ( $incomplete_submission_info['form_id'] == $form_id ) { + $submission_details_json = $incomplete_submission_info['submission']; + $submission_details = json_decode( $submission_details_json, true ); + $partial_entry = $submission_details['partial_entry']; + $form = self::update_confirmation( $form, $partial_entry, 'form_saved' ); + $confirmation_message = rgar( $form['confirmation'], 'message' ); + $nl2br = rgar( $form['confirmation'], 'disableAutoformat' ) ? false : true; + $confirmation_message = GFCommon::replace_variables( $confirmation_message, $form, $partial_entry, false, true, $nl2br ); + return self::handle_save_confirmation( $form, $resume_token, $confirmation_message, $ajax ); + } + } else { + return $save_email_confirmation; + } + } + + $is_postback = false; + $is_valid = true; + $confirmation_message = ''; + + //If form was submitted, read variables set during form submission procedure + $submission_info = isset( self::$submission[ $form_id ] ) ? self::$submission[ $form_id ] : false; + + if ( rgar( $submission_info, 'saved_for_later' ) == true ) { + $resume_token = $submission_info['resume_token']; + $confirmation_message = rgar( $submission_info, 'confirmation_message' ); + + return self::handle_save_confirmation( $form, $resume_token, $confirmation_message, $ajax ); + } + + $partial_entry = $submitted_values = false; + if ( isset( $_GET['gf_token'] ) ) { + $incomplete_submission_info = GFFormsModel::get_incomplete_submission_values( $_GET['gf_token'] ); + if ( $incomplete_submission_info['form_id'] == $form_id ) { + $submission_details_json = $incomplete_submission_info['submission']; + $submission_details = json_decode( $submission_details_json, true ); + $partial_entry = $submission_details['partial_entry']; + $submitted_values = $submission_details['submitted_values']; + $field_values = $submission_details['field_values']; + GFFormsModel::$unique_ids[ $form_id ] = $submission_details['gform_unique_id']; + GFFormsModel::$uploaded_files[ $form_id ] = $submission_details['files']; + self::set_submission_if_null( $form_id, 'resuming_incomplete_submission', true ); + self::set_submission_if_null( $form_id, 'form_id', $form_id ); + self::set_submission_if_null( $form_id, 'page_number', $submission_details['page_number'] ); + } + } + + if ( ! is_array( $partial_entry ) ) { + $view_counter_disabled = apply_filters( 'gform_disable_view_counter', false ); + $view_counter_disabled = apply_filters( "gform_disable_view_counter_{$form_id}", $view_counter_disabled ); + + if ( $submission_info ) { + $is_postback = true; + $is_valid = rgar( $submission_info, 'is_valid' ) || rgar( $submission_info, 'is_confirmation' ); + $form = $submission_info['form']; + $lead = $submission_info['lead']; + $confirmation_message = rgget( 'confirmation_message', $submission_info ); + + if ( $is_valid && ! RGForms::get( 'is_confirmation', $submission_info ) ) { + + if ( $submission_info['page_number'] == 0 ) { + //post submission hook + do_action( 'gform_post_submission', $lead, $form ); + do_action( "gform_post_submission_{$form['id']}", $lead, $form ); + } else { + //change page hook + do_action( 'gform_post_paging', $form, $submission_info['source_page_number'], $submission_info['page_number'] ); + do_action( "gform_post_paging_{$form['id']}", $form, $submission_info['source_page_number'], $submission_info['page_number'] ); + } + } + } elseif ( ! current_user_can( 'administrator' ) && ! $view_counter_disabled ) { + RGFormsModel::insert_form_view( $form_id, $_SERVER['REMOTE_ADDR'] ); + } + } + + if ( rgar( $form, 'enableHoneypot' ) ) { + $form['fields'][] = self::get_honeypot_field( $form ); + } + + //Fired right before the form rendering process. Allow users to manipulate the form object before it gets displayed in the front end + $form = apply_filters( "gform_pre_render_{$form_id}", apply_filters( 'gform_pre_render', $form, $ajax, $field_values ), $ajax, $field_values ); + + if ( $form == null ) { + return '

    ' . __( 'Oops! We could not locate your form.', 'gravityforms' ) . '

    '; + } + + $has_pages = self::has_pages( $form ); + + //calling tab index filter + GFCommon::$tab_index = apply_filters( "gform_tabindex_{$form_id}", apply_filters( 'gform_tabindex', $tabindex, $form ), $form ); + + //Don't display inactive forms + if ( ! $force_display && ! $is_postback ) { + + $form_info = RGFormsModel::get_form( $form_id ); + if ( empty( $form_info ) || ! $form_info->is_active ) { + return ''; + } + + // If form requires login, check if user is logged in + if ( rgar( $form, 'requireLogin' ) ) { + if ( ! is_user_logged_in() ) { + return empty( $form['requireLoginMessage'] ) ? '

    ' . __( 'Sorry. You must be logged in to view this form.', 'gravityforms' ) . '

    ' : '

    ' . GFCommon::gform_do_shortcode( $form['requireLoginMessage'] ) . '

    '; + } + } + } + + // show the form regardless of the following validations when force display is set to true + if ( ! $force_display || $is_postback ) { + + $form_schedule_validation = self::validate_form_schedule( $form ); + + // if form schedule validation fails AND this is not a postback, display the validation error + // if form schedule validation fails AND this is a postback, make sure is not a valid submission (enables display of confirmation message) + if ( ( $form_schedule_validation && ! $is_postback ) || ( $form_schedule_validation && $is_postback && ! $is_valid ) ) { + return $form_schedule_validation; + } + + $entry_limit_validation = self::validate_entry_limit( $form ); + + // refer to form schedule condition notes above + if ( ( $entry_limit_validation && ! $is_postback ) || ( $entry_limit_validation && $is_postback && ! $is_valid ) ) { + return $entry_limit_validation; + } + } + + $form_string = ''; + + //When called via a template, this will enqueue the proper scripts + //When called via a shortcode, this will be ignored (too late to enqueue), but the scripts will be enqueued via the enqueue_scripts event + self::enqueue_form_scripts( $form, $ajax ); + + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; + + if ( empty( $confirmation_message ) ) { + $wrapper_css_class = GFCommon::get_browser_class() . ' gform_wrapper'; + + if ( ! $is_valid ) { + $wrapper_css_class .= ' gform_validation_error'; + } + + //Hiding entire form if conditional logic is on to prevent 'hidden' fields from blinking. Form will be set to visible in the conditional_logic.php after the rules have been applied. + $style = self::has_conditional_logic( $form ) ? "style='display:none'" : ''; + $custom_wrapper_css_class = ! empty( $form['cssClass'] ) ? " {$form['cssClass']}_wrapper" : ''; + $form_string .= " +
    '; + + $default_anchor = $has_pages || $ajax ? true : false; + $use_anchor = apply_filters( "gform_confirmation_anchor_{$form['id']}", apply_filters( 'gform_confirmation_anchor', $default_anchor ) ); + if ( $use_anchor !== false ) { + $form_string .= ""; + $action .= "#gf_$form_id"; + } + $target = $ajax ? "target='gform_ajax_frame_{$form_id}'" : ''; + + $form_css_class = ! empty( $form['cssClass'] ) ? "class='{$form['cssClass']}'" : ''; + + $action = esc_url( $action ); + $form_string .= apply_filters( "gform_form_tag_{$form_id}", apply_filters( 'gform_form_tag', "
    ", $form ), $form ); + + if ( $display_title || $display_description ) { + $form_string .= " +
    "; + if ( $display_title ) { + $form_string .= " +

    " . $form['title'] . '

    '; + } + if ( $display_description ) { + $form_string .= " + " . rgar( $form, 'description' ) . ''; + } + $form_string .= ' +
    '; + } + + $current_page = self::get_current_page( $form_id ); + + if ( $has_pages && ! $is_admin ) { + + if ( $form['pagination']['type'] == 'percentage' ) { + $form_string .= self::get_progress_bar( $form, $form_id, $confirmation_message ); + } else if ( $form['pagination']['type'] == 'steps' ) { + $form_string .= " +
    "; + $pages = isset( $form['pagination']['pages'] ) ? $form['pagination']['pages'] : array(); + for ( $i = 0, $count = sizeof( $pages ); $i < $count; $i ++ ) { + $step_number = $i + 1; + $active_class = $step_number == $current_page ? ' gf_step_active' : ''; + $first_class = $i == 0 ? ' gf_step_first' : ''; + $last_class = $i + 1 == $count ? ' gf_step_last' : ''; + $complete_class = $step_number < $current_page ? ' gf_step_completed' : ''; + $previous_class = $step_number + 1 == $current_page ? ' gf_step_previous' : ''; + $next_class = $step_number - 1 == $current_page ? ' gf_step_next' : ''; + $pending_class = $step_number > $current_page ? ' gf_step_pending' : ''; + $classes = 'gf_step' . $active_class . $first_class . $last_class . $complete_class . $previous_class . $next_class . $pending_class; + + $classes = GFCommon::trim_all( $classes ); + + $form_string .= " +
    {$step_number} {$pages[ $i ]}
    "; + } + + $form_string .= " +
    +
    "; + } + } + + if ( $is_postback && ! $is_valid ) { + $validation_message = "
    " . __( 'There was a problem with your submission.', 'gravityforms' ) . ' ' . __( 'Errors have been highlighted below.', 'gravityforms' ) . '
    '; + $form_string .= apply_filters( "gform_validation_message_{$form['id']}", apply_filters( 'gform_validation_message', $validation_message, $form ), $form ); + } + + $form_string .= " +
    "; + + //add first page if this form has any page fields + if ( $has_pages ) { + $style = self::is_page_active( $form_id, 1 ) ? '' : "style='display:none;'"; + $class = ! empty( $form['firstPageCssClass'] ) ? " {$form['firstPageCssClass']}" : ''; + $form_string .= "
    +
    "; + } + + $description_class = rgar( $form, 'descriptionPlacement' ) == 'above' ? 'description_above' : 'description_below'; + $sublabel_class = rgar( $form, 'subLabelPlacement' ) == 'above' ? 'form_sublabel_above' : 'form_sublabel_below'; + + + $form_string .= "
      "; + + if ( is_array( $form['fields'] ) ) { + foreach ( $form['fields'] as $field ) { + /* @var GF_Field $field */ + $field->conditionalLogicFields = self::get_conditional_logic_fields( $form, $field->id ); + + if ( is_array( $submitted_values ) ) { + $field_value = $submitted_values[ $field->id ]; + } else { + $field_value = GFFormsModel::get_field_value( $field, $field_values ); + } + + $form_string .= self::get_field( $field, $field_value, false, $form, $field_values ); + } + } + $form_string .= ' +
    '; + + if ( $has_pages ) { + $previous_button = self::get_form_button( $form['id'], "gform_previous_button_{$form['id']}", $form['lastPageButton'], __( 'Previous', 'gravityforms' ), 'gform_previous_button', __( 'Previous Page', 'gravityforms' ), self::get_current_page( $form_id ) - 1 ); + $previous_button = apply_filters( 'gform_previous_button', $previous_button, $form ); + $previous_button = apply_filters( "gform_previous_button_{$form['id']}", $previous_button, $form ); + $form_string .= '
    ' . self::gform_footer( $form, 'gform_page_footer ' . $form['labelPlacement'], $ajax, $field_values, $previous_button, $display_title, $display_description, $is_postback ) . ' +
    '; //closes gform_page + } + + $form_string .= '
    '; //closes gform_body + + //suppress form footer for multi-page forms (footer will be included on the last page + if ( ! $has_pages ) { + $form_string .= self::gform_footer( $form, 'gform_footer ' . $form['labelPlacement'], $ajax, $field_values, '', $display_title, $display_description, $tabindex ); + } + + $form_string .= ' +
    +
    '; + + if ( $ajax && $is_postback ) { + global $wp_scripts; + + $form_string = apply_filters( + 'gform_ajax_iframe_content', '' . + "" . $form_string . '' + ); + + } + + if ( $ajax && ! $is_postback ) { + $spinner_url = apply_filters( "gform_ajax_spinner_url_{$form_id}", apply_filters( 'gform_ajax_spinner_url', GFCommon::get_base_url() . '/images/spinner.gif', $form ), $form ); + $scroll_position = array( 'default' => '', 'confirmation' => '' ); + + if ( $use_anchor !== false ) { + $scroll_position['default'] = is_numeric( $use_anchor ) ? 'jQuery(document).scrollTop(' . intval( $use_anchor ) . ');' : "jQuery(document).scrollTop(jQuery('#gform_wrapper_{$form_id}').offset().top);"; + $scroll_position['confirmation'] = is_numeric( $use_anchor ) ? 'jQuery(document).scrollTop(' . intval( $use_anchor ) . ');' : "jQuery(document).scrollTop(jQuery('#gforms_confirmation_message_{$form_id}').offset().top);"; + } + + $iframe_style = defined( 'GF_DEBUG' ) && GF_DEBUG ? 'display:block;width:600px;height:300px;border:1px solid #eee;' : 'display:none;width:0px;height:0px;'; + + $form_string .= " + + '; + } + + $is_first_load = ! $is_postback; + + if ( ( ! $ajax || $is_first_load ) ) { + + self::register_form_init_scripts( $form, $field_values, $ajax ); + + if ( apply_filters( 'gform_init_scripts_footer', false ) ) { + add_action( 'wp_footer', create_function( '', 'GFFormDisplay::footer_init_scripts(' . $form['id'] . ');' ), 20 ); + add_action( 'gform_preview_footer', create_function( '', 'GFFormDisplay::footer_init_scripts(' . $form['id'] . ');' ) ); + } else { + $form_string .= self::get_form_init_scripts( $form ); + $form_string .= "'; + } + } + + return apply_filters( "gform_get_form_filter_{$form['id']}", apply_filters( 'gform_get_form_filter', $form_string, $form ), $form ); + } else { + $progress_confirmation = ''; + + //check admin setting for whether the progress bar should start at zero + $start_at_zero = rgars( $form, 'pagination/display_progressbar_on_confirmation' ); + $start_at_zero = apply_filters( 'gform_progressbar_start_at_zero', $start_at_zero, $form ); + + //show progress bar on confirmation + if ( $start_at_zero && $has_pages && ! $is_admin && ( $form['confirmation']['type'] == 'message' && $form['pagination']['type'] == 'percentage' ) ) { + $progress_confirmation = self::get_progress_bar( $form, $form_id, $confirmation_message ); + if ( $ajax ) { + $progress_confirmation = apply_filters( 'gform_ajax_iframe_content', "" . $progress_confirmation . '' ); + } + } else { + //return regular confirmation message + if ( $ajax ) { + $progress_confirmation = apply_filters( 'gform_ajax_iframe_content', "" . $confirmation_message . '' ); + } else { + $progress_confirmation = $confirmation_message; + } + } + + return $progress_confirmation; + } + } + + public static function footer_init_scripts( $form_id ) { + global $_init_forms; + + $form = RGFormsModel::get_form_meta( $form_id ); + $form_string = self::get_form_init_scripts( $form ); + $current_page = self::get_current_page( $form_id ); + $form_string .= "'; + + $form_string = apply_filters( 'gform_footer_init_scripts_filter', $form_string, $form, $current_page ); + $form_string = apply_filters( 'gform_footer_init_scripts_filter_' . $form['id'], $form_string, $form, $current_page ); + + if ( ! isset( $_init_forms[ $form_id ] ) ) { + echo $form_string; + if ( ! is_array( $_init_forms ) ) { + $_init_forms = array(); + } + + $_init_forms[ $form_id ] = true; + } + } + + public static function add_init_script( $form_id, $script_name, $location, $script ) { + $key = $script_name . '_' . $location; + + if ( ! isset( self::$init_scripts[ $form_id ] ) ) { + self::$init_scripts[ $form_id ] = array(); + } + + //add script if it hasn't been added before + if ( ! array_key_exists( $key, self::$init_scripts[ $form_id ] ) ) { + self::$init_scripts[ $form_id ][ $key ] = array( 'location' => $location, 'script' => $script ); + } + } + + private static function get_form_button( $form_id, $button_input_id, $button, $default_text, $class, $alt, $target_page_number, $onclick = '' ) { + + $tabindex = GFCommon::get_tabindex(); + + $input_type = 'submit'; + + if ( ! empty( $target_page_number ) ) { + $onclick = "onclick='jQuery(\"#gform_target_page_number_{$form_id}\").val(\"{$target_page_number}\"); {$onclick} jQuery(\"#gform_{$form_id}\").trigger(\"submit\",[true]); '"; + $input_type = 'button'; + } else { + // prevent multiple form submissions when button is pressed multiple times + if ( GFFormsModel::is_html5_enabled() ) { + $set_submitting = "if( !jQuery(\"#gform_{$form_id}\")[0].checkValidity || jQuery(\"#gform_{$form_id}\")[0].checkValidity()){window[\"gf_submitting_{$form_id}\"]=true;}"; + } else { + $set_submitting = "window[\"gf_submitting_{$form_id}\"]=true;"; + } + + $onclick_submit = $button['type'] == 'link' ? "jQuery(\"#gform_{$form_id}\").trigger(\"submit\",[true]);" : ''; + + $onclick = "onclick='if(window[\"gf_submitting_{$form_id}\"]){return false;} {$set_submitting} {$onclick} {$onclick_submit}'"; + } + + if ( $button['type'] == 'text' || $button['type'] == 'link' || empty( $button['imageUrl'] ) ) { + $button_text = ! empty( $button['text'] ) ? $button['text'] : $default_text; + if ( $button['type'] == 'link' ) { + $button_input = "{$button_text}"; + } else { + $class .= ' button'; + $button_input = ""; + } + } else { + $imageUrl = $button['imageUrl']; + $class .= ' gform_image_button'; + $button_input = ""; + } + + return $button_input; + } + + private static function gform_footer( $form, $class, $ajax, $field_values, $previous_button, $display_title, $display_description, $tabindex = 1 ) { + $form_id = $form['id']; + $footer = " +
    "; + $button_input = self::get_form_button( $form['id'], "gform_submit_button_{$form['id']}", $form['button'], __( 'Submit', 'gravityforms' ), 'gform_button', __( 'Submit', 'gravityforms' ), 0 ); + $button_input = apply_filters( 'gform_submit_button', $button_input, $form ); + $button_input = apply_filters( "gform_submit_button_{$form_id}", $button_input, $form ); + + $save_button = rgars( $form, 'save/enabled' ) ? self::get_form_button( $form_id, "gform_save_{$form_id}", $form['save']['button'], rgars( $form, 'save/button/text' ), 'gform_save_link', rgars( $form, 'save/button/text' ), 0, "jQuery(\"#gform_save_{$form_id}\").val(1);" ) : ''; + + $footer .= $previous_button . ' ' . $button_input . ' ' . $save_button; + + if ( $ajax ) { + $footer .= ""; + } + + $current_page = self::get_current_page( $form_id ); + $next_page = $current_page + 1; + $next_page = $next_page > self::get_max_page_number( $form ) ? 0 : $next_page; + $field_values_str = is_array( $field_values ) ? http_build_query( $field_values ) : $field_values; + $files_input = ''; + if ( GFCommon::has_multifile_fileupload_field( $form ) || ! empty( RGFormsModel::$uploaded_files[ $form_id ] ) ) { + $files = ! empty( RGFormsModel::$uploaded_files[ $form_id ] ) ? GFCommon::json_encode( RGFormsModel::$uploaded_files[ $form_id ] ) : ''; + $files_input = ""; + } + $save_inputs = ''; + if ( rgars( $form, 'save/enabled' ) ) { + $resume_token = isset( $_POST['gform_resume_token'] ) ? $_POST['gform_resume_token'] : rgget( 'gf_token' ); + $save_inputs = " + "; + } + + $unique_id = isset( self::$submission[ $form_id ] ) && rgar( self::$submission[ $form_id ], 'resuming_incomplete_submission' ) == true ? rgar( GFFormsModel::$unique_ids, $form_id ) : GFFormsModel::get_form_unique_id( $form_id ); + $footer .= " + + + {$save_inputs} + + + + + + {$files_input} +
    "; + + return $footer; + } + + private static function get_max_page_number( $form ) { + $page_number = 0; + foreach ( $form['fields'] as $field ) { + if ( $field->type == 'page' ) { + $page_number ++; + } + } + + return $page_number == 0 ? 0 : $page_number + 1; + } + + + private static function get_honeypot_field( $form ) { + $max_id = self::get_max_field_id( $form ); + $labels = self::get_honeypot_labels(); + $properties = array( 'type' => 'honeypot', 'label' => $labels[ rand( 0, 3 ) ], 'id' => $max_id + 1, 'cssClass' => 'gform_validation_container', 'description' => __( 'This field is for validation purposes and should be left unchanged.', 'gravityforms' ) ); + $field = GF_Fields::create( $properties ); + + return $field; + } + + private static function get_max_field_id( $form ) { + $max = 0; + foreach ( $form['fields'] as $field ) { + if ( floatval( $field->id ) > $max ) { + $max = floatval( $field->id ); + } + } + + return $max; + } + + private static function get_honeypot_labels() { + return array( 'Name', 'Email', 'Phone', 'Comments' ); + } + + /** + * Used to determine the required validation result. + * + * @param GF_Field $field + * @param int $form_id + * + * @return bool + */ + public static function is_empty( $field, $form_id = 0 ) { + + if ( empty( $_POST[ 'is_submit_' . $field->formId ] ) ) { + return true; + } + + return $field->is_value_submission_empty( $form_id ); + } + + private static function validate_honeypot( $form ) { + $honeypot_id = self::get_max_field_id( $form ); + + return rgempty( "input_{$honeypot_id}" ); + } + + public static function handle_submission( $form, &$lead, $ajax = false ){ + + $lead_id = apply_filters( "gform_entry_id_pre_save_lead{$form['id']}", apply_filters( 'gform_entry_id_pre_save_lead', null, $form ), $form ); + + if ( ! empty( $lead_id ) ) { + if ( empty( $lead ) ) { + $lead = array(); + } + $lead['id'] = $lead_id; + } + + //creating entry in DB + RGFormsModel::save_lead( $form, $lead ); + + //reading entry that was just saved + $lead = RGFormsModel::get_lead( $lead['id'] ); + + $lead = GFFormsModel::set_entry_meta( $lead, $form ); + + //if Akismet plugin is installed, run lead through Akismet and mark it as Spam when appropriate + $is_spam = GFCommon::akismet_enabled( $form['id'] ) && GFCommon::is_akismet_spam( $form, $lead ); + $is_spam = apply_filters( 'gform_entry_is_spam', $is_spam, $form, $lead ); + $is_spam = apply_filters( "gform_entry_is_spam_{$form['id']}", $is_spam, $form, $lead ); + + if ( GFCommon::spam_enabled( $form['id'] ) ) { + GFCommon::log_debug( 'GFFormDisplay::handle_submission(): Akismet integration enabled OR gform_entry_is_spam hook in use.' ); + $log_is_spam = $is_spam ? 'Yes' : 'No'; + GFCommon::log_debug( "GFFormDisplay::handle_submission(): Is entry considered spam? {$log_is_spam}." ); + } + + if ( $is_spam ) { + + //marking entry as spam + RGFormsModel::update_lead_property( $lead['id'], 'status', 'spam', false, true ); + $lead['status'] = 'spam'; + + } + + do_action( 'gform_entry_created', $lead, $form ); + $lead = apply_filters( 'gform_entry_post_save', $lead, $form ); + + RGFormsModel::set_current_lead( $lead ); + + if ( ! $is_spam ) { + GFCommon::create_post( $form, $lead ); + //send notifications + GFCommon::send_form_submission_notifications( $form, $lead ); + } + + self::clean_up_files( $form ); + + // remove incomplete submission and purge expired + if ( rgars( $form, 'save/enabled' ) ) { + GFFormsModel::delete_incomplete_submission( rgpost( 'gform_resume_token' ) ); + GFFormsModel::purge_expired_incomplete_submissions(); + } + + //display confirmation message or redirect to confirmation page + return self::handle_confirmation( $form, $lead, $ajax ); + } + + public static function clean_up_files( $form ) { + $unique_form_id = rgpost( 'gform_unique_id' ); + if ( ! ctype_alnum( $unique_form_id ) ) { + return false; + } + $target_path = RGFormsModel::get_upload_path( $form['id'] ) . '/tmp/'; + $filename = $target_path . $unique_form_id . '_input_*'; + $files = glob( $filename ); + if ( is_array( $files ) ) { + array_map( 'unlink', $files ); + } + + // clean up files from abandoned submissions older than 48 hours (30 days if Save and Continue is enabled) + $files = glob( $target_path . '*' ); + if ( is_array( $files ) ) { + $seconds_in_day = 24 * 60 * 60; + $lifespan = rgars( $form, 'save/enabled' ) ? $expiration_days = apply_filters( 'gform_incomplete_submissions_expiration_days', 30 ) * $seconds_in_day : 2 * $seconds_in_day; + foreach ( $files as $file ) { + if ( is_file( $file ) && time() - filemtime( $file ) >= $lifespan ) { + unlink( $file ); + } + } + } + } + + public static function handle_confirmation( $form, $lead, $ajax = false ) { + + GFCommon::log_debug( 'GFFormDisplay::handle_confirmation(): Sending confirmation.' ); + + //run the function to populate the legacy confirmation format to be safe + $form = self::update_confirmation( $form, $lead ); + + if ( $form['confirmation']['type'] == 'message' ) { + $default_anchor = self::has_pages( $form ) ? 1 : 0; + $anchor = apply_filters( "gform_confirmation_anchor_{$form['id']}", apply_filters( 'gform_confirmation_anchor', $default_anchor ) ) ? "" : ''; + $nl2br = rgar( $form['confirmation'], 'disableAutoformat' ) ? false : true; + $cssClass = rgar( $form, 'cssClass' ); + $confirmation = empty( $form['confirmation']['message'] ) ? "{$anchor} " : "{$anchor}
    " . GFCommon::replace_variables( $form['confirmation']['message'], $form, $lead, false, true, $nl2br ) . '
    '; + } else { + if ( ! empty( $form['confirmation']['pageId'] ) ) { + $url = get_permalink( $form['confirmation']['pageId'] ); + + } else { + $url = GFCommon::replace_variables( trim( $form['confirmation']['url'] ), $form, $lead, false, true, true, 'text' ); + } + + $url_info = parse_url( $url ); + $query_string = rgar( $url_info, 'query' ); + $dynamic_query = GFCommon::replace_variables( trim( $form['confirmation']['queryString'] ), $form, $lead, true, false, false, 'text' ); + $dynamic_query = str_replace( array( "\r", "\n" ), '', $dynamic_query ); + $query_string .= rgempty( 'query', $url_info ) || empty( $dynamic_query ) ? $dynamic_query : '&' . $dynamic_query; + + if ( ! empty( $url_info['fragment'] ) ) { + $query_string .= '#' . rgar( $url_info, 'fragment' ); + } + + $url = isset( $url_info['scheme'] ) ? $url_info['scheme'] : 'http'; + $url .= '://' . rgar( $url_info, 'host' ); + if ( ! empty( $url_info['port'] ) ) { + $url .= ':' . rgar( $url_info, 'port' ); + } + + $url .= rgar( $url_info, 'path' ); + if ( ! empty( $query_string ) ) { + $url .= "?{$query_string}"; + } + + if ( headers_sent() || $ajax ) { + //Perform client side redirect for AJAX forms, of if headers have already been sent + $confirmation = self::get_js_redirect_confirmation( $url, $ajax ); + } else { + $confirmation = array( 'redirect' => $url ); + } + } + + $confirmation = apply_filters( "gform_confirmation_{$form['id']}", apply_filters( 'gform_confirmation', $confirmation, $form, $lead, $ajax ), $form, $lead, $ajax ); + + if ( ! is_array( $confirmation ) ) { + $confirmation = GFCommon::gform_do_shortcode( $confirmation ); //enabling shortcodes + } else if ( headers_sent() || $ajax ) { + //Perform client side redirect for AJAX forms, of if headers have already been sent + $confirmation = self::get_js_redirect_confirmation( $confirmation['redirect'], $ajax ); //redirecting via client side + } + + GFCommon::log_debug( 'GFFormDisplay::handle_confirmation(): Confirmation => ' . print_r( $confirmation, true ) ); + + return $confirmation; + } + + private static function get_js_redirect_confirmation( $url, $ajax ) { + $confirmation = "'; + + return $confirmation; + } + + public static function send_emails( $form, $lead ) { + _deprecated_function( 'send_emails', '1.7', 'GFCommon::send_form_submission_notifications' ); + GFCommon::send_form_submission_notifications( $form, $lead ); + } + + public static function validate( &$form, $field_values, $page_number = 0, &$failed_validation_page = 0 ) { + + $form = apply_filters( 'gform_pre_validation_' . $form['id'], apply_filters( 'gform_pre_validation', $form ) ); + + // validate form schedule + if ( self::validate_form_schedule( $form ) ) { + return false; + } + + // validate entry limit + if ( self::validate_entry_limit( $form ) ) { + return false; + } + + // Prevent tampering with the submitted form + if ( empty( $_POST[ 'is_submit_' . $form['id'] ] ) ) { + return false; + } + + foreach ( $form['fields'] as &$field ) { + /* @var GF_Field $field */ + + //If a page number is specified, only validates fields that are on current page + $field_in_other_page = $page_number > 0 && $field->pageNumber != $page_number; + + //validate fields with 'no duplicate' functionality when they are present on pages before the current page. + $validate_duplicate_feature = $field->noDuplicates && $page_number > 0 && $field->pageNumber <= $page_number; + + if ( $field_in_other_page && ! $validate_duplicate_feature ) { + continue; + } + + //ignore validation if field is hidden or admin only + if ( RGFormsModel::is_field_hidden( $form, $field, $field_values ) || $field->adminOnly ) { + continue; + } + + $value = RGFormsModel::get_field_value( $field ); + + $input_type = RGFormsModel::get_input_type( $field ); + + //display error message if field is marked as required and the submitted value is empty + if ( $field->isRequired && self::is_empty( $field, $form['id'] ) ) { + $field->failed_validation = true; + $field->validation_message = empty( $field->errorMessage ) ? __( 'This field is required.', 'gravityforms' ) : $field->errorMessage; + } //display error if field does not allow duplicates and the submitted value already exists + else if ( $field->noDuplicates && RGFormsModel::is_duplicate( $form['id'], $field, $value ) ) { + $field->failed_validation = true; + //set page number so the failed field displays if on multi-page form + $failed_validation_page = $field->pageNumber; + + switch ( $input_type ) { + case 'date' : + $default_message = __( 'This date has already been taken. Please select a new date.', 'gravityforms' ); + break; + + default: + $default_message = is_array( $value ) ? __( 'This field requires a unique entry and the values you entered have been already been used.', 'gravityforms' ) : + sprintf( __( "This field requires a unique entry and '%s' has already been used", 'gravityforms' ), $value ); + break; + } + + $field->validation_message = apply_filters( "gform_duplicate_message_{$form['id']}", apply_filters( 'gform_duplicate_message', $default_message, $form, $field, $value ), $form, $field, $value ); + + } else { + if ( self::failed_state_validation( $form['id'], $field, $value ) ) { + $field->failed_validation = true; + $field->validation_message = in_array( $field->inputType, array( 'singleproduct', 'singleshipping', 'hiddenproduct' ) ) ? __( 'Please enter a valid value.', 'gravityforms' ) : __( 'Invalid selection. Please select one of the available choices.', 'gravityforms' ); + } else { + $field->validate( $value, $form ); + } + } + + $custom_validation_result = apply_filters( 'gform_field_validation', array( 'is_valid' => $field->failed_validation ? false : true, 'message' => $field->validation_message ), $value, $form, $field ); + $custom_validation_result = apply_filters( "gform_field_validation_{$form['id']}", $custom_validation_result, $value, $form, $field ); + $custom_validation_result = apply_filters( "gform_field_validation_{$form['id']}_{$field->id}", $custom_validation_result, $value, $form, $field ); + + $field->failed_validation = rgar( $custom_validation_result, 'is_valid' ) ? false : true; + $field->validation_message = rgar( $custom_validation_result, 'message' ); + } + + $is_valid = true; + foreach ( $form['fields'] as $f ) { + if ( $f->failed_validation ) { + $is_valid = false; + break; + } + } + + $validation_result = apply_filters( "gform_validation_{$form['id']}", apply_filters( 'gform_validation', array( 'is_valid' => $is_valid, 'form' => $form ) ) ); + $is_valid = $validation_result['is_valid']; + $form = $validation_result['form']; + + return $is_valid; + } + + public static function failed_state_validation( $form_id, $field, $value ) { + + global $_gf_state; + + //if field can be populated dynamically, disable state validation + if ( $field->allowsPrepopulate ) { + return false; + } else if ( ! GFCommon::is_product_field( $field->type && $field->type != 'donation' ) ) { + return false; + } else if ( ! in_array( $field->inputType, array( 'singleshipping', 'singleproduct', 'hiddenproduct', 'checkbox', 'radio', 'select' ) ) ) { + return false; + } + + if ( ! isset( $_gf_state ) ) { + $state = json_decode( base64_decode( $_POST[ "state_{$form_id}" ] ), true ); + + if ( ! $state || sizeof( $state ) != 2 ) { + return true; + } + + //making sure state wasn't tampered with by validating checksum + $checksum = wp_hash( crc32( $state[0] ) ); + + if ( $checksum !== $state[1] ) { + return true; + } + + $_gf_state = json_decode( $state[0], true ); + } + + if ( ! is_array( $value ) ) { + $value = array( $field->id => $value ); + } + + foreach ( $value as $key => $input_value ) { + $state = isset( $_gf_state[ $key ] ) ? $_gf_state[ $key ] : false; + + //converting price to a number for single product fields and single shipping fields + if ( ( in_array( $field->inputType, array( 'singleproduct', 'hiddenproduct' ) ) && $key == $field->id . '.2' ) || $field->inputType == 'singleshipping' ) { + $input_value = GFCommon::to_number( $input_value ); + } + + $hash = wp_hash( $input_value ); + + if ( strlen( $input_value ) > 0 && $state !== false && ( ( is_array( $state ) && ! in_array( $hash, $state ) ) || ( ! is_array( $state ) && $hash != $state ) ) ) { + return true; + } + } + + return false; + } + + public static function enqueue_scripts() { + global $wp_query; + if ( isset( $wp_query->posts ) && is_array( $wp_query->posts ) ) { + foreach ( $wp_query->posts as $post ) { + $forms = self::get_embedded_forms( $post->post_content, $ajax ); + foreach ( $forms as $form ) { + if ( isset( $form['id'] ) ) { + self::enqueue_form_scripts( $form, $ajax ); + } + } + } + } + } + + public static function get_embedded_forms( $post_content, &$ajax ) { + $forms = array(); + if ( preg_match_all( '/\[gravityform[s]? +.*?((id=.+?)|(name=.+?))\]/is', $post_content, $matches, PREG_SET_ORDER ) ) { + $ajax = false; + foreach ( $matches as $match ) { + //parsing shortcode attributes + $attr = shortcode_parse_atts( $match[1] ); + $form_id = rgar( $attr, 'id' ); + if ( ! is_numeric( $form_id ) ) { + $form_id = RGFormsModel::get_form_id( rgar( $attr, 'name' ) ); + } + + if ( ! empty( $form_id ) ){ + $forms[] = RGFormsModel::get_form_meta( $form_id ); + $ajax = isset( $attr['ajax'] ) && strtolower( substr( $attr['ajax'], 0, 4 ) ) == 'true'; + } + } + } + + return $forms; + } + + public static function enqueue_form_scripts( $form, $ajax = false ) { + + // adding pre enqueue scripts hook so that scripts can be added first if a need exists + do_action( "gform_pre_enqueue_scripts_{$form['id']}", do_action( 'gform_pre_enqueue_scripts', $form, $ajax ), $ajax ); + + if ( ! get_option( 'rg_gforms_disable_css' ) ) { + + wp_enqueue_style( 'gforms_reset_css', GFCommon::get_base_url() . '/css/formreset.css', null, GFCommon::$version ); + + if ( self::has_datepicker_field( $form ) ) { + wp_enqueue_style( 'gforms_datepicker_css', GFCommon::get_base_url() . '/css/datepicker.css', null, GFCommon::$version ); + } + + wp_enqueue_style( 'gforms_formsmain_css', GFCommon::get_base_url() . '/css/formsmain.css', null, GFCommon::$version ); + wp_enqueue_style( 'gforms_ready_class_css', GFCommon::get_base_url() . '/css/readyclass.css', null, GFCommon::$version ); + wp_enqueue_style( 'gforms_browsers_css', GFCommon::get_base_url() . '/css/browsers.css', null, GFCommon::$version ); + + if ( is_rtl() ) { + wp_enqueue_style( 'gforms_rtl_css', GFCommon::get_base_url() . '/css/rtl.css', null, GFCommon::$version ); + } + } + + if ( self::has_conditional_logic( $form ) ) { + wp_enqueue_script( 'gform_conditional_logic' ); + } + + if ( self::has_datepicker_field( $form ) ) { + wp_enqueue_script( 'gform_datepicker_init' ); + } + + if ( $ajax || self::has_price_field( $form ) || self::has_password_strength( $form ) || GFCommon::has_list_field( $form ) || GFCommon::has_credit_card_field( $form ) || self::has_conditional_logic( $form ) || self::has_currency_format_number_field( $form ) || self::has_calculation_field( $form ) ) { + wp_enqueue_script( 'gform_gravityforms' ); + } + + if ( GFCommon::has_multifile_fileupload_field( $form ) ) { + wp_enqueue_script( 'plupload-all' ); + GFCommon::localize_gform_gravityforms_multifile(); + } + + if ( self::has_enhanced_dropdown( $form ) || self::has_pages( $form ) || self::has_fileupload_field( $form ) ) { + wp_enqueue_script( 'gform_json' ); + wp_enqueue_script( 'gform_gravityforms' ); + } + + if ( self::has_character_counter( $form ) ) { + wp_enqueue_script( 'gform_textarea_counter' ); + } + + if ( self::has_input_mask( $form ) ) { + wp_enqueue_script( 'gform_masked_input' ); + } + + if ( self::has_enhanced_dropdown( $form ) && ! wp_script_is( 'chosen' ) ) { + wp_enqueue_script( 'gform_chosen' ); + } + + if ( self::has_enhanced_dropdown( $form ) ) { + if ( wp_script_is( 'chosen', 'registered' ) ) { + wp_enqueue_script( 'chosen' ); + } else { + wp_enqueue_script( 'gform_chosen' ); + } + } + + if ( self::has_placeholder( $form ) ) { + wp_enqueue_script( 'gform_placeholder' ); + } + + do_action( 'gform_enqueue_scripts', $form, $ajax ); + do_action( "gform_enqueue_scripts_{$form['id']}", $form, $ajax ); + + // enqueue jQuery every time form is displayed to allow 'gform_post_render' js hook + // to be available to users even when GF is not using it + wp_enqueue_script( 'jquery' ); + + } + + private static $printed_scripts = array(); + + public static function print_form_scripts( $form, $ajax ) { + + if ( ! get_option( 'rg_gforms_disable_css' ) ) { + + if ( ! wp_style_is( 'gforms_css' ) ) { + + wp_enqueue_style( 'gforms_reset_css', GFCommon::get_base_url() . '/css/formreset.css', null, GFCommon::$version ); + wp_print_styles( array( 'gforms_reset_css' ) ); + + wp_enqueue_style( 'gforms_formsmain_css', GFCommon::get_base_url() . '/css/formsmain.css', null, GFCommon::$version ); + wp_print_styles( array( 'gforms_formsmain_css' ) ); + + wp_enqueue_style( 'gforms_ready_class_css', GFCommon::get_base_url() . '/css/readyclass.css', null, GFCommon::$version ); + wp_print_styles( array( 'gforms_ready_class_css' ) ); + + wp_enqueue_style( 'gforms_browsers_css', GFCommon::get_base_url() . '/css/browsers.css', null, GFCommon::$version ); + wp_print_styles( array( 'gforms_browsers_css' ) ); + + if ( self::has_datepicker_field( $form ) ) { + wp_enqueue_style( 'gforms_datepicker_css', GFCommon::get_base_url() . '/css/datepicker.css', null, GFCommon::$version ); + wp_print_styles( array( 'gforms_datepicker_css' ) ); + } + + if ( is_rtl() ) { + wp_enqueue_style( 'gforms_rtl_css', GFCommon::get_base_url() . '/css/rtl.css', null, GFCommon::$version ); + wp_print_styles( array( 'gforms_rtl_css' ) ); + } + } + } + + $scripts = array(); + + if ( ( $ajax || self::has_enhanced_dropdown( $form ) || self::has_price_field( $form ) || self::has_password_strength( $form ) || self::has_pages( $form ) || self::has_password_strength( $form ) || GFCommon::has_list_field( $form ) || GFCommon::has_credit_card_field( $form ) || self::has_calculation_field( $form ) ) && ! wp_script_is( 'gform_gravityforms' ) ) { + $scripts[] = 'gform_gravityforms'; + } - $confirmation = ""; - if($is_valid && $page_number == 0){ + if ( self::has_conditional_logic( $form ) && ! wp_script_is( 'gform_conditional_logic' ) ) { + $scripts[] = 'gform_conditional_logic'; + } + if ( self::has_datepicker_field( $form ) && ! wp_script_is( 'gform_datepicker_init' ) ) { + $scripts[] = 'gform_datepicker_init'; + } - $ajax = isset($_POST["gform_ajax"]); + if ( self::has_pages( $form ) && ! wp_script_is( 'gform_json' ) ) { + $scripts[] = 'gform_json'; + } - //adds honeypot field if configured - if(rgar($form,"enableHoneypot")) - $form["fields"][] = self::get_honeypot_field($form); + if ( self::has_character_counter( $form ) && ! wp_script_is( 'gform_textarea_counter' ) ) { + $scripts[] = 'gform_textarea_counter'; + } - $failed_honeypot = rgar($form,"enableHoneypot") && !self::validate_honeypot($form); + if ( self::has_input_mask( $form ) && ! wp_script_is( 'gform_masked_input' ) ) { + $scripts[] = 'gform_masked_input'; + } - if($failed_honeypot){ + if ( self::has_enhanced_dropdown( $form ) && ! wp_script_is( 'gform_chosen' ) && ! wp_script_is( 'chosen' ) ) { + if ( wp_script_is( 'chosen', 'registered' ) ) { + $scripts[] = 'chosen'; + } else { + $scripts[] = 'gform_chosen'; + } + } - GFCommon::log_debug("Failed Honeypot validation. Displaying confirmation and aborting"); + if ( ! wp_script_is( 'jquery' ) ) { + $scripts[] = 'jquery'; + } - //display confirmation but doesn't process the form when honeypot fails - $confirmation = self::handle_confirmation($form, $lead, $ajax); - $is_valid = false; - } - else{ + foreach ( $scripts as $script ) { + wp_enqueue_script( $script ); + } - GFCommon::log_debug("Submission is valid. Moving forward."); + wp_print_scripts( $scripts ); - $form = self::update_confirmation($form); + if ( wp_script_is( 'gform_gravityforms' ) ) { + echo ''; + } - //pre submission action - do_action("gform_pre_submission", $form); - do_action("gform_pre_submission_{$form["id"]}", $form); + } - //pre submission filter - $form = apply_filters("gform_pre_submission_filter_{$form["id"]}", apply_filters("gform_pre_submission_filter", $form)); + public static function has_conditional_logic( $form ) { + $has_conditional_logic = self::has_conditional_logic_legwork( $form ); - //handle submission - $confirmation = self::handle_submission($form, $lead, $ajax); + return apply_filters( 'gform_has_conditional_logic', $has_conditional_logic, $form ); + } - //after submission hook - do_action("gform_after_submission", $lead, $form); - do_action("gform_after_submission_{$form["id"]}", $lead, $form); + private static function has_conditional_logic_legwork( $form ) { - } + if ( empty( $form ) ) { + return false; + } - if(is_array($confirmation) && isset($confirmation["redirect"])){ - header("Location: {$confirmation["redirect"]}"); - do_action("gform_post_submission", $lead, $form); - do_action("gform_post_submission_{$form["id"]}", $lead, $form); + if ( isset( $form['button']['conditionalLogic'] ) ) { + return true; + } - GFFormsModel::delete_password( $lead, $form ); + if ( is_array( rgar( $form, 'fields' ) ) ) { + foreach ( rgar( $form, 'fields' ) as $field ) { + if ( ! empty( $field->conditionalLogic ) ) { + return true; + } else if ( isset( $field->nextButton ) && ! empty( $field->nextButton['conditionalLogic'] ) ) { + return true; + } + } + } - exit; - } - else{ + return false; + } - GFFormsModel::delete_password( $lead, $form ); + private static function get_conditional_logic( $form, $field_values = array() ) { + $logics = ''; + $dependents = ''; + $fields_with_logic = array(); + $default_values = array(); - } - } + foreach ( $form['fields'] as $field ) { - if(!isset(self::$submission[$form_id])) - self::$submission[$form_id] = array(); + /* @var GF_Field $field */ - self::set_submission_if_null($form_id, "is_valid", $is_valid); - self::set_submission_if_null($form_id, "form", $form); - self::set_submission_if_null($form_id, "lead", $lead); - self::set_submission_if_null($form_id, "confirmation_message", $confirmation); - self::set_submission_if_null($form_id, "page_number", $page_number); - self::set_submission_if_null($form_id, "source_page_number", $source_page_number); + //use section's logic if one exists + $section = RGFormsModel::get_section( $form, $field->id ); + $section_logic = ! empty( $section ) ? rgar( $section, 'conditionalLogic' ) : null; - do_action("gform_post_process", $form, $page_number, $source_page_number ); - do_action("gform_post_process_{$form["id"]}", $form, $page_number, $source_page_number ); + $field_logic = $field->type != 'page' ? $field->conditionalLogic : null; //page break conditional logic will be handled during the next button click - } + $next_button_logic = ! empty( $field->nextButton ) && ! empty( $field->nextButton['conditionalLogic'] ) ? $field->nextButton['conditionalLogic'] : null; - private static function set_submission_if_null($form_id, $key, $val){ - if(!isset(self::$submission[$form_id][$key])) - self::$submission[$form_id][$key] = $val; - } + if ( ! empty( $field_logic ) || ! empty( $next_button_logic ) ) { - private static function upload_files($form, $files){ + $field_section_logic = array( 'field' => $field_logic, 'nextButton' => $next_button_logic, 'section' => $section_logic ); - //Creating temp folder if it does not exist - $target_path = RGFormsModel::get_upload_path($form["id"]) . "/tmp/"; - wp_mkdir_p($target_path); + $logics .= $field->id . ': ' . GFCommon::json_encode( $field_section_logic ) . ','; - foreach($form["fields"] as $field){ - $input_name = "input_{$field["id"]}"; + $fields_with_logic[] = $field->id; - //skip fields that are not file upload fields or that don't have a file to be uploaded or that have failed validation - $input_type = RGFormsModel::get_input_type($field); - if(!in_array($input_type, array("fileupload", "post_image")) || $field["failed_validation"] || empty($_FILES[$input_name]["name"])){ - GFCommon::log_debug("upload_files() - skipping field: {$field["label"]}({$field["id"]} - {$field["type"]})"); - continue; - } + $peers = $field->type == 'section' ? GFCommon::get_section_fields( $form, $field->id ) : array( $field ); + $peer_ids = array(); - if(rgar($field,"multipleFiles")) - continue; + foreach ( $peers as $peer ) { + $peer_ids[] = $peer->id; + } - $file_info = RGFormsModel::get_temp_filename($form["id"], $input_name); - GFCommon::log_debug("upload_files() - temp file info: " . print_r($file_info, true)); + $dependents .= $field->id . ': ' . GFCommon::json_encode( $peer_ids ) . ','; + } - if($file_info && move_uploaded_file($_FILES[$input_name]['tmp_name'], $target_path . $file_info["temp_filename"])){ - GFFormsModel::set_permissions( $target_path . $file_info['temp_filename'] ); - $files[$input_name] = $file_info["uploaded_filename"]; - GFCommon::log_debug("upload_files() - file uploaded successfully: {$file_info["uploaded_filename"]}"); - } - else{ - GFCommon::log_error("upload_files() - file could not be uploaded: tmp_name: {$_FILES[$input_name]['tmp_name']} - target location: " . $target_path . $file_info["temp_filename"]); - } - } - - return $files; - } - - public static function get_state($form, $field_values){ - $product_fields = array(); - foreach($form["fields"] as $field){ - if(GFCommon::is_product_field($field["type"]) || $field["type"] == "donation"){ - $value = RGFormsModel::get_field_value($field, $field_values, false); - $value = self::default_if_empty($field, $value); - - switch($field["inputType"]){ - case "calculation" : - case "singleproduct" : - case "hiddenproduct" : - $price = !is_array($value) || empty($value[$field["id"] . ".2"]) ? $field["basePrice"] : $value[$field["id"] . ".2"]; - if(empty($price)) - $price = 0; - - $price = GFCommon::to_number($price); - - $product_name = !is_array($value) || empty($value[$field["id"] . ".1"]) ? $field["label"] : $value[$field["id"] . ".1"]; - $product_fields[$field["id"]. ".1"] = wp_hash(GFFormsModel::maybe_trim_input($product_name, $form["id"], $field)); - $product_fields[$field["id"]. ".2"] = wp_hash(GFFormsModel::maybe_trim_input($price, $form["id"], $field)); - break; + //-- Saving default values so that they can be restored when toggling conditional logic --- + $field_val = ''; + $input_type = RGFormsModel::get_input_type( $field ); - case "singleshipping" : - $price = !empty($value) ? $value : $field["basePrice"]; - $price = GFCommon::to_number($price); + //get parameter value if pre-populate is enabled + if ( $field->allowsPrepopulate ) { + if ( is_array( $field->inputs ) ) { + $field_val = array(); + foreach ( $field->inputs as $input ) { + $field_val[ "input_{$input['id']}" ] = RGFormsModel::get_parameter_value( rgar( $input, 'name' ), $field_values, $field ); + } + } else if ( $input_type == 'time' ) { // maintained for backwards compatibility. The Time field now has an inputs array. + $parameter_val = RGFormsModel::get_parameter_value( $field->inputName, $field_values, $field ); + if ( ! empty( $parameter_val ) && preg_match( '/^(\d*):(\d*) ?(.*)$/', $parameter_val, $matches ) ) { + $field_val = array(); + $field_val[] = esc_attr( $matches[1] ); //hour + $field_val[] = esc_attr( $matches[2] ); //minute + $field_val[] = rgar( $matches, 3 ); //am or pm + } + } else if ( $input_type == 'list' ) { + $parameter_val = RGFormsModel::get_parameter_value( $field->inputName, $field_values, $field ); + $field_val = is_array( $parameter_val ) ? $parameter_val : explode( ',', str_replace( '|', ',', $parameter_val ) ); + } else { + $field_val = RGFormsModel::get_parameter_value( $field->inputName, $field_values, $field ); + } + } - $product_fields[$field["id"]] = wp_hash(GFFormsModel::maybe_trim_input($price, $form["id"], $field)); - break; - case "radio" : - case "select" : - $product_fields[$field["id"]] = array(); - foreach($field["choices"] as $choice){ - $field_value = !empty($choice["value"]) || rgar($field,"enableChoiceValue") ? $choice["value"] : $choice["text"]; - if($field["enablePrice"]) - $field_value .= "|" . GFCommon::to_number(rgar($choice,"price")); + //use default value if pre-populated value is empty + $field_val = $field->get_value_default_if_empty( $field_val ); - $product_fields[$field["id"]][] = wp_hash(GFFormsModel::maybe_trim_input($field_value, $form["id"], $field)); - } - break; - case "checkbox" : - $index = 1; - foreach($field["choices"] as $choice){ - $field_value = !empty($choice["value"]) || $field["enableChoiceValue"] ? $choice["value"] : $choice["text"]; - if($field["enablePrice"]) - $field_value .= "|" . GFCommon::to_number(rgar($choice,"price")); + if ( is_array( $field->choices ) && $input_type != 'list' ) { - if($index % 10 == 0) //hack to skip numbers ending in 0. so that 5.1 doesn't conflict with 5.10 - $index++; + //radio buttons start at 0 and checkboxes start at 1 + $choice_index = $input_type == 'radio' ? 0 : 1; + $is_pricing_field = GFCommon::is_pricing_field( $field->type ); - $product_fields[$field["id"] . "." . $index++] = wp_hash(GFFormsModel::maybe_trim_input($field_value, $form["id"], $field)); - } - break; + foreach ( $field->choices as $choice ) { - } - } - } + if ( $input_type == 'checkbox' && ( $choice_index % 10 ) == 0 ){ + $choice_index++; + } - $hash = json_encode($product_fields); - $checksum = wp_hash(crc32($hash)); - return base64_encode(json_encode(array($hash, $checksum))); - - } - - private static function has_pages($form){ - return GFCommon::has_pages($form); - } - - private static function has_character_counter($form){ - - if(!is_array($form["fields"])) - return false; - - foreach($form["fields"] as $field){ - if(rgar($field, "maxLength") && !rgar($field, "inputMask")) - return true; - } - - return false; - } - - - private static function has_enhanced_dropdown($form){ - - if(!is_array($form["fields"])) - return false; - - foreach($form["fields"] as $field){ - if(in_array(RGFormsModel::get_input_type($field), array("select", "multiselect")) && rgar($field, "enableEnhancedUI")) - return true; - } - - return false; - } - - private static function has_password_strength($form){ - - if(!is_array($form["fields"])) - return false; - - foreach($form["fields"] as $field){ - if($field["type"] == "password" && RGForms::get("passwordStrengthEnabled", $field)) - return true; - } - - return false; - } - - private static function has_other_choice($form){ - - if(!is_array($form["fields"])) - return false; - - foreach($form["fields"] as $field){ - if($field["type"] == "radio" && rgget("enableOtherChoice", $field)) - return true; - } - - return false; - } - - - public static function get_target_page($form, $current_page, $field_values){ - $page_number = RGForms::post("gform_target_page_number_{$form["id"]}"); - $page_number = !is_numeric($page_number) ? 1 : $page_number; - - $direction = $page_number >= $current_page ? 1 : -1; - - //Finding next page that is not hidden by conditional logic - while(RGFormsModel::is_page_hidden($form, $page_number, $field_values)){ - $page_number += $direction; - } + if ( rgar( $choice, 'isSelected' ) && $input_type == 'select' ) { + $val = $is_pricing_field && $field->type != 'quantity' ? $choice['value'] . '|' . GFCommon::to_number( rgar( $choice, 'price' ) ): $choice['value']; + $default_values[ $field->id ] = $val; + } else if ( rgar( $choice, 'isSelected' ) ) { + if ( ! isset( $default_values[ $field->id ] ) ) { + $default_values[ $field->id ] = array(); + } - //If all following pages are hidden, submit the form - if($page_number > self::get_max_page_number($form)) - $page_number = 0; + $default_values[ $field->id ][] = "choice_{$form['id']}_{$field->id}_{$choice_index}"; + } + $choice_index ++; + } + } else if ( ! empty( $field_val ) ) { + + if ( GFFormsModel::get_input_type( $field ) == 'date' ) { + //format date + $format = empty( $field->dateFormat ) ? 'mdy' : esc_attr( $field->dateFormat ); + $date_info = GFcommon::parse_date( $field_val, $format ); + switch ( $format ) { + case 'mdy': + $field_val = $date_info['month'] . '/' . $date_info['day'] . '/' . $date_info['year']; + break; + case 'dmy': + $field_val = $date_info['day'] . '/' . $date_info['month'] . '/' . $date_info['year']; + break; + case 'ymd': + $field_val = $date_info['year'] . '/' . $date_info['month'] . '/' . $date_info['day']; + break; + } + } + $default_values[ $field->id ] = $field_val; + } + } - return $page_number; - } + $button_conditional_script = ''; - public static function get_source_page($form_id){ - $page_number = RGForms::post("gform_source_page_number_{$form_id}"); - return !is_numeric($page_number) ? 1 : $page_number; - } + //adding form button conditional logic if enabled + if ( isset( $form['button']['conditionalLogic'] ) ) { + $logics .= '0: ' . GFCommon::json_encode( array( 'field' => $form['button']['conditionalLogic'], 'section' => null ) ) . ','; + $dependents .= '0: ' . GFCommon::json_encode( array( 0 ) ) . ','; + $fields_with_logic[] = 0; - public static function set_current_page($form_id, $page_number){ - self::$submission[$form_id]["page_number"] = $page_number; - } + $button_conditional_script = "jQuery('#gform_{$form['id']}').submit(" . + "function(event, isButtonPress){" . + " var visibleButton = jQuery('.gform_next_button:visible, .gform_button:visible, .gform_image_button:visible');" . + " return visibleButton.length > 0 || isButtonPress == true;" . + "}" . + ");"; + } - public static function get_current_page($form_id){ - $page_number = isset(self::$submission[$form_id]) ? intval(self::$submission[$form_id]["page_number"]) : 1; - return $page_number; - } + if ( ! empty( $logics ) ) { + $logics = substr( $logics, 0, strlen( $logics ) - 1 ); + } //removing last comma; - private static function is_page_active($form_id, $page_number){ - return intval(self::get_current_page($form_id)) == intval($page_number); - } - - /** - * Determine if the last page for the current form object is being submitted or rendered (depending on the provided $mode). - * - * @param array $form A Gravity Forms form object. - * @param string $mode Mode to check for: 'submit' or 'render' - * @return boolean - */ - public static function is_last_page( $form, $mode = 'submit' ) { - - $page_number = self::get_source_page( $form['id'] ); - $field_values = GFForms::post( 'gform_field_values' ); - $target_page = self::get_target_page( $form, $page_number, $field_values ); - - if( $mode == 'render' ) { - $is_last_page = $target_page == self::get_max_page_number( $form ); - } else { - $is_last_page = (string) $target_page === '0'; - } - - return $is_last_page; - } - - private static function get_limit_period_dates($period){ - if(empty($period)) - return array("start_date" => null, "end_date" => null); - - switch($period){ - case "day" : - return array( - "start_date" => gmdate("Y-m-d"), - "end_date" => gmdate("Y-m-d 23:59:59")); - break; - - case "week" : - return array( - "start_date" => gmdate("Y-m-d", strtotime("Monday this week")), - "end_date" => gmdate("Y-m-d 23:59:59", strtotime("next Sunday"))); - break; - - case "month" : - $month_start = gmdate("Y-m-1"); - return array( - "start_date" => $month_start, - "end_date" => gmdate("Y-m-d H:i:s", strtotime("{$month_start} +1 month -1 second"))); - break; - - case "year" : - return array( - "start_date" => gmdate("Y-1-1"), - "end_date" => gmdate("Y-12-31 23:59:59")); - break; - } - } - - public static function get_form($form_id, $display_title=true, $display_description=true, $force_display=false, $field_values=null, $ajax=false, $tabindex = 1){ - - - //looking up form id by form name - if(!is_numeric($form_id)) - $form_id = RGFormsModel::get_form_id($form_id); - - //reading form metadata - $form = RGFormsModel::get_form_meta($form_id, true); - $form = RGFormsModel::add_default_properties($form); - - //disable ajax if form has a reCAPTCHA field (not supported). - if($ajax && self::has_recaptcha_field($form)) - $ajax = false; - - $is_postback = false; - $is_valid = true; - $confirmation_message = ""; - $page_number = 1; - - $view_counter_disabled = apply_filters( 'gform_disable_view_counter', false ); - $view_counter_disabled = apply_filters( "gform_disable_view_counter_{$form_id}", $view_counter_disabled ); - - //If form was submitted, read variables set during form submission procedure - $submission_info = isset(self::$submission[$form_id]) ? self::$submission[$form_id] : false; - if($submission_info){ - $is_postback = true; - $is_valid = rgar($submission_info, "is_valid") || rgar($submission_info, "is_confirmation"); - $form = $submission_info["form"]; - $lead = $submission_info["lead"]; - $confirmation_message = rgget("confirmation_message", $submission_info); - - if($is_valid && !RGForms::get("is_confirmation", $submission_info)){ - - if($submission_info["page_number"] == 0){ - //post submission hook - do_action("gform_post_submission", $lead, $form); - do_action("gform_post_submission_{$form["id"]}", $lead, $form); - } - else{ - //change page hook - do_action("gform_post_paging", $form, $submission_info["source_page_number"], $submission_info["page_number"]); - do_action("gform_post_paging_{$form["id"]}", $form, $submission_info["source_page_number"], $submission_info["page_number"]); - } - } - } - else if(!current_user_can("administrator") && !$view_counter_disabled){ - RGFormsModel::insert_form_view($form_id, $_SERVER['REMOTE_ADDR']); - } - - if(rgar($form,"enableHoneypot")) - $form["fields"][] = self::get_honeypot_field($form); - - //Fired right before the form rendering process. Allow users to manipulate the form object before it gets displayed in the front end - $form = apply_filters( "gform_pre_render_{$form_id}", apply_filters( 'gform_pre_render', $form, $ajax, $field_values ), $ajax, $field_values ); - - if($form == null) - return "

    " . __("Oops! We could not locate your form.", "gravityforms") . "

    "; - - $has_pages = self::has_pages($form); - - //calling tab index filter - GFCommon::$tab_index = apply_filters("gform_tabindex_{$form_id}", apply_filters("gform_tabindex", $tabindex, $form), $form); - - //Don't display inactive forms - if(!$force_display && !$is_postback) { - - $form_info = RGFormsModel::get_form($form_id); - if(!$form_info->is_active) - return ""; - - // If form requires login, check if user is logged in - if(rgar($form, "requireLogin")) { - if(!is_user_logged_in()) - return empty($form["requireLoginMessage"]) ? "

    " . __("Sorry. You must be logged in to view this form.", "gravityforms"). "

    " : "

    " . GFCommon::gform_do_shortcode($form["requireLoginMessage"]) . "

    "; - } - - } - - // show the form regardless of the following validations when force display is set to true - if(!$force_display || $is_postback) { - - $form_schedule_validation = self::validate_form_schedule($form); - - // if form schedule validation fails AND this is not a postback, display the validation error - // if form schedule validation fails AND this is a postback, make sure is not a valid submission (enables display of confirmation message) - if( ($form_schedule_validation && !$is_postback) || ($form_schedule_validation && $is_postback && !$is_valid) ) - return $form_schedule_validation; + if ( ! empty( $dependents ) ) { + $dependents = substr( $dependents, 0, strlen( $dependents ) - 1 ); + } //removing last comma; - $entry_limit_validation = self::validate_entry_limit($form); + $animation = rgar( $form, 'enableAnimation' ) ? '1' : '0'; + global $wp_locale; + $number_format = $wp_locale->number_format['decimal_point'] == ',' ? 'decimal_comma' : 'decimal_dot'; - // refer to form schedule condition notes above - if( ($entry_limit_validation && !$is_postback) || ($entry_limit_validation && $is_postback && !$is_valid) ) - return $entry_limit_validation; + $str = "if(window['jQuery']){" . - } + "if(!window['gf_form_conditional_logic'])" . + "window['gf_form_conditional_logic'] = new Array();" . + "window['gf_form_conditional_logic'][{$form['id']}] = {'logic' : {" . $logics . " }, 'dependents' : {" . $dependents . " }, 'animation' : " . $animation . " , 'defaults' : " . json_encode( $default_values ) . ' }; ' . + "if(!window['gf_number_format'])" . + "window['gf_number_format'] = '" . $number_format . "';" . - $form_string = ""; + "jQuery(document).ready(function(){" . + "gf_apply_rules({$form['id']}, " . json_encode( $fields_with_logic ) . ', true);' . + "jQuery('#gform_wrapper_{$form['id']}').show();" . + "jQuery(document).trigger('gform_post_conditional_logic', [{$form['id']}, null, true]);" . + $button_conditional_script . - //When called via a template, this will enqueue the proper scripts - //When called via a shortcode, this will be ignored (too late to enqueue), but the scripts will be enqueued via the enqueue_scripts event - self::enqueue_form_scripts($form, $ajax); + "} );" . - if(empty($confirmation_message)){ - $wrapper_css_class = GFCommon::get_browser_class() . " gform_wrapper"; + "} "; - if(!$is_valid) - $wrapper_css_class .=" gform_validation_error"; + return $str; + } - //Hidding entire form if conditional logic is on to prevent "hidden" fields from blinking. Form will be set to visible in the conditional_logic.php after the rules have been applied. - $style = self::has_conditional_logic($form) ? "style='display:none'" : ""; - $custom_wrapper_css_class = !empty($form["cssClass"]) ? " {$form["cssClass"]}_wrapper": ""; - $form_string .= " -
    "; - $action = add_query_arg(array()); - $default_anchor = $has_pages || $ajax ? true : false; - $use_anchor = apply_filters("gform_confirmation_anchor_{$form["id"]}", apply_filters("gform_confirmation_anchor", $default_anchor)); - if($use_anchor !== false){ - $form_string .=""; - $action .= "#gf_$form_id"; - } - $target = $ajax ? "target='gform_ajax_frame_{$form_id}'" : ""; - - $form_css_class = !empty($form["cssClass"]) ? "class='{$form["cssClass"]}'": ""; + /** + * Enqueue and retrieve all inline scripts that should be executed when the form is rendered. + * Use add_init_script() function to enqueue scripts. + * + * @param array $form + * @param array $field_values + * @param bool $is_ajax + */ + private static function register_form_init_scripts( $form, $field_values = array(), $is_ajax = false ) { + + // adding conditional logic script if conditional logic is configured for this form. + // get_conditional_logic also adds the chosen script for the enhanced dropdown option. + // if this form does not have conditional logic, add chosen script separately + if ( self::has_conditional_logic( $form ) ) { + self::add_init_script( $form['id'], 'conditional_logic', self::ON_PAGE_RENDER, self::get_conditional_logic( $form, $field_values ) ); + } - $action = esc_url($action); - $form_string .= apply_filters("gform_form_tag_{$form_id}", apply_filters("gform_form_tag", "
    ", $form), $form); + //adding currency config if there are any product fields in the form + if ( self::has_price_field( $form ) ) { + self::add_init_script( $form['id'], 'pricing', self::ON_PAGE_RENDER, self::get_pricing_init_script( $form ) ); + } - if($display_title || $display_description){ - $form_string .= " -
    "; - if($display_title){ - $form_string .= " -

    " . $form['title'] . "

    "; - } - if($display_description){ - $form_string .= " - " . rgar($form,'description') .""; - } - $form_string .= " -
    "; - } - - $current_page = self::get_current_page($form_id); - if($has_pages && !IS_ADMIN){ - $page_count = self::get_max_page_number($form); - - if($form["pagination"]["type"] == "percentage"){ - $form_string .= self::get_progress_bar($form, $form_id,$confirmation_message); - } - else if($form["pagination"]["type"] == "steps"){ - $form_string .=" -
    "; - $pages = isset($form["pagination"]["pages"]) ? $form["pagination"]["pages"] : array(); - for($i=0, $count = sizeof($pages); $i<$count; $i++){ - $step_number = $i+1; - $active_class = $step_number == $current_page ? " gf_step_active" : ""; - $first_class = $i==0 ? " gf_step_first" : ""; - $last_class = $i+1 == $count ? " gf_step_last" : ""; - $complete_class = $step_number < $current_page ? " gf_step_completed" : ""; - $previous_class = $step_number + 1 == $current_page ? " gf_step_previous" : ""; - $next_class = $step_number - 1 == $current_page ? " gf_step_next" : ""; - $pending_class = $step_number > $current_page ? " gf_step_pending" : ""; - $classes = "gf_step" . $active_class . $first_class . $last_class . $complete_class . $previous_class . $next_class . $pending_class; - - $classes = GFCommon::trim_all($classes); - - $form_string .=" -
    {$step_number} {$pages[$i]}
    "; - } - - $form_string .=" -
    -
    "; - } - } + if ( self::has_password_strength( $form ) ) { + $password_script = self::get_password_strength_init_script( $form ); + self::add_init_script( $form['id'], 'password', self::ON_PAGE_RENDER, $password_script ); + } + if ( self::has_enhanced_dropdown( $form ) ) { + $chosen_script = self::get_chosen_init_script( $form ); + self::add_init_script( $form['id'], 'chosen', self::ON_PAGE_RENDER, $chosen_script ); + self::add_init_script( $form['id'], 'chosen', self::ON_CONDITIONAL_LOGIC, $chosen_script ); + } - if($is_postback && !$is_valid){ - $validation_message = "
    " . __("There was a problem with your submission.", "gravityforms") . " " . __("Errors have been highlighted below.", "gravityforms") . "
    "; - $form_string .= apply_filters("gform_validation_message_{$form["id"]}", apply_filters("gform_validation_message", $validation_message, $form), $form); - } + if ( self::has_character_counter( $form ) ) { + self::add_init_script( $form['id'], 'character_counter', self::ON_PAGE_RENDER, self::get_counter_init_script( $form ) ); + } - $form_string .= " -
    "; + if ( self::has_input_mask( $form ) ) { + self::add_init_script( $form['id'], 'input_mask', self::ON_PAGE_RENDER, self::get_input_mask_init_script( $form ) ); + } - //add first page if this form has any page fields - if($has_pages){ - $style = self::is_page_active($form_id, 1) ? "" : "style='display:none;'"; - $class = !empty($form["firstPageCssClass"]) ? " {$form["firstPageCssClass"]}" : ""; - $form_string .= "
    -
    "; - } - - $description_class = rgar($form,"descriptionPlacement") == "above" ? "description_above" : "description_below"; - - $form_string .= " -
      "; - - if(is_array($form['fields'])) - { - foreach($form['fields'] as $field){ - $field["conditionalLogicFields"] = self::get_conditional_logic_fields($form, $field["id"]); - $form_string .= self::get_field($field, RGFormsModel::get_field_value($field, $field_values), false, $form, $field_values); - } - } - $form_string .= " -
    "; - - if($has_pages){ - $previous_button = self::get_form_button($form["id"], "gform_previous_button_{$form["id"]}", $form["lastPageButton"], __("Previous", "gravityforms"), "gform_previous_button", __("Previous Page", "gravityforms"), self::get_current_page($form_id) -1); - $previous_button = apply_filters("gform_previous_button", $previous_button, $form); - $previous_button = apply_filters("gform_previous_button_{$form["id"]}", $previous_button, $form); - $form_string .= "
    " . self::gform_footer($form, "gform_page_footer " . $form['labelPlacement'], $ajax, $field_values, $previous_button, $display_title, $display_description, $is_postback) . " -
    "; //closes gform_page - } - - $form_string .= "
    "; //closes gform_body - - //suppress form footer for multi-page forms (footer will be included on the last page - if(!$has_pages) - $form_string .= self::gform_footer($form, "gform_footer " . $form['labelPlacement'], $ajax, $field_values, "", $display_title, $display_description, $tabindex); - - $form_string .= " -
    -
    "; + if ( self::has_calculation_field( $form ) ) { + self::add_init_script( $form['id'], 'calculation', self::ON_PAGE_RENDER, self::get_calculations_init_script( $form ) ); + } - if($ajax && $is_postback){ - global $wp_scripts; + if ( self::has_currency_format_number_field( $form ) ) { + self::add_init_script( $form['id'], 'currency_format', self::ON_PAGE_RENDER, self::get_currency_format_init_script( $form ) ); + } - $form_string = apply_filters('gform_ajax_iframe_content', "" . - "" . $form_string . ""); + if ( self::has_currency_copy_values_option( $form ) ) { + self::add_init_script( $form['id'], 'copy_values', self::ON_PAGE_RENDER, self::get_copy_values_init_script( $form ) ); + } - } + if ( self::has_placeholder( $form ) ) { + self::add_init_script( $form['id'], 'placeholders', self::ON_PAGE_RENDER, self::get_placeholders_init_script( $form ) ); + } - if($ajax && !$is_postback){ - $spinner_url = apply_filters("gform_ajax_spinner_url_{$form_id}", apply_filters("gform_ajax_spinner_url", GFCommon::get_base_url() . "/images/spinner.gif", $form), $form); - $scroll_position = array('default' => '', 'confirmation' => ''); + if ( isset( $form['fields'] ) && is_array( $form['fields'] ) ) { + foreach ( $form['fields'] as $field ) { + /* @var GF_Field $field */ + if ( is_subclass_of( $field, 'GF_Field' ) ) { + $field->register_form_init_scripts( $form ); + } + } + } - if($use_anchor !== false) { - $scroll_position['default'] = is_numeric($use_anchor) ? "jQuery(document).scrollTop(" . intval($use_anchor) . ");" : "jQuery(document).scrollTop(jQuery('#gform_wrapper_{$form_id}').offset().top);"; - $scroll_position['confirmation'] = is_numeric($use_anchor) ? "jQuery(document).scrollTop(" . intval($use_anchor) . ");" : "jQuery(document).scrollTop(jQuery('#gforms_confirmation_message').offset().top);"; - } + do_action( 'gform_register_init_scripts', $form, $field_values, $is_ajax ); + do_action( 'gform_register_init_scripts_' . $form['id'], $form, $field_values, $is_ajax ); - $iframe_style = defined( 'GF_DEBUG' ) && GF_DEBUG ? 'display:block;width:600px;height:300px;border:1px solid #eee;' : 'display:none;width:0px;height:0px;'; + } - $form_string .=" - - "; - } - - $is_first_load = !$is_postback; - - if((!$ajax || $is_first_load)) { - - self::register_form_init_scripts( $form, $field_values, $ajax ); - - if(apply_filters("gform_init_scripts_footer", false)){ - add_action("wp_footer", create_function('', 'GFFormDisplay::footer_init_scripts(' . $form['id'] . ');'), 20); - add_action("gform_preview_footer", create_function('', 'GFFormDisplay::footer_init_scripts(' . $form['id'] . ');')); - } - else{ - $form_string .= self::get_form_init_scripts($form); - $form_string .= ""; - } - } - - return apply_filters("gform_get_form_filter_{$form["id"]}",apply_filters('gform_get_form_filter',$form_string, $form), $form); - } - else{ - $progress_confirmation = ""; + public static function get_form_init_scripts( $form ) { - //check admin setting for whether the progress bar should start at zero - $start_at_zero = rgars($form, "pagination/display_progressbar_on_confirmation"); - $start_at_zero = apply_filters("gform_progressbar_start_at_zero", $start_at_zero, $form); - - //show progress bar on confirmation - if( $start_at_zero && $has_pages && ! IS_ADMIN && ( $form["confirmation"]["type"] == "message" && $form["pagination"]["type"] == "percentage" ) ) - { - $progress_confirmation = self::get_progress_bar($form, $form_id,$confirmation_message); - if($ajax) - $progress_confirmation = "" . $progress_confirmation . ""; - - } - else - { - //return regular confirmation message - if($ajax) - { - $progress_confirmation = apply_filters('gform_ajax_iframe_content', "" . $confirmation_message . ""); - } - else - { - $progress_confirmation = $confirmation_message; - } - } - - return $progress_confirmation; - } - } - - public static function footer_init_scripts($form_id){ - global $_init_forms; - - $form = RGFormsModel::get_form_meta($form_id); - $form_string = self::get_form_init_scripts($form); - $current_page = self::get_current_page($form_id); - $form_string .= ""; - - $form_string = apply_filters( 'gform_footer_init_scripts_filter', $form_string, $form, $current_page ); - $form_string = apply_filters( 'gform_footer_init_scripts_filter_' . $form['id'], $form_string, $form, $current_page ); - - if(!isset($_init_forms[$form_id])){ - echo $form_string; - if(!is_array($_init_forms)) - $_init_forms = array(); - - $_init_forms[$form_id] = true; - } - } - - public static function add_init_script($form_id, $script_name, $location, $script){ - $key = $script_name . "_" . $location; - - if(!isset(self::$init_scripts[$form_id])) - self::$init_scripts[$form_id] = array(); - - //add script if it hasn't been added before - if(!array_key_exists($key, self::$init_scripts[$form_id])) - self::$init_scripts[$form_id][$key] = array("location" => $location, "script" => $script); - } - - private static function get_form_button($form_id, $button_input_id, $button, $default_text, $class, $alt, $target_page_number){ - $tabindex = GFCommon::get_tabindex(); - $input_type='submit'; - $onclick=""; - if(!empty($target_page_number)){ - $onclick = "onclick='jQuery(\"#gform_target_page_number_{$form_id}\").val(\"{$target_page_number}\"); jQuery(\"#gform_{$form_id}\").trigger(\"submit\",[true]); '"; - $input_type='button'; - } - else{ - //to prevent multiple form submissions when button is pressed multiple times - if(GFFormsModel::is_html5_enabled()) - $set_submitting = "if( !jQuery(\"#gform_{$form_id}\")[0].checkValidity || jQuery(\"#gform_{$form_id}\")[0].checkValidity()){window[\"gf_submitting_{$form_id}\"]=true;}"; - else - $set_submitting = "window[\"gf_submitting_{$form_id}\"]=true;"; - - $onclick="onclick='if(window[\"gf_submitting_{$form_id}\"]){return false;} $set_submitting '"; - } - - if($button["type"] == "text" || empty($button["imageUrl"])){ - $class .= ' button'; - $button_text = !empty($button["text"]) ? $button["text"] : $default_text; - $button_input = ""; - } - else{ - $imageUrl = $button["imageUrl"]; - $class .= ' gform_image_button'; - $button_input= ""; - } - return $button_input; - } - - private static function gform_footer($form, $class, $ajax, $field_values, $previous_button, $display_title, $display_description, $tabindex = 1){ - $form_id = $form["id"]; - $footer = " -
    "; - $button_input = self::get_form_button($form["id"], "gform_submit_button_{$form["id"]}", $form["button"], __("Submit", "gravityforms"), "gform_button", __("Submit", "gravityforms"), 0); - $button_input = apply_filters("gform_submit_button", $button_input, $form); - $button_input = apply_filters("gform_submit_button_{$form_id}", $button_input, $form); - $footer .= $previous_button . " " . $button_input; - - if($ajax){ - $footer .= ""; - } - - $current_page = self::get_current_page($form_id); - $next_page = $current_page + 1; - $next_page = $next_page > self::get_max_page_number($form) ? 0 : $next_page; - $field_values_str = is_array($field_values) ? http_build_query($field_values) : $field_values; - $files_input = ""; - if(GFCommon::has_multifile_fileupload_field($form) || !empty(RGFormsModel::$uploaded_files[$form_id])){ - $files = !empty(RGFormsModel::$uploaded_files[$form_id]) ? GFCommon::json_encode(RGFormsModel::$uploaded_files[$form_id]) : ""; - $files_input = ""; - } - - $footer .=" - - - - - - - - {$files_input} -
    "; + $script_string = ''; - return $footer; - } - - private static function get_max_page_number($form){ - $page_number = 0; - foreach($form["fields"] as $field){ - if($field["type"] == "page"){ - $page_number++; - } - } - return $page_number == 0 ? 0 : $page_number + 1; - } - - - private static function get_honeypot_field($form){ - $max_id = self::get_max_field_id($form); - $labels = self::get_honeypot_labels(); - return array("type" => "honeypot", "label" => $labels[rand(0, 3)], "id" => $max_id + 1, "cssClass" => "gform_validation_container", "description" => __("This field is for validation purposes and should be left unchanged.", "gravityforms")); - } - - private static function get_max_field_id($form){ - $max = 0; - foreach($form["fields"] as $field){ - if(floatval($field["id"]) > $max) - $max = floatval($field["id"]); - } - return $max; - } - - private static function get_honeypot_labels(){ - return array("Name", "Email", "Phone", "Comments"); - } - - public static function is_empty($field, $form_id=0){ - - if(empty($_POST["is_submit_" . $field["formId"]])){ - return true; - } - - switch(RGFormsModel::get_input_type($field)){ - case "post_image" : - case "fileupload" : - $input_name = "input_" . $field["id"]; - - if(rgar($field, "multipleFiles")){ - $uploaded_files = GFFormsModel::$uploaded_files[$form_id]; - $file_info = rgar($uploaded_files, $input_name); - return empty($file_info); - } else { - $file_info = GFFormsModel::get_temp_filename($form_id, $input_name); - return !$file_info && empty($_FILES[$input_name]['name']); - } - break; - - case "list" : - $value = rgpost("input_" . $field["id"]); - if(is_array($value)){ - //empty if all inputs are empty (for inputs with the same name) - foreach($value as $input){ - if(strlen(trim($input)) > 0 ) - return false; - } - } - - return true; - - } - - if(is_array($field["inputs"])) - { - foreach($field["inputs"] as $input){ - $value = rgpost("input_" . str_replace('.', '_', $input["id"])); - if(is_array($value) && !empty($value)){ - return false; - } - - $strlen = strlen(trim($value)); - if(!is_array($value) && strlen(trim($value)) > 0) - return false; - } - return true; - } - else{ - $value = rgpost("input_" . $field["id"]); - if(is_array($value)){ - //empty if any of the inputs are empty (for inputs with the same name) - foreach($value as $input){ - if(strlen(trim($input)) <= 0 ) - return true; - } - return false; - } - else if($field["enablePrice"]){ - list($label, $price) = explode("|", $value); - $is_empty = (strlen(trim($price)) <= 0); - return $is_empty; - } - else{ - $is_empty = (strlen(trim($value)) <= 0) || ($field["type"] == "post_category" && $value < 0); - return $is_empty; - } - } - } - - - /** - * Validates the range of the number according to the field settings. - * - * @param array $field - * @param array $value A decimal_dot formatted string - * @return true|false True on valid or false on invalid - */ - private static function validate_range($field, $value){ - - if( !GFCommon::is_numeric($value, "decimal_dot") ) - return false; - - if( (is_numeric($field["rangeMin"]) && $value < $field["rangeMin"]) || - (is_numeric($field["rangeMax"]) && $value > $field["rangeMax"]) - ) - return false; - else - return true; - } - - private static function validate_honeypot($form){ - $honeypot_id = self::get_max_field_id($form); - return rgempty("input_{$honeypot_id}"); - } - - public static function handle_submission($form, &$lead, $ajax=false){ - - $lead_id = apply_filters("gform_entry_id_pre_save_lead{$form["id"]}", apply_filters("gform_entry_id_pre_save_lead", null, $form), $form); - - if(!empty($lead_id)){ - if(empty($lead)){ - $lead = array(); - } - $lead["id"] = $lead_id; + // temporary solution for output gf_global obj until wp min version raised to 3.3 + if ( wp_script_is( 'gform_gravityforms' ) ) { + $gf_global_script = "if(typeof gf_global == 'undefined') " . GFCommon::gf_global( false ); } - //creating entry in DB - RGFormsModel::save_lead($form, $lead); + /* rendering initialization scripts */ + $init_scripts = rgar( self::$init_scripts, $form['id'] ); - //reading entry that was just saved - $lead = RGFormsModel::get_lead($lead["id"]); + if ( ! empty( $init_scripts ) ) { + $script_string = + "'; + } - RGFormsModel::set_current_lead($lead); + return $script_string; + } - if(!$is_spam){ - GFCommon::create_post($form, $lead); - //send notifications - GFCommon::send_form_submission_notifications($form, $lead); + public static function get_chosen_init_script( $form ) { + $chosen_fields = array(); + foreach ( $form['fields'] as $field ) { + $input_type = GFFormsModel::get_input_type( $field ); + if ( $field->enableEnhancedUI && in_array( $input_type, array( 'select', 'multiselect' ) ) ) { + $chosen_fields[] = "#input_{$form['id']}_{$field->id}"; + } } - self::clean_up_files($form); - - //display confirmation message or redirect to confirmation page - return self::handle_confirmation($form, $lead, $ajax); + return "gformInitChosenFields('" . implode( ',', $chosen_fields ) . "','" . esc_attr( apply_filters( "gform_dropdown_no_results_text_{$form['id']}", apply_filters( 'gform_dropdown_no_results_text', __( 'No results matched', 'gravityforms' ), $form['id'] ), $form['id'] ) ) . "');"; } - public static function clean_up_files($form){ - $unique_form_id = rgpost("gform_unique_id"); - if(!ctype_alnum($unique_form_id)) - return false; - $target_path = RGFormsModel::get_upload_path($form["id"]) . "/tmp/"; - $filename = $target_path . $unique_form_id . "_input_*"; - $files = glob($filename); - if (is_array($files)){ - array_map('unlink', $files); + public static function get_currency_format_init_script( $form ) { + $currency_fields = array(); + foreach ( $form['fields'] as $field ) { + if ( $field->numberFormat == 'currency' ) { + $currency_fields[] = "#input_{$form['id']}_{$field->id}"; + } } - // clean up file from abandoned submissions older than 48 hours - $files = glob($target_path."*"); - if (is_array($files)){ - foreach($files as $file) { - if(is_file($file) && time() - filemtime($file) >= 2*24*60*60) { - unlink($file); - } - } - } - } + return "gformInitCurrencyFormatFields('" . implode( ',', $currency_fields ) . "');"; + } - public static function handle_confirmation($form, $lead, $ajax=false){ + public static function get_copy_values_init_script( $form ) { + $script = "jQuery('.copy_values_activated').on('click', function(){ + var inputId = this.id.replace('_copy_values_activated', ''); + jQuery('#' + inputId).toggle(!this.checked); + });"; - GFCommon::log_debug("Sending confirmation"); + return $script; + } - //run the function to populate the legacy confirmation format to be safe - $form = self::update_confirmation($form, $lead); - - if($form["confirmation"]["type"] == "message"){ - $default_anchor = self::has_pages($form) ? 1 : 0; - $anchor = apply_filters("gform_confirmation_anchor_{$form["id"]}", apply_filters("gform_confirmation_anchor", $default_anchor)) ? "" : ""; - $nl2br = rgar($form["confirmation"],"disableAutoformat") ? false : true; - $cssClass = rgar($form, "cssClass"); - $confirmation = empty($form["confirmation"]["message"]) ? "{$anchor} " : "{$anchor}
    " . GFCommon::replace_variables($form["confirmation"]["message"], $form, $lead, false, true, $nl2br) . "
    "; - } - else{ - if ( ! empty( $form['confirmation']['pageId'] ) ) { - $url = get_permalink( $form['confirmation']['pageId'] ); + public static function get_placeholders_init_script( $form ) { - } else { - $url = GFCommon::replace_variables( trim( $form['confirmation']['url'] ), $form, $lead, false, true, true, 'text' ); + $script = "if(typeof Placeholders != 'undefined'){ + Placeholders.enable(); + }"; + + return $script; + } + + public static function get_counter_init_script( $form ) { + + $script = ''; + foreach ( $form['fields'] as $field ) { + $max_length = $field->maxLength; + $field_id = "input_{$form['id']}_{$field->id}"; + if ( ! empty( $max_length ) && ! $field->adminOnly ) { + $field_script = + "jQuery('#{$field_id}').textareaCount(" . + " {" . + " 'maxCharacterSize': {$max_length}," . + " 'originalStyle': 'ginput_counter'," . + " 'displayFormat' : '#input " . __( 'of', 'gravityforms' ) . ' #max ' . __( 'max characters', 'gravityforms' ) . "'" . + " } );"; + + $script .= apply_filters( "gform_counter_script_{$form['id']}", apply_filters( 'gform_counter_script', $field_script, $form['id'], $field_id, $max_length ), $form['id'], $field_id, $max_length ); } + } - $url_info = parse_url( $url ); - $query_string = rgar( $url_info, 'query' ); - $dynamic_query = GFCommon::replace_variables( trim( $form['confirmation']['queryString'] ), $form, $lead, true, false, false, 'text' ); - $query_string .= rgempty( 'query', $url_info ) || empty( $dynamic_query ) ? $dynamic_query : '&' . $dynamic_query; + return $script; + } + public static function get_pricing_init_script( $form ) { - if ( ! empty( $url_info['fragment'] ) ) { - $query_string .= '#' . rgar( $url_info, 'fragment' ); - } + if ( ! class_exists( 'RGCurrency' ) ) { + require_once( 'currency.php' ); + } - $url = $url_info['scheme'] . '://' . rgar( $url_info, 'host' ); - if ( ! empty( $url_info['port'] ) ) { - $url .= ':' . rgar( $url_info, 'port' ); - } + return "if(window[\"gformInitPriceFields\"]) jQuery(document).ready(function(){gformInitPriceFields();} );"; + } - $url .= rgar( $url_info, 'path' ); - if ( ! empty( $query_string ) ) { - $url .= "?{$query_string}"; - } + public static function get_password_strength_init_script( $form ) { + $field_script = "if(!window['gf_text']){window['gf_text'] = new Array();} window['gf_text']['password_blank'] = '" . __( 'Strength indicator', 'gravityforms' ) . "'; window['gf_text']['password_mismatch'] = '" . __( 'Mismatch', 'gravityforms' ) . "';window['gf_text']['password_bad'] = '" . __( 'Bad', 'gravityforms' ) . "'; window['gf_text']['password_short'] = '" . __( 'Short', 'gravityforms' ) . "'; window['gf_text']['password_good'] = '" . __( 'Good', 'gravityforms' ) . "'; window['gf_text']['password_strong'] = '" . __( 'Strong', 'gravityforms' ) . "';"; - if ( headers_sent() || $ajax ) { - //Perform client side redirect for AJAX forms, of if headers have already been sent - $confirmation = self::get_js_redirect_confirmation( $url, $ajax ); - } else { - $confirmation = array( 'redirect' => $url ); + foreach ( $form['fields'] as $field ) { + if ( $field->type == 'password' && $field->passwordStrengthEnabled ) { + $field_id = "input_{$form['id']}_{$field->id}"; + $field_script .= "gformShowPasswordStrength(\"$field_id\");"; } - } + } - $confirmation = apply_filters("gform_confirmation_{$form["id"]}", apply_filters("gform_confirmation", $confirmation, $form, $lead, $ajax), $form, $lead, $ajax); + return $field_script; + } - if(!is_array($confirmation)){ - $confirmation = GFCommon::gform_do_shortcode($confirmation); //enabling shortcodes - } - else if(headers_sent() || $ajax){ - //Perform client side redirect for AJAX forms, of if headers have already been sent - $confirmation = self::get_js_redirect_confirmation($confirmation["redirect"], $ajax); //redirecting via client side - } + public static function get_input_mask_init_script( $form ) { - GFCommon::log_debug("Confirmation: " . print_r($confirmation, true)); + $script_str = ''; - return $confirmation; - } - - private static function get_js_redirect_confirmation($url, $ajax){ - $confirmation = ""; - - return $confirmation; - } - - public static function send_emails($form, $lead){ - _deprecated_function("send_emails", "1.7", "GFCommon::send_form_submission_notifications"); - GFCommon::send_form_submission_notifications($form, $lead); - } - - public static function checkdate($month, $day, $year){ - if(empty($month) || !is_numeric($month) || empty($day) || !is_numeric($day) || empty($year) || !is_numeric($year) || strlen($year) != 4) - return false; - - return checkdate($month, $day, $year); - } - - public static function validate(&$form, $field_values, $page_number=0, &$failed_validation_page=0){ - - $form = apply_filters('gform_pre_validation', $form); - - // validate form schedule - if(self::validate_form_schedule($form)) - return false; - - // validate entry limit - if(self::validate_entry_limit($form)) - return false; - - if(empty($_POST["is_submit_" . $form["id"]])){ - return false; - } - - foreach($form["fields"] as &$field){ - - //If a page number is specified, only validates fields that are on current page - $field_in_other_page = $page_number > 0 && $field["pageNumber"] != $page_number; - - //validate fields with "no duplicate" functionality when they are present on pages before the current page. - $validate_duplicate_feature = $field["noDuplicates"] && $page_number > 0 && $field["pageNumber"] <= $page_number; - - //if(($page_number > 0 && $field["pageNumber"] != $page_number) && $field["noDuplicates"] <> "1"){ - if($field_in_other_page && !$validate_duplicate_feature){ - continue; - } - - //ignore validation if field is hidden or admin only - if(RGFormsModel::is_field_hidden($form, $field, $field_values) || $field["adminOnly"]){ - continue; - } - - $value = RGFormsModel::get_field_value($field); - - //display error message if field is marked as required and the submitted value is empty - if($field["isRequired"] && self::is_empty($field, $form["id"])){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("This field is required.", "gravityforms") : $field["errorMessage"]; - } - //display error if field does not allow duplicates and the submitted value already exists - else if($field["noDuplicates"] && RGFormsModel::is_duplicate($form["id"], $field, $value)){ - $field["failed_validation"] = true; - //set page number so the failed field displays if on multi-page form - $failed_validation_page = $field["pageNumber"]; - - $input_type = RGFormsModel::get_input_type($field); - switch($input_type){ - case "date" : - $default_message = __("This date has already been taken. Please select a new date.", "gravityforms"); - break; - - default: - $default_message = is_array($value) ? __("This field requires a unique entry and the values you entered have been already been used.", "gravityforms") : - sprintf(__("This field requires a unique entry and '%s' has already been used", "gravityforms"), $value); - break; - } - - $field["validation_message"] = apply_filters( "gform_duplicate_message_{$form["id"]}", apply_filters("gform_duplicate_message", $default_message, $form, $field, $value ), $form, $field, $value ); - - } - else{ - if(self::failed_state_validation($form["id"], $field, $value)){ - $field["failed_validation"] = true; - $field["validation_message"] = in_array($field["inputType"], array("singleproduct", "singleshipping", "hiddenproduct")) ? __("Please enter a valid value.", "gravityforms") : __("Invalid selection. Please select one of the available choices.", "gravityforms"); - } - else{ - switch(RGFormsModel::get_input_type($field)){ - case "password" : - $password = $_POST["input_" . $field["id"]]; - $confirm = $_POST["input_" . $field["id"] . "_2"]; - if($password != $confirm){ - $field["failed_validation"] = true; - $field["validation_message"] = __("Your passwords do not match.", "gravityforms"); - } - else if(rgar($field,"passwordStrengthEnabled") && !rgempty("minPasswordStrength",$field) && !empty($password)){ - $strength = $_POST["input_" . $field["id"] . "_strength"]; - - $levels = array("short" => 1, "bad" => 2, "good" => 3, "strong" => 4); - if($levels[$strength] < $levels[$field["minPasswordStrength"]]){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("Your password does not meet the required strength.
    Hint: To make it stronger, use upper and lower case letters, numbers and symbols like ! \" ? $ % ^ & ).", "gravityforms") : $field["errorMessage"]; - } - } - break; - - case "name" : - if($field["isRequired"] && $field["nameFormat"] != "simple") - { - $first = $_POST["input_" . $field["id"] . "_3"]; - $last = $_POST["input_" . $field["id"] . "_6"]; - if(empty($first) || empty($last)){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("This field is required. Please enter the first and last name.", "gravityforms") : $field["errorMessage"]; - } - } - - break; - - case "address" : - if($field["isRequired"]) - { - $street = $_POST["input_" . $field["id"] . "_1"]; - $city = $_POST["input_" . $field["id"] . "_3"]; - $state = $_POST["input_" . $field["id"] . "_4"]; - $zip = $_POST["input_" . $field["id"] . "_5"]; - $country = $_POST["input_" . $field["id"] . "_6"]; - if(empty($street) || empty($city) || empty($zip) || (empty($state) && !$field["hideState"] ) || (empty($country) && !$field["hideCountry"])){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("This field is required. Please enter a complete address.", "gravityforms") : $field["errorMessage"]; - } - } - - break; - - case "creditcard" : - $card_number = rgpost("input_" . $field["id"] . "_1"); - $expiration_date = rgpost("input_" . $field["id"] . "_2"); - $security_code = rgpost("input_" . $field["id"] . "_3"); - - if(rgar($field, "isRequired") && (empty($card_number) || empty($security_code) || empty($expiration_date[0]) || empty($expiration_date[1]))){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("Please enter your credit card information.", "gravityforms") : $field["errorMessage"]; - } - else if(!empty($card_number)){ - $card_type = GFCommon::get_card_type($card_number); - $security_code = rgpost("input_" . $field["id"] . "_3"); - - if(empty($security_code)){ - $field["failed_validation"] = true; - $field["validation_message"] = __("Please enter your card's security code.", "gravityforms"); - } - else if(!$card_type){ - $field["failed_validation"] = true; - $field["validation_message"] = __("Invalid credit card number.", "gravityforms"); - } - else if(!GFCommon::is_card_supported($field, $card_type["slug"])){ - $field["failed_validation"] = true; - $field["validation_message"] = $card_type["name"] . " " . __("is not supported. Please enter one of the supported credit cards.", "gravityforms"); - } - } - break; - - case "email" : - if(!rgblank($value) && !GFCommon::is_valid_email($value)){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("Please enter a valid email address.", "gravityforms"): $field["errorMessage"]; - } - else if(rgget("emailConfirmEnabled", $field) && !empty($value)){ - $confirm = rgpost("input_" . $field["id"] . "_2"); - if($confirm != $value){ - $field["failed_validation"] = true; - $field["validation_message"] = __("Your emails do not match.", "gravityforms"); - } - } - break; - - case "donation" : - case "price" : - - if(!class_exists("RGCurrency")) - require_once("currency.php"); - - $donation = GFCommon::to_number($value); - if(!rgblank($value) && ($donation === false || $donation < 0)){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("Please enter a valid amount.", "gravityforms") : $field["errorMessage"]; - - } - break; - - case "number" : - - // the POST value has already been converted from currency or decimal_comma to decimal_dot and then cleaned in get_field_value() - - $value = GFCommon::maybe_add_leading_zero($value); - $raw_value = $_POST["input_" . $field["id"]]; //Raw value will be tested against the is_numeric() function to make sure it is in the right format. - - $requires_valid_number = !rgblank($raw_value) && !GFCommon::has_field_calculation($field); - $is_valid_number = self::validate_range($field, $value) && GFCommon::is_numeric($raw_value, $field["numberFormat"]); - - if( $requires_valid_number && !$is_valid_number ) { - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? GFCommon::get_range_message($field) : $field["errorMessage"]; - } - else if( $field['type'] == 'quantity' ) { - if( intval( $value ) != $value ) { - $field['failed_validation'] = true; - $field['validation_message'] = empty( $field['errorMessage'] ) ? __( 'Please enter a valid quantity. Quantity cannot contain decimals.', 'gravityforms' ) : $field['errorMessage']; - } else if( ! empty( $value ) && ( ! is_numeric( $value ) || intval( $value ) != floatval( $value ) || intval( $value ) < 0 ) ) { - $field['failed_validation'] = true; - $field['validation_message'] = empty( $field['errorMessage'] ) ? __( 'Please enter a valid quantity', 'gravityforms' ) : $field['errorMessage']; - } - } - - break; - - case "phone" : - - $regex = '/^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$/'; - if($field["phoneFormat"] == "standard" && $value !== "" && $value !== 0 && !preg_match($regex, $value)){ - $field["failed_validation"] = true; - if(!empty($field["errorMessage"])) - $field["validation_message"] = $field["errorMessage"]; - } - break; - - case "date" : - if(is_array($value) && rgempty(0, $value) && rgempty(1, $value)&& rgempty(2, $value)) - $value = null; - - if(!empty($value)){ - $format = empty($field["dateFormat"]) ? "mdy" : $field["dateFormat"]; - $date = GFCommon::parse_date($value, $format); - - if(empty($date) || !self::checkdate($date["month"], $date["day"], $date["year"])){ - $field["failed_validation"] = true; - $format_name = ""; - switch($format){ - case "mdy" : - $format_name = "mm/dd/yyyy"; - break; - case "dmy" : - $format_name = "dd/mm/yyyy"; - break; - case "dmy_dash" : - $format_name = "dd-mm-yyyy"; - break; - case "dmy_dot" : - $format_name = "dd.mm.yyyy"; - break; - case "ymd_slash" : - $format_name = "yyyy/mm/dd"; - break; - case "ymd_dash" : - $format_name = "yyyy-mm-dd"; - break; - case "ymd_dot" : - $format_name = "yyyy.mm.dd"; - break; - } - $message = $field["dateType"] == "datepicker" ? sprintf(__("Please enter a valid date in the format (%s).", "gravityforms"), $format_name) : __("Please enter a valid date.", "gravityforms"); - $field["validation_message"] = empty($field["errorMessage"]) ? $message : $field["errorMessage"]; - } - } - break; - - case "time" : - - //create variable values if time came in one field - if(!is_array($value) && !empty($value)){ - preg_match('/^(\d*):(\d*) ?(.*)$/', $value, $matches); - $value = array(); - $value[0] = $matches[1]; - $value[1] = $matches[2]; - } - - $hour = $value[0]; - $minute = $value[1]; - - if(empty($hour) && empty($minute)) - break; - - $is_valid_format = is_numeric($hour) && is_numeric($minute); - - $min_hour = rgar($field, "timeFormat") == "24" ? 0 : 1; - $max_hour = rgar($field, "timeFormat") == "24" ? 23 : 12; - - if(!$is_valid_format || $hour < $min_hour || $hour > $max_hour || $minute < 0 || $minute >= 60) - { - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("Please enter a valid time." , "gravityforms"): $field["errorMessage"]; - } - break; - - case "website" : - if(empty($value) || $value == "http://"){ - $value = ""; - if($field["isRequired"]){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("This field is required.", "gravityforms") : $field["errorMessage"]; - } - } - - if(!empty($value) && !GFCommon::is_valid_url($value)){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("Please enter a valid Website URL (i.e. http://www.gravityforms.com).", "gravityforms") : $field["errorMessage"]; - } - break; - - case "captcha" : - switch($field["captchaType"]){ - case "simple_captcha" : - if(class_exists("ReallySimpleCaptcha")){ - $prefix = $_POST["input_captcha_prefix_{$field["id"]}"]; - $captcha_obj = GFCommon::get_simple_captcha(); - - if(!$captcha_obj->check($prefix, str_replace(" ", "", $value))){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("The CAPTCHA wasn't entered correctly. Go back and try it again.", "gravityforms") : $field["errorMessage"]; - } - - //removes old files in captcha folder (older than 1 hour); - $captcha_obj->cleanup(); - } - break; - - case "math" : - $prefixes = explode(",", $_POST["input_captcha_prefix_{$field["id"]}"]); - $captcha_obj = GFCommon::get_simple_captcha(); - - //finding first number - $first = 0; - for($first=0; $first<10; $first++){ - if($captcha_obj->check($prefixes[0], $first)) - break; - } - - //finding second number - $second = 0; - for($second=0; $second<10; $second++){ - if($captcha_obj->check($prefixes[2], $second)) - break; - } - - //if it is a +, perform the sum - if($captcha_obj->check($prefixes[1], "+")) - $result = $first + $second; - else - $result = $first - $second; - - - if(intval($result) != intval($value)){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("The CAPTCHA wasn't entered correctly. Go back and try it again.", "gravityforms") : $field["errorMessage"]; - } - - //removes old files in captcha folder (older than 1 hour); - $captcha_obj->cleanup(); - - break; - - default : - if(!function_exists("recaptcha_get_html")){ - require_once(GFCommon::get_base_path() . '/recaptchalib.php'); - } - - $privatekey = get_option("rg_gforms_captcha_private_key"); - $resp = recaptcha_check_answer ($privatekey, - $_SERVER["REMOTE_ADDR"], - $_POST["recaptcha_challenge_field"], - $_POST["recaptcha_response_field"]); - - if (!$resp->is_valid) { - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("The reCAPTCHA wasn't entered correctly. Go back and try it again.", "gravityforms") : $field["errorMessage"]; - } - } - break; - - case "fileupload" : - case "post_image" : - $input_name = "input_" . $field["id"]; - - if(rgar($field, "multipleFiles")){ - $file_names = isset(GFFormsModel::$uploaded_files[$form["id"]][$input_name]) ? GFFormsModel::$uploaded_files[$form["id"]][$input_name] : array(); - } else { - $max_upload_size_in_bytes = isset($field["maxFileSize"]) && $field["maxFileSize"] > 0 ? $field["maxFileSize"] * 1048576: wp_max_upload_size(); - $max_upload_size_in_mb = $max_upload_size_in_bytes / 1048576; - if(!empty($_FILES[$input_name]["name"]) && $_FILES[$input_name]["error"] > 0){ - $uploaded_file_name = isset(GFFormsModel::$uploaded_files[$form["id"]][$input_name]) ? GFFormsModel::$uploaded_files[$form["id"]][$input_name] : ""; - if(empty($uploaded_file_name)){ - $field["failed_validation"] = true; - switch($_FILES[$input_name]["error"]){ - case UPLOAD_ERR_INI_SIZE : - case UPLOAD_ERR_FORM_SIZE : - $fileupload_validation_message = sprintf(__("File exceeds size limit. Maximum file size: %dMB", "gravityforms"), $max_upload_size_in_mb); - break; - default : - $fileupload_validation_message = sprintf(__("There was an error while uploading the file. Error code: %d", "gravityforms"), $_FILES[$input_name]["error"]); - } - $field["validation_message"] = empty($field["errorMessage"]) ? $fileupload_validation_message : $field["errorMessage"]; - break; - } - - } elseif ( $_FILES[ $input_name ]['size'] > 0 && $_FILES[ $input_name ]['size'] > $max_upload_size_in_bytes ) { - $field["failed_validation"] = true; - $field["validation_message"] = sprintf( __( 'File exceeds size limit. Maximum file size: %dMB', 'gravityforms' ), $max_upload_size_in_mb ); - } - $single_file_name = $_FILES[$input_name]["name"]; - $file_names = array(array("uploaded_filename" => $single_file_name)); - - } - - foreach($file_names as $file_name){ - $info = pathinfo(rgar($file_name, "uploaded_filename")); - $allowed_extensions = isset($field["allowedExtensions"]) && !empty($field["allowedExtensions"]) ? GFCommon::clean_extensions(explode(",", strtolower($field["allowedExtensions"]))) : array(); - - if( empty( $field["allowedExtensions"] ) && GFCommon::file_name_has_disallowed_extension( rgar( $file_name, 'uploaded_filename' ) ) ){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("The uploaded file type is not allowed.", "gravityforms") : $field["errorMessage"]; - } - else if(!empty($field["allowedExtensions"]) && !empty($info["basename"]) && ! GFCommon::match_file_extension( rgar( $file_name, 'uploaded_filename' ), $allowed_extensions )){ - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? sprintf(__("The uploaded file type is not allowed. Must be one of the following: %s", "gravityforms"), strtolower($field["allowedExtensions"]) ) : $field["errorMessage"]; - } - } + foreach ( $form['fields'] as $field ) { - break; - - case "calculation" : - case "singleproduct" : - case "hiddenproduct" : - $quantity_id = $field["id"] . ".3"; - $quantity = rgget($quantity_id, $value); - - if($field["isRequired"] && rgblank($quantity) && !rgar($field, "disableQuantity") ){ - $field["failed_validation"] = true; - $field["validation_message"] = rgempty("errorMessage", $field) ? __("This field is required.", "gravityforms") : rgar($field, "errorMessage"); - } - else if(!empty($quantity) && (!is_numeric($quantity) || intval($quantity) != floatval($quantity) || intval($quantity) < 0) ) { - $field["failed_validation"] = true; - $field["validation_message"] = __("Please enter a valid quantity", "gravityforms"); - } - - break; - - case "radio" : - - if(rgar($field, 'enableOtherChoice') && $value == 'gf_other_choice') - $value = rgpost("input_{$field['id']}_other"); - - if($field["isRequired"] && rgar($field, 'enableOtherChoice') && $value == GFCommon::get_other_choice_value()) { - $field["failed_validation"] = true; - $field["validation_message"] = empty($field["errorMessage"]) ? __("This field is required.", "gravityforms") : $field["errorMessage"]; - } - - break; - } - } - } - - $custom_validation_result = apply_filters("gform_field_validation", array("is_valid"=> rgar($field, "failed_validation") ? false : true, "message"=>rgar($field, "validation_message")), $value, $form, $field); - $custom_validation_result = apply_filters("gform_field_validation_{$form["id"]}", $custom_validation_result, $value, $form, $field); - $custom_validation_result = apply_filters("gform_field_validation_{$form["id"]}_{$field["id"]}", $custom_validation_result, $value, $form, $field); - - $field["failed_validation"] = rgar($custom_validation_result, "is_valid") ? false : true; - $field["validation_message"] = rgar($custom_validation_result, "message"); - } - - $is_valid = true; - foreach($form["fields"] as $f){ - if(rgar($f,"failed_validation")){ - $is_valid = false; - break; - } - } - - $validation_result = apply_filters("gform_validation_{$form["id"]}", apply_filters("gform_validation", array("is_valid" => $is_valid, "form" => $form)) ); - $is_valid = $validation_result["is_valid"]; - $form = $validation_result["form"]; - - return $is_valid; - } - - public static function failed_state_validation($form_id, $field, $value){ - - global $_gf_state; - - //if field can be populated dynamically, disable state validation - if(rgar($field,"allowsPrepopulate")) { - return false; - } else if(!GFCommon::is_product_field($field["type"] && $field["type"] != "donation")) { - return false; - } else if (!in_array($field["inputType"], array("singleshipping", "singleproduct", "hiddenproduct", "checkbox", "radio", "select"))) { - return false; - } - - if(!isset($_gf_state)){ - $state = json_decode(base64_decode($_POST["state_{$form_id}"]), true); - - if(!$state || sizeof($state) != 2) - return true; - - //making sure state wasn't tampered with by validating checksum - $checksum = wp_hash(crc32($state[0])); - - if($checksum !== $state[1]){ - return true; - } - - $_gf_state = json_decode($state[0], true); - } - - if(!is_array($value)){ - $value = array($field["id"] => $value); - } - - foreach($value as $key => $input_value){ - $state = isset($_gf_state[$key]) ? $_gf_state[$key] : false; - - //converting price to a number for single product fields and single shipping fields - if( (in_array($field["inputType"], array("singleproduct", "hiddenproduct")) && $key == $field["id"] . ".2") || $field["inputType"] == "singleshipping") - $input_value = GFCommon::to_number($input_value); - - $hash = wp_hash($input_value); - - if(strlen($input_value) > 0 && $state !== false && ((is_array($state) && !in_array($hash, $state)) || (!is_array($state) && $hash != $state)) ){ - return true; - } - } - return false; - } - - public static function enqueue_scripts(){ - global $wp_query; - if(isset($wp_query->posts) && is_array($wp_query->posts)){ - foreach($wp_query->posts as $post){ - $forms = self::get_embedded_forms($post->post_content, $ajax); - foreach($forms as $form){ - if(isset($form["id"])) - self::enqueue_form_scripts($form, $ajax); - } - } - } - } - - public static function get_embedded_forms($post_content, &$ajax){ - $forms = array(); - if(preg_match_all('/\[gravityform[s]? +.*?((id=.+?)|(name=.+?))\]/is', $post_content, $matches, PREG_SET_ORDER)){ - $ajax = false; - foreach($matches as $match){ - //parsing shortcode attributes - $attr = shortcode_parse_atts($match[1]); - $form_id = rgar($attr, "id"); - if(!is_numeric($form_id)){ - $form_id = RGFormsModel::get_form_id( rgar($attr, "name") ); - } + if ( ! $field->inputMask || ! $field->inputMaskValue ) { + continue; + } - if(!empty($form_id)){ - $forms[] = RGFormsModel::get_form_meta($form_id); - $ajax = isset($attr["ajax"]) && strtolower(substr($attr["ajax"],0, 4)) == "true"; - } - } - } - return $forms; - } + $mask = $field->inputMaskValue; + $script = "jQuery('#input_{$form['id']}_{$field->id}').mask('" . esc_js( $mask ) . "').bind('keypress', function(e){if(e.which == 13){jQuery(this).blur();} } );"; - public static function enqueue_form_scripts( $form, $ajax = false ){ + $script_str .= apply_filters( "gform_input_mask_script_{$form['id']}", apply_filters( 'gform_input_mask_script', $script, $form['id'], $field->id, $mask ), $form['id'], $field->id, $mask ); + } - // adding pre enqueue scripts hook so that scripts can be added first if a need exists - do_action("gform_pre_enqueue_scripts_{$form["id"]}", do_action("gform_pre_enqueue_scripts", $form, $ajax), $ajax); + return $script_str; + } - if(!get_option('rg_gforms_disable_css')){ + public static function get_calculations_init_script( $form ) { + require_once( GFCommon::get_base_path() . '/currency.php' ); - wp_enqueue_style("gforms_reset_css", GFCommon::get_base_url() . "/css/formreset.css", null, GFCommon::$version); + $formula_fields = array(); - if( self::has_datepicker_field( $form ) ) { - wp_enqueue_style("gforms_datepicker_css", GFCommon::get_base_url() . "/css/datepicker.css", null, GFCommon::$version); - } + foreach ( $form['fields'] as $field ) { - wp_enqueue_style("gforms_formsmain_css", GFCommon::get_base_url() . "/css/formsmain.css", null, GFCommon::$version); - wp_enqueue_style("gforms_ready_class_css", GFCommon::get_base_url() . "/css/readyclass.css", null, GFCommon::$version); - wp_enqueue_style("gforms_browsers_css", GFCommon::get_base_url() . "/css/browsers.css", null, GFCommon::$version); + if ( ! $field->enableCalculation || ! $field->calculationFormula ) { + continue; + } - if(is_rtl()){ - wp_enqueue_style("gforms_rtl_css", GFCommon::get_base_url() . "/css/rtl.css", null, GFCommon::$version); - } + $formula_fields[] = array( 'field_id' => $field->id, 'formula' => $field->calculationFormula, 'rounding' => $field->calculationRounding ); - } + } - if( self::has_conditional_logic( $form ) ) { - wp_enqueue_script( 'gform_conditional_logic' ); - } + if ( empty( $formula_fields ) ) { + return ''; + } - if( self::has_datepicker_field( $form ) ) { - wp_enqueue_script( 'gform_datepicker_init' ); - } + $script = self::get_number_formats_script( $form ); + $script .= 'new GFCalc(' . $form['id'] . ', ' . GFCommon::json_encode( $formula_fields ) . ');'; - if( $ajax || self::has_price_field( $form ) || self::has_password_strength( $form ) || GFCommon::has_list_field( $form ) || GFCommon::has_credit_card_field($form) || self::has_conditional_logic( $form ) || self::has_currency_format_number_field($form) || self::has_calculation_field( $form ) ) { - wp_enqueue_script( 'gform_gravityforms' ); - } + return $script; + } - if(GFCommon::has_multifile_fileupload_field($form)){ - wp_enqueue_script( 'plupload-all' ); - GFCommon::localize_gform_gravityforms_multifile(); - } + /** + * Generates a map of fields IDs and their corresponding number formats used by the GFCalc JS object for correctly + * converting field values to clean numbers. + * + * - Number fields have a 'numberFormat' setting (w/ UI). + * - Single-input product fields (i.e. 'singleproduct', 'calculation', 'price' and 'hiddenproduct') should default to + * the number format of the configured currency. + * - All other product fields will default to 'decimal_dot' for the number format. + * - All other fields will have no format (false) and inherit the format of the formula field when the formula is + * calculated. + * + * @param mixed $form + * @return string + */ + public static function get_number_formats_script( $form ) { + + $number_formats = array(); + $currency = RGCurrency::get_currency( GFCommon::get_currency() ); + + foreach ( $form['fields'] as $field ) { + + // default format is false, fields with no format will inherit the format of the formula field when calculated + $format = false; + + switch ( GFFormsModel::get_input_type( $field ) ) { + case 'number': + $format = $field->numberFormat ? $field->numberFormat : 'decimal_dot'; + break; + case 'singleproduct': + case 'calculation': + case 'price': + case 'hiddenproduct': + case 'singleshipping': + $format = $currency['decimal_separator'] == ',' ? 'decimal_comma' : 'decimal_dot'; + break; + default: + + // we check above for all single-input product types, for all other products, assume decimal format + if ( in_array( $field->type, array( 'product', 'option', 'shipping' ) ) ) { + $format = 'decimal_dot'; + } + } - if( self::has_enhanced_dropdown( $form ) || self::has_pages( $form ) || self::has_fileupload_field( $form ) ) { - wp_enqueue_script( 'gform_json' ); - wp_enqueue_script( 'gform_gravityforms' ); - } + $number_formats[ $field->id ] = $format; - if( self::has_character_counter( $form ) ) { - wp_enqueue_script( 'gform_textarea_counter' ); - } + } - if( self::has_input_mask( $form ) ) { - wp_enqueue_script( 'gform_masked_input' ); - } + return 'gf_global["number_formats"][' . $form['id'] . '] = ' . json_encode( $number_formats ) . ';'; + } - if( self::has_enhanced_dropdown( $form ) ) { - if( wp_script_is( 'chosen', 'registered' ) ) { - wp_enqueue_script( 'chosen' ); - } else { - wp_enqueue_script( 'gform_chosen' ); - } - } + private static function has_datepicker_field( $form ) { + if ( is_array( $form['fields'] ) ) { + foreach ( $form['fields'] as $field ) { - do_action( 'gform_enqueue_scripts', $form, $ajax ); - do_action( "gform_enqueue_scripts_{$form['id']}", $form, $ajax ); + if ( RGFormsModel::get_input_type( $field ) == 'date' && $field->dateType == 'datepicker' ) { + return true; + } + } + } - // enqueue jQuery every time form is displayed to allow "gform_post_render" js hook - // to be available to users even when GF is not using it - wp_enqueue_script( 'jquery' ); + return false; + } - } + private static function has_price_field( $form ) { + $price_fields = GFCommon::get_fields_by_type( $form, array( 'product', 'donation' ) ); - private static $printed_scripts = array(); + return ! empty( $price_fields ); + } - public static function print_form_scripts( $form, $ajax ) { + private static function has_fileupload_field( $form ) { + if ( is_array( $form['fields'] ) ) { + foreach ( $form['fields'] as $field ) { + $input_type = RGFormsModel::get_input_type( $field ); + if ( in_array( $input_type, array( 'fileupload', 'post_image' ) ) ) { + return true; + } + } + } - if( ! get_option( 'rg_gforms_disable_css' ) ) { + return false; + } - if( ! wp_style_is( 'gforms_css' ) ) { + private static function has_currency_format_number_field( $form ) { + if ( is_array( $form['fields'] ) ) { + foreach ( $form['fields'] as $field ) { + $input_type = RGFormsModel::get_input_type( $field ); + if ( $input_type == 'number' && $field->numberFormat == 'currency' ) { + return true; + } + } + } - wp_enqueue_style("gforms_reset_css", GFCommon::get_base_url() . "/css/formreset.css", null, GFCommon::$version); - wp_enqueue_style("gforms_formsmain_css", GFCommon::get_base_url() . "/css/formsmain.css", null, GFCommon::$version); - wp_enqueue_style("gforms_ready_class_css", GFCommon::get_base_url() . "/css/readyclass.css", null, GFCommon::$version); - wp_enqueue_style("gforms_browsers_css", GFCommon::get_base_url() . "/css/browsers.css", null, GFCommon::$version); + return false; + } - wp_print_styles(array("gforms_reset_css")); + private static function has_currency_copy_values_option( $form ) { + if ( is_array( $form['fields'] ) ) { + foreach ( $form['fields'] as $field ) { + if ( $field->enableCopyValuesOption == true ) { + return true; + } + } + } - if( self::has_datepicker_field( $form ) ) { - wp_enqueue_style("gforms_datepicker_css", GFCommon::get_base_url() . "/css/datepicker.css", null, GFCommon::$version); - wp_print_styles(array("gforms_datepicker_css")); - } + return false; + } - wp_print_styles(array("gforms_formsmain_css")); - wp_print_styles(array("gforms_ready_class_css")); - wp_print_styles(array("gforms_browsers_css")); + private static function has_recaptcha_field( $form ) { + if ( is_array( $form['fields'] ) ) { + foreach ( $form['fields'] as $field ) { + if ( ( $field->type == 'captcha' || $field->inputType == 'captcha' ) && ! in_array( $field->captchaType, array( 'simple_captcha', 'math' ) ) ) { + return true; + } + } + } - if( is_rtl() ) { - wp_enqueue_style("gforms_rtl_css", GFCommon::get_base_url() . "/css/rtl.css", null, GFCommon::$version); - wp_print_styles(array("gforms_rtl_css")); - } + return false; + } - } - } + public static function has_input_mask( $form, $field = false ) { - $scripts = array(); + if ( $field ) { + if ( self::has_field_input_mask( $field ) ) { + return true; + } + } else { - if( ( $ajax || self::has_enhanced_dropdown( $form ) || self::has_price_field( $form ) || self::has_password_strength( $form ) || self::has_pages( $form ) || self::has_password_strength( $form ) || GFCommon::has_list_field( $form ) || GFCommon::has_credit_card_field( $form ) || self::has_calculation_field( $form ) ) && ! wp_script_is( 'gform_gravityforms' ) ) { - $scripts[] = 'gform_gravityforms'; - } + if ( ! is_array( $form['fields'] ) ) { + return false; + } - if( self::has_conditional_logic( $form ) && ! wp_script_is( 'gform_conditional_logic' ) ) { - $scripts[] = 'gform_conditional_logic'; - } + foreach ( $form['fields'] as $field ) { + if ( self::has_field_input_mask( $field ) ) { + return true; + } + } + } - if( self::has_datepicker_field( $form ) && ! wp_script_is( 'gform_datepicker_init' ) ) { - $scripts[] = 'gform_datepicker_init'; - } + return false; + } - if( self::has_pages( $form ) && ! wp_script_is( 'gform_json' ) ) { - $scripts[] = 'gform_json'; - } + public static function has_field_input_mask( $field ) { - if( self::has_character_counter( $form ) && ! wp_script_is( 'gform_textarea_counter' ) ) { - $scripts[] = 'gform_textarea_counter'; - } + $type = GFFormsModel::get_input_type( $field ); + if ( $type == 'phone' && $field->phoneFormat == 'standard' ) { + return true; + } - if( self::has_input_mask( $form ) && ! wp_script_is( 'gform_masked_input' ) ) { - $scripts[] = 'gform_masked_input'; - } + if ( $field->inputMask && $field->inputMaskValue && ! $field->enablePasswordInput ) { + return true; + } - if( self::has_enhanced_dropdown( $form ) && ! wp_script_is( 'gform_chosen' ) && ! wp_script_is( 'chosen' ) ) { - if( wp_script_is( 'chosen', 'registered' ) ) { - $scripts[] = 'chosen'; - } else { - $scripts[] = 'gform_chosen'; - } - } + return false; + } - if( ! wp_script_is( 'jquery' ) ) { - $scripts[] = 'jquery'; - } + public static function has_calculation_field( $form ) { - foreach( $scripts as $script ) { - wp_enqueue_script( $script ); - } + if ( ! is_array( $form['fields'] ) ) { + return false; + } - wp_print_scripts( $scripts ); + foreach ( $form['fields'] as $field ) { + /* @var $field GF_Field */ + if ( $field->has_calculation() ) { + return true; + } + } - if( wp_script_is( 'gform_gravityforms' ) ) { - echo ''; - } + return false; + } - } + //Getting all fields that have a rule based on the specified field id + public static function get_conditional_logic_fields( $form, $fieldId ) { + $fields = array(); - public static function has_conditional_logic( $form ) { - $has_conditional_logic = self::has_conditional_logic_legwork( $form ); - return apply_filters( 'gform_has_conditional_logic', $has_conditional_logic, $form ); - } + //adding submit button field if enabled + if ( isset( $form['button']['conditionalLogic'] ) ) { + $fields[] = 0; + } - private static function has_conditional_logic_legwork($form){ + foreach ( $form['fields'] as $field ) { - if(empty($form)) - return false; + if ( $field->type != 'page' && ! empty( $field->conditionalLogic ) ) { + foreach ( $field->conditionalLogic['rules'] as $rule ) { + if ( $rule['fieldId'] == $fieldId ) { + $fields[] = floatval( $field->id ); - if(isset($form["button"]["conditionalLogic"])) - return true; + //if field is a section, add all fields in the section that have conditional logic (to support nesting) + if ( $field->type == 'section' ) { + $section_fields = GFCommon::get_section_fields( $form, $field->id ); + foreach ( $section_fields as $section_field ) { + if ( ! empty( $section_field['conditionalLogic'] ) ) { + $fields[] = floatval( $section_field['id'] ); + } + } + } + break; + } + } + } + //adding fields with next button logic + if ( ! empty( $field->nextButton['conditionalLogic'] ) ) { + foreach ( $field->nextButton['conditionalLogic']['rules'] as $rule ) { + if ( $rule['fieldId'] == $fieldId && ! in_array( $fieldId, $fields ) ) { + $fields[] = floatval( $field->id ); + break; + } + } + } + } - if(is_array(rgar($form,"fields"))){ - foreach(rgar($form,"fields") as $field){ - if(!empty($field["conditionalLogic"])){ - return true; - } - else if(isset($field["nextButton"]) && !empty($field["nextButton"]["conditionalLogic"])){ - return true; - } - } - } + return $fields; + } - return false; - } - - private static function get_conditional_logic($form, $field_values = array()){ - $logics = ""; - $dependents = ""; - $fields_with_logic = array(); - $default_values = array(); + public static function get_field( $field, $value = '', $force_frontend_label = false, $form = null, $field_values = null ) { + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; + + $custom_class = $is_admin ? '' : $field->cssClass; + + if ( $field->type == 'page' ) { + if ( $is_entry_detail ) { + return; //ignore page breaks in the entry detail page + } else if ( ! $is_form_editor ) { + $save_button = rgars( $form, 'save/enabled' ) ? self::get_form_button( $form['id'], "gform_save_{$form['id']}", $form['save']['button'], rgars( $form, 'save/button/text' ), 'gform_save_link', rgars( $form, 'save/button/text' ), 0, "jQuery(\"#gform_save_{$form['id']}\").val(1);" ) : ''; + + $next_button = self::get_form_button( $form['id'], "gform_next_button_{$form['id']}_{$field->id}", $field->nextButton, __( 'Next', 'gravityforms' ), 'gform_next_button', __( 'Next Page', 'gravityforms' ), $field->pageNumber ); + $next_button = apply_filters( 'gform_next_button', $next_button, $form ); + $next_button = apply_filters( "gform_next_button_{$form['id']}", $next_button, $form ); + $previous_button = $field->pageNumber == 2 ? '' : self::get_form_button( $form['id'], "gform_previous_button_{$form['id']}_{$field->id}", $field->previousButton, __( 'Previous', 'gravityforms' ), 'gform_previous_button', __( 'Previous Page', 'gravityforms' ), $field->pageNumber - 2 ); + if ( ! empty( $previous_button ) ) { + $previous_button = apply_filters( 'gform_previous_button', $previous_button, $form ); + $previous_button = apply_filters( "gform_previous_button_{$form['id']}", $previous_button, $form ); + } + $style = self::is_page_active( $form['id'], $field->pageNumber ) ? '' : "style='display:none;'"; + $custom_class = ! empty( $custom_class ) ? " {$custom_class}" : ''; + $html = " +
    + +
    +
    pageNumber}' class='gform_page{$custom_class}' {$style}> +
    +
      "; - foreach($form["fields"] as $field){ - - //use section's logic if one exists - $section = RGFormsModel::get_section($form, $field["id"]); - $section_logic = !empty($section) ? rgar($section,"conditionalLogic") : null; - - $field_logic = $field["type"] != "page" ? RGForms::get("conditionalLogic", $field) : null; //page break conditional logic will be handled during the next button click + return $html; + } + } - $next_button_logic = isset($field["nextButton"]) && isset($field["nextButton"]["conditionalLogic"]) ? $field["nextButton"]["conditionalLogic"] : null; - - if(!empty($field_logic) || !empty($next_button_logic)){ + if ( ! $is_admin && $field->adminOnly ) { + if ( $field->allowsPrepopulate ) { + $field->inputType = 'adminonly_hidden'; + } else { + return; + } + } - $field_section_logic = array("field" => $field_logic, "nextButton" => $next_button_logic, "section" => $section_logic); + $id = $field->id; - $logics .= $field["id"] . ": " . GFCommon::json_encode($field_section_logic) . ","; + $input_type = GFFormsModel::get_input_type( $field ); - $fields_with_logic[] = $field["id"]; - - $peers = $field["type"] == "section" ? GFCommon::get_section_fields($form, $field["id"]) : array($field); - $peer_ids = array(); - - foreach ($peers as $peer) - $peer_ids[] = $peer["id"]; - - $dependents .= $field["id"] . ": " . GFCommon::json_encode($peer_ids) . ","; - } + $error_class = $field->failed_validation ? 'gfield_error' : ''; + $admin_only_class = $field->adminOnly ? 'field_admin_only' : ''; + $selectable_class = $is_admin ? 'selectable' : ''; + $hidden_class = in_array( $input_type, array( 'hidden', 'hiddenproduct' ) ) ? 'gform_hidden' : ''; - //-- Saving default values so that they can be restored when toggling conditional logic --- - $field_val = ""; - $input_type = RGFormsModel::get_input_type($field); + $section_class = $field->type == 'section' ? 'gsection' : ''; + $page_class = $field->type == 'page' ? 'gpage' : ''; + $html_block_class = $field->type == 'html' ? 'gfield_html' : ''; + $html_formatted_class = $field->type == 'html' && ! $is_admin && ! $field->disableMargins ? 'gfield_html_formatted' : ''; + $html_no_follows_desc_class = $field->type == 'html' && ! $is_admin && ! self::prev_field_has_description( $form, $field->id ) ? 'gfield_no_follows_desc' : ''; - //get parameter value if pre-populate is enabled - if(rgar($field, "allowsPrepopulate")){ - if(is_array(rgar($field, "inputs"))){ - $field_val = array(); - foreach($field["inputs"] as $input){ - $field_val["input_{$input["id"]}"] = RGFormsModel::get_parameter_value(rgar($input, "name"), $field_values, $field); - } - } - else if($input_type == "time"){ - $parameter_val = RGFormsModel::get_parameter_value(rgar($field, "inputName"), $field_values, $field); - if(!empty($parameter_val) && preg_match('/^(\d*):(\d*) ?(.*)$/', $parameter_val, $matches)){ - $field_val = array(); - $field_val[] = esc_attr($matches[1]); //hour - $field_val[] = esc_attr($matches[2]); //minute - $field_val[] = rgar($matches,3); //am or pm - } - } - else if($input_type == "list"){ - $parameter_val = RGFormsModel::get_parameter_value(rgar($field, "inputName"), $field_values, $field); - $field_val = is_array($parameter_val) ? $parameter_val : explode(",", str_replace("|", ",", $parameter_val)); - } - else { - $field_val = RGFormsModel::get_parameter_value(rgar($field, "inputName"), $field_values, $field); - } - } + $calculation_class = $input_type == 'calculation' || ( $input_type == 'number' && $field->has_calculation() ) ? 'gfield_calculation' : ''; - //use default value if pre-populated value is empty - $field_val = self::default_if_empty($field, $field_val); + $product_suffix = "_{$form['id']}_" . $field->productField; + $option_class = $field->type == 'option' ? "gfield_price gfield_price{$product_suffix} gfield_option{$product_suffix}" : ''; + $quantity_class = $field->type == 'quantity' ? "gfield_price gfield_price{$product_suffix} gfield_quantity{$product_suffix}" : ''; + $shipping_class = $field->type == 'shipping' ? "gfield_price gfield_shipping gfield_shipping_{$form['id']}" : ''; + $product_class = $field->type == 'product' ? "gfield_price gfield_price_{$form['id']}_{$field->id} gfield_product_{$form['id']}_{$field->id}" : ''; + $hidden_product_class = $input_type == 'hiddenproduct' ? 'gfield_hidden_product' : ''; + $donation_class = $field->type == 'donation' ? "gfield_price gfield_price_{$form['id']}_{$field->id} gfield_donation_{$form['id']}_{$field->id}" : ''; + $required_class = $field->isRequired ? 'gfield_contains_required' : ''; + $creditcard_warning_class = $input_type == 'creditcard' && ! GFCommon::is_ssl() ? 'gfield_creditcard_warning' : ''; - if(is_array(rgar($field, "choices")) && $input_type != "list"){ - - //radio buttons start at 0 and checkboxes start at 1 - $choice_index = $input_type == "radio" ? 0 : 1; - $is_pricing_field = GFCommon::is_pricing_field( $field['type'] ); - - foreach($field["choices"] as $choice){ - - if( $input_type == "checkbox" && ($choice_index % 10) == 0){ - $choice_index++; - } + $form_sublabel_setting = rgempty( 'subLabelPlacement', $form ) ? 'below' : $form['subLabelPlacement']; + $sublabel_setting = ! isset( $field->subLabelPlacement ) || empty( $field->subLabelPlacement ) ? $form_sublabel_setting : $field->subLabelPlacement; + $sublabel_class = "field_sublabel_{$sublabel_setting}"; - if(rgar($choice,"isSelected") && $input_type == "select"){ - $val = $is_pricing_field && $field['type'] != 'quantity' ? $choice["value"] . "|" . GFCommon::to_number($choice["price"]) : $choice["value"]; - $default_values[$field["id"]] = $val; - } - else if(rgar($choice,"isSelected")){ - if(!isset($default_values[$field["id"]])) - $default_values[$field["id"]] = array(); - - $default_values[$field["id"]][] = "choice_{$field["id"]}_{$choice_index}"; - } - $choice_index++; - } - } - else if(!empty($field_val)){ - - if(GFFormsModel::get_input_type($field) == "date"){ - //format date - $format = empty($field["dateFormat"]) ? "mdy" : esc_attr($field["dateFormat"]); - $date_info = GFcommon::parse_date($field_val, $format); - switch($format){ - case "mdy": - $field_val = rgar($date_info, "month") . "/" . rgar($date_info, "day") . "/" . rgar($date_info, "year"); - break; - case "dmy": - $field_val = rgar($date_info, "day" ) . "/" . rgar($date_info, "month" ) . "/" . rgar($date_info, "year" ); - break; - case "ymd": - $field_val = rgar($date_info, "year") . "/" . rgar($date_info, "month" ) . "/" . rgar($date_info, "day" ); - break; - } - } - - - - $default_values[$field["id"]] = $field_val; - } - } - - $button_conditional_script = ""; - - //adding form button conditional logic if enabled - if(isset($form["button"]["conditionalLogic"])){ - $logics .= "0: " . GFCommon::json_encode(array("field"=>$form["button"]["conditionalLogic"], "section" => null)) . ","; - $dependents .= "0: " . GFCommon::json_encode(array(0)) . ","; - $fields_with_logic[] = 0; - - $button_conditional_script = "jQuery('#gform_{$form['id']}').submit(" . - "function(event, isButtonPress){" . - " var visibleButton = jQuery('.gform_next_button:visible, .gform_button:visible, .gform_image_button:visible');" . - " return visibleButton.length > 0 || isButtonPress == true;" . - "}" . - ");"; - } - - if(!empty($logics)) - $logics = substr($logics, 0, strlen($logics) - 1); //removing last comma; - - if(!empty($dependents)) - $dependents = substr($dependents, 0, strlen($dependents) - 1); //removing last comma; - - $animation = rgar($form,"enableAnimation") ? "1" : "0"; - global $wp_locale; - $number_format = $wp_locale->number_format['decimal_point'] == "," ? "decimal_comma" : "decimal_dot"; - - $str = "if(window['jQuery']){" . - - "if(!window['gf_form_conditional_logic'])" . - "window['gf_form_conditional_logic'] = new Array();" . - "window['gf_form_conditional_logic'][{$form['id']}] = {'logic' : {" . $logics . " }, 'dependents' : {" . $dependents . " }, 'animation' : " . $animation . " , 'defaults' : " . json_encode($default_values) . " }; ". - "if(!window['gf_number_format'])" . - "window['gf_number_format'] = '" . $number_format . "';" . - - "jQuery(document).ready(function(){" . - "gf_apply_rules({$form['id']}, " . json_encode($fields_with_logic) . ", true);" . - "jQuery('#gform_wrapper_{$form['id']}').show();" . - "jQuery(document).trigger('gform_post_conditional_logic', [{$form['id']}, null, true]);" . - $button_conditional_script . - - "} );" . - - "} "; - - return $str; - } - - - /** - * Enqueue and retrieve all inline scripts that should be executed when the form is rendered. - * Use add_init_script() function to enqueue scripts. - * - * @param mixed $form - */ - private static function register_form_init_scripts( $form, $field_values = array(), $is_ajax = false ) { - - // adding conditional logic script if conditional logic is configured for this form. - // get_conditional_logic also adds the chosen script for the enhanced dropdown option. - // if this form does not have conditional logic, add chosen script separately - if(self::has_conditional_logic($form)){ - self::add_init_script($form["id"], "conditional_logic", self::ON_PAGE_RENDER, self::get_conditional_logic($form, $field_values)); - } - - //adding currency config if there are any product fields in the form - if(self::has_price_field($form)){ - self::add_init_script($form["id"], "pricing", self::ON_PAGE_RENDER, self::get_pricing_init_script($form)); - } - - if(self::has_password_strength($form)){ - $password_script = self::get_password_strength_init_script($form); - self::add_init_script($form["id"], "password", self::ON_PAGE_RENDER, $password_script); - } - - if(self::has_enhanced_dropdown($form) ){ - $chosen_script = self::get_chosen_init_script($form); - self::add_init_script($form["id"], "chosen", self::ON_PAGE_RENDER, $chosen_script); - self::add_init_script($form["id"], "chosen", self::ON_CONDITIONAL_LOGIC, $chosen_script); - } - - if(GFCommon::has_credit_card_field($form)) { - self::add_init_script($form["id"], "credit_card", self::ON_PAGE_RENDER, self::get_credit_card_init_script($form)); - } - - if(self::has_character_counter($form)){ - self::add_init_script($form['id'], 'character_counter', self::ON_PAGE_RENDER, self::get_counter_init_script($form)); - } - - if(self::has_input_mask($form)) { - self::add_init_script($form['id'], 'input_mask', self::ON_PAGE_RENDER, self::get_input_mask_init_script($form)); - } - - if(self::has_calculation_field($form)) { - self::add_init_script($form['id'], 'calculation', self::ON_PAGE_RENDER, self::get_calculations_init_script($form)); - } - - if(self::has_currency_format_number_field($form)) { - self::add_init_script($form['id'], 'currency_format', self::ON_PAGE_RENDER, self::get_currency_format_init_script($form)); - } - - do_action( 'gform_register_init_scripts', $form, $field_values, $is_ajax ); - do_action( 'gform_register_init_scripts_' . $form['id'], $form, $field_values, $is_ajax ); - - - } - - public static function get_form_init_scripts($form) { - - $script_string = ''; - - // temporary solution for output gf_global obj until wp min version raised to 3.3 - if(wp_script_is("gform_gravityforms")) { - $gf_global_script = "if(typeof gf_global == 'undefined') " . GFCommon::gf_global(false); - } + $form_description_setting = rgempty( 'descriptionPlacement', $form ) ? 'below' : $form['descriptionPlacement']; + $description_setting = ! isset( $field->descriptionPlacement ) || empty( $field->descriptionPlacement ) ? $form_description_setting : $field->descriptionPlacement; + $description_class = "field_description_{$description_setting}"; - /* rendering initialization scripts */ - $init_scripts = rgar(self::$init_scripts, $form["id"]); + $field_setting_label_placement = $field->labelPlacement; + $label_placement = empty( $field_setting_label_placement ) ? '' : $field_setting_label_placement; - if(!empty($init_scripts)){ - $script_string = - ""; - } + return $field_markup; + } - return $script_string; - } + private static function prev_field_has_description( $form, $field_id ) { + if ( ! is_array( $form['fields'] ) ) { + return false; + } - public static function get_chosen_init_script($form){ - $chosen_fields = array(); - foreach($form["fields"] as $field){ - $input_type = GFFormsModel::get_input_type($field); - if(rgar($field, "enableEnhancedUI") && in_array($input_type, array("select", "multiselect"))) - $chosen_fields[] = "#input_{$form["id"]}_{$field["id"]}"; - } - return "gformInitChosenFields('" . implode(",", $chosen_fields) . "','" . esc_attr(apply_filters("gform_dropdown_no_results_text_{$form["id"]}", apply_filters("gform_dropdown_no_results_text", __("No results matched", "gravityforms"), $form["id"]), $form["id"])) . "');"; - } + $prev = null; + foreach ( $form['fields'] as $field ) { + if ( $field->id == $field_id ) { + return $prev != null && ! empty( $prev['description'] ); + } + $prev = $field; + } - public static function get_currency_format_init_script($form){ - $currency_fields = array(); - foreach($form["fields"] as $field){ - if(rgar($field, "numberFormat") == "currency") - $currency_fields[] = "#input_{$form["id"]}_{$field["id"]}"; - } + return false; + } - return "gformInitCurrencyFormatFields('" . implode(",", $currency_fields) . "');"; - } + /** + * @param GF_Field $field + * @param string $value + * @param bool $force_frontend_label + * @param int $form_id + * @param null|array $form + * + * @return string + */ + public static function get_field_content( $field, $value = '', $force_frontend_label = false, $form_id = 0, $form = null ) { + + $field_label = $field->get_field_label( $form, $value ); + $admin_buttons = $field->get_admin_buttons(); + + $input_type = GFFormsModel::get_input_type( $field ); + + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; + + if ( $input_type == 'adminonly_hidden' ) { + $field_content = ! $is_admin ? '{FIELD}' : sprintf( "%s{FIELD}", $admin_buttons, esc_html( $field_label ) ); + } else { + $field_content = $field->get_field_content( $value, $force_frontend_label, $form ); + } - public static function get_counter_init_script($form){ + if ( $input_type == 'creditcard' && ! GFCommon::is_ssl() && ! $is_admin ) { + $field_content = "
      " . __( 'This page is unsecured. Do not enter a real credit card number. Use this field only for testing purposes. ', 'gravityforms' ) . '
      ' . $field_content; + } - $script = ""; - foreach($form["fields"] as $field){ - $max_length = rgar($field,"maxLength"); - $field_id = "input_{$form["id"]}_{$field["id"]}"; - if(!empty($max_length) && !rgar($field,"adminOnly")) - { - $field_script = - "jQuery('#{$field_id}').textareaCount(" . - " {" . - " 'maxCharacterSize': {$max_length}," . - " 'originalStyle': 'ginput_counter'," . - " 'displayFormat' : '#input " . __("of", "gravityforms") . " #max " . __("max characters", "gravityforms") . "'" . - " } );"; + $value = $field->get_value_default_if_empty( $value ); - $script .= apply_filters("gform_counter_script_{$form["id"]}", apply_filters("gform_counter_script", $field_script, $form["id"], $field_id, $max_length), $form["id"], $field_id, $max_length); - } - } - return $script; - } + $field_content = str_replace( '{FIELD}', GFCommon::get_field_input( $field, $value, 0, $form_id, $form ), $field_content ); - public static function get_credit_card_init_script($form) { + $field_content = apply_filters( 'gform_field_content', $field_content, $field, $value, 0, $form_id ); - $script = ""; + return $field_content; + } - foreach($form["fields"] as $field){ - if($field['type'] != 'creditcard') - continue; - $field_id = "input_{$form["id"]}_{$field["id"]}"; - $field_script = "jQuery(document).ready(function(){ { gformMatchCard(\"{$field_id}_1\"); } } );"; - if(rgar($field, "forceSSL") && !GFCommon::is_ssl() && !GFCommon::is_preview()) - $field_script = "document.location.href='" . esc_js( RGFormsModel::get_current_page_url(true) ) . "';"; + private static function get_progress_bar( $form, $form_id, $confirmation_message ) { - $script .= $field_script; - } + $progress_complete = false; + $progress_bar = ''; + $page_count = self::get_max_page_number( $form ); + $current_page = self::get_current_page( $form_id ); + $page_name = rgar( rgar( $form['pagination'], 'pages' ), $current_page - 1 ); + $page_name = ! empty( $page_name ) ? ' - ' . $page_name : ''; + $style = $form['pagination']['style']; + $color = $style == 'custom' ? " color:{$form['pagination']['color']};" : ''; + $bgcolor = $style == 'custom' ? " background-color:{$form['pagination']['backgroundColor']};" : ''; - $card_rules = self::get_credit_card_rules(); - $script = "if(!window['gf_cc_rules']){window['gf_cc_rules'] = new Array(); } window['gf_cc_rules'] = " . GFCommon::json_encode($card_rules) . "; $script"; + if ( ! empty( $confirmation_message ) ) { + $progress_complete = true; + } + //check admin setting for whether the progress bar should start at zero + $start_at_zero = rgars( $form, 'pagination/display_progressbar_on_confirmation' ); + //check for filter + $start_at_zero = apply_filters( 'gform_progressbar_start_at_zero', $start_at_zero, $form ); + $progressbar_page_count = $start_at_zero ? $current_page - 1 : $current_page; + $percent = ! $progress_complete ? floor( ( ( $progressbar_page_count ) / $page_count ) * 100 ) . '%' : '100%'; + $percent_number = ! $progress_complete ? floor( ( ( $progressbar_page_count ) / $page_count ) * 100 ) . '' : '100'; - return $script; - } + if ( $progress_complete ) { + $wrapper_css_class = GFCommon::get_browser_class() . ' gform_wrapper'; - public static function get_pricing_init_script($form) { + //add on surrounding wrapper class when confirmation page + $progress_bar = "
      "; + $page_name = ! empty( $form['pagination']['progressbar_completion_text'] ) ? $form['pagination']['progressbar_completion_text'] : ''; + } - if(!class_exists("RGCurrency")) - require_once("currency.php"); - return "if(window[\"gformInitPriceFields\"]) jQuery(document).ready(function(){gformInitPriceFields();} );"; - } + $progress_bar .= " +
      +

      "; + $progress_bar .= ! $progress_complete ? __( 'Step', 'gravityforms' ) . " {$current_page} " . __( 'of', 'gravityforms' ) . " {$page_count}{$page_name}" : "{$page_name}"; + $progress_bar .= " +

      +
      +
      {$percent}
      +
      "; + //close div for surrounding wrapper class when confirmation page + $progress_bar .= $progress_complete ? $confirmation_message . '
      ' : ''; - public static function get_password_strength_init_script($form) { + return $progress_bar; + } - $field_script = "if(!window['gf_text']){window['gf_text'] = new Array();} window['gf_text']['password_blank'] = '" . __("Strength indicator", "gravityforms") . "'; window['gf_text']['password_mismatch'] = '" . __("Mismatch", "gravityforms") . "';window['gf_text']['password_bad'] = '" . __("Bad", "gravityforms") . "'; window['gf_text']['password_short'] = '" . __("Short", "gravityforms") . "'; window['gf_text']['password_good'] = '" . __("Good", "gravityforms") . "'; window['gf_text']['password_strong'] = '" . __("Strong", "gravityforms") . "';"; + /** + * Validates the form's entry limit settings. Returns the entry limit message if entry limit exceeded. + * + * @param array $form current GF form object + * + * @return string If entry limit exceeded returns entry limit setting. + */ + public static function validate_entry_limit( $form ) { + + //If form has a limit of entries, check current entry count + if ( rgar( $form, 'limitEntries' ) ) { + $period = rgar( $form, 'limitEntriesPeriod' ); + $range = self::get_limit_period_dates( $period ); + $entry_count = RGFormsModel::get_lead_count( $form['id'], '', null, null, $range['start_date'], $range['end_date'] ); + + if ( $entry_count >= $form['limitEntriesCount'] ) { + return empty( $form['limitEntriesMessage'] ) ? "

      " . __( 'Sorry. This form is no longer accepting new submissions.', 'gravityforms' ) . '

      ' : '

      ' . GFCommon::gform_do_shortcode( $form['limitEntriesMessage'] ) . '

      '; + } + } - foreach($form['fields'] as $field) { - if($field['type'] == 'password' && rgar($field, 'passwordStrengthEnabled')) { - $field_id = "input_{$form["id"]}_{$field["id"]}"; - $field_script .= "gformShowPasswordStrength(\"$field_id\");"; - } - } + } - return $field_script; - } + public static function validate_form_schedule( $form ) { - public static function get_input_mask_init_script($form) { + //If form has a schedule, make sure it is within the configured start and end dates + if ( rgar( $form, 'scheduleForm' ) ) { + $local_time_start = sprintf( '%s %02d:%02d %s', $form['scheduleStart'], $form['scheduleStartHour'], $form['scheduleStartMinute'], $form['scheduleStartAmpm'] ); + $local_time_end = sprintf( '%s %02d:%02d %s', $form['scheduleEnd'], $form['scheduleEndHour'], $form['scheduleEndMinute'], $form['scheduleEndAmpm'] ); + $timestamp_start = strtotime( $local_time_start . ' +0000' ); + $timestamp_end = strtotime( $local_time_end . ' +0000' ); + $now = current_time( 'timestamp' ); - $script_str = ''; + if ( ! empty( $form['scheduleStart'] ) && $now < $timestamp_start ) { + return empty( $form['schedulePendingMessage'] ) ? '

      ' . __( 'This form is not yet available.', 'gravityforms' ) . '

      ' : '

      ' . GFCommon::gform_do_shortcode( $form['schedulePendingMessage'] ) . '

      '; + } elseif ( ! empty( $form['scheduleEnd'] ) && $now > $timestamp_end ) { + return empty( $form['scheduleMessage'] ) ? '

      ' . __( 'Sorry. This form is no longer available.', 'gravityforms' ) . '

      ' : '

      ' . GFCommon::gform_do_shortcode( $form['scheduleMessage'] ) . '

      '; + } + } - foreach($form['fields'] as $field) { + } - if(!rgar($field, 'inputMask') || !rgar($field, 'inputMaskValue')) - continue; + public static function update_confirmation( $form, $lead = null, $event = '' ) { + if ( ! is_array( rgar( $form, 'confirmations' ) ) ) { + return $form; + } - $mask = rgar($field, 'inputMaskValue'); - $script = "jQuery('#input_{$form['id']}_{$field['id']}').mask('" . esc_js($mask). "').bind('keypress', function(e){if(e.which == 13){jQuery(this).blur();} } );"; + if ( ! empty( $event ) ) { + $confirmations = wp_filter_object_list( $form['confirmations'], array( 'event' => $event ) ); + } else { + $confirmations = $form['confirmations']; + } - $script_str .= apply_filters("gform_input_mask_script_{$form['id']}", apply_filters("gform_input_mask_script", $script, $form['id'], $field['id'], $mask), $form['id'], $field['id'], $mask); - } + // if there is only one confirmation, don't bother with the conditional logic, just return it + // this is here mostly to avoid the semi-costly GFFormsModel::create_lead() function unless we really need it + if ( is_array( $form['confirmations'] ) && count( $confirmations ) <= 1 ) { + $form['confirmation'] = reset( $confirmations ); - return $script_str; - } + return $form; + } - public static function get_calculations_init_script($form) { - require_once(GFCommon::get_base_path() . '/currency.php'); + if ( empty( $lead ) ) { + $lead = GFFormsModel::create_lead( $form ); + } - $formula_fields = array(); + foreach ( $confirmations as $confirmation ) { - foreach($form['fields'] as $field) { + if ( rgar( $confirmation, 'event' ) != $event ) { + continue; + } - if(!rgar($field, 'enableCalculation') || !rgar($field, 'calculationFormula')) - continue; + if ( rgar( $confirmation, 'isDefault' ) ) { + continue; + } - $formula_fields[] = array('field_id' => $field['id'], 'formula' => rgar($field, 'calculationFormula'), 'rounding' => rgar($field, 'calculationRounding') ); + if ( isset( $confirmation['isActive'] ) && ! $confirmation['isActive'] ) { + continue; + } - } + $logic = rgar( $confirmation, 'conditionalLogic' ); + if ( GFCommon::evaluate_conditional_logic( $logic, $form, $lead ) ) { + $form['confirmation'] = $confirmation; - if( empty( $formula_fields ) ) - return ''; - - $script = self::get_number_formats_script( $form ); - $script .= 'new GFCalc(' . $form['id'] . ', ' . GFCommon::json_encode( $formula_fields ) . ');'; - - return $script; - } + return $form; + } + } - /** - * Generates a map of fields IDs and their corresponding number formats used by the GFCalc JS object for correctly - * converting field values to clean numbers. - * - * - Number fields have a 'numberFormat' setting (w/ UI). - * - Single-input product fields (i.e. 'singleproduct', 'calculation', 'price' and 'hiddenproduct') should default to - * the number format of the configured currency. - * - All other product fields will default to 'decimal_dot' for the number format. - * - All other fields will have no format (false) and inherit the format of the formula field when the formula is - * calculated. - * - * @param mixed $form - */ - public static function get_number_formats_script( $form ) { + $filtered_list = wp_filter_object_list( $form['confirmations'], array( 'isDefault' => true ) ); - $number_formats = array(); - $currency = RGCurrency::get_currency( GFCommon::get_currency() ); + $form['confirmation'] = reset( $filtered_list ); - foreach( $form['fields'] as $field ) { + return $form; + } - // default format is false, fields with no format will inherit the format of the formula field when calculated - $format = false; + public static function process_send_resume_link() { - switch( GFFormsModel::get_input_type( $field ) ) { - case 'number': - $format = rgar( $field, 'numberFormat' ) ? rgar( $field, 'numberFormat' ) : 'decimal_dot'; - break; - case 'singleproduct': - case 'singleproduct': - case 'calculation': - case 'price': - case 'hiddenproduct': - case 'singleshipping': - $format = $currency['decimal_separator'] == ',' ? 'decimal_comma' : 'decimal_dot'; - break; - default: + $form_id = rgpost( 'gform_send_resume_link' ); + $email = rgpost( 'gform_resume_email' ); + $resume_token = rgpost( 'gform_resume_token' ); - // we check above for all single-input product types, for all other products, assume decimal format - if( in_array( $field['type'], array( 'product', 'option', 'shipping' ) ) ) - $format = 'decimal_dot'; + if ( empty( $form_id ) || empty( $email ) || empty( $resume_token ) || ! GFCommon::is_valid_email( $email ) ) { + return; + } - } - - $number_formats[$field['id']] = $format; - - } - - return 'gf_global["number_formats"][' . $form['id'] . '] = ' . json_encode( $number_formats ) . ';'; - } - - private static function has_datepicker_field($form){ - if(is_array($form["fields"])){ - foreach($form["fields"] as $field){ - - if(RGFormsModel::get_input_type($field) == "date" && rgar($field, "dateType") == "datepicker") - return true; - } - } - return false; - } - - private static function has_price_field($form){ - $price_fields = GFCommon::get_fields_by_type($form, array("product", "donation")); - return !empty($price_fields); - } - - private static function has_fileupload_field($form){ - if(is_array($form["fields"])){ - foreach($form["fields"] as $field){ - $input_type = RGFormsModel::get_input_type($field); - if(in_array($input_type, array("fileupload", "post_image"))) - return true; - } - } - return false; - } - - private static function has_currency_format_number_field($form){ - if(is_array($form["fields"])){ - foreach($form["fields"] as $field){ - $input_type = RGFormsModel::get_input_type($field); - if($input_type == "number" && rgar($field, "numberFormat") == "currency") - return true; - } - } - return false; - } - - private static function has_recaptcha_field($form){ - if(is_array($form["fields"])){ - foreach($form["fields"] as $field){ - if(($field["type"] == "captcha" || $field["inputType"] == "captcha") && !in_array($field["captchaType"], array("simple_captcha", "math"))) - return true; - } - } - return false; - } - - public static function has_input_mask($form, $field = false){ - - if($field) { - if(self::has_field_input_mask($field)) - return true; - } else { - - if(!is_array($form["fields"])) - return false; - - foreach($form["fields"] as $field){ - if(rgar($field, "inputMask") && rgar($field, "inputMaskValue") && !rgar($field, "enablePasswordInput")) - return true; - } - - } - - return false; - } - - public static function has_field_input_mask($field){ - if(rgar($field, "inputMask") && rgar($field, "inputMaskValue") && !rgar($field, "enablePasswordInput")) - return true; - - return false; - } - - public static function has_calculation_field($form) { - - if(!is_array($form["fields"])) - return false; - - foreach($form['fields'] as $field) { - if(GFCommon::has_field_calculation($field)) - return true; - } - return false; - } - - //Getting all fields that have a rule based on the specified field id - public static function get_conditional_logic_fields($form, $fieldId){ - $fields = array(); - - //adding submit button field if enabled - if(isset($form["button"]["conditionalLogic"])){ - $fields[] = 0; - } - - foreach($form["fields"] as $field){ - - if($field["type"] != "page" && !empty($field["conditionalLogic"])){ - foreach($field["conditionalLogic"]["rules"] as $rule){ - if($rule["fieldId"] == $fieldId){ - $fields[] = floatval($field["id"]); - - //if field is a section, add all fields in the section that have conditional logic (to support nesting) - if($field["type"] == "section"){ - $section_fields = GFCommon::get_section_fields($form, $field["id"]); - foreach($section_fields as $section_field) - if(!empty($section_field["conditionalLogic"])) - $fields[] = floatval($section_field["id"]); - } - break; - } - } - } - //adding fields with next button logic - if(!empty($field["nextButton"]["conditionalLogic"])){ - foreach($field["nextButton"]["conditionalLogic"]["rules"] as $rule){ - if($rule["fieldId"] == $fieldId && !in_array($fieldId, $fields)){ - $fields[] = floatval($field["id"]); - break; - } - } - } - } - return $fields; - } - - public static function get_field($field, $value="", $force_frontend_label = false, $form=null, $field_values=null){ - $custom_class = IS_ADMIN ? "" : rgget("cssClass", $field); - - if($field["type"] == "page"){ - if(IS_ADMIN && RG_CURRENT_VIEW == "entry"){ - return; //ignore page breaks in the entry detail page - } - else if(!IS_ADMIN){ - $next_button = self::get_form_button($form["id"], "gform_next_button_{$form["id"]}_{$field["id"]}", $field["nextButton"], __("Next", "gravityforms"), "gform_next_button", __("Next Page", "gravityforms"), $field["pageNumber"]); - $next_button = apply_filters("gform_next_button", $next_button, $form); - $next_button = apply_filters("gform_next_button_{$form["id"]}", $next_button, $form); - $previous_button = $field["pageNumber"] == 2 ? "" : self::get_form_button($form["id"], "gform_previous_button_{$form["id"]}_{$field["id"]}", $field["previousButton"], __("Previous", "gravityforms"), "gform_previous_button", __("Previous Page", "gravityforms"), $field["pageNumber"]-2); - if(!empty($previous_button)){ - $previous_button = apply_filters("gform_previous_button", $previous_button, $form); - $previous_button = apply_filters("gform_previous_button_{$form["id"]}", $previous_button, $form); - } - $style = self::is_page_active($form["id"], $field["pageNumber"]) ? "" : "style='display:none;'"; - $custom_class = !empty($custom_class) ? " {$custom_class}" : ""; - $html = "
    -
    - -
    -
    -
    -
      "; + $form = GFFormsModel::get_form_meta( $form_id ); - return $html; - } - } + if ( empty( $form ) ) { + return; + } - if($field["type"] == "post_category") { + $incomplete_submission = GFFormsModel::get_incomplete_submission_values( $resume_token ); + $submission = json_decode( $incomplete_submission['submission'], true ); + $partial_entry = $submission['partial_entry']; - } + $notifications_to_send = GFCommon::get_notifications_to_send( 'form_save_email_requested', $form, $partial_entry ); - if(!IS_ADMIN && rgar($field,"adminOnly")) - { - if($field["allowsPrepopulate"]) - $field["inputType"] = "adminonly_hidden"; - else - return; - } + $log_notification_event = empty( $notifications_to_send ) ? 'No notifications to process' : 'Processing notifications'; + GFCommon::log_debug( "GFFormDisplay::process_send_resume_link(): {$log_notification_event} for form_save_email_requested event." ); - $id = $field["id"]; - $type = $field["type"]; - $input_type = RGFormsModel::get_input_type($field); + foreach ( $notifications_to_send as $notification ) { + if ( isset( $notification['isActive'] ) && ! $notification['isActive'] ) { + GFCommon::log_debug( "GFFormDisplay::process_send_resume_link(): Notification is inactive, not processing notification (#{$notification['id']} - {$notification['name']})." ); + continue; + } + if ( $notification['toType'] == 'hidden' ) { + $notification['to'] = $email; + } + $notification['message'] = self::replace_save_variables( $notification['message'], $form, $resume_token, $email ); + GFCommon::send_notification( $notification, $form, $partial_entry ); + } - $error_class = rgget("failed_validation", $field) ? "gfield_error" : ""; - $admin_only_class = rgget("adminOnly", $field) ? "field_admin_only" : ""; - $selectable_class = IS_ADMIN ? "selectable" : ""; - $hidden_class = in_array($input_type, array("hidden", "hiddenproduct")) ? "gform_hidden" : ""; + GFFormsModel::add_email_to_incomplete_sumbmission( $resume_token, $email ); + } - $section_class = $field["type"] == "section" ? "gsection" : ""; - $page_class = $field["type"] == "page" ? "gpage" : ""; - $html_block_class = $field["type"] == "html" ? "gfield_html" : ""; - $html_formatted_class = $field["type"] == "html" && !IS_ADMIN && !rgget("disableMargins", $field) ? "gfield_html_formatted" : ""; - $html_no_follows_desc_class = $field["type"] == "html" && !IS_ADMIN && !self::prev_field_has_description($form, $field["id"]) ? "gfield_no_follows_desc" : ""; + public static function replace_save_variables( $text, $form, $resume_token, $email = null ) { - $calculation_class = RGFormsModel::get_input_type($field) == 'number' && GFCommon::has_field_calculation($field) ? 'gfield_calculation' : ''; - $calculation_class = RGFormsModel::get_input_type($field) == 'calculation' ? 'gfield_calculation' : ''; + $form_id = intval( $form['id'] ); - $product_suffix = "_{$form["id"]}_" . rgget("productField", $field); - $option_class = $field["type"] == "option" ? "gfield_price gfield_price{$product_suffix} gfield_option{$product_suffix}" : ""; - $quantity_class = $field["type"] == "quantity" ? "gfield_price gfield_price{$product_suffix} gfield_quantity{$product_suffix}" : ""; - $shipping_class = $field["type"] == "shipping" ? "gfield_price gfield_shipping gfield_shipping_{$form["id"]}" : ""; - $product_class = $field["type"] == "product" ? "gfield_price gfield_price_{$form["id"]}_{$field["id"]} gfield_product_{$form["id"]}_{$field["id"]}" : ""; - $hidden_product_class = $input_type == "hiddenproduct" ? "gfield_hidden_product" : ""; - $donation_class = $field["type"] == "donation" ? "gfield_price gfield_price_{$form["id"]}_{$field["id"]} gfield_donation_{$form["id"]}_{$field["id"]}" : ""; - $required_class = rgar($field, "isRequired") ? "gfield_contains_required" : ""; - $creditcard_warning_class = $input_type == "creditcard" && !GFCommon::is_ssl() ? "gfield_creditcard_warning" : ""; - - $css_class = "$selectable_class gfield $error_class $section_class $admin_only_class $custom_class $hidden_class $html_block_class $html_formatted_class $html_no_follows_desc_class $option_class $quantity_class $product_class $donation_class $shipping_class $page_class $required_class $hidden_product_class $creditcard_warning_class $calculation_class"; - $css_class = apply_filters("gform_field_css_class_{$form["id"]}", apply_filters("gform_field_css_class", trim($css_class), $field, $form), $field, $form); + $resume_url = apply_filters( 'gform_save_and_continue_resume_url', add_query_arg( array( 'gf_token' => $resume_token ), GFFormsModel::get_current_page_url() ), $form, $resume_token, $email ); + $resume_url = esc_url( $resume_url ); + $resume_link = "{$resume_url}"; + $text = str_replace( '{save_link}', $resume_link, $text ); + $text = str_replace( '{save_token}', $resume_token, $text ); - $style = !empty($form) && !IS_ADMIN && RGFormsModel::is_field_hidden($form, $field, $field_values) ? "style='display:none;'" : ""; - - $field_id = IS_ADMIN || empty($form) ? "field_$id" : "field_" . $form["id"] . "_$id"; - - $field_content = self::get_field_content( $field, $value, $force_frontend_label, $form == null ? 0 : $form['id'] ); - $field_container = "
    • {FIELD_CONTENT}
    • "; - - $field_container = apply_filters( 'gform_field_container', $field_container, $field, $form, $css_class, $style, $field_content ); - $field_container = apply_filters( "gform_field_container_{$form['id']}", $field_container, $field, $form, $css_class, $style, $field_content ); - $field_container = apply_filters( "gform_field_container_{$form['id']}_{$field['id']}", $field_container, $field, $form, $css_class, $style, $field_content ); - - $field_markup = str_replace( '{FIELD_CONTENT}', $field_content, $field_container ); - - return $field_markup; - - } - - private static function prev_field_has_description($form, $field_id){ - if(!is_array($form["fields"])) - return false; - - $prev = null; - foreach($form["fields"] as $field){ - if($field["id"] == $field_id){ - return $prev != null && !empty($prev["description"]); - } - $prev = $field; - } - return false; - } - - public static function get_field_content($field, $value="", $force_frontend_label = false, $form_id=0){ - $id = $field["id"]; - $size = rgar($field,"size"); - $validation_message = (rgget("failed_validation", $field) && !empty($field["validation_message"])) ? sprintf("
      %s
      ", $field["validation_message"]) : ""; - - $duplicate_disabled = array('captcha', 'post_title', 'post_content', 'post_excerpt', 'total', 'shipping', 'creditcard'); - $duplicate_field_link = !in_array($field['type'], $duplicate_disabled) ? "" : ""; - $duplicate_field_link = apply_filters("gform_duplicate_field_link", $duplicate_field_link); - - $delete_field_link = ""; - $delete_field_link = apply_filters("gform_delete_field_link", $delete_field_link); - $field_type_title = GFCommon::get_field_type_title($field["type"]); - $admin_buttons = IS_ADMIN ? "
      {$field_type_title} : " . __("Field ID", "gravityforms") . " {$field["id"]}
      " . $delete_field_link . $duplicate_field_link . "
      " : ""; - - $field_label = $force_frontend_label ? $field["label"] : GFCommon::get_label($field); - if( (rgar($field, "inputType") == "singleproduct" || rgar($field, "inputType") == "calculation" ) && !rgempty($field["id"] . ".1", $value)){ - $field_label = rgar($value, $field["id"] . ".1"); - } - - - $field_id = IS_ADMIN || $form_id == 0 ? "input_$id" : "input_" . $form_id . "_$id"; - - $required_div = IS_ADMIN || rgar($field, "isRequired") ? sprintf("%s", rgar($field, "isRequired") ? "*" : "") : ""; - $target_input_id = ""; - $is_description_above = rgar($field, "descriptionPlacement") == "above"; - - switch(RGFormsModel::get_input_type($field)){ - case "section" : - $description = self::get_description(rgget("description", $field), "gsection_description"); - $field_content = sprintf("%s

      %s

      %s", $admin_buttons, esc_html($field_label), $description); - break; - - case "page" : - //only executed on the form editor in the admin - // removed images to make page breaks translatable - $page_label = __("Page Break", "gravityforms"); - $field_content = "{$admin_buttons}
      " . __("end of page", "gravityforms") . "
      " . __("PAGE BREAK", "gravityforms") . "
      " . __("top of new page", "gravityforms") . "
      "; - break; - - case "adminonly_hidden": - case "hidden" : - case "html" : - $field_content = !IS_ADMIN ? "{FIELD}" : $field_content = sprintf("%s{FIELD}", $admin_buttons, $field_id, esc_html($field_label)); - break; - - case "checkbox": - case "radio": - $description = self::get_description(rgget("description", $field),"gfield_description"); - if($is_description_above) - $field_content = sprintf("%s%s{FIELD}%s", $admin_buttons, esc_html($field_label), $required_div , $description, $validation_message); - else - $field_content = sprintf("%s{FIELD}%s%s", $admin_buttons, esc_html($field_label), $required_div , $description, $validation_message); - break; - - case "name" : - switch(rgar($field, "nameFormat")){ - case "simple" : - $target_input_id = $field_id; - break; - - case "extended" : - $target_input_id = $field_id . "_2"; - break; - - default : - $target_input_id = $field_id . "_3"; - } - - case "address" : - if(empty($target_input_id)){ - $target_input_id = $field_id . "_1"; - } + $text = str_replace( '{save_url}', $resume_url, $text ); - case 'list': - if(empty($target_input_id)) - $target_input_id = sprintf( 'input_%s_%s_shim', $form_id, $field['id'] ); - - default : - if(empty($target_input_id)) - $target_input_id = $field_id; - - $description = self::get_description(rgget("description", $field),"gfield_description"); - if($is_description_above) - $field_content = sprintf("%s%s{FIELD}%s", $admin_buttons, $target_input_id, esc_html($field_label), $required_div , $description, $validation_message); - else - $field_content = sprintf("%s{FIELD}%s%s", $admin_buttons, $target_input_id, esc_html($field_label), $required_div , $description, $validation_message); - break; - } - - if(RGFormsModel::get_input_type($field) == "creditcard" && !GFCommon::is_ssl() && !IS_ADMIN){ - $field_content = "
      " . __("This page is unsecured. Do not enter a real credit card number. Use this field only for testing purposes. ", "gravityforms") . "
      " . $field_content; - } - - $value = self::default_if_empty($field, $value); - - $field_content = str_replace("{FIELD}", GFCommon::get_field_input($field, $value, 0, $form_id), $field_content); - - $field_content = apply_filters("gform_field_content", $field_content, $field, $value, 0, $form_id); - - return $field_content; - } - - private static function default_if_empty($field, $value){ - - if(!GFCommon::is_empty_array($value)) - return $value; - - if(IS_ADMIN){ - $value = rgget("defaultValue", $field); - } - else{ - $value = rgar($field, "defaultValue"); - if(!is_array($value)) - $value = GFCommon::replace_variables_prepopulate(rgget("defaultValue", $field)); - } - - return $value; - } - - private static function get_description($description, $css_class){ - return IS_ADMIN || !empty($description) ? "
      " . $description . "
      " : ""; - } - - public static function get_credit_card_rules() { - - $cards = GFCommon::get_card_types(); - //$supported_cards = //TODO: Only include enabled cards - $rules = array(); - - foreach($cards as $card) { - $prefixes = explode(',', $card['prefixes']); - foreach($prefixes as $prefix) { - $rules[$card['slug']][] = $prefix; - } - } - - return $rules; - } - - private static function get_progress_bar($form, $form_id,$confirmation_message) { - - $progress_complete = false; - $progress_bar = ""; - $page_count = self::get_max_page_number($form); - $current_page = self::get_current_page($form_id); - $page_name = rgar(rgar($form["pagination"],"pages"), $current_page -1); - $page_name = !empty($page_name) ? " - " . $page_name : ""; - $style = $form["pagination"]["style"]; - $color = $style == "custom" ? " color:{$form["pagination"]["color"]};" : ""; - $bgcolor = $style == "custom" ? " background-color:{$form["pagination"]["backgroundColor"]};" : ""; - - if (!empty($confirmation_message)) - { - $progress_complete = true; - } - //check admin setting for whether the progress bar should start at zero - $start_at_zero = rgars($form, "pagination/display_progressbar_on_confirmation"); - //check for filter - $start_at_zero = apply_filters("gform_progressbar_start_at_zero", $start_at_zero, $form); - $progressbar_page_count = $start_at_zero ? $current_page - 1 : $current_page; - $percent = !$progress_complete ? floor(( ($progressbar_page_count) / $page_count ) * 100) . "%" : "100%"; - $percent_number = !$progress_complete ? floor(( ($progressbar_page_count) / $page_count ) * 100) . "" : "100"; + $email_esc = esc_attr( $email ); + $text = str_replace( '{save_email}', $email_esc, $text ); - if ($progress_complete) - { - $wrapper_css_class = GFCommon::get_browser_class() . " gform_wrapper"; + $resume_submit_button_text = __( 'Send Email', 'gravityforms' ); + $resume_email_validation_message = __( 'Please enter a valid email address.', 'gravityforms' ); - //add on surrounding wrapper class when confirmation page - $progress_bar = "
      "; - $page_name = !empty($form["pagination"]["progressbar_completion_text"]) ? $form["pagination"]["progressbar_completion_text"] : ""; - } + // The {save_email_input} accepts shortcode-style options button_text and validation_message. E.g., + // {save_email_input: button_text="Send the link to my email address" validation_message="The link couldn't be sent because the email address is not valid."} + preg_match_all( '/\{save_email_input:(.*?)\}/', $text, $matches, PREG_SET_ORDER ); + if ( is_array( $matches ) && isset( $matches[0] ) && isset( $matches[0][1] ) ) { + $options_string = isset( $matches[0][1] ) ? $matches[0][1] : ''; + $options = shortcode_parse_atts( $options_string ); + if ( isset( $options['button_text'] ) ) { + $resume_submit_button_text = $options['button_text']; + } + if ( isset( $options['validation_message'] ) ) { + $resume_email_validation_message = $options['validation_message']; + } + $full_tag = $matches[0][0]; + $text = str_replace( $full_tag, '{save_email_input}', $text ); + } - $progress_bar .=" -
      -

      "; - $progress_bar .= !$progress_complete ? __("Step", "gravityforms") . " {$current_page} " . __("of", "gravityforms") . " {$page_count}{$page_name}" : "{$page_name}"; - $progress_bar .= " -

      -
      -
      {$percent}
      -
      "; - //close div for surrounding wrapper class when confirmation page - $progress_bar .= $progress_complete ? $confirmation_message . "
      " : ""; + $action = esc_url( remove_query_arg( 'gf_token' ) ); - return $progress_bar; - } + $html_input_type = RGFormsModel::is_html5_enabled() ? 'email' : 'text'; - /** - * Validates the form's entry limit settings. Returns the entry limit message if entry limit exceeded. - * - * @param array $form current GF form object - * @return string If entry limit exceeded returns entry limit setting. - */ - public static function validate_entry_limit($form) { + $resume_token = esc_attr( $resume_token ); - //If form has a limit of entries, check current entry count - if(rgar($form,"limitEntries")) { - $period = rgar($form, "limitEntriesPeriod"); - $range = self::get_limit_period_dates($period); - $entry_count = RGFormsModel::get_lead_count($form['id'], "", null, null, $range["start_date"], $range["end_date"]); + $validation_message = ! is_null( $email ) && ! GFCommon::is_valid_email( $email ) ? sprintf( '
      %s
      ', $resume_email_validation_message ) : ''; - if($entry_count >= $form["limitEntriesCount"]) - return empty($form["limitEntriesMessage"]) ? "

      " . __("Sorry. This form is no longer accepting new submissions.", "gravityforms"). "

      " : "

      " . GFCommon::gform_do_shortcode($form["limitEntriesMessage"]) . "

      "; - } + $resume_form = "
      +
      + + + + + {$validation_message} +
      +
      "; - } + $text = str_replace( '{save_email_input}', $resume_form, $text ); - public static function validate_form_schedule($form) { - //If form has a schedule, make sure it is within the configured start and end dates - if(rgar($form, "scheduleForm")){ - $local_time_start = sprintf("%s %02d:%02d %s", $form["scheduleStart"], $form["scheduleStartHour"], $form["scheduleStartMinute"], $form["scheduleStartAmpm"]); - $local_time_end = sprintf("%s %02d:%02d %s", $form["scheduleEnd"], $form["scheduleEndHour"], $form["scheduleEndMinute"], $form["scheduleEndAmpm"]); - $timestamp_start = strtotime($local_time_start . ' +0000'); - $timestamp_end = strtotime($local_time_end . ' +0000'); - $now = current_time("timestamp"); - if (!empty($form["scheduleStart"]) && $now < $timestamp_start) - return empty($form["schedulePendingMessage"]) ? "

      " . __("This form is not yet available.", "gravityforms") . "

      " : "

      " . GFCommon::gform_do_shortcode($form["schedulePendingMessage"]) . "

      "; - elseif(!empty($form["scheduleEnd"]) && $now > $timestamp_end) - return empty($form["scheduleMessage"]) ? "

      " . __("Sorry. This form is no longer available.", "gravityforms") . "

      " : "

      " . GFCommon::gform_do_shortcode($form["scheduleMessage"]) . "

      "; - } + return $text; + } - } + public static function handle_save_email_confirmation( $form, $ajax ) { + $resume_email = $_POST['gform_resume_email']; + if ( ! GFCommon::is_valid_email( $resume_email ) ) { + GFCommon::log_debug( 'GFFormDisplay::handle_save_email_confirmation(): Invalid email address: ' . $resume_email ); + return new WP_Error( 'invalid_email' ); + } + $resume_token = $_POST['gform_resume_token']; + $submission_details = GFFormsModel::get_incomplete_submission_values( $resume_token ); + $submission_json = $submission_details['submission']; + $submission = json_decode( $submission_json, true ); + $entry = $submission['partial_entry']; + $form = self::update_confirmation( $form, $entry, 'form_save_email_sent' ); - public static function update_confirmation($form, $lead=null) { - if(!is_array(rgar($form, "confirmations"))) - return $form; + $confirmation = '
      ' . rgar( $form['confirmation'], 'message' ) . '
      '; + $nl2br = rgar( $form['confirmation'], 'disableAutoformat' ) ? false : true; + $save_email_confirmation = self::replace_save_variables( $confirmation, $form, $resume_token, $resume_email ); - // if there is only one confirmation, don't bother with the conditional logic, just return it - // this is here mostly to avoid the semi-costly GFFormsModel::create_lead() function unless we really need it - if(is_array($form["confirmations"]) && count($form['confirmations']) <= 1) { - $form['confirmation'] = reset($form['confirmations']); - return $form; - } + $save_email_confirmation = GFCommon::replace_variables( $save_email_confirmation, $form, $entry, false, true, $nl2br ); - if (empty($lead)){ - $lead = GFFormsModel::create_lead($form); + if ( $ajax ) { + $save_email_confirmation = "" . $save_email_confirmation . ''; } - foreach($form['confirmations'] as $confirmation) { - - if( rgar($confirmation, 'isDefault') ){ - continue; - } + GFCommon::log_debug( 'GFFormDisplay::handle_save_email_confirmation(): Confirmation => ' . print_r( $save_email_confirmation, true ) ); - if(isset($confirmation['isActive']) && ! $confirmation['isActive']) - continue; + return $save_email_confirmation; + } - $logic = rgar($confirmation, "conditionalLogic"); - if(GFCommon::evaluate_conditional_logic($logic, $form, $lead)) { - $form['confirmation'] = $confirmation; - return $form; - } + public static function handle_save_confirmation( $form, $resume_token, $confirmation_message, $ajax ) { + $resume_email = isset( $_POST['gform_resume_email'] ) ? $_POST['gform_resume_email'] : null; + $confirmation_message = self::replace_save_variables( $confirmation_message, $form, $resume_token, $resume_email ); + $confirmation_message = "
      " . $confirmation_message . '
      '; + if ( $ajax ) { + $confirmation_message = "" . $confirmation_message . ''; + } - } - $filtered_list = wp_filter_object_list($form['confirmations'], array('isDefault' => true)); - $form['confirmation'] = reset($filtered_list); + GFCommon::log_debug( 'GFFormDisplay::handle_save_confirmation(): Confirmation => ' . print_r( $confirmation_message, true ) ); - return $form; - } + return $confirmation_message; + } } \ No newline at end of file diff --git a/form_list.php b/form_list.php index 425c1c8..c4988b6 100644 --- a/form_list.php +++ b/form_list.php @@ -1,640 +1,678 @@ - - - - - - - - - - - - -
      - -

      - - -

      - - -

      - - -
      - - - - - - - -
      -
      - - - - '; - echo apply_filters("gform_form_apply_button", $apply_button); - ?> - -
      - -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0){ - $alternate_row = false; - foreach($forms as $form){ - $conversion = "0%"; - if($form->view_count > 0){ - $conversion = (number_format($form->lead_count / $form->view_count, 3) * 100) . "%"; - } - $gf_form_locking = new GFFormLocking(); - ?> - ' valign="top" data-id="id) ?>"> - - - - - - - - - - - - - - - - - -
      lock_indicator();?> - - <?php echo $form->is_active ? __(" title="is_active ? __("Active", "gravityforms") : __("Inactive", "gravityforms");?>" onclick="ToggleActive(this, id ?>); " /> - - id ?> - title; - else : - ?> - ">title ?> - lock_info($form->id); - endif - ?> -
      - - __("Restore", "gravityforms"), - 'title' => __("Restore", "gravityforms"), - 'url' => 'javascript:RestoreForm(' . $form->id . ');', - 'capabilities' => "gravityforms_delete_forms", - 'priority' => 600 - ); - $form_actions['delete'] = array( - 'label' => __("Delete permanently", "gravityforms"), - 'title' => __("Delete permanently", "gravityforms"), - 'menu_class' => 'delete', - 'url' => 'javascript: if(confirm("' . __("WARNING: You are about to delete this form and ALL entries associated with it. ", "gravityforms") . __('\"Cancel\" to stop, \"OK\" to delete.', "gravityforms") . '")){ DeleteForm(' . $form->id . ');}', - 'capabilities' => "gravityforms_delete_forms", - 'priority' => 500 - ); - - } else { - require_once(GFCommon::get_base_path() . '/form_settings.php'); - - $form_actions = GFForms::get_toolbar_menu_items($form->id, true); - - $form_actions['duplicate'] = array( - 'label' => __("Duplicate", "gravityforms"), - 'title' => __("Duplicate this form", "gravityforms"), - 'url' => 'javascript:DuplicateForm(' . $form->id . ');', - 'capabilities' => "gravityforms_create_form", - 'priority' => 600 - ); - - $form_actions['trash'] = array( - 'label' => __("Trash", "gravityforms"), - 'title' => __("Move this form to the trash", "gravityforms"), - 'url' => 'javascript:TrashForm(' . $form->id . ');', - 'capabilities' => "gravityforms_delete_forms", - 'menu_class' => 'trash', - 'priority' => 500 - ); - - } - - $form_actions = apply_filters("gform_form_actions", $form_actions, $form->id); - - echo GFForms::format_toolbar_menu_items($form_actions, true); - - ?> - -
      -
      view_count ?> - - lead_count > 0 && !$trash) { ?> - id}"); ?>">lead_count; ?> - lead_count; - } ?> - -
      - ', ""); - - ?> -
      -
      -
      - - - - '; - echo apply_filters("gform_form_apply_button", $apply_button); - } - ?> -
      -
      -
      -
      -
      - __('There was an issue creating your form.', 'gravityforms') ) ) ); - } - - GFFormsModel::ensure_tables_exist(); - - require_once(GFCommon::get_base_path() . '/form_detail.php'); - - $form_json = rgpost('form'); - - $form = json_decode($form_json, true); - - if( empty( $form['title'] ) ) { - $result = array( 'error' => __( 'Please enter a form title.', 'gravityforms' ) ); - die( json_encode( $result ) ); - } - - /* - * This is now added in JavaScript using jQuery.toJSON(). See the DocBlock GFFormDetail::save_form_info() for details. - * - $form['labelPlacement'] = 'top_label'; - $form['descriptionPlacement'] = 'below'; - $form['button'] = array( - 'type' => 'text', - 'text' => __("Submit", "gravityforms"), - 'imageUrl' => '' - ); - $form['fields'] = array(); - */ - - $result = GFFormDetail::save_form_info( 0, $form_json ); - - switch(rgar($result, 'status')){ - case 'invalid_json': - $result['error'] = __('There was an issue creating your form.', 'gravityforms'); - die(json_encode($result)); - - case 'duplicate_title': - $result['error'] = __('Please enter a unique form title.', 'gravityforms'); - die(json_encode($result)); - - default: - $form_id = abs($result['status']); - die( json_encode( array('redirect' => admin_url("admin.php?page=gf_edit_forms&id={$form_id}")) ) ); - } - - } +class GFFormList { + + public static function form_list_page() { + global $wpdb; + + if ( ! GFCommon::ensure_wp_version() ) { + return; + } + + echo GFCommon::get_remote_message(); + + $action = RGForms::post( 'action' ); + $bulk_action = RGForms::post( 'bulk_action' ); + $bulk_action = ! empty( $bulk_action ) ? $bulk_action : RGForms::post( 'bulk_action2' ); + + if ( $action == 'trash' ) { + check_admin_referer( 'gforms_update_forms', 'gforms_update_forms' ); + $form_id = RGForms::post( 'action_argument' ); + RGFormsModel::trash_form( $form_id ); + $message = __( 'Form moved to the trash.', 'gravityforms' ); + } else if ( $action == 'restore' ) { + check_admin_referer( 'gforms_update_forms', 'gforms_update_forms' ); + $form_id = RGForms::post( 'action_argument' ); + RGFormsModel::restore_form( $form_id ); + $message = __( 'Form restored.', 'gravityforms' ); + } else if ( $action == 'delete' ) { + check_admin_referer( 'gforms_update_forms', 'gforms_update_forms' ); + $form_id = RGForms::post( 'action_argument' ); + if ( GFCommon::current_user_can_any( 'gravityforms_delete_forms' ) ) { + RGFormsModel::delete_form( $form_id ); + $message = __( 'Form deleted.', 'gravityforms' ); + } else { + $message = __( "You don't have adequate permission to delete forms.", 'gravityforms' ); + } + } else if ( $action == 'duplicate' ) { + check_admin_referer( 'gforms_update_forms', 'gforms_update_forms' ); + $form_id = RGForms::post( 'action_argument' ); + RGFormsModel::duplicate_form( $form_id ); + $message = __( 'Form duplicated.', 'gravityforms' ); + } + + if ( $bulk_action ) { + + check_admin_referer( 'gforms_update_forms', 'gforms_update_forms' ); + $form_ids = is_array( rgpost( 'form' ) ) ? rgpost( 'form' ) : array(); + $form_count = count( $form_ids ); + + switch ( $bulk_action ) { + case 'trash': + GFFormsModel::trash_forms( $form_ids ); + $message = _n( '%s form moved to the trash.', '%s forms moved to the trash.', $form_count, 'gravityforms' ); + break; + case 'restore': + GFFormsModel::restore_forms( $form_ids ); + $message = _n( '%s form restored.', '%s forms restored.', $form_count, 'gravityforms' ); + break; + case 'delete': + if ( GFCommon::current_user_can_any( 'gravityforms_delete_forms' ) ) { + GFFormsModel::delete_forms( $form_ids ); + $message = _n( '%s form deleted.', '%s forms deleted.', $form_count, 'gravityforms' ); + } else { + $message = __( "You don't have adequate permissions to delete forms.", 'gravityforms' ); + } + break; + case 'reset_views': + foreach ( $form_ids as $form_id ) { + GFFormsModel::delete_views( $form_id ); + } + $message = _n( 'Views for %s form have been reset.', 'Views for %s forms have been reset.', $form_count, 'gravityforms' ); + break; + case 'delete_entries': + if ( GFCommon::current_user_can_any( 'gravityforms_delete_entries' ) ) { + foreach ( $form_ids as $form_id ) { + GFFormsModel::delete_leads_by_form( $form_id ); + } + $message = _n( 'Entries for %s form have been deleted.', 'Entries for %s forms have been deleted.', $form_count, 'gravityforms' ); + } else { + $message = __( "You don't have adequate permission to delete entries.", 'gravityforms' ); + } + + break; + case 'activate': + foreach ( $form_ids as $form_id ) { + GFFormsModel::update_form_active( $form_id, 1 ); + } + $message = _n( '%s form has been marked as active.', '%s forms have been marked as active.', $form_count, 'gravityforms' ); + break; + case 'deactivate': + foreach ( $form_ids as $form_id ) { + GFFormsModel::update_form_active( $form_id, 0 ); + } + $message = _n( '%s form has been marked as inactive.', '%s forms have been marked as inactive.', $form_count, 'gravityforms' ); + break; + } + + if ( isset( $message ) ) + $message = sprintf( $message, $form_count ); + + } + $sort_column = empty( $_GET['sort'] ) ? 'title' : $_GET['sort']; + $sort_direction = empty( $_GET['dir'] ) ? 'ASC' : $_GET['dir']; + $active = RGForms::get( 'active' ) == '' ? null : RGForms::get( 'active' ); + $trash = RGForms::get( 'trash' ) == '' ? false : RGForms::get( 'trash' ); + $trash = esc_attr( $trash ); + $forms = RGFormsModel::get_forms( $active, $sort_column, $sort_direction, $trash ); + + $form_count = RGFormsModel::get_form_count(); + + // - new form modal - // + + wp_print_styles( array( 'thickbox' ) ); + + /*wp_enqueue_script( 'form_admin' ); + wp_print_scripts( array( 'form_admin' ) );*/ + + ?> + + + + + + + + + + + + +
      + +

      + + +

      + + +

      + + +
      + + + + + + + +
      +
      + + + + '; + echo apply_filters( 'gform_form_apply_button', $apply_button ); + ?> + +
      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 ) { + $alternate_row = false; + foreach ( $forms as $form ) { + $conversion = '0%'; + if ( $form->view_count > 0 ) { + $conversion = ( number_format( $form->lead_count / $form->view_count, 3 ) * 100 ) . '%'; + } + $gf_form_locking = new GFFormLocking(); + ?> + ' valign="top" data-id="id ) ?>"> + + + + + + + + + + + + + + + + + +
      + +
      + +
      + lock_indicator(); ?> + + + <?php echo $form->is_active ? __( 'Active', 'gravityforms' ) : __( 'Inactive', 'gravityforms' ); ?> + + id ?> + title; + else : + ?> + title ?> + lock_info( $form->id ); + endif + ?> +
      + + __( 'Restore', 'gravityforms' ), + 'title' => __( 'Restore', 'gravityforms' ), + 'url' => 'javascript:RestoreForm(' . $form->id . ');', + 'capabilities' => 'gravityforms_delete_forms', + 'priority' => 600, + ); + $form_actions['delete'] = array( + 'label' => __( 'Delete permanently', 'gravityforms' ), + 'title' => __( 'Delete permanently', 'gravityforms' ), + 'menu_class' => 'delete', + 'url' => 'javascript: if(confirm("' . __( 'WARNING: You are about to delete this form and ALL entries associated with it. ', 'gravityforms' ) . __( '\"Cancel\" to stop, \"OK\" to delete.', 'gravityforms' ) . '")){ DeleteForm(' . $form->id . ');}', + 'capabilities' => 'gravityforms_delete_forms', + 'priority' => 500, + ); + + } else { + require_once( GFCommon::get_base_path() . '/form_settings.php' ); + + $form_actions = GFForms::get_toolbar_menu_items( $form->id, true ); + + $form_actions['duplicate'] = array( + 'label' => __( 'Duplicate', 'gravityforms' ), + 'title' => __( 'Duplicate this form', 'gravityforms' ), + 'url' => 'javascript:DuplicateForm(' . $form->id . ');', + 'capabilities' => 'gravityforms_create_form', + 'priority' => 600, + ); + + $form_actions['trash'] = array( + 'label' => __( 'Trash', 'gravityforms' ), + 'title' => __( 'Move this form to the trash', 'gravityforms' ), + 'url' => 'javascript:TrashForm(' . $form->id . ');', + 'capabilities' => 'gravityforms_delete_forms', + 'menu_class' => 'trash', + 'priority' => 500, + ); + + } + + $form_actions = apply_filters( 'gform_form_actions', $form_actions, $form->id ); + + echo GFForms::format_toolbar_menu_items( $form_actions, true ); + + ?> + +
      +
      view_count ?> + + lead_count > 0 && ! $trash ) { ?> + id}" ); ?>">lead_count; ?> + lead_count; + } ?> + +
      + ', '' ); + + ?> +
      +
      +
      + + + + '; + echo apply_filters( 'gform_form_apply_button', $apply_button ); + } + ?> +
      +
      +
      +
      +
      + __( 'There was an issue creating your form.', 'gravityforms' ) ) ) ); + } + + GFFormsModel::ensure_tables_exist(); + + require_once( GFCommon::get_base_path() . '/form_detail.php' ); + + $form_json = rgpost( 'form' ); + + $form = json_decode( $form_json, true ); + + if ( empty( $form['title'] ) ) { + $result = array( 'error' => __( 'Please enter a form title.', 'gravityforms' ) ); + die( json_encode( $result ) ); + } + + $result = GFFormDetail::save_form_info( 0, $form_json ); + + switch ( rgar( $result, 'status' ) ) { + case 'invalid_json': + $result['error'] = __( 'There was an issue creating your form.', 'gravityforms' ); + die( json_encode( $result ) ); + + case 'duplicate_title': + $result['error'] = __( 'Please enter a unique form title.', 'gravityforms' ); + die( json_encode( $result ) ); + + default: + $form_id = abs( $result['status'] ); + die( json_encode( array( 'redirect' => admin_url( "admin.php?page=gf_edit_forms&id={$form_id}" ) ) ) ); + } + } } diff --git a/form_settings.php b/form_settings.php index 68669d6..59401cd 100644 --- a/form_settings.php +++ b/form_settings.php @@ -1,495 +1,543 @@ + self::page_header( __( 'Form Settings', 'gravityforms' ) ); - - - -
      -

      - - ', '') ?> -

      -
      - -
      -

      - -

      -
      - -
      -

      - -

      -
      - + + + + +
      +

      + + ', '' ) ?> +

      +
      + +
      +

      + +

      +
      + +
      +

      + +

      +
      +
      '; - $subsetting_close = ' + $subsetting_close = '
      '; - - //create form settings table rows and put them into an array - //form title - $tr_form_title = ' + //create form settings table rows and put them into an array + //form title + $tr_form_title = ' ' . - __("Form title", "gravityforms") . ' ' . - gform_tooltip("form_title", "", true) . - ' - - - + __( 'Form title', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_title', '', true ) . + ' + + + '; - //form description - $tr_form_description = ' + //form description + $tr_form_description = ' ' . - __("Form description", "gravityforms") . ' ' . - gform_tooltip("form_description", "", true) . - ' - - - + __( 'Form description', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_description', '', true ) . + ' + + + '; - //form label placement - $alignment_options = array( - 'top_label' => __("Top aligned", "gravityforms"), - 'left_label' => __("Left aligned", "gravityforms"), - 'right_label' => __("Right aligned", "gravityforms") - ); + //form label placement + $alignment_options = array( + 'top_label' => __( 'Top aligned', 'gravityforms' ), + 'left_label' => __( 'Left aligned', 'gravityforms' ), + 'right_label' => __( 'Right aligned', 'gravityforms' ) + ); - $label_dd = ""; - foreach($alignment_options as $value => $label) { - $selected = $form['labelPlacement'] == $value ? 'selected="selected"' : ''; + $label_dd = ''; + foreach ( $alignment_options as $value => $label ) { + $selected = $form['labelPlacement'] == $value ? 'selected="selected"' : ''; - $label_dd .= ''; - } - $tr_form_label_placement = ' + $label_dd .= ''; + } + $tr_form_label_placement = ' ' . - __("Label placement", "gravityforms") . ' ' . - gform_tooltip("form_label_placement", "", true) . - ' - - - - - '; - - //form description placement - $style = $form['labelPlacement'] != 'top_label' ? 'display:none;' : ''; - $description_dd = ""; - $description_options = array( - 'below' => __("Below inputs", "gravityforms"), - 'above' => __("Above inputs", "gravityforms") - ); - foreach($description_options as $value => $label) { - $selected = rgar( $form, 'descriptionPlacement' ) == $value ? 'selected="selected"' : ''; - - $description_dd .= ''; - } - $tr_form_description_placement = ' + __( 'Label placement', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_label_placement', '', true ) . + ' + + + + + '; + + //form description placement + $style = $form['labelPlacement'] != 'top_label' ? 'display:none;' : ''; + $description_dd = ''; + $description_options = array( + 'below' => __( 'Below inputs', 'gravityforms' ), + 'above' => __( 'Above inputs', 'gravityforms' ) + ); + foreach ( $description_options as $value => $label ) { + $selected = rgar( $form, 'descriptionPlacement' ) == $value ? 'selected="selected"' : ''; + + $description_dd .= ''; + } + $tr_form_description_placement = ' ' . - __("Description placement", "gravityforms") . ' ' . - gform_tooltip("form_description_placement", "", true) . - ' - - - - - '; - - - - //css class name - $tr_css_class_name = ' + __( 'Description placement', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_description_placement', '', true ) . + ' + + + + + '; + + + //Sub Label placement + $sub_label_placement_dd = ''; + $sub_label_placement_options = array( + 'below' => __( 'Below inputs', 'gravityforms' ), + 'above' => __( 'Above inputs', 'gravityforms' ) + ); + foreach ( $sub_label_placement_options as $value => $label ) { + $selected = rgar( $form, 'subLabelPlacement' ) == $value ? 'selected="selected"' : ''; + + $sub_label_placement_dd .= ''; + } + $tr_sub_label_placement = ' + + + ' . + __( 'Sub-label placement', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_sub_label_placement', '', true ) . + ' + + + + + '; + + + //css class name + $tr_css_class_name = ' - - - + __( 'CSS Class Name', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_css_class', '', true ) . + ' + + + '; - - //create form advanced settings table rows - //create form button rows - $form_button_type = rgars($form, 'button/type'); - $text_button_checked = ""; - $image_button_checked = ""; - $text_style_display = ""; - $image_style_display = ""; - if ($form_button_type == "text"){ + //create form advanced settings table rows + //create form button rows + $form_button_type = rgars( $form, 'button/type' ); + $text_button_checked = ''; + $image_button_checked = ''; + $text_style_display = ''; + $image_style_display = ''; + if ( $form_button_type == 'text' ) { $text_button_checked = 'checked="checked"'; - $image_style_display = "display:none;"; - } - else if ($form_button_type == "image"){ + $image_style_display = 'display:none;'; + } else if ( $form_button_type == 'image' ) { $image_button_checked = 'checked="checked"'; - $text_style_display = "display:none;"; + $text_style_display = 'display:none;'; } - //form button - $tr_form_button = ' + //form button + $tr_form_button = ' - ' . __("Input type", "gravityforms") . ' + ' . __( 'Input type', 'gravityforms' ) . ' + __( 'Text', 'gravityforms' ) . + ' -    +    - + + __( 'Image', 'gravityforms' ) . ' '; - //form button text - $tr_form_button_text = $subsetting_open . ' + //form button text + $tr_form_button_text = $subsetting_open . ' ' . - __("Button text", "gravityforms") . ' ' . - gform_tooltip("form_button_text", "", true) . - ' - - - + __( 'Button text', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_button_text', '', true ) . + ' + + + '; - //form button image path - $tr_form_button_image_path = ' + //form button image path + $tr_form_button_image_path = ' ' . - __("Button image path", "gravityforms") . ' ' . - gform_tooltip("form_button_image", "", true) . - ' - - - + __( 'Button image path', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_button_image', '', true ) . + ' + + + ' . $subsetting_close; - //form button conditional logic - $button_conditional_checked = ""; - if (rgars($form, 'button/conditionalLogic')){ + //form button conditional logic + $button_conditional_checked = ''; + if ( rgars( $form, 'button/conditionalLogic' ) ) { $button_conditional_checked = 'checked="checked"'; - } + } - $tr_form_button_conditional = ' + $tr_form_button_conditional = ' - ' . __("Button conditional logic", "gravityforms") . ' ' . gform_tooltip("form_button_conditional_logic", "", true) . ' + ' . __( 'Button conditional logic', 'gravityforms' ) . ' ' . gform_tooltip( 'form_button_conditional_logic', '', true ) . ' - - + + @@ -502,1068 +550,1306 @@ function ShowAdvancedFormSettings() { '; - //limit entries - $limit_entry_checked = ""; - $limit_entry_style = ""; - $limit_entries_dd = ""; - if(rgar($form, 'limitEntries')){ - $limit_entry_checked = 'checked="checked"'; + //create save and continue rows + + $save_enabled_checked = ''; + $save_enabled_style = ''; + + if ( rgars( $form, 'save/enabled' ) ) { + $save_enabled_checked = 'checked="checked"'; + } else { + $save_enabled_style = 'style="display:none;"'; + } - } - else{ - $limit_entry_style = "display:none"; - } - - $limit_periods = array( - '' => __('total entries', 'gravityforms'), - 'day' => __('per day', 'gravityforms'), - 'week' => __('per week', 'gravityforms'), - 'month' => __('per month', 'gravityforms'), - 'year' => __('per year', 'gravityforms') - ); - foreach($limit_periods as $value => $label) { - $selected = rgar($form, 'limitEntriesPeriod') == $value ? 'selected="selected"' : ''; - $limit_entries_dd .= ''; - } - - $tr_limit_entries = ' + $save_button_text = isset( $form['save']['button']['text'] ) ? esc_attr( rgars( $form, 'save/button/text' ) ) : __( 'Save and Continue Later', 'gravityforms' ); + + $tr_enable_save = ' - ' . __("Limit number of entries", "gravityforms") . ' ' . gform_tooltip("form_limit_entries", "", true) . ' + ' . __( 'Save and Continue', 'gravityforms' ) . ' ' . gform_tooltip( 'form_enable_save', '', true ) . ' - - + + '; - //limit entries count - $tr_limit_entries_count = ' - + // Warning + $tr_save_warning = ' + ' . $subsetting_open . ' + + + +
      +
      + + '. __('This feature stores potentially private and sensitive data on this server and protects it with a unique link which is displayed to the user on the page in plain, unencrypted text. The link is similar to a password so it\'s strongly advisable to ensure that the page enforces a secure connection (HTTPS) before activating this setting.', 'gravityforms'). + '
      +
      +
      + + '. __('When this setting is activated two confirmations and one notification are automatically generated and can be modified in their respective editors. When this setting is deactivated the confirmations and the notification will be deleted automatically and any modifications will be lost.', 'gravityforms'). + '
      +
      + + + '; + + //save button text + $tr_save_button_text = ' + ' . - __("Number of Entries", "gravityforms") . - ' + __( 'Link text', 'gravityforms' ) . ' ' . + gform_tooltip( 'form_save_button_text', '', true ) . + ' + + + + + ' . $subsetting_close . ' + '; + + //limit entries + $limit_entry_checked = ''; + $limit_entry_style = ''; + $limit_entries_dd = ''; + if ( rgar( $form, 'limitEntries' ) ) { + $limit_entry_checked = 'checked="checked"'; + + } else { + $limit_entry_style = 'display:none'; + } + + $limit_periods = array( + '' => __( 'total entries', 'gravityforms' ), + 'day' => __( 'per day', 'gravityforms' ), + 'week' => __( 'per week', 'gravityforms' ), + 'month' => __( 'per month', 'gravityforms' ), + 'year' => __( 'per year', 'gravityforms' ) + ); + foreach ( $limit_periods as $value => $label ) { + $selected = rgar( $form, 'limitEntriesPeriod' ) == $value ? 'selected="selected"' : ''; + $limit_entries_dd .= ''; + } + + $tr_limit_entries = ' + + + ' . __( 'Limit number of entries', 'gravityforms' ) . ' ' . gform_tooltip( 'form_limit_entries', '', true ) . ' - + + + + '; + + //limit entries count + $tr_limit_entries_count = ' + + ' . $subsetting_open . ' + + ' . + __( 'Number of Entries', 'gravityforms' ) . + ' + + +   - - ' . $subsetting_close . ' + $limit_entries_dd . + ' + + ' . $subsetting_close . ' '; - //limit entries message - $tr_limit_entries_message = ' + //limit entries message + $tr_limit_entries_message = ' ' . $subsetting_open . ' - - - + __( 'Entry Limit Reached Message', 'gravityforms' ) . + ' + + + ' . $subsetting_close . ' '; - //schedule form - $schedule_form_checked = ""; - $schedule_form_style = ""; - $start_hour_dd = ""; - $start_minute_dd = ""; - $start_am_selected = ""; - $start_pm_selected = ""; - $end_hour_dd = ""; - $end_minute_dd = ""; - $end_am_selected = ""; - $end_pm_selected = ""; - - if (rgar($form, 'scheduleForm')){ + //schedule form + $schedule_form_checked = ''; + $schedule_form_style = ''; + $start_hour_dd = ''; + $start_minute_dd = ''; + $start_am_selected = ''; + $start_pm_selected = ''; + $end_hour_dd = ''; + $end_minute_dd = ''; + $end_am_selected = ''; + $end_pm_selected = ''; + + if ( rgar( $form, 'scheduleForm' ) ) { $schedule_form_checked = 'checked="checked"'; - } - else{ - $schedule_form_style = "display:none"; - } + } else { + $schedule_form_style = 'display:none'; + } //create start hour dd options - for($i = 1; $i <= 12; $i++) { - $selected = rgar($form, 'scheduleStartHour') == $i ? 'selected="selected"' : ''; - $start_hour_dd .= ''; + for ( $i = 1; $i <= 12; $i ++ ) { + $selected = rgar( $form, 'scheduleStartHour' ) == $i ? 'selected="selected"' : ''; + $start_hour_dd .= ''; } //create start minute dd options - foreach(array('00', '15', '30', '45') as $value) { - $selected = rgar($form, 'scheduleStartMinute') == $value ? 'selected="selected"' : ''; - $start_minute_dd .= ''; - } - //set start am/pm - if (rgar($form, 'scheduleStartAmpm') == 'am') { - $start_am_selected = 'selected="selected"'; - } - elseif (rgar($form, 'scheduleStartAmpm') == 'pm'){ + foreach ( array( '00', '15', '30', '45' ) as $value ) { + $selected = rgar( $form, 'scheduleStartMinute' ) == $value ? 'selected="selected"' : ''; + $start_minute_dd .= ''; + } + //set start am/pm + if ( rgar( $form, 'scheduleStartAmpm' ) == 'am' ) { + $start_am_selected = 'selected="selected"'; + } elseif ( rgar( $form, 'scheduleStartAmpm' ) == 'pm' ) { $start_pm_selected = 'selected="selected"'; - } - //create end hour dd options - for($i = 1; $i <= 12; $i++) { - $selected = rgar($form, 'scheduleEndHour') == $i ? 'selected="selected"' : ''; - $end_hour_dd .= ''; + } + //create end hour dd options + for ( $i = 1; $i <= 12; $i ++ ) { + $selected = rgar( $form, 'scheduleEndHour' ) == $i ? 'selected="selected"' : ''; + $end_hour_dd .= ''; } //create end minute dd options - foreach(array('00', '15', '30', '45') as $value) { - $selected = rgar($form, 'scheduleEndMinute') == $value ? 'selected="selected"' : ''; - $end_minute_dd .= ''; + foreach ( array( '00', '15', '30', '45' ) as $value ) { + $selected = rgar( $form, 'scheduleEndMinute' ) == $value ? 'selected="selected"' : ''; + $end_minute_dd .= ''; } //set end am/pm - if (rgar($form, 'scheduleEndAmpm') == 'am') { - $end_am_selected = 'selected="selected"'; - } - elseif (rgar($form, 'scheduleEndAmpm') == 'pm'){ + if ( rgar( $form, 'scheduleEndAmpm' ) == 'am' ) { + $end_am_selected = 'selected="selected"'; + } elseif ( rgar( $form, 'scheduleEndAmpm' ) == 'pm' ) { $end_pm_selected = 'selected="selected"'; - } + } - //schedule form - $tr_schedule_form = ' + //schedule form + $tr_schedule_form = ' - ' . __("Schedule form", "gravityforms") . ' ' . gform_tooltip("form_schedule_form", "", true) . ' + ' . __( 'Schedule form', 'gravityforms' ) . ' ' . gform_tooltip( 'form_schedule_form', '', true ) . ' - + '; - //schedule start - $tr_schedule_start = ' + //schedule start + $tr_schedule_start = ' ' . $subsetting_open . ' - + - +    - : - - + : + + ' . $subsetting_close . ' '; - //schedule end - $tr_schedule_end = ' - + //schedule end + $tr_schedule_end = ' + ' . $subsetting_open . ' - ' . __("Schedule Form End Date/Time", "gravityforms") . ' + ' . __( 'Schedule Form End Date/Time', 'gravityforms' ) . ' - +    - : - - + : + + ' . $subsetting_close . ' '; - //schedule message - $tr_schedule_pending_message = ' - + //schedule message + $tr_schedule_pending_message = ' + ' . $subsetting_open . ' - ' . __("Form Pending Message", "gravityforms") . ' + ' . __( 'Form Pending Message', 'gravityforms' ) . ' - + ' . $subsetting_close . ' '; - //schedule message - $tr_schedule_message = ' - + //schedule message + $tr_schedule_message = ' + ' . $subsetting_open . ' - ' . __("Form Expired Message", "gravityforms") . ' + ' . __( 'Form Expired Message', 'gravityforms' ) . ' - + ' . $subsetting_close . ' '; - //honey pot - $honey_pot_checked = ""; - if (rgar($form, 'enableHoneypot')){ + //honey pot + $honey_pot_checked = ''; + if ( rgar( $form, 'enableHoneypot' ) ) { $honey_pot_checked = 'checked="checked"'; - } - $tr_honey_pot = ' + } + $tr_honey_pot = ' - ' . __("Anti-spam honeypot", "gravityforms") . ' ' . gform_tooltip("form_honeypot", "", true) . ' + ' . __( 'Anti-spam honeypot', 'gravityforms' ) . ' ' . gform_tooltip( 'form_honeypot', '', true ) . ' - + '; - //enable animation - $enable_animation_checked = ""; - if (rgar($form, 'enableAnimation')){ + //enable animation + $enable_animation_checked = ''; + if ( rgar( $form, 'enableAnimation' ) ) { $enable_animation_checked = 'checked="checked"'; - } - $tr_enable_animation = ' + } + $tr_enable_animation = ' - ' . __("Animated transitions", "gravityforms") . ' ' . gform_tooltip("form_animation", "", true) . ' + ' . __( 'Animated transitions', 'gravityforms' ) . ' ' . gform_tooltip( 'form_animation', '', true ) . ' - + '; - //require login - $require_login_checked = ""; - $require_login_style = ""; - if (rgar($form, 'requireLogin')){ + //require login + $require_login_checked = ''; + $require_login_style = ''; + if ( rgar( $form, 'requireLogin' ) ) { $require_login_checked = 'checked="checked"'; - } - else{ - $require_login_style = "display:none"; - } - $tr_requires_login = ' + } else { + $require_login_style = 'display:none'; + } + $tr_requires_login = ' - ' . __("Require user to be logged in", "gravityforms") . ' ' . gform_tooltip("form_require_login", "", true) . ' + ' . __( 'Require user to be logged in', 'gravityforms' ) . ' ' . gform_tooltip( 'form_require_login', '', true ) . ' - + '; - //require login message - $tr_requires_login_message = ' - + //require login message + $tr_requires_login_message = ' + ' . $subsetting_open . ' - ' . __("Require Login Message", "gravityforms") . ' ' . gform_tooltip("form_require_login_message", "", true) . ' + ' . __( 'Require Login Message', 'gravityforms' ) . ' ' . gform_tooltip( 'form_require_login_message', '', true ) . ' - + ' . $subsetting_close . ' '; - //populate arrays with table rows - $form_basics = array("form_title" => $tr_form_title, "form_description" => $tr_form_description); - $form_layout = array("form_label_placement" => $tr_form_label_placement, "form_description_placement" => $tr_form_description_placement, "css_class_name" => $tr_css_class_name); - $form_button = array("form_button_type" => $tr_form_button, "form_button_text" => $tr_form_button_text, "form_button_image_path" => $tr_form_button_image_path, "form_button_conditional" => $tr_form_button_conditional); - $form_restrictions = array("limit_entries" => $tr_limit_entries, "number_of_entries" => $tr_limit_entries_count, "entry_limit_message" => $tr_limit_entries_message, "schedule_form" => $tr_schedule_form, "schedule_start" => $tr_schedule_start, "schedule_end" => $tr_schedule_end, "schedule_pending_message" => $tr_schedule_pending_message, "schedule_message" => $tr_schedule_message, "requires_login" => $tr_requires_login, "requires_login_message" => $tr_requires_login_message); - $form_options = array("honey_pot" => $tr_honey_pot, "enable_animation" => $tr_enable_animation); - - $form_settings = array( - __("Form Basics", "gravityforms") => $form_basics, - __("Form Layout", "gravityforms") => $form_layout, - __("Form Button", "gravityforms") => $form_button, - __("Restrictions", "gravityforms") => $form_restrictions, - __("Form Options", "gravityforms") => $form_options); - - $form_settings = apply_filters("gform_form_settings", $form_settings, $form); - ?> - -
      - -

      - -
      - - - $value) { - ?> - - - - $tr_form_title, 'form_description' => $tr_form_description ); + $form_layout = array( 'form_label_placement' => $tr_form_label_placement, 'form_description_placement' => $tr_form_description_placement, 'form_sub_label_placement' => $tr_sub_label_placement, 'css_class_name' => $tr_css_class_name ); + $form_button = array( 'form_button_type' => $tr_form_button, 'form_button_text' => $tr_form_button_text, 'form_button_image_path' => $tr_form_button_image_path, 'form_button_conditional' => $tr_form_button_conditional ); + $save_button = array( 'save_enabled' => $tr_enable_save, 'save_warning' => $tr_save_warning, 'save_button_text' => $tr_save_button_text ); + $form_restrictions = array( 'limit_entries' => $tr_limit_entries, 'number_of_entries' => $tr_limit_entries_count, 'entry_limit_message' => $tr_limit_entries_message, 'schedule_form' => $tr_schedule_form, 'schedule_start' => $tr_schedule_start, 'schedule_end' => $tr_schedule_end, 'schedule_pending_message' => $tr_schedule_pending_message, 'schedule_message' => $tr_schedule_message, 'requires_login' => $tr_requires_login, 'requires_login_message' => $tr_requires_login_message ); + $form_options = array( 'honey_pot' => $tr_honey_pot, 'enable_animation' => $tr_enable_animation ); + + $form_settings = array( + __( 'Form Basics', 'gravityforms' ) => $form_basics, + __( 'Form Layout', 'gravityforms' ) => $form_layout, + __( 'Form Button', 'gravityforms' ) => $form_button, + __( 'Save and Continue', 'gravityforms' ) => $save_button, + __( 'Restrictions', 'gravityforms' ) => $form_restrictions, + __( 'Form Options', 'gravityforms' ) => $form_options, + ); + + $form_settings = apply_filters( 'gform_form_settings', $form_settings, $form ); + ?> + +
      + +

      + + + +

      + $value ) { + ?> + + + + -
      +

      +
      + } + } + ?> + -
      - - - - - - +
      + + + + + + - - - - - - - - + + + + + + + + -
      +
      - - - + + + -
      + -
      +
    - 0 ) ); + ?> - self::page_header(__('Confirmations', 'gravityforms')); +

    + +

    - $add_new_url = add_query_arg(array("cid" => 0)); - ?> + -

    + - var mysack = new sack("" ); - mysack.execute = 1; - mysack.method = 'POST'; - mysack.setVar( "action", "rg_update_confirmation_active" ); - mysack.setVar( "rg_update_confirmation_active", "" ); - mysack.setVar( "form_id", ); - mysack.setVar( "confirmation_id", confirmation_id); - mysack.setVar( "is_active", is_active ? 0 : 1); - mysack.onError = function() { alert('' )}; - mysack.runAJAX(); + prepare_items(); + ?> - return true; - } - +
    - prepare_items(); - ?> + display(); ?> - + + - display(); ?> + - - +
    - + + public static function confirmations_edit_page( $form_id, $confirmation_id ) { - - $confirmation = self::handle_confirmation_edit_submission( rgar($form["confirmations"], $confirmation_id), $form ); + + - + -
    +
    -
    + - - -
    + + +
    - + - - - " /> - + + + + -

    - -

    +

    + +

    - + -
    + -
    +
    -
    - +
    '; - $subsetting_close = ' + $subsetting_close = '
    '; - $ui_settings = array(); - $confirmation_type = rgar($confirmation, 'type') ? rgar($confirmation, 'type') : 'message'; - $is_valid = !empty(GFCommon::$errors); - $is_default = rgar($confirmation, 'isDefault'); + $ui_settings = array(); + $confirmation_type = rgar( $confirmation, 'type' ) ? rgar( $confirmation, 'type' ) : 'message'; + $is_valid = ! empty( GFCommon::$errors ); + $is_default = rgar( $confirmation, 'isDefault' ); + + $form_id = rgget( 'id' ); + $form = RGFormsModel::get_form_meta( $form_id ); + + ob_start(); ?> + + + + class=""> + + + + + + + + + + + + value="message" onclick="ToggleConfirmation();" /> + +    + value="page" onclick="ToggleConfirmation();" /> + +    + value="redirect" onclick="ToggleConfirmation();" /> + + + + + + + > + + + + + false, 'editor_class' => 'merge-tag-support mt-wp_editor mt-manual_position mt-position-right' ) ); + } else { + ?> + +
    + /> + +
    + + + + + + + + class=""> + + + + 'form_confirmation_page', 'selected' => rgar( $confirmation, 'pageId' ), 'show_option_none' => __( 'Select a page', 'gravityforms' ) ) ); ?> + + + + + + class=""> + + + + onclick="TogglePageQueryString()" /> + + +
    > +
    + +
    +
    + + + + + + + > + + + + + + + + + + + > + + + + onclick="ToggleQueryString()" /> + + +
    > +
    + +
    +
    + + + + + + + > + + + + +
    + +
    + + + + + + - ob_start(); ?> +
    +

    + ID: : +

    + - - class=""> - - - - + +
    +
      + $tab['name'] ); + if ( isset( $tab['query'] ) ) + $query = array_merge( $query, $tab['query'] ); - - - - value="message" onclick="ToggleConfirmation();" /> - -    - value="page" onclick="ToggleConfirmation();" /> - -    - value="redirect" onclick="ToggleConfirmation();" /> - - - - + ?> +
    • > + +
    • + +
    +
    +
    - > - - - - -
    - /> - -
    - - - - + +
    + +
    + +
    + - - class=""> - - - - "form_confirmation_page", "selected" => rgar($confirmation, 'pageId'), "show_option_none" => __("Select a page", "gravityforms"))); ?> - - - - +
    - class=""> - - - - onclick="TogglePageQueryString()"/> -
    > -
    -
    -
    - - - - - - - > - - - - " style="width:98%;" /> - - - - +
    + - > - - - - onclick="ToggleQueryString()"/> -
    > -
    -
    -
    - - - - + > - - - -
    - -
    - - - + $setting_tabs = array( + '10' => array( 'name' => 'settings', 'label' => __( 'Form Settings', 'gravityforms' ) ), + '20' => array( 'name' => 'confirmation', 'label' => __( 'Confirmations', 'gravityforms' ), 'query' => array( 'cid' => null, 'duplicatedcid' => null ) ), + '30' => array( 'name' => 'notification', 'label' => __( 'Notifications', 'gravityforms' ), 'query' => array( 'nid' => null ) ) + ); + $setting_tabs = apply_filters( 'gform_form_settings_menu', $setting_tabs, $form_id ); + ksort( $setting_tabs, SORT_NUMERIC ); - + // if is default confirmation, override any submitted conditional logic with empty array + $confirmation['conditionalLogic'] = $confirmation['isDefault'] ? array() : json_decode( rgpost( 'conditional_logic' ), ARRAY_A ); -
    -

    ID: :

    + $failed_validation = false; - + if ( ! $confirmation['name'] ) { + $failed_validation = true; + GFCommon::add_error_message( __( 'You must specify a Confirmation Name.', 'gravityforms' ) ); + } - + switch ( $confirmation['type'] ) { + case 'page': + if ( empty( $confirmation['pageId'] ) ) { + $failed_validation = true; + GFCommon::add_error_message( __( 'You must select a Confirmation Page.', 'gravityforms' ) ); + } + break; + case 'redirect': + if ( empty( $confirmation['url'] ) || ! GFCommon::is_valid_url( $confirmation['url'] ) ) { + $failed_validation = true; + GFCommon::add_error_message( __( 'You must specify a valid Redirect URL.', 'gravityforms' ) ); + } + break; + } -
    -
      - $tab["name"]); - if(isset($tab["query"])) - $query = array_merge($query, $tab["query"]); + if ( $failed_validation ) + return $confirmation; - ?> -
    • > - -
    • - -
    + // allow user to filter confirmation before save + $confirmation = apply_filters( "gform_pre_confirmation_save_{$form['id']}", apply_filters( 'gform_pre_confirmation_save', $confirmation, $form, $is_new_confirmation ), $form, $is_new_confirmation ); -
    -
    + // trim values + $confirmation = GFFormsModel::trim_conditional_logic_values_from_element( $confirmation, $form ); - -
    -
    -
    + // save updated confirmations array + $result = GFFormsModel::save_form_confirmations( $form['id'], $form['confirmations'] ); -
    + if ( $result !== false ) { + GFCommon::add_message( sprintf( __( 'Confirmation saved successfully. %sBack to confirmations.%s', 'gravityforms' ), '', '' ) ); + } else { + GFCommon::add_error_message( __( 'There was an issue saving this confirmation.', 'gravityforms' ) ); + } -
    + return $confirmation; + } - + public static function maybe_process_confirmation_list_action() { - array("name" => "settings", "label" => __("Form Settings", "gravityforms")), - "20" => array("name" => "confirmation" , "label" => __("Confirmations", "gravityforms"), "query" => array("cid"=>null, "duplicatedcid"=>null)), - "30" => array("name" => "notification", "label" => __("Notifications", "gravityforms"), "query" => array("nid"=>null)) - ); + switch ( $action ) { + case 'delete': + $confirmation_deleted = self::delete_confirmation( $object_id, rgget( 'id' ) ); + if ( $confirmation_deleted ) { + GFCommon::add_message( __( 'Confirmation deleted.', 'gravityforms' ) ); + } else { + GFCommon::add_error_message( __( 'There was an issue deleting this confirmation.', 'gravityforms' ) ); + } + break; + } - $setting_tabs = apply_filters("gform_form_settings_menu", $setting_tabs, $form_id); - ksort($setting_tabs, SORT_NUMERIC); + } - return $setting_tabs; - } + /** + * Delete a form confirmation by ID. + * + * @param mixed $confirmation_id + * @param mixed $form_id Can pass a form ID or a form object + * + * @return mixed The result of the database operation + */ + public static function delete_confirmation( $confirmation_id, $form_id ) { + if ( ! $form_id ) + return false; - /* Ajax Functions */ + $form = ! is_array( $form_id ) ? RGFormsModel::get_form_meta( $form_id ) : $form_id; - public static function handle_confirmation_edit_submission($confirmation, $form) { + do_action( 'gform_pre_confirmation_deleted', $form['confirmations'][ $confirmation_id ], $form ); - if( empty($_POST) || !check_admin_referer('gform_confirmation_edit', 'gform_confirmation_edit') ) - return $confirmation; + unset( $form['confirmations'][ $confirmation_id ] ); - $is_new_confirmation = !$confirmation; + // clear form cache so next retrieval of form meta will reflect deleted notification + RGFormsModel::flush_current_forms(); - if($is_new_confirmation) - $confirmation['id'] = uniqid(); + return RGFormsModel::save_form_confirmations( $form['id'], $form['confirmations'] ); + } - $confirmation['name'] = rgpost('form_confirmation_name'); - $confirmation['type'] = rgpost('form_confirmation'); - $confirmation['message'] = rgpost('form_confirmation_message'); - $confirmation['disableAutoformat'] = rgpost('form_disable_autoformatting'); - $confirmation['pageId'] = rgpost('form_confirmation_page'); - $confirmation['url'] = rgpost('form_confirmation_url'); - $confirmation['queryString'] = '' != rgpost('form_redirect_querystring') ? rgpost('form_redirect_querystring') : rgpost('form_page_querystring'); - $confirmation['isDefault'] = rgpost('is_default'); + public static function output( $a ) { + echo $a; + } - // if is default confirmation, override any submitted conditional logic with empty array - $confirmation['conditionalLogic'] = $confirmation['isDefault'] ? array() : json_decode(rgpost('conditional_logic'), ARRAY_A); + public static function is_unique_name( $name, $confirmations ) { - $failed_validation = false; + foreach ( $confirmations as $confirmation ) { + if ( strtolower( rgar( $confirmation, 'name' ) ) == strtolower( $name ) ) + return false; + } - if(!$confirmation['name']) { - $failed_validation = true; - GFCommon::add_error_message(__('You must specify a Confirmation Name.', 'gravityforms')); - } + return true; + } - switch($confirmation['type']) { - case 'page': - if(empty($confirmation['pageId'])) { - $failed_validation = true; - GFCommon::add_error_message( __('You must select a Confirmation Page.', 'gravityforms') ); - } - break; - case 'redirect': - if(empty($confirmation['url'])) { - $failed_validation = true; - GFCommon::add_error_message( __('You must specify a Redirect URL.', 'gravityforms') ); - } - break; - } + public static function output_field_scripts( $echo = true ){ + $script_str = ''; + $conditional_logic_fields = array(); - if($failed_validation) - return $confirmation; + foreach ( GF_Fields::get_all() as $gf_field ) { + if ( $gf_field->is_conditional_logic_supported() ) { + $conditional_logic_fields[] = $gf_field->type; + } - // allow user to filter confirmation before save - $confirmation = apply_filters("gform_pre_confirmation_save_{$form['id']}", apply_filters('gform_pre_confirmation_save', $confirmation, $form), $form); + } - // trim values - $confirmation = GFFormsModel::trim_conditional_logic_values_from_element($confirmation, $form); + $script_str .= sprintf( 'function GetConditionalLogicFields(){return %s;}', json_encode( $conditional_logic_fields ) ) . PHP_EOL; - // add current confirmation to confirmations array - $form['confirmations'][$confirmation['id']] = $confirmation; + if ( ! empty( $script_str ) && $echo ){ + echo $script_str; + } - // save updated confirmations array - $result = GFFormsModel::save_form_confirmations($form['id'], $form['confirmations']); + return $script_str; + } - if($result !== false) { - GFCommon::add_message( sprintf( __('Confirmation saved successfully. %sBack to confirmations.%s', 'gravityforms'), '', '') ); - } else { - GFCommon::add_error_message(__('There was an issue saving this confirmation.', 'gravityforms')); - } + public static function activate_save( $form ) { - return $confirmation; - } + $form_id = $form['id']; - public static function maybe_process_confirmation_list_action() { + $has_save_notification = false; + foreach ( $form['notifications'] as $notification ) { + if ( rgar( $notification, 'event' ) == 'form_save_email_requested' ) { + $has_save_notification = true; + break; + } + } + if ( ! $has_save_notification ) { + $notification_id = uniqid(); + $form['notifications'][ $notification_id ] = array( + 'id' => $notification_id, + 'isDefault' => true, + 'name' => __( 'Save and Continue Email', 'gravityforms' ), + 'event' => 'form_save_email_requested', + 'toType' => 'hidden', + 'from' => '{admin_email}', + 'subject' => __( 'Link to continue {form_title}' ), + 'message' => __( 'Thank you for saving {form_title}. Please use the unique link below to return to the form from any computer.

    {save_link}

    Remember that the link will expire after 30 days so please return via the provided link to complete your form submission.', 'gravityforms' ), + ); + GFFormsModel::save_form_notifications( $form_id, $form['notifications'] ); + } - if( empty($_POST) || !check_admin_referer('gform_confirmation_list_action', 'gform_confirmation_list_action') ) - return; - $action = rgpost('action'); - $object_id = rgpost('action_argument'); + $has_save_confirmation = false; + foreach ( $form['confirmations'] as $confirmation ) { + if ( rgar( $confirmation, 'event' ) == 'form_saved' ) { + $has_save_confirmation = true; + break; + } + } - switch($action) { - case 'delete': - $confirmation_deleted = self::delete_confirmation($object_id, rgget('id')); - if($confirmation_deleted) { - GFCommon::add_message( __('Confirmation deleted.', 'gravityforms') ); - } else { - GFCommon::add_error_message( __('There was an issue deleting this confirmation.', 'gravityforms') ); - } - break; - } + if ( ! $has_save_confirmation ) { + $confirmation_id = uniqid(); + $form['confirmations'][ $confirmation_id ] = array( + 'id' => $confirmation_id, + 'event' => 'form_saved', + 'name' => __( 'Save and Continue Confirmation', 'gravityforms' ), + 'isDefault' => true, + 'type' => 'message', + 'message' => __( 'Please use the following link to return to your form from any computer.
    {save_link}
    This link will expire after 30 days.
    Enter your email address to send the link by email.
    {save_email_input}', 'gravityforms' ), + 'url' => '', + 'pageId' => '', + 'queryString' => '', + ); + $confirmation_id = uniqid(); + $form['confirmations'][ $confirmation_id ] = array( + 'id' => $confirmation_id, + 'event' => 'form_save_email_sent', + 'name' => __( 'Save and Continue Email Sent Confirmation', 'gravityforms' ), + 'isDefault' => true, + 'type' => 'message', + 'message' => __( 'The link was sent to the following email address: {save_email}', 'gravityforms' ), + 'url' => '', + 'pageId' => '', + 'queryString' => '', + ); + GFFormsModel::save_form_confirmations( $form_id, $form['confirmations'] ); + } + return $form; + } - } + public static function deactivate_save( $form ) { - /** - * Delete a form confirmation by ID. - * - * @param mixed $confirmation_id - * @param mixed $form_id Can pass a form ID or a form object - */ - public static function delete_confirmation($confirmation_id, $form_id) { + $form_id = $form['id']; - if(!$form_id) - return false; + foreach ( $form['notifications'] as $notification_id => $notification ) { + if ( rgar( $notification, 'isDefault' ) && rgar( $notification, 'event' ) == 'form_save_email_requested' ) { + unset( $form['notifications'][ $notification_id ] ); + GFFormsModel::save_form_notifications( $form_id, $form['notifications'] ); + break; + } + } - $form = !is_array($form_id) ? RGFormsModel::get_form_meta($form_id) : $form_id; - unset($form['confirmations'][$confirmation_id]); - - // clear form cache so next retrieval of form meta will reflect deleted notification - RGFormsModel::flush_current_forms(); - - return RGFormsModel::save_form_confirmations($form['id'], $form['confirmations']); - } - - public static function output($a) { - echo $a; - } - - public static function is_unique_name($name, $confirmations){ - - foreach ($confirmations as $confirmation){ - if(strtolower(rgar($confirmation, "name")) == strtolower($name)) - return false; - } - - return true; - } + $changed = false; + foreach ( $form['confirmations'] as $confirmation_id => $confirmation ) { + $event = rgar( $confirmation, 'event' ); + if ( rgar( $confirmation, 'isDefault' ) && ( $event == 'form_saved' || $event == 'form_save_email_sent' ) ) { + unset( $form['confirmations'][ $confirmation_id ] ); + $changed = true; + } + } + if ( $changed ) { + GFFormsModel::save_form_confirmations( $form_id, $form['confirmations'] ); + } + return $form; + } } - -require_once(ABSPATH . '/wp-admin/includes/class-wp-list-table.php'); +require_once( ABSPATH . '/wp-admin/includes/class-wp-list-table.php' ); class GFConfirmationTable extends WP_List_Table { - public $form; + public $form; + + function __construct( $form ) { + + $this->form = $form; + + $this->_column_headers = array( + array( + 'cb' => '', + 'name' => __( 'Name', 'gravityforms' ), + 'type' => __( 'Type', 'gravityforms' ), + 'content' => __( 'Content', 'gravityforms' ) + ), + array(), + array(), + ); + + parent::__construct(); + } + + function prepare_items() { + $this->items = $this->form['confirmations']; + } + + function display() { + $singular = rgar( $this->_args, 'singular' ); + ?> + + + + print_column_headers(); ?> + + + + + + print_column_headers( false ); ?> + + + + > + + display_rows_or_placeholder(); ?> + + +
    + + '; + echo $this->single_row_columns( $item ); + echo ''; + } + + function column_content( $item ) { + return self::get_column_content( $item ); + } + + function column_default( $item, $column ) { + echo rgar( $item, $column ); + } + + function column_type( $item ) { + return self::get_column_type( $item ); + } + + function column_cb( $item ) { + if ( isset( $item['isDefault'] ) && $item['isDefault'] ) + return; + + $is_active = isset( $item['isActive'] ) ? $item['isActive'] : true; + ?> + <?php $is_active ? __( 'Active', 'gravityforms' ) : __( 'Inactive', 'gravityforms' ); ?> + $item['id'] ) ); + $duplicate_url = add_query_arg( array( 'cid' => 0, 'duplicatedcid' => $item['id'] ) ); + $actions = apply_filters( + 'gform_confirmation_actions', array( + 'edit' => '' . __( 'Edit', 'gravityforms' ) . '', + 'duplicate' => '' . __( 'Duplicate', 'gravityforms' ) . '', + 'delete' => '' . __( 'Delete', 'gravityforms' ) . '' + ) + ); + + if ( isset( $item['isDefault'] ) && $item['isDefault'] ){ + unset( $actions['delete'] ); + } + - function __construct($form) { + ?> - $this->form = $form; + +
    - $this->_column_headers = array( - array( - 'cb' => '', - 'name' => __('Name','gravityforms'), - 'type' => __('Type','gravityforms'), - 'content' => __('Content','gravityforms') - ), - array(), - array() - ); - - parent::__construct(); - } - - function prepare_items() { - $this->items = $this->form['confirmations']; - } - - function display() { - //extract( $this->_args ); - - $singular = $this->_args['singular']; - - ?> - - - - print_column_headers(); ?> - - - - - - print_column_headers( false ); ?> - - - - > - - display_rows_or_placeholder(); ?> - - -
    - - '; - echo $this->single_row_columns( $item ); - echo ''; - } - - function column_content($item) { - return self::get_column_content($item); - } - - function column_default($item, $column) { - echo rgar($item, $column); - } - - function column_type($item) { - return self::get_column_type($item); - } - - function column_cb($item) { - if(isset($item['isDefault']) && $item['isDefault']) - return; - - $is_active = isset($item["isActive"]) ? $item["isActive"] : true; - ?> - <?php $is_active ? __(" title="" onclick="ToggleActive(this, ''); " /> - $item["id"])); - $duplicate_url = add_query_arg(array("cid" => 0, "duplicatedcid" => $item["id"])); - $actions = apply_filters('gform_confirmation_actions', array( - 'edit' => '' . __('Edit', 'gravityforms') . '', - 'duplicate' => '' . __('Duplicate', 'gravityforms') . '', - 'delete' => '' . __('Delete', 'gravityforms') . '' - )); - - if(isset($item['isDefault']) && $item['isDefault']) - unset($actions['delete']); - - ?> - - -
    - - $html) { - $divider = $key == $last_key ? '' : " | "; - ?> - + $html ) { + $divider = $key == $last_key ? '' : ' | '; + ?> + - - -
    - - ' . strip_tags($item['message']) . ''; - - case 'page': - - $page = get_post($item['pageId']); - if(empty($page)) - return __('This page does not exist.', 'gravityforms'); - - return '' . $page->post_title . ''; - - case 'redirect': - $url_pieces = parse_url($item['url']); - $url_connector = rgar($url_pieces, 'query') ? '&' : '?'; - $url = rgar($item, 'queryString') ? "{$item['url']}{$url_connector}{$item['queryString']}" : $item['url']; - return '' . $url . ''; - } - - return ''; - } - - public static function get_column_type($item) { - switch($item['type']) { - case 'message': - $type = __('Text', 'gravityforms'); - break; - case 'page': - $type = __('Page', 'gravityforms'); - break; - case 'redirect': - $type = __('Redirect', 'gravityforms'); - break; - } - return $type; - } + + +
    + + ' . strip_tags( $item['message'] ) . ''; + + case 'page': + + $page = get_post( $item['pageId'] ); + if ( empty( $page ) ) + return __( 'This page does not exist.', 'gravityforms' ); + + return '' . $page->post_title . ''; + + case 'redirect': + $url_pieces = parse_url( $item['url'] ); + $url_connector = rgar( $url_pieces, 'query' ) ? '&' : '?'; + $url = rgar( $item, 'queryString' ) ? "{$item['url']}{$url_connector}{$item['queryString']}" : $item['url']; + + return '' . $url . ''; + } + + return ''; + } + + public static function get_column_type( $item ) { + switch ( $item['type'] ) { + case 'message': + $type = __( 'Text', 'gravityforms' ); + break; + case 'page': + $type = __( 'Page', 'gravityforms' ); + break; + case 'redirect': + $type = __( 'Redirect', 'gravityforms' ); + break; + } + return $type; + } } \ No newline at end of file diff --git a/forms_model.php b/forms_model.php index 56c2d4f..4c73240 100644 --- a/forms_model.php +++ b/forms_model.php @@ -1,3003 +1,3099 @@ prefix . "rg_form"; - } + public static function get_form_table_name() { + global $wpdb; - public static function get_meta_table_name(){ - global $wpdb; - return $wpdb->prefix . "rg_form_meta"; - } + return $wpdb->prefix . 'rg_form'; + } - public static function get_form_view_table_name(){ - global $wpdb; - return $wpdb->prefix . "rg_form_view"; - } + public static function get_meta_table_name() { + global $wpdb; - public static function get_lead_table_name(){ - global $wpdb; - return $wpdb->prefix . "rg_lead"; - } + return $wpdb->prefix . 'rg_form_meta'; + } - public static function get_lead_meta_table_name(){ - global $wpdb; - return $wpdb->prefix . "rg_lead_meta"; - } + public static function get_form_view_table_name() { + global $wpdb; - public static function get_lead_notes_table_name(){ - global $wpdb; - return $wpdb->prefix . "rg_lead_notes"; - } + return $wpdb->prefix . 'rg_form_view'; + } - public static function get_lead_details_table_name(){ - global $wpdb; - return $wpdb->prefix . "rg_lead_detail"; - } + public static function get_lead_table_name() { + global $wpdb; - public static function get_lead_details_long_table_name(){ - global $wpdb; - return $wpdb->prefix . "rg_lead_detail_long"; - } + return $wpdb->prefix . 'rg_lead'; + } - public static function get_lead_view_name(){ - global $wpdb; - return $wpdb->prefix . "rg_lead_view"; - } + public static function get_lead_meta_table_name() { + global $wpdb; - public static function get_forms($is_active = null, $sort_column = "title", $sort_dir = "ASC", $is_trash = false){ - global $wpdb; - $form_table_name = self::get_form_table_name(); - $lead_table_name = self::get_lead_table_name(); - $view_table_name = self::get_form_view_table_name(); + return $wpdb->prefix . 'rg_lead_meta'; + } + + public static function get_lead_notes_table_name() { + global $wpdb; + + return $wpdb->prefix . 'rg_lead_notes'; + } + + public static function get_lead_details_table_name() { + global $wpdb; + + return $wpdb->prefix . 'rg_lead_detail'; + } + + public static function get_lead_details_long_table_name() { + global $wpdb; + + return $wpdb->prefix . 'rg_lead_detail_long'; + } + + public static function get_lead_view_name() { + global $wpdb; + + return $wpdb->prefix . 'rg_lead_view'; + } + + public static function get_incomplete_submissions_table_name() { + global $wpdb; + + return $wpdb->prefix . 'rg_incomplete_submissions'; + } - $where_arr = array(); - $where_arr[] = $wpdb->prepare("is_trash=%d", $is_trash); - if($is_active !== null) - $where_arr[] = $wpdb->prepare("is_active=%d", $is_active); + public static function get_forms( $is_active = null, $sort_column = 'title', $sort_dir = 'ASC', $is_trash = false ) { + global $wpdb; + $form_table_name = self::get_form_table_name(); + $lead_table_name = self::get_lead_table_name(); + $view_table_name = self::get_form_view_table_name(); + + $where_arr = array(); + $where_arr[] = $wpdb->prepare( 'is_trash=%d', $is_trash ); + if ( $is_active !== null ) { + $where_arr[] = $wpdb->prepare( 'is_active=%d', $is_active ); + } - $where_clause = "WHERE " . join(" AND ", $where_arr); - $sort_keyword = $sort_dir == "ASC" ? "ASC" : "DESC"; - $sort_column = ESC_SQL($sort_column); - $order_by = !empty($sort_column) ? "ORDER BY $sort_column $sort_keyword" : ""; + $where_clause = 'WHERE ' . join( ' AND ', $where_arr ); + $sort_keyword = $sort_dir == 'ASC' ? 'ASC' : 'DESC'; + $sort_column = ESC_SQL( $sort_column ); + $order_by = ! empty( $sort_column ) ? "ORDER BY $sort_column $sort_keyword" : ''; - $sql = "SELECT f.id, f.title, f.date_created, f.is_active, 0 as lead_count, 0 view_count + $sql = "SELECT f.id, f.title, f.date_created, f.is_active, 0 as lead_count, 0 view_count FROM $form_table_name f $where_clause $order_by"; - //Getting all forms - $forms = $wpdb->get_results($sql); + //Getting all forms + $forms = $wpdb->get_results( $sql ); - //Getting entry count per form - $sql = "SELECT form_id, count(id) as lead_count FROM $lead_table_name l WHERE status='active' GROUP BY form_id"; - $entry_count = $wpdb->get_results($sql); + //Getting entry count per form + $sql = "SELECT form_id, count(id) as lead_count FROM $lead_table_name l WHERE status='active' GROUP BY form_id"; + $entry_count = $wpdb->get_results( $sql ); - //Getting view count per form - $sql = "SELECT form_id, sum(count) as view_count FROM $view_table_name GROUP BY form_id"; - $view_count = $wpdb->get_results($sql); + //Getting view count per form + $sql = "SELECT form_id, sum(count) as view_count FROM $view_table_name GROUP BY form_id"; + $view_count = $wpdb->get_results( $sql ); - //Adding entry counts and to form array - foreach($forms as &$form){ - foreach($view_count as $count){ - if($count->form_id == $form->id){ - $form->view_count = $count->view_count; - break; - } - } + //Adding entry counts and to form array + foreach ( $forms as &$form ) { + foreach ( $view_count as $count ) { + if ( $count->form_id == $form->id ) { + $form->view_count = $count->view_count; + break; + } + } - foreach($entry_count as $count){ - if($count->form_id == $form->id){ - $form->lead_count = $count->lead_count; - break; - } - } - } + foreach ( $entry_count as $count ) { + if ( $count->form_id == $form->id ) { + $form->lead_count = $count->lead_count; + break; + } + } + } - return $forms; - } + return $forms; + } - public static function get_forms_by_id($ids){ - _deprecated_function('get_forms_by_id', '1.7', 'get_form_meta_by_id'); - return self::get_form_meta_by_id($ids); - } + public static function get_forms_by_id( $ids ) { + _deprecated_function( 'get_forms_by_id', '1.7', 'get_form_meta_by_id' ); - public static function get_form_payment_totals($form_id){ - global $wpdb; - $lead_table_name = self::get_lead_table_name(); + return self::get_form_meta_by_id( $ids ); + } - $sql = $wpdb->prepare(" SELECT sum(payment_amount) revenue, count(l.id) orders + public static function get_form_payment_totals( $form_id ) { + global $wpdb; + $lead_table_name = self::get_lead_table_name(); + + $sql = $wpdb->prepare( + " SELECT sum(payment_amount) revenue, count(l.id) orders FROM $lead_table_name l - WHERE form_id=%d AND payment_amount IS NOT null", $form_id); + WHERE form_id=%d AND payment_amount IS NOT null", $form_id + ); - $totals = $wpdb->get_row($sql, ARRAY_A); + $totals = $wpdb->get_row( $sql, ARRAY_A ); - $active = $wpdb->get_var($wpdb->prepare(" SELECT count(id) as active + $active = $wpdb->get_var( + $wpdb->prepare( + " SELECT count(id) as active FROM $lead_table_name - WHERE form_id=%d AND payment_status='Active'", $form_id)); + WHERE form_id=%d AND payment_status='Active'", $form_id + ) + ); - if(empty($active)) - $active = 0; + if ( empty( $active ) ) { + $active = 0; + } - $totals["active"] = $active; + $totals['active'] = $active; - return $totals; - } + return $totals; + } - public static function get_form_counts($form_id){ - global $wpdb; - $lead_table_name = self::get_lead_table_name(); - $sql = $wpdb->prepare( - "SELECT + public static function get_form_counts( $form_id ) { + global $wpdb; + $lead_table_name = self::get_lead_table_name(); + $sql = $wpdb->prepare( + "SELECT (SELECT count(0) FROM $lead_table_name WHERE form_id=%d AND status='active') as total, (SELECT count(0) FROM $lead_table_name WHERE is_read=0 AND status='active' AND form_id=%d) as unread, (SELECT count(0) FROM $lead_table_name WHERE is_starred=1 AND status='active' AND form_id=%d) as starred, (SELECT count(0) FROM $lead_table_name WHERE status='spam' AND form_id=%d) as spam, (SELECT count(0) FROM $lead_table_name WHERE status='trash' AND form_id=%d) as trash", - $form_id, $form_id, $form_id, $form_id, $form_id); + $form_id, $form_id, $form_id, $form_id, $form_id + ); - $results = $wpdb->get_results($sql, ARRAY_A); + $results = $wpdb->get_results( $sql, ARRAY_A ); - return $results[0]; + return $results[0]; - } + } - public static function get_form_summary(){ - global $wpdb; - $form_table_name = self::get_form_table_name(); - $lead_table_name = self::get_lead_table_name(); + public static function get_form_summary() { + global $wpdb; + $form_table_name = self::get_form_table_name(); + $lead_table_name = self::get_lead_table_name(); - $sql = "SELECT l.form_id, count(l.id) as unread_count + $sql = "SELECT l.form_id, count(l.id) as unread_count FROM $lead_table_name l WHERE is_read=0 AND status='active' GROUP BY form_id"; - //getting number of unread and total leads for all forms - $unread_results = $wpdb->get_results($sql, ARRAY_A); + //getting number of unread and total leads for all forms + $unread_results = $wpdb->get_results( $sql, ARRAY_A ); - $sql = "SELECT l.form_id, max(l.date_created) as last_lead_date, count(l.id) as total_leads + $sql = "SELECT l.form_id, max(l.date_created) as last_lead_date, count(l.id) as total_leads FROM $lead_table_name l WHERE status='active' GROUP BY form_id"; - $lead_date_results = $wpdb->get_results($sql, ARRAY_A); + $lead_date_results = $wpdb->get_results( $sql, ARRAY_A ); - $sql = "SELECT id, title, '' as last_lead_date, 0 as unread_count + $sql = "SELECT id, title, '' as last_lead_date, 0 as unread_count FROM $form_table_name WHERE is_active=1 ORDER BY title"; - $forms = $wpdb->get_results($sql, ARRAY_A); + $forms = $wpdb->get_results( $sql, ARRAY_A ); - for($i=0; $count = sizeof($forms), $i<$count; $i++){ - if(is_array($unread_results)){ - foreach($unread_results as $unread_result){ - if($unread_result["form_id"] == $forms[$i]["id"]){ - $forms[$i]["unread_count"] = $unread_result["unread_count"]; - break; - } - } - } - - if(is_array($lead_date_results)){ - foreach($lead_date_results as $lead_date_result){ - if($lead_date_result["form_id"] == $forms[$i]["id"]){ - $forms[$i]["last_lead_date"] = $lead_date_result["last_lead_date"]; - $forms[$i]["total_leads"] = $lead_date_result["total_leads"]; - break; - } - } - } - - } + for ( $i = 0; $count = sizeof( $forms ), $i < $count; $i ++ ) { + if ( is_array( $unread_results ) ) { + foreach ( $unread_results as $unread_result ) { + if ( $unread_result['form_id'] == $forms[ $i ]['id'] ) { + $forms[ $i ]['unread_count'] = $unread_result['unread_count']; + break; + } + } + } + + if ( is_array( $lead_date_results ) ) { + foreach ( $lead_date_results as $lead_date_result ) { + if ( $lead_date_result['form_id'] == $forms[ $i ]['id'] ) { + $forms[ $i ]['last_lead_date'] = $lead_date_result['last_lead_date']; + $forms[ $i ]['total_leads'] = $lead_date_result['total_leads']; + break; + } + } + } + } - return $forms; - } + return $forms; + } - public static function get_form_count(){ - global $wpdb; - $form_table_name = self::get_form_table_name(); - $results = $wpdb->get_results(" + public static function get_form_count() { + global $wpdb; + $form_table_name = self::get_form_table_name(); + $results = $wpdb->get_results( + " SELECT (SELECT count(0) FROM $form_table_name WHERE is_trash = 0) as total, (SELECT count(0) FROM $form_table_name WHERE is_active=1 AND is_trash = 0 ) as active, (SELECT count(0) FROM $form_table_name WHERE is_active=0 AND is_trash = 0 ) as inactive, (SELECT count(0) FROM $form_table_name WHERE is_trash=1) as trash - "); + " + ); + + return array( + 'total' => intval( $results[0]->total ), + 'active' => intval( $results[0]->active ), + 'inactive' => intval( $results[0]->inactive ), + 'trash' => intval( $results[0]->trash ) + ); + } - return array( "total" => intval($results[0]->total), - "active" => intval($results[0]->active), - "inactive" => intval($results[0]->inactive), - "trash" => intval($results[0]->trash) - ); - } + public static function get_form_id( $form_title ) { + $forms = self::get_forms(); + foreach ( $forms as $form ) { + $sanitized_name = str_replace( '[', '', str_replace( ']', '', $form->title ) ); + if ( $form->title == $form_title || $sanitized_name == $form_title ) { + return $form->id; + } + } - public static function get_form_id($form_title){ - $forms = self::get_forms(); - foreach($forms as $form){ - $sanitized_name = str_replace("[", "", str_replace("]","", $form->title)); - if($form->title == $form_title || $sanitized_name == $form_title) - return $form->id; - } - return 0; - } + return 0; + } - public static function get_form($form_id, $allow_trash = false){ - global $wpdb; - $table_name = self::get_form_table_name(); - $trash_clause = $allow_trash ? "" : "AND is_trash = 0"; - $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM $table_name WHERE id=%d {$trash_clause}", $form_id)); - return isset($results[0]) ? $results[0] : false; - } + public static function get_form( $form_id, $allow_trash = false ) { + global $wpdb; + $table_name = self::get_form_table_name(); + $trash_clause = $allow_trash ? '' : 'AND is_trash = 0'; + $results = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $table_name WHERE id=%d {$trash_clause}", $form_id ) ); - public static function unserialize($string){ + return isset( $results[0] ) ? $results[0] : false; + } - if(is_serialized($string)){ - $obj = @unserialize($string); - } - else{ - $obj = json_decode($string, true); - } + public static function unserialize( $string ) { - return $obj; - } + if ( is_serialized( $string ) ) { + $obj = @unserialize( $string ); + } else { + $obj = json_decode( $string, true ); + } - public static function get_form_meta($form_id){ - global $wpdb; + return $obj; + } - // return cached version if form meta has been previously retrieved for this form - if(isset(self::$_current_forms[$form_id])){ - return self::$_current_forms[$form_id]; + public static function get_form_meta( $form_id ) { + global $wpdb; + + // return cached version if form meta has been previously retrieved for this form + if ( isset( self::$_current_forms[ $form_id ] ) ) { + return self::$_current_forms[ $form_id ]; } - $table_name = self::get_meta_table_name(); - $form_row = $wpdb->get_row($wpdb->prepare("SELECT display_meta, notifications FROM {$table_name} WHERE form_id=%d", $form_id), ARRAY_A); + $table_name = self::get_meta_table_name(); + $form_row = $wpdb->get_row( $wpdb->prepare( "SELECT display_meta, notifications FROM {$table_name} WHERE form_id=%d", $form_id ), ARRAY_A ); - //Loading main form object (supports serialized strings as well as JSON strings) - $form = self::unserialize($form_row["display_meta"]); + //Loading main form object (supports serialized strings as well as JSON strings) + $form = self::unserialize( $form_row['display_meta'] ); - if(!$form) - return null; + if ( ! $form ) { + return null; + } - //loading notifications - $form["notifications"] = self::unserialize($form_row["notifications"]); + //loading notifications + $form['notifications'] = self::unserialize( $form_row['notifications'] ); + //creating field objects and copying some form variables down to fields for easier access + $form = self::convert_field_objects( $form ); - //copying some form variables down to fields for easier access - $page_number = 1; - $description_placement = rgar($form, "descriptionPlacement") == "above" ? "above" : "below"; - if(is_array(rgar($form,"fields"))){ - foreach($form["fields"] as &$field){ - $field["label"] = !isset($field["label"]) ? "" : $field["label"]; - $field["formId"] = $form["id"]; - $field["pageNumber"] = $page_number; - $field["descriptionPlacement"] = $description_placement; - if($field["type"] == "page"){ - $page_number++; - $field["pageNumber"] = $page_number; - } - } - } + // loading confirmations from legacy structure into new structure + $form = self::load_confirmations( $form ); + + //only migrate legacy notification if there isn't any notification configured in new structure + if ( ! isset( $form['notifications'] ) ) { + $form = self::load_notifications_from_legacy( $form ); //moving notification data from legacy structure into new 'notifications' array + } - // loading confirmations from legacy structure into new structure - $form = self::load_confirmations($form); + //load notifications to legacy structure to maintain backward compatibility with legacy hooks and functions + $form = self::load_notifications_to_legacy( $form ); - //only migrate legacy notification if there isn't any notification configured in new structure - if(!isset($form["notifications"])){ - $form = self::load_notifications_from_legacy($form); //moving notification data from legacy structure into new "notifications" array - } + $form = apply_filters( 'gform_form_post_get_meta', $form ); - //load notifications to legacy structure to maintain backward compatibility with legacy hooks and functions - $form = self::load_notifications_to_legacy($form); + // cached form meta for cheaper retrieval on subsequent requests + self::$_current_forms[ $form_id ] = $form; - $form = apply_filters('gform_form_post_get_meta', $form); + return $form; + } - // cached form meta for cheaper retrieval on subsequent requests - self::$_current_forms[$form_id] = $form; + public static function convert_field_objects( $form ) { + $page_number = 1; + if ( is_array( rgar( $form, 'fields' ) ) ) { + foreach ( $form['fields'] as &$field ) { + $field = GF_Fields::create( $field ); + if ( isset( $form['id'] ) ) { + $field->formId = $form['id']; + } + $field->pageNumber = $page_number; + if ( $field->type == 'page' ) { + $page_number ++; + $field->pageNumber = $page_number; + } + } + } - return $form; - } + return $form; + } - public static function get_form_meta_by_id($ids){ - global $wpdb; - $form_table_name = self::get_form_table_name(); - $meta_table_name = self::get_meta_table_name(); + public static function get_form_meta_by_id( $ids ) { + global $wpdb; + $form_table_name = self::get_form_table_name(); + $meta_table_name = self::get_meta_table_name(); - if(is_array($ids)) - $ids = implode(",", array_map('intval', $ids ) ); - else - $ids = intval($ids); + if ( is_array( $ids ) ) { + $ids = implode( ',', array_map( 'intval', $ids ) ); + } else { + $ids = intval( $ids ); + } - $results = $wpdb->get_results(" SELECT display_meta, confirmations, notifications FROM {$form_table_name} f + $results = $wpdb->get_results( + " SELECT display_meta, confirmations, notifications FROM {$form_table_name} f INNER JOIN {$meta_table_name} m ON f.id = m.form_id - WHERE id in({$ids})", ARRAY_A); + WHERE id in({$ids})", ARRAY_A + ); + + foreach ( $results as &$result ) { + $form = self::unserialize( $result['display_meta'] ); + $form['confirmations'] = self::unserialize( $result['confirmations'] ); + $form['notifications'] = self::unserialize( $result['notifications'] ); + //creating field objects and copying some form variables down to fields for easier access + $form = self::convert_field_objects( $form ); + $result = $form; + } - foreach ($results as &$result) { - $form = self::unserialize($result["display_meta"]); - $form['confirmations'] = self::unserialize($result["confirmations"]); - $form['notifications'] = self::unserialize($result["notifications"]); - $result = $form; - } + return $results; - return $results; + } - } + private static function load_notifications_to_legacy( $form ) { + if ( ! is_array( rgar( $form, 'notifications' ) ) ) { + return $form; + } - private static function load_notifications_to_legacy($form){ - if(!is_array(rgar($form, "notifications"))) - return $form; + foreach ( $form['notifications'] as $notification ) { + if ( ! in_array( rgar( $notification, 'type' ), array( 'user', 'admin' ) ) ) { + continue; + } + + $legacy_notification = $notification; + + if ( $notification['toType'] == 'field' ) { + $legacy_notification['toField'] = $notification['to']; + unset( $legacy_notification['to'] ); + } + + //unsetting new properties + unset( $legacy_notification['toType'] ); + unset( $legacy_notification['id'] ); + unset( $legacy_notification['event'] ); + unset( $legacy_notification['name'] ); + if ( isset( $legacy_notification['type'] ) ) { + unset( $legacy_notification['type'] ); + } + + //saving into form object + $property = $notification['type'] == 'user' ? 'autoResponder' : 'notification'; + $form[ $property ] = $legacy_notification; + } - foreach($form["notifications"] as $notification){ - if(!in_array(rgar($notification,"type"), array("user", "admin"))) - continue; + return $form; + } - $legacy_notification = $notification; + private static function load_notifications_from_legacy( $form ) { - if($notification["toType"] == "field"){ - $legacy_notification["toField"] = $notification["to"]; - unset($legacy_notification["to"]); - } + $form['notifications'] = array(); + if ( GFCommon::has_admin_notification( $form ) ) { + $admin_notification = $form['notification']; - //unsetting new properties - unset($legacy_notification["toType"]); - unset($legacy_notification["id"]); - unset($legacy_notification["event"]); - unset($legacy_notification["name"]); - if(isset($legacy_notification["type"])) - unset($legacy_notification["type"]); - - //saving into form object - $property = $notification["type"] == "user" ? "autoResponder" : "notification"; - $form[$property] = $legacy_notification; - } + //if there is a fromField configured, move it to 'from' as a merge tag + $admin_notification = self::convert_property_to_merge_tag( $form, $admin_notification, 'from', 'fromField' ); - return $form; - } + //if there is a fromNameField configured, move it to 'fromName' as a merge tag + $admin_notification = self::convert_property_to_merge_tag( $form, $admin_notification, 'fromName', 'fromNameField' ); - private static function load_notifications_from_legacy($form){ + //if there is a replyToField configured, move it to 'replyTo' as a merge tag + $admin_notification = self::convert_property_to_merge_tag( $form, $admin_notification, 'replyTo', 'replyToField' ); - $form["notifications"] = array(); - if(GFCommon::has_admin_notification($form)){ - $admin_notification = $form["notification"]; + //if routing is configured, set toType to routing, otherwise, set it to email + $admin_notification['toType'] = ! rgempty( 'routing', $admin_notification ) ? 'routing' : 'email'; - //if there is a fromField configured, move it to "from" as a merge tag - $admin_notification = self::convert_property_to_merge_tag($form, $form["notification"], "from", "fromField"); + $notification_id = uniqid(); - //if there is a fromNameField configured, move it to "fromName" as a merge tag - $admin_notification = self::convert_property_to_merge_tag($form, $form["notification"], "fromName", "fromNameField"); + //assigning this notification to the form_submission action + $admin_notification['event'] = 'form_submission'; + $admin_notification['name'] = __( 'Admin Notification', 'gravityforms' ); + $admin_notification['type'] = 'admin'; + $admin_notification['id'] = $notification_id; - //if there is a replyToField configured, move it to "replyTo" as a merge tag - $admin_notification = self::convert_property_to_merge_tag($form, $form["notification"], "replyTo", "replyToField"); + //copying admin notification as an item in the new notifications array + $form['notifications'][ $notification_id ] = $admin_notification; + } - //if routing is configured, set toType to routing, otherwise, set it to email - $admin_notification["toType"] = !rgempty("routing", $admin_notification) ? "routing" : "email"; + if ( GFCommon::has_user_notification( $form ) ) { - $notification_id = uniqid(); + $user_notification = $form['autoResponder']; - //assigning this notification to the form_submission action - $admin_notification["event"] = "form_submission"; - $admin_notification["name"] = __("Admin Notification", "gravityforms"); - $admin_notification["type"] = "admin"; - $admin_notification["id"] = $notification_id; + //if there is a toField configured, set toType to field, if not, set it toemail + $to_field = rgar( $user_notification, 'toField' ); + if ( ! empty( $to_field ) ) { + $user_notification['toType'] = 'field'; + $user_notification['to'] = $to_field; + } else { + $user_notification['toType'] = 'email'; + } - //copying admin notification as an item in the new notifications array - $form["notifications"][$notification_id] = $admin_notification; - } + $notification_id = uniqid(); + //assigning this notification to the form_submission action + $user_notification['event'] = 'form_submission'; + $user_notification['name'] = __( 'User Notification', 'gravityforms' ); + $user_notification['type'] = 'user'; + $user_notification['id'] = $notification_id; - if(GFCommon::has_user_notification($form)){ + //copying user notification as an item in the new notifications array + $form['notifications'][ $notification_id ] = $user_notification; + } - $user_notification = $form["autoResponder"]; + self::save_form_notifications( $form['id'], $form['notifications'] ); - //if there is a toField configured, set toType to field, if not, set it toemail - $to_field = rgar($user_notification, "toField"); - if(!empty($to_field)){ - $user_notification["toType"] = "field"; - $user_notification["to"] = $to_field; - } - else{ - $user_notification["toType"] = "email"; - } + return $form; + } - $notification_id = uniqid(); - //assigning this notification to the form_submission action - $user_notification["event"] = "form_submission"; - $user_notification["name"] = __("User Notification", "gravityforms"); - $user_notification["type"] = "user"; - $user_notification["id"] = $notification_id; + private static function convert_property_to_merge_tag( $form, $array, $target_property, $source_property ) { + $merge_tag = self::get_field_merge_tag( $form, rgar( $array, $source_property ) ); + if ( $merge_tag ) { + $array[ $target_property ] = $merge_tag; + unset( $array[ $source_property ] ); + } - //copying user notification as an item in the new notifications array - $form["notifications"][$notification_id] = $user_notification; - } + return $array; + } - self::save_form_notifications($form["id"], $form["notifications"]); + private static function get_field_merge_tag( $form, $field_id ) { + $field = self::get_field( $form, $field_id ); + if ( ! $field ) { + return false; + } - return $form; - } + return '{' . GFCommon::get_label( $field, $field_id ) . ':' . $field_id . '}'; + } - private static function convert_property_to_merge_tag($form, $array, $target_property, $source_property){ - $merge_tag = self::get_field_merge_tag($form, rgar($array, $source_property)); - if($merge_tag){ - $array[$target_property] = $merge_tag; - unset($array[$source_property]); - } + public static function add_default_properties( $form ) { + _deprecated_function( 'GFFormsModel::add_default_properties', '1.9' ); + + if ( is_array( rgar( $form, 'fields' ) ) ) { + $all_fields = array( + 'adminLabel' => '', 'adminOnly' => '', 'allowsPrepopulate' => '', 'defaultValue' => '', 'description' => '', 'content' => '', 'cssClass' => '', + 'errorMessage' => '', 'id' => '', 'inputName' => '', 'isRequired' => '', 'label' => '', 'noDuplicates' => '', + 'size' => '', 'type' => '', 'postCustomFieldName' => '', 'displayAllCategories' => '', 'displayCaption' => '', 'displayDescription' => '', + 'displayTitle' => '', 'inputType' => '', 'rangeMin' => '', 'rangeMax' => '', 'calendarIconType' => '', + 'calendarIconUrl' => '', 'dateType' => '', 'dateFormat' => '', 'phoneFormat' => '', 'addressType' => '', 'defaultCountry' => '', 'defaultProvince' => '', + 'defaultState' => '', 'hideAddress2' => '', 'hideCountry' => '', 'hideState' => '', 'inputs' => '', 'nameFormat' => '', 'allowedExtensions' => '', + 'captchaType' => '', 'pageNumber' => '', 'captchaTheme' => '', 'simpleCaptchaSize' => '', 'simpleCaptchaFontColor' => '', 'simpleCaptchaBackgroundColor' => '', + 'failed_validation' => '', 'productField' => '', 'enablePasswordInput' => '', 'maxLength' => '', 'enablePrice' => '', 'basePrice' => '', + ); + + foreach ( $form['fields'] as &$field ) { + if ( is_array( $field ) ) { + $field = wp_parse_args( $field, $all_fields ); + } + } + } - return $array; - } + return $form; + } - private static function get_field_merge_tag($form, $field_id){ - $field = self::get_field($form, $field_id); - if(!$field) - return false; + public static function get_grid_column_meta( $form_id ) { + global $wpdb; - return "{" . GFCommon::get_label($field, $field_id) . ":" . $field_id . "}"; - } + $table_name = self::get_meta_table_name(); - public static function add_default_properties($form){ - if(is_array(rgar($form,"fields"))){ - $all_fields = array("adminLabel"=>"","adminOnly"=>"","allowsPrepopulate"=>"","defaultValue"=>"","description"=>"","content"=>"","cssClass"=>"", - "errorMessage"=>"","id"=>"","inputName"=>"","isRequired"=>"","label"=>"","noDuplicates"=>"", - "size"=>"","type"=>"","postCustomFieldName"=>"","displayAllCategories"=>"","displayCaption"=>"","displayDescription"=>"", - "displayTitle"=>"","inputType"=>"","rangeMin"=>"","rangeMax"=>"","calendarIconType"=>"", - "calendarIconUrl"=>"", "dateType"=>"","dateFormat"=>"","phoneFormat"=>"","addressType"=>"","defaultCountry"=>"","defaultProvince"=>"", - "defaultState"=>"","hideAddress2"=>"","hideCountry"=>"","hideState"=>"","inputs"=>"","nameFormat"=>"","allowedExtensions"=>"", - "captchaType"=>"","pageNumber"=>"","captchaTheme"=>"","simpleCaptchaSize"=>"","simpleCaptchaFontColor"=>"","simpleCaptchaBackgroundColor"=>"", - "failed_validation"=>"", "productField" => "", "enablePasswordInput" => "", "maxLength" => "", "enablePrice" => "", "basePrice" => ""); - - foreach($form["fields"] as &$field) - $field = wp_parse_args($field, $all_fields); - } - return $form; - } + return maybe_unserialize( $wpdb->get_var( $wpdb->prepare( "SELECT entries_grid_meta FROM $table_name WHERE form_id=%d", $form_id ) ) ); + } - public static function get_grid_column_meta($form_id){ - global $wpdb; + public static function update_grid_column_meta( $form_id, $columns ) { + global $wpdb; - $table_name = self::get_meta_table_name(); - return maybe_unserialize($wpdb->get_var($wpdb->prepare("SELECT entries_grid_meta FROM $table_name WHERE form_id=%d", $form_id))); - } + $table_name = self::get_meta_table_name(); + $meta = maybe_serialize( stripslashes_deep( $columns ) ); + $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET entries_grid_meta=%s WHERE form_id=%d", $meta, $form_id ) ); + } - public static function update_grid_column_meta($form_id, $columns){ - global $wpdb; + public static function get_lead_detail_id( $current_fields, $field_number ) { + foreach ( $current_fields as $field ) { + if ( $field->field_number == $field_number ) { + return $field->id; + } + } - $table_name = self::get_meta_table_name(); - $meta = maybe_serialize(stripslashes_deep($columns) ); - $wpdb->query( $wpdb->prepare("UPDATE $table_name SET entries_grid_meta=%s WHERE form_id=%d", $meta, $form_id) ); - } + return 0; + } - public static function get_lead_detail_id($current_fields, $field_number){ - foreach($current_fields as $field) - if($field->field_number == $field_number) - return $field->id; + public static function update_form_active( $form_id, $is_active ) { + global $wpdb; + $form_table = self::get_form_table_name(); + $sql = $wpdb->prepare( "UPDATE $form_table SET is_active=%d WHERE id=%d", $is_active, $form_id ); + $wpdb->query( $sql ); - return 0; - } + if ( $is_active ) { + do_action( 'gform_post_form_activated', $form_id ); + } else { + do_action( 'gform_post_form_deactivated', $form_id ); + } + } - public static function update_form_active($form_id, $is_active){ - global $wpdb; - $form_table = self::get_form_table_name(); - $sql = $wpdb->prepare("UPDATE $form_table SET is_active=%d WHERE id=%d", $is_active, $form_id); - $wpdb->query($sql); - } + public static function update_notification_active( $form_id, $notification_id, $is_active ) { + $form = GFFormsModel::get_form_meta( $form_id ); - public static function update_notification_active($form_id, $notification_id, $is_active){ - $form = GFFormsModel::get_form_meta($form_id); + if ( ! isset( $form['notifications'][ $notification_id ] ) ) { + return new WP_Error( 'not_found', __( 'Notification not found', 'gravityforms' ) ); + } - if(!isset($form["notifications"][$notification_id])) - return new WP_Error("not_found", __("Notification not found", "gravityforms")); + $form['notifications'][ $notification_id ]['isActive'] = (bool) $is_active; - $form["notifications"][$notification_id]["isActive"] = (bool) $is_active; + if ( (bool) $is_active ) { + do_action( 'gform_pre_notification_activated', $form['notifications'][ $notification_id ], $form ); + } else { + do_action( 'gform_pre_notification_deactivated', $form['notifications'][ $notification_id ], $form ); + } - $result = GFFormsModel::update_form_meta($form_id, $form["notifications"], "notifications"); - return $result; - } + $result = GFFormsModel::update_form_meta( $form_id, $form['notifications'], 'notifications' ); - public static function update_confirmation_active($form_id, $confirmation_id, $is_active){ - $form = GFFormsModel::get_form_meta($form_id); + return $result; + } - if(!isset($form["confirmations"][$confirmation_id])) - return new WP_Error("not_found", __("Notification not found", "gravityforms")); + public static function update_confirmation_active( $form_id, $confirmation_id, $is_active ) { + $form = GFFormsModel::get_form_meta( $form_id ); - $form["confirmations"][$confirmation_id]["isActive"] = (bool) $is_active; + if ( ! isset( $form['confirmations'][ $confirmation_id ] ) ) { + return new WP_Error( 'not_found', __( 'Notification not found', 'gravityforms' ) ); + } - $result = GFFormsModel::update_form_meta($form_id, $form["confirmations"], "confirmations"); - return $result; - } + $form['confirmations'][ $confirmation_id ]['isActive'] = (bool) $is_active; - public static function update_forms_active($forms, $is_active){ - foreach($forms as $form_id) - self::update_form_active($form_id, $is_active); - } - public static function update_leads_property($leads, $property_name, $property_value){ - foreach($leads as $lead) - self::update_lead_property($lead, $property_name, $property_value); - } - public static function update_lead_property($lead_id, $property_name, $property_value, $update_akismet=true, $disable_hook=false){ - global $wpdb; - $lead_table = self::get_lead_table_name(); + $result = GFFormsModel::update_form_meta( $form_id, $form['confirmations'], 'confirmations' ); - $lead = self::get_lead($lead_id); + return $result; + } - //marking entry as "spam" or "not spam" with Akismet if the plugin is installed - if($update_akismet && GFCommon::akismet_enabled($lead["form_id"]) && $property_name == "status" && in_array($property_value, array("active", "spam"))){ + public static function update_forms_active( $forms, $is_active ) { + foreach ( $forms as $form_id ) { + self::update_form_active( $form_id, $is_active ); + } + } - $current_status = $lead["status"]; - if($current_status == "spam" && $property_value == "active"){ - $form = self::get_form_meta($lead["form_id"]); - GFCommon::mark_akismet_spam($form, $lead, false); - } - else if($current_status == "active" && $property_value == "spam"){ - $form = self::get_form_meta($lead["form_id"]); - GFCommon::mark_akismet_spam($form, $lead, true); - } - } + public static function update_leads_property( $leads, $property_name, $property_value ) { + foreach ( $leads as $lead ) { + self::update_lead_property( $lead, $property_name, $property_value ); + } + } - //updating lead - $result = $wpdb->update($lead_table, array($property_name => $property_value ), array("id" => $lead_id)); + public static function update_lead_property( $lead_id, $property_name, $property_value, $update_akismet = true, $disable_hook = false ) { + global $wpdb; + $lead_table = self::get_lead_table_name(); - if(!$disable_hook){ + $lead = self::get_lead( $lead_id ); - $previous_value = rgar($lead, $property_name); + //marking entry as 'spam' or 'not spam' with Akismet if the plugin is installed + if ( $update_akismet && GFCommon::akismet_enabled( $lead['form_id'] ) && $property_name == 'status' && in_array( $property_value, array( 'active', 'spam' ) ) ) { - if($previous_value != $property_value) { + $current_status = $lead['status']; + if ( $current_status == 'spam' && $property_value == 'active' ) { + $form = self::get_form_meta( $lead['form_id'] ); + GFCommon::mark_akismet_spam( $form, $lead, false ); + } else if ( $current_status == 'active' && $property_value == 'spam' ) { + $form = self::get_form_meta( $lead['form_id'] ); + GFCommon::mark_akismet_spam( $form, $lead, true ); + } + } - // if property is status, prev value is spam and new value is active - if($property_name == 'status' && $previous_value == 'spam' && $property_value == 'active' && !rgar($lead, 'post_id')) { - $lead[$property_name] = $property_value; - $lead['post_id'] = GFCommon::create_post($form, $lead); - } + //updating lead + $result = $wpdb->update( $lead_table, array( $property_name => $property_value ), array( 'id' => $lead_id ) ); - do_action("gform_update_{$property_name}", $lead_id, $property_value, $previous_value); - } - } + if ( ! $disable_hook ) { - return $result; - } + $previous_value = rgar( $lead, $property_name ); - public static function update_lead($lead){ + if ( $previous_value != $property_value ) { - _deprecated_function("GFFormsModel::update_lead()", "1.8.8", "GFAPI::update_entry()"); + // if property is status, prev value is spam and new value is active + if ( $property_name == 'status' && $previous_value == 'spam' && $property_value == 'active' && ! rgar( $lead, 'post_id' ) ) { + $lead[ $property_name ] = $property_value; + $lead['post_id'] = GFCommon::create_post( $form, $lead ); + } - global $wpdb; - $lead_table = self::get_lead_table_name(); - - $payment_date = strtotime(rgar($lead,"payment_date")) ? "'" . gmdate( 'Y-m-d H:i:s', strtotime("{$lead["payment_date"]}") ) . "'" : "NULL"; - $payment_amount = !rgblank(rgar($lead, "payment_amount")) ? (float) rgar($lead, "payment_amount") : "NULL"; - $transaction_type = !rgempty("transaction_type", $lead) ? intval($lead["transaction_type"]) : "NULL"; - - $status = !rgempty("status", $lead) ? $lead["status"] : "active"; - $source_url = self::truncate(rgar($lead,"source_url"), 200); - $user_agent = self::truncate(rgar($lead,"user_agent"), 250); - - $sql = $wpdb->prepare("UPDATE $lead_table SET - form_id=%d, - post_id=%d, - is_starred=%d, - is_read=%d, - ip=%s, - source_url=%s, - user_agent=%s, - currency=%s, - payment_status=%s, - payment_date={$payment_date}, - payment_amount={$payment_amount}, - transaction_id=%s, - is_fulfilled=%d, - transaction_type={$transaction_type}, - payment_method=%s, - status='{$status}' - WHERE id=%d", rgar($lead,"form_id"), rgar($lead,"post_id"), rgar($lead,"is_starred"), rgar($lead,"is_read"), rgar($lead,"ip"), $source_url, $user_agent, - rgar($lead,"currency"), rgar($lead,"payment_status"), rgar($lead,"transaction_id"), rgar($lead,"is_fulfilled"), rgar($lead, "payment_method"), rgar($lead,"id")); - $wpdb->query($sql); - - self::set_current_lead($lead); - } + do_action( "gform_update_{$property_name}", $lead_id, $property_value, $previous_value ); + } + } - private static function truncate($str, $length){ - if(strlen($str) > $length){ - $str = substr($str, 0, $length); - } - return $str; - } + return $result; + } - public static function delete_leads($leads){ - foreach($leads as $lead_id) - self::delete_lead($lead_id); - } + public static function update_lead( $lead ) { - public static function delete_forms($forms){ - foreach($forms as $form_id) - self::delete_form($form_id); - } + _deprecated_function( 'GFFormsModel::update_lead()', '1.8.8', 'GFAPI::update_entry()' ); - public static function trash_forms($form_ids){ - foreach($form_ids as $form_id) - self::trash_form($form_id); - } + global $wpdb; + $lead_table = self::get_lead_table_name(); + + $payment_date = strtotime( rgar( $lead, 'payment_date' ) ) ? "'" . gmdate( 'Y-m-d H:i:s', strtotime( "{$lead['payment_date']}" ) ) . "'" : 'NULL'; + $payment_amount = ! rgblank( rgar( $lead, 'payment_amount' ) ) ? (float) rgar( $lead, 'payment_amount' ) : 'NULL'; + $transaction_type = ! rgempty( 'transaction_type', $lead ) ? intval( $lead['transaction_type'] ) : 'NULL'; + + $status = ! rgempty( 'status', $lead ) ? $lead['status'] : 'active'; + $source_url = self::truncate( rgar( $lead, 'source_url' ), 200 ); + $user_agent = self::truncate( rgar( $lead, 'user_agent' ), 250 ); + + $sql = $wpdb->prepare( + "UPDATE $lead_table SET + form_id=%d, + post_id=%d, + is_starred=%d, + is_read=%d, + ip=%s, + source_url=%s, + user_agent=%s, + currency=%s, + payment_status=%s, + payment_date={$payment_date}, + payment_amount={$payment_amount}, + transaction_id=%s, + is_fulfilled=%d, + transaction_type={$transaction_type}, + payment_method=%s, + status='{$status}' + WHERE id=%d", rgar( $lead, 'form_id' ), rgar( $lead, 'post_id' ), rgar( $lead, 'is_starred' ), rgar( $lead, 'is_read' ), rgar( $lead, 'ip' ), $source_url, $user_agent, + rgar( $lead, 'currency' ), rgar( $lead, 'payment_status' ), rgar( $lead, 'transaction_id' ), rgar( $lead, 'is_fulfilled' ), rgar( $lead, 'payment_method' ), rgar( $lead, 'id' ) + ); + $wpdb->query( $sql ); + + self::set_current_lead( $lead ); + } - public static function restore_forms($form_ids){ - foreach($form_ids as $form_id) - self::restore_form($form_id); - } + private static function truncate( $str, $length ) { + if ( strlen( $str ) > $length ) { + $str = substr( $str, 0, $length ); + } - public static function delete_leads_by_form($form_id, $status=""){ - global $wpdb; + return $str; + } + + public static function delete_leads( $leads ) { + foreach ( $leads as $lead_id ) { + self::delete_lead( $lead_id ); + } + } + + public static function delete_forms( $forms ) { + foreach ( $forms as $form_id ) { + self::delete_form( $form_id ); + } + } + + public static function trash_forms( $form_ids ) { + foreach ( $form_ids as $form_id ) { + self::trash_form( $form_id ); + } + } + + public static function restore_forms( $form_ids ) { + foreach ( $form_ids as $form_id ) { + self::restore_form( $form_id ); + } + } - $lead_table = self::get_lead_table_name(); - $lead_notes_table = self::get_lead_notes_table_name(); - $lead_detail_table = self::get_lead_details_table_name(); - $lead_detail_long_table = self::get_lead_details_long_table_name(); - $lead_meta_table = self::get_lead_meta_table_name(); + public static function delete_leads_by_form( $form_id, $status = '' ) { + global $wpdb; + + $lead_table = self::get_lead_table_name(); + $lead_notes_table = self::get_lead_notes_table_name(); + $lead_detail_table = self::get_lead_details_table_name(); + $lead_detail_long_table = self::get_lead_details_long_table_name(); + $lead_meta_table = self::get_lead_meta_table_name(); - do_action("gform_delete_entries", $form_id, $status); + do_action( 'gform_delete_entries', $form_id, $status ); - //deleting uploaded files - self::delete_files_by_form($form_id, $status); + //deleting uploaded files + self::delete_files_by_form( $form_id, $status ); - $status_filter = empty($status) ? "" : $wpdb->prepare("AND status=%s", $status); + $status_filter = empty( $status ) ? '' : $wpdb->prepare( 'AND status=%s', $status ); - //Delete from detail long - $sql = $wpdb->prepare(" DELETE FROM $lead_detail_long_table + //Delete from detail long + $sql = $wpdb->prepare( + " DELETE FROM $lead_detail_long_table WHERE lead_detail_id IN( SELECT ld.id FROM $lead_detail_table ld INNER JOIN $lead_table l ON l.id = ld.lead_id WHERE l.form_id=%d AND ld.form_id=%d {$status_filter} - )", $form_id, $form_id); - $wpdb->query($sql); + )", $form_id, $form_id + ); + $wpdb->query( $sql ); - //Delete from lead details - $sql = $wpdb->prepare(" DELETE FROM $lead_detail_table + //Delete from lead details + $sql = $wpdb->prepare( + " DELETE FROM $lead_detail_table WHERE lead_id IN ( SELECT id FROM $lead_table WHERE form_id=%d {$status_filter} - )", $form_id); - $wpdb->query($sql); + )", $form_id + ); + $wpdb->query( $sql ); - //Delete from lead notes - $sql = $wpdb->prepare(" DELETE FROM $lead_notes_table + //Delete from lead notes + $sql = $wpdb->prepare( + " DELETE FROM $lead_notes_table WHERE lead_id IN ( SELECT id FROM $lead_table WHERE form_id=%d {$status_filter} - )", $form_id); - $wpdb->query($sql); + )", $form_id + ); + $wpdb->query( $sql ); - //Delete from lead meta - $sql = $wpdb->prepare(" DELETE FROM $lead_meta_table + //Delete from lead meta + $sql = $wpdb->prepare( + " DELETE FROM $lead_meta_table WHERE lead_id IN ( SELECT id FROM $lead_table WHERE form_id=%d {$status_filter} - )", $form_id); - $wpdb->query($sql); + )", $form_id + ); + $wpdb->query( $sql ); - //Delete from lead - $sql = $wpdb->prepare("DELETE FROM $lead_table WHERE form_id=%d {$status_filter}", $form_id); - $wpdb->query($sql); - } + //Delete from lead + $sql = $wpdb->prepare( "DELETE FROM $lead_table WHERE form_id=%d {$status_filter}", $form_id ); + $wpdb->query( $sql ); + } - public static function delete_views($form_id){ - global $wpdb; + public static function delete_views( $form_id ) { + global $wpdb; - $form_view_table = self::get_form_view_table_name(); + $form_view_table = self::get_form_view_table_name(); - //Delete form view - $sql = $wpdb->prepare("DELETE FROM $form_view_table WHERE form_id=%d", $form_id); - $wpdb->query($sql); - } + //Delete form view + $sql = $wpdb->prepare( "DELETE FROM $form_view_table WHERE form_id=%d", $form_id ); + $wpdb->query( $sql ); - public static function delete_form($form_id){ - global $wpdb; + do_action( 'gform_post_form_views_deleted', $form_id ); + } - do_action("gform_before_delete_form", $form_id); + public static function delete_form( $form_id ) { + global $wpdb; - $form_meta_table = self::get_meta_table_name(); - $form_table = self::get_form_table_name(); + do_action( 'gform_before_delete_form', $form_id ); - //Deleting form Entries - self::delete_leads_by_form($form_id); + $form_meta_table = self::get_meta_table_name(); + $form_table = self::get_form_table_name(); - //Delete form meta - $sql = $wpdb->prepare("DELETE FROM $form_meta_table WHERE form_id=%d", $form_id); - $wpdb->query($sql); + //Deleting form Entries + self::delete_leads_by_form( $form_id ); - //Deleting form Views - self::delete_views($form_id); + //Delete form meta + $sql = $wpdb->prepare( "DELETE FROM $form_meta_table WHERE form_id=%d", $form_id ); + $wpdb->query( $sql ); - //Delete form - $sql = $wpdb->prepare("DELETE FROM $form_table WHERE id=%d", $form_id); - $wpdb->query($sql); + //Deleting form Views + self::delete_views( $form_id ); - do_action("gform_after_delete_form", $form_id); - } + //Delete form + $sql = $wpdb->prepare( "DELETE FROM $form_table WHERE id=%d", $form_id ); + $wpdb->query( $sql ); - public static function trash_form($form_id){ - global $wpdb; - $form_table_name = self::get_form_table_name(); - $sql = $wpdb->prepare("UPDATE $form_table_name SET is_trash=1 WHERE id=%d", $form_id) ; - $result = $wpdb->query($sql); + do_action( 'gform_after_delete_form', $form_id ); + } - self::$_current_forms[$form_id] = null; - $success = $result == false; - return $success; - } + public static function trash_form( $form_id ) { + global $wpdb; + $form_table_name = self::get_form_table_name(); + $sql = $wpdb->prepare( "UPDATE $form_table_name SET is_trash=1 WHERE id=%d", $form_id ); + $result = $wpdb->query( $sql ); - public static function restore_form($form_id){ - global $wpdb; - $form_table_name = self::get_form_table_name(); - $sql = $wpdb->prepare("UPDATE $form_table_name SET is_trash=0 WHERE id=%d", $form_id) ; - $result = $wpdb->query($sql); + self::$_current_forms[ $form_id ] = null; - self::$_current_forms[$form_id] = null; - $success = $result == false; - return $success; - } + $success = $result == false; - public static function duplicate_form($form_id){ - global $wpdb; + do_action( 'gform_post_form_trashed', $form_id ); - if(!GFCommon::current_user_can_any("gravityforms_create_form")) - die(__("You don't have adequate permission to create forms.", "gravityforms")); + return $success; + } - //finding unique title - $form = self::get_form($form_id); - $count = 2; - $title = $form->title . " - Copy 1"; - while(!self::is_unique_title($title)){ - $title = $form->title . " - Copy $count"; - $count++; - } + public static function restore_form( $form_id ) { + global $wpdb; + $form_table_name = self::get_form_table_name(); + $sql = $wpdb->prepare( "UPDATE $form_table_name SET is_trash=0 WHERE id=%d", $form_id ); + $result = $wpdb->query( $sql ); - //creating new form - $new_id = self::insert_form($title); + self::$_current_forms[ $form_id ] = null; - //copying form meta - $meta = self::get_form_meta($form_id); - $meta["title"] = $title; - $meta["id"] = $new_id; + $success = $result == false; - $notifications = $meta["notifications"]; - $confirmations = $meta["confirmations"]; - unset($meta["notifications"]); - unset($meta["confirmations"]); - self::update_form_meta($new_id, $meta); + do_action( 'gform_post_form_restored', $form_id ); - //copying notification meta - self::update_form_meta($new_id, $notifications, "notifications"); + return $success; + } - //copying confirmation meta - self::update_form_meta($new_id, $confirmations, "confirmations"); + public static function duplicate_form( $form_id ) { + global $wpdb; - do_action("gform_after_duplicate_form", $form_id, $new_id); + if ( ! GFCommon::current_user_can_any( 'gravityforms_create_form' ) ) { + die( __( "You don't have adequate permission to create forms.", 'gravityforms' ) ); + } - return $new_id; - } + //finding unique title + $form = self::get_form( $form_id ); + $count = 2; + $title = $form->title . ' - Copy 1'; + while ( ! self::is_unique_title( $title ) ) { + $title = $form->title . " - Copy $count"; + $count ++; + } - public static function is_unique_title($title){ - $forms = self::get_forms(); - foreach($forms as $form){ - if(strtolower($form->title) == strtolower($title)) - return false; - } + //creating new form + $new_id = self::insert_form( $title ); - return true; - } + //copying form meta + $meta = self::get_form_meta( $form_id ); + $meta['title'] = $title; + $meta['id'] = $new_id; - public static function ensure_tables_exist(){ - global $wpdb; - $form_table_name = self::get_form_table_name(); - $form_count = $wpdb->get_var("SELECT count(0) FROM {$form_table_name}"); - if($wpdb->last_error){ - GFCommon::log_debug("Blog " . get_current_blog_id() . " - Form database table does not exist. Forcing database setup."); - GFForms::setup_database(); - } - } + $notifications = $meta['notifications']; + $confirmations = $meta['confirmations']; + unset( $meta['notifications'] ); + unset( $meta['confirmations'] ); + self::update_form_meta( $new_id, $meta ); - public static function insert_form($form_title){ - global $wpdb; - $form_table_name = $wpdb->prefix . "rg_form"; + //copying notification meta + self::update_form_meta( $new_id, $notifications, 'notifications' ); - //creating new form - $wpdb->query($wpdb->prepare("INSERT INTO $form_table_name(title, date_created) VALUES(%s, utc_timestamp())", $form_title)); + //copying confirmation meta + self::update_form_meta( $new_id, $confirmations, 'confirmations' ); - //returning newly created form id - return $wpdb->insert_id; - } + // The gform_after_duplicate_form action is deprecated since version 1.9. Please use gform_post_form_duplicated instead + do_action( 'gform_after_duplicate_form', $form_id, $new_id ); - public static function update_form_meta( $form_id, $form_meta, $meta_name = 'display_meta' ) { - global $wpdb; + do_action( 'gform_post_form_duplicated', $form_id, $new_id ); - $form_meta = apply_filters( 'gform_form_update_meta', $form_meta, $form_id, $meta_name ); - $form_meta = apply_filters( "gform_form_update_meta_{$form_id}", $form_meta, $form_id, $meta_name ); - $meta_table_name = self::get_meta_table_name(); - $form_meta = json_encode( $form_meta ); + return $new_id; + } - if(intval($wpdb->get_var($wpdb->prepare("SELECT count(0) FROM $meta_table_name WHERE form_id=%d", $form_id))) > 0) - $result = $wpdb->query( $wpdb->prepare("UPDATE $meta_table_name SET $meta_name=%s WHERE form_id=%d", $form_meta, $form_id) ); - else - $result = $wpdb->query( $wpdb->prepare("INSERT INTO $meta_table_name(form_id, $meta_name) VALUES(%d, %s)", $form_id, $form_meta ) ); + public static function is_unique_title( $title ) { + $forms = self::get_forms(); + foreach ( $forms as $form ) { + if ( strtolower( $form->title ) == strtolower( $title ) ) { + return false; + } + } - self::$_current_forms[$form_id] = null; + return true; + } - do_action( 'gform_post_update_form_meta', $form_meta, $form_id, $meta_name ); - do_action( "gform_post_update_form_meta_{$form_id}", $form_meta, $form_id, $meta_name ); + public static function ensure_tables_exist() { + global $wpdb; + $form_table_name = self::get_form_table_name(); + $form_count = $wpdb->get_var( "SELECT count(0) FROM {$form_table_name}" ); + if ( $wpdb->last_error ) { + GFCommon::log_debug( 'GFFormsModel::ensure_tables_exist(): Blog ' . get_current_blog_id() . ' - Form database table does not exist. Forcing database setup.' ); + GFForms::setup_database(); + } + } - return $result; - } + public static function insert_form( $form_title ) { + global $wpdb; + $form_table_name = $wpdb->prefix . 'rg_form'; - public static function delete_files($lead_id, $form=null){ - $lead = self::get_lead($lead_id); - - if($form == null) - $form = self::get_form_meta($lead["form_id"]); - - $fields = GFCommon::get_fields_by_type($form, array("fileupload", "post_image")); - if(is_array($fields)){ - foreach($fields as $field){ - if(rgar($field, "multipleFiles")){ - $value_json = self::get_lead_field_value($lead, $field); - if(!empty($value_json)){ - $files = json_decode($value_json, true); - if(false === empty($files) && is_array($files)){ - foreach ($files as $file){ - self::delete_physical_file($file); - } - } - } - } else { - $value = self::get_lead_field_value($lead, $field); - self::delete_physical_file($value); - } - } - } - } + //creating new form + $wpdb->query( $wpdb->prepare( "INSERT INTO $form_table_name(title, date_created) VALUES(%s, utc_timestamp())", $form_title ) ); - public static function delete_files_by_form($form_id, $status=""){ - global $wpdb; - $form = self::get_form_meta($form_id); - $fields = GFCommon::get_fields_by_type($form, array("fileupload", "post_image")); - if(empty($fields)) - return; + //returning newly created form id + return $wpdb->insert_id; - $status_filter = empty($status) ? "" : $wpdb->prepare("AND status=%s", $status); - $results = $wpdb->get_results($wpdb->prepare("SELECT id FROM {$wpdb->prefix}rg_lead WHERE form_id=%d {$status_filter}", $form_id), ARRAY_A); + } - foreach($results as $result){ - self::delete_files($result["id"], $form); - } - } + public static function update_form_meta( $form_id, $form_meta, $meta_name = 'display_meta' ) { + global $wpdb; - public static function delete_file($entry_id, $field_id, $file_index = 0){ - global $wpdb; + $form_meta = apply_filters( 'gform_form_update_meta', $form_meta, $form_id, $meta_name ); + $form_meta = apply_filters( "gform_form_update_meta_{$form_id}", $form_meta, $form_id, $meta_name ); - if($entry_id == 0 || $field_id == 0) - return; + $meta_table_name = self::get_meta_table_name(); + $form_meta = json_encode( $form_meta ); - $entry = self::get_lead($entry_id); - $form_id = $entry["form_id"]; - $form = self::get_form_meta($form_id); - $field = self::get_field($form, $field_id); - $multiple_files = rgar($field, "multipleFiles"); - if($multiple_files){ - $file_urls = json_decode($entry[$field_id], true); - $file_url = $file_urls[$file_index]; - unset($file_urls[$file_index]); - $file_urls = array_values($file_urls); - $field_value = empty($file_urls) ? "" : json_encode($file_urls); - } else { - $file_url = $entry[$field_id]; - $field_value = ""; - } + if ( intval( $wpdb->get_var( $wpdb->prepare( "SELECT count(0) FROM $meta_table_name WHERE form_id=%d", $form_id ) ) ) > 0 ) { + $result = $wpdb->query( $wpdb->prepare( "UPDATE $meta_table_name SET $meta_name=%s WHERE form_id=%d", $form_meta, $form_id ) ); + } else { + $result = $wpdb->query( $wpdb->prepare( "INSERT INTO $meta_table_name(form_id, $meta_name) VALUES(%d, %s)", $form_id, $form_meta ) ); + } - self::delete_physical_file($file_url); + self::$_current_forms[ $form_id ] = null; - // update lead field value - simulate form submission + do_action( 'gform_post_update_form_meta', $form_meta, $form_id, $meta_name ); + do_action( "gform_post_update_form_meta_{$form_id}", $form_meta, $form_id, $meta_name ); - $lead_detail_table = self::get_lead_details_table_name(); - $sql = $wpdb->prepare("SELECT id FROM $lead_detail_table WHERE lead_id=%d AND field_number BETWEEN %s AND %s", $entry_id, doubleval($field_id) - 0.001, doubleval($field_id) + 0.001); - $entry_detail_id = $wpdb->get_var($sql); + return $result; + } - self::update_lead_field_value($form, $entry, $field, $entry_detail_id, $field_id, $field_value); + public static function delete_files( $lead_id, $form = null ) { + $lead = self::get_lead( $lead_id ); - } + if ( $form == null ) { + $form = self::get_form_meta( $lead['form_id'] ); + } - private static function delete_physical_file($file_url){ - $ary = explode("|:|", $file_url); - $url = rgar($ary,0); - if(empty($url)) - return; + $fields = GFCommon::get_fields_by_type( $form, array( 'fileupload', 'post_image' ) ); + if ( is_array( $fields ) ) { + foreach ( $fields as $field ) { + if ( $field->multipleFiles ) { + $value_json = self::get_lead_field_value( $lead, $field ); + if ( ! empty( $value_json ) ) { + $files = json_decode( $value_json, true ); + if ( false === empty( $files ) && is_array( $files ) ) { + foreach ( $files as $file ) { + self::delete_physical_file( $file ); + } + } + } + } else { + $value = self::get_lead_field_value( $lead, $field ); + self::delete_physical_file( $value ); + } + } + } + } - //Convert from url to physical path - if (is_multisite() && get_site_option( 'ms_files_rewriting' )) { - $file_path = preg_replace("|^(.*?)/files/gravity_forms/|", BLOGUPLOADDIR . "gravity_forms/", $url); - } else { - $file_path = str_replace(WP_CONTENT_URL, WP_CONTENT_DIR, $url); - } + public static function delete_files_by_form( $form_id, $status = '' ) { + global $wpdb; + $form = self::get_form_meta( $form_id ); + $fields = GFCommon::get_fields_by_type( $form, array( 'fileupload', 'post_image' ) ); + if ( empty( $fields ) ) { + return; + } - if(file_exists($file_path)){ - unlink($file_path); - } - } + $status_filter = empty( $status ) ? '' : $wpdb->prepare( 'AND status=%s', $status ); + $results = $wpdb->get_results( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}rg_lead WHERE form_id=%d {$status_filter}", $form_id ), ARRAY_A ); - public static function delete_field($form_id, $field_id){ - global $wpdb; + foreach ( $results as $result ) { + self::delete_files( $result['id'], $form ); + } + } - if($form_id == 0) - return; + public static function delete_file( $entry_id, $field_id, $file_index = 0 ) { + global $wpdb; - do_action("gform_before_delete_field", $form_id, $field_id); + if ( $entry_id == 0 || $field_id == 0 ) { + return; + } - $lead_table = self::get_lead_table_name(); - $lead_detail_table = self::get_lead_details_table_name(); - $lead_detail_long_table = self::get_lead_details_long_table_name(); + $entry = self::get_lead( $entry_id ); + $form_id = $entry['form_id']; + $form = self::get_form_meta( $form_id ); + $field = self::get_field( $form, $field_id ); + $multiple_files = $field->multipleFiles; + if ( $multiple_files ) { + $file_urls = json_decode( $entry[ $field_id ], true ); + $file_url = $file_urls[ $file_index ]; + unset( $file_urls[ $file_index ] ); + $file_urls = array_values( $file_urls ); + $field_value = empty( $file_urls ) ? '' : json_encode( $file_urls ); + } else { + $file_url = $entry[ $field_id ]; + $field_value = ''; + } + self::delete_physical_file( $file_url ); - $form = self::get_form_meta($form_id); + // update lead field value - simulate form submission - $field_type = ""; + $lead_detail_table = self::get_lead_details_table_name(); + $sql = $wpdb->prepare( "SELECT id FROM $lead_detail_table WHERE lead_id=%d AND field_number BETWEEN %s AND %s", $entry_id, doubleval( $field_id ) - 0.0001, doubleval( $field_id ) + 0.0001 ); + $entry_detail_id = $wpdb->get_var( $sql ); - //Deleting field from form meta - $count = sizeof($form["fields"]); - for($i = $count-1; $i >= 0; $i--){ - $field = $form["fields"][$i]; + self::update_lead_field_value( $form, $entry, $field, $entry_detail_id, $field_id, $field_value ); - //Deleting associated conditional logic rules - if(!empty($field["conditionalLogic"])){ - $rule_count = sizeof($field["conditionalLogic"]["rules"]); - for($j = $rule_count-1; $j >= 0; $j--){ - if($field["conditionalLogic"]["rules"][$j]["fieldId"] == $field_id){ - unset($form["fields"][$i]["conditionalLogic"]["rules"][$j]); - } - } - $form["fields"][$i]["conditionalLogic"]["rules"] = array_values($form["fields"][$i]["conditionalLogic"]["rules"]); + } - //If there aren't any rules, remove the conditional logic - if(sizeof($form["fields"][$i]["conditionalLogic"]["rules"]) == 0){ - $form["fields"][$i]["conditionalLogic"] = false; - } - } + private static function delete_physical_file( $file_url ) { + $ary = explode( '|:|', $file_url ); + $url = rgar( $ary, 0 ); + if ( empty( $url ) ) { + return; + } - //Deleting field from form meta - if($field["id"] == $field_id){ - $field_type = $field["type"]; - unset($form["fields"][$i]); - } + //Convert from url to physical path + if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { + $file_path = preg_replace( "|^(.*?)/files/gravity_forms/|", BLOGUPLOADDIR . 'gravity_forms/', $url ); + } else { + $file_path = str_replace( WP_CONTENT_URL, WP_CONTENT_DIR, $url ); + } - } + if ( file_exists( $file_path ) ) { + unlink( $file_path ); + } + } - //removing post content and title template if the field being deleted is a post content field or post title field - if($field_type == "post_content"){ - $form["postContentTemplateEnabled"] = false; - $form["postContentTemplate"] = ""; - } - else if($field_type == "post_title"){ - $form["postTitleTemplateEnabled"] = false; - $form["postTitleTemplate"] = ""; - } + public static function delete_field( $form_id, $field_id ) { + global $wpdb; - //Deleting associated routing rules - if(!empty($form["notification"]["routing"])){ - $routing_count = sizeof($form["notification"]["routing"]); - for($j = $routing_count-1; $j >= 0; $j--){ - if(intval($form["notification"]["routing"][$j]["fieldId"]) == $field_id){ - unset($form["notification"]["routing"][$j]); - } - } - $form["notification"]["routing"] = array_values($form["notification"]["routing"]); + if ( $form_id == 0 ) { + return; + } - //If there aren't any routing, remove it - if(sizeof($form["notification"]["routing"]) == 0){ - $form["notification"]["routing"] = null; - } - } + do_action( 'gform_before_delete_field', $form_id, $field_id ); - $form["fields"] = array_values($form["fields"]); - self::update_form_meta($form_id, $form); + $lead_table = self::get_lead_table_name(); + $lead_detail_table = self::get_lead_details_table_name(); + $lead_detail_long_table = self::get_lead_details_long_table_name(); - //Delete from grid column meta - $columns = self::get_grid_column_meta($form_id); - $count = sizeof($columns); - for($i = $count -1; $i >=0; $i--) - { - if(intval(rgar($columns,$i)) == intval($field_id)){ - unset($columns[$i]); - } - } - self::update_grid_column_meta($form_id, $columns); - //Delete from detail long - $sql = $wpdb->prepare(" DELETE FROM $lead_detail_long_table + $form = self::get_form_meta( $form_id ); + + $field_type = ''; + + //Deleting field from form meta + $count = sizeof( $form['fields'] ); + for ( $i = $count - 1; $i >= 0; $i -- ) { + $field = $form['fields'][ $i ]; + + //Deleting associated conditional logic rules + if ( ! empty( $field->conditionalLogic ) ) { + $rule_count = sizeof( $field->conditionalLogic['rules'] ); + for ( $j = $rule_count - 1; $j >= 0; $j -- ) { + if ( $field->conditionalLogic['rules'][ $j ]['fieldId'] == $field_id ) { + unset( $form['fields'][ $i ]->conditionalLogic['rules'][ $j ] ); + } + } + $form['fields'][ $i ]->conditionalLogic['rules'] = array_values( $form['fields'][ $i ]->conditionalLogic['rules'] ); + + //If there aren't any rules, remove the conditional logic + if ( sizeof( $form['fields'][ $i ]->conditionalLogic['rules'] ) == 0 ) { + $form['fields'][ $i ]->conditionalLogic = false; + } + } + + //Deleting field from form meta + if ( $field->id == $field_id ) { + $field_type = $field->type; + unset( $form['fields'][ $i ] ); + } + } + + //removing post content and title template if the field being deleted is a post content field or post title field + if ( $field_type == 'post_content' ) { + $form['postContentTemplateEnabled'] = false; + $form['postContentTemplate'] = ''; + } else if ( $field_type == 'post_title' ) { + $form['postTitleTemplateEnabled'] = false; + $form['postTitleTemplate'] = ''; + } + + //Deleting associated routing rules + if ( ! empty( $form['notification']['routing'] ) ) { + $routing_count = sizeof( $form['notification']['routing'] ); + for ( $j = $routing_count - 1; $j >= 0; $j -- ) { + if ( intval( $form['notification']['routing'][ $j ]['fieldId'] ) == $field_id ) { + unset( $form['notification']['routing'][ $j ] ); + } + } + $form['notification']['routing'] = array_values( $form['notification']['routing'] ); + + //If there aren't any routing, remove it + if ( sizeof( $form['notification']['routing'] ) == 0 ) { + $form['notification']['routing'] = null; + } + } + + $form['fields'] = array_values( $form['fields'] ); + self::update_form_meta( $form_id, $form ); + + //Delete from grid column meta + $columns = self::get_grid_column_meta( $form_id ); + $count = sizeof( $columns ); + for ( $i = $count - 1; $i >= 0; $i -- ) { + if ( intval( rgar( $columns, $i ) ) == intval( $field_id ) ) { + unset( $columns[ $i ] ); + } + } + self::update_grid_column_meta( $form_id, $columns ); + + //Delete from detail long + $sql = $wpdb->prepare( + " DELETE FROM $lead_detail_long_table WHERE lead_detail_id IN( SELECT id FROM $lead_detail_table WHERE form_id=%d AND field_number >= %d AND field_number < %d - )", $form_id, $field_id, $field_id + 1); - $wpdb->query($sql); + )", $form_id, $field_id, $field_id + 1 + ); + $wpdb->query( $sql ); - //Delete from lead details - $sql = $wpdb->prepare("DELETE FROM $lead_detail_table WHERE form_id=%d AND field_number >= %d AND field_number < %d", $form_id, $field_id, $field_id + 1); - $wpdb->query($sql); + //Delete from lead details + $sql = $wpdb->prepare( "DELETE FROM $lead_detail_table WHERE form_id=%d AND field_number >= %d AND field_number < %d", $form_id, $field_id, $field_id + 1 ); + $wpdb->query( $sql ); - //Delete leads with no details - $sql = $wpdb->prepare(" DELETE FROM $lead_table + //Delete leads with no details + $sql = $wpdb->prepare( + " DELETE FROM $lead_table WHERE form_id=%d AND id NOT IN( SELECT DISTINCT(lead_id) FROM $lead_detail_table WHERE form_id=%d - )", $form_id, $form_id); - $wpdb->query($sql); + )", $form_id, $form_id + ); + $wpdb->query( $sql ); - do_action("gform_after_delete_field", $form_id, $field_id); - } + do_action( 'gform_after_delete_field', $form_id, $field_id ); + } - public static function delete_lead($lead_id){ - global $wpdb; + public static function delete_lead( $lead_id ) { + global $wpdb; - do_action("gform_delete_lead", $lead_id); + do_action( 'gform_delete_lead', $lead_id ); - $lead_table = self::get_lead_table_name(); - $lead_notes_table = self::get_lead_notes_table_name(); - $lead_detail_table = self::get_lead_details_table_name(); - $lead_detail_long_table = self::get_lead_details_long_table_name(); + $lead_table = self::get_lead_table_name(); + $lead_notes_table = self::get_lead_notes_table_name(); + $lead_detail_table = self::get_lead_details_table_name(); + $lead_detail_long_table = self::get_lead_details_long_table_name(); - //deleting uploaded files - self::delete_files($lead_id); + //deleting uploaded files + self::delete_files( $lead_id ); - //Delete from detail long - $sql = $wpdb->prepare(" DELETE FROM $lead_detail_long_table + //Delete from detail long + $sql = $wpdb->prepare( + " DELETE FROM $lead_detail_long_table WHERE lead_detail_id IN( SELECT id FROM $lead_detail_table WHERE lead_id=%d - )", $lead_id); - $wpdb->query($sql); + )", $lead_id + ); + $wpdb->query( $sql ); - //Delete from lead details - $sql = $wpdb->prepare("DELETE FROM $lead_detail_table WHERE lead_id=%d", $lead_id); - $wpdb->query($sql); + //Delete from lead details + $sql = $wpdb->prepare( "DELETE FROM $lead_detail_table WHERE lead_id=%d", $lead_id ); + $wpdb->query( $sql ); - //Delete from lead notes - $sql = $wpdb->prepare("DELETE FROM $lead_notes_table WHERE lead_id=%d", $lead_id); - $wpdb->query($sql); + //Delete from lead notes + $sql = $wpdb->prepare( "DELETE FROM $lead_notes_table WHERE lead_id=%d", $lead_id ); + $wpdb->query( $sql ); - //Delete from lead meta - gform_delete_meta($lead_id); + //Delete from lead meta + gform_delete_meta( $lead_id ); - //Delete from lead - $sql = $wpdb->prepare("DELETE FROM $lead_table WHERE id=%d", $lead_id); - $wpdb->query($sql); + //Delete from lead + $sql = $wpdb->prepare( "DELETE FROM $lead_table WHERE id=%d", $lead_id ); + $wpdb->query( $sql ); - } + } - public static function add_note($lead_id, $user_id, $user_name, $note, $note_type = "note"){ - global $wpdb; + public static function add_note( $lead_id, $user_id, $user_name, $note, $note_type = 'note' ) { + global $wpdb; - $table_name = self::get_lead_notes_table_name(); - $sql = $wpdb->prepare("INSERT INTO $table_name(lead_id, user_id, user_name, value, note_type, date_created) values(%d, %d, %s, %s, %s, utc_timestamp())", $lead_id, $user_id, $user_name, $note, $note_type); + $table_name = self::get_lead_notes_table_name(); + $sql = $wpdb->prepare( "INSERT INTO $table_name(lead_id, user_id, user_name, value, note_type, date_created) values(%d, %d, %s, %s, %s, utc_timestamp())", $lead_id, $user_id, $user_name, $note, $note_type ); - $wpdb->query($sql); - } + $wpdb->query( $sql ); - public static function delete_note($note_id){ - global $wpdb; + do_action( 'gform_post_note_added', $wpdb->insert_id, $lead_id, $user_id, $user_name, $note, $note_type ); + } - if(!GFCommon::current_user_can_any("gravityforms_edit_entry_notes")) - die(__("You don't have adequate permission to delete notes.", "gravityforms")); + public static function delete_note( $note_id ) { + global $wpdb; - $table_name = self::get_lead_notes_table_name(); - $sql = $wpdb->prepare("DELETE FROM $table_name WHERE id=%d", $note_id); - $wpdb->query($sql); - } + $table_name = self::get_lead_notes_table_name(); - public static function delete_notes($notes){ - if(!is_array($notes)) - return; + $lead_id = $wpdb->get_var( $wpdb->prepare( "SELECT lead_id FROM $table_name WHERE id = %d", $note_id ) ); + do_action( 'gform_pre_note_deleted', $note_id, $lead_id ); - foreach($notes as $note_id){ - self::delete_note($note_id); - } - } + $sql = $wpdb->prepare( "DELETE FROM $table_name WHERE id=%d", $note_id ); + $wpdb->query( $sql ); + } - public static function get_ip(){ + public static function delete_notes( $notes ) { + if ( ! is_array( $notes ) ) { + return; + } - $ip = ''; - $headers = array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR' ); + foreach ( $notes as $note_id ) { + self::delete_note( $note_id ); + } + } - foreach( $headers as $header ) { - $ip = rgar( $_SERVER, $header ); - if( $ip ) - break; - } + public static function get_ip() { - // HTTP_X_FORWARDED_FOR can return a comma separated list of IPs; using the first one - $ips = explode( ',', $ip ); + $ip = ''; + $headers = array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR' ); - return $ips[0]; - } + foreach ( $headers as $header ) { + $ip = rgar( $_SERVER, $header ); + if ( $ip ) { + break; + } + } - public static function save_lead($form, &$lead){ - global $wpdb; + // HTTP_X_FORWARDED_FOR can return a comma separated list of IPs; using the first one + $ips = explode( ',', $ip ); - GFCommon::log_debug("Saving entry."); + return $ips[0]; + } - if(IS_ADMIN && !GFCommon::current_user_can_any("gravityforms_edit_entries")) - die(__("You don't have adequate permission to edit entries.", "gravityforms")); + public static function save_lead( $form, &$lead ) { + global $wpdb; - $lead_detail_table = self::get_lead_details_table_name(); - $is_new_lead = $lead == null; + GFCommon::log_debug( 'GFFormsModel::save_lead(): Saving entry.' ); - //Inserting lead if null - if( $is_new_lead ) { + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; - global $current_user; - $user_id = $current_user && $current_user->ID ? $current_user->ID : 'NULL'; + if ( $is_admin && ! GFCommon::current_user_can_any( 'gravityforms_edit_entries' ) ) { + die( __( "You don't have adequate permission to edit entries.", 'gravityforms' ) ); + } - $lead_table = RGFormsModel::get_lead_table_name(); - $user_agent = self::truncate($_SERVER["HTTP_USER_AGENT"], 250); - $currency = GFCommon::get_currency(); - $source_url = self::truncate(self::get_current_page_url(), 200); + $lead_detail_table = self::get_lead_details_table_name(); + $is_new_lead = $lead == null; - $wpdb->query($wpdb->prepare("INSERT INTO $lead_table(form_id, ip, source_url, date_created, user_agent, currency, created_by) VALUES(%d, %s, %s, utc_timestamp(), %s, %s, {$user_id})", $form["id"], self::get_ip(), $source_url, $user_agent, $currency)); + //Inserting lead if null + if ( $is_new_lead ) { + global $current_user; + $user_id = $current_user && $current_user->ID ? $current_user->ID : 'NULL'; - //reading newly created lead id - $lead_id = $wpdb->insert_id; - $lead = array( 'id' => $lead_id ); + $lead_table = RGFormsModel::get_lead_table_name(); + $user_agent = self::truncate( $_SERVER['HTTP_USER_AGENT'], 250 ); + $currency = GFCommon::get_currency(); + $source_url = self::truncate( self::get_current_page_url(), 200 ); - GFCommon::log_debug("Entry record created in the database. ID: {$lead_id}"); - } + $wpdb->query( $wpdb->prepare( "INSERT INTO $lead_table(form_id, ip, source_url, date_created, user_agent, currency, created_by) VALUES(%d, %s, %s, utc_timestamp(), %s, %s, {$user_id})", $form['id'], self::get_ip(), $source_url, $user_agent, $currency ) ); - $current_fields = $wpdb->get_results($wpdb->prepare("SELECT id, field_number FROM $lead_detail_table WHERE lead_id=%d", $lead["id"])); - $total_fields = array(); - $calculation_fields = array(); - $recalculate_total = false; + //reading newly created lead id + $lead_id = $wpdb->insert_id; + $lead = array( 'id' => $lead_id ); - GFCommon::log_debug("Saving entry fields."); + GFCommon::log_debug( "GFFormsModel::save_lead(): Entry record created in the database. ID: {$lead_id}." ); + } - foreach($form["fields"] as $field){ + $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT id, field_number FROM $lead_detail_table WHERE lead_id=%d", $lead['id'] ) ); - //Ignore fields that are marked as display only - if(rgget("displayOnly", $field) && $field["type"] != "password"){ - continue; - } + $total_fields = array(); + /* @var $calculation_fields GF_Field[] */ + $calculation_fields = array(); + $recalculate_total = false; - //ignore pricing fields in the entry detail - if(RG_CURRENT_VIEW == "entry" && GFCommon::is_pricing_field($field["type"])){ - continue; - } + GFCommon::log_debug( 'GFFormsModel::save_lead(): Saving entry fields.' ); + foreach ( $form['fields'] as $field ) { + /* @var $field GF_Field */ - //process total field after all fields have been saved - if($field["type"] == "total"){ - $total_fields[] = $field; - continue; - } + //Ignore fields that are marked as display only + if ( $field->displayOnly && $field->type != 'password' ) { + continue; + } + + //ignore pricing fields in the entry detail + if ( RG_CURRENT_VIEW == 'entry' && GFCommon::is_pricing_field( $field->type ) ) { + continue; + } + + + //process total field after all fields have been saved + if ( $field->type == 'total' ) { + $total_fields[] = $field; + continue; + } $is_entry_update = RG_CURRENT_VIEW == 'entry' || ! $is_new_lead; $read_value_from_post = $is_new_lead || ! isset( $lead[ 'date_created' ] ); - //only save fields that are not hidden (except on entry screen) - if( $is_entry_update || ! GFFormsModel::is_field_hidden( $form, $field, array(), $read_value_from_post ? null : $lead ) ) { + //only save fields that are not hidden (except when updating an entry) + if( $is_entry_update || ! GFFormsModel::is_field_hidden( $form, $field, array(), $read_value_from_post ? null : $lead ) ) { - // process calculation fields after all fields have been saved (moved after the is hidden check) - if( GFCommon::has_field_calculation($field) ) { - $calculation_fields[] = $field; - continue; - } + // process calculation fields after all fields have been saved (moved after the is hidden check) + if ( $field->has_calculation() ) { + $calculation_fields[] = $field; + continue; + } - GFCommon::log_debug("Saving field {$field["label"]}"); + GFCommon::log_debug( "GFFormsModel::save_lead(): Saving field {$field->label}(#{$field->id} - {$field->type})." ); - if($field['type'] == 'post_category') - $field = GFCommon::add_categories_as_choices($field, ''); + if ( $field->type == 'post_category' ) { + $field = GFCommon::add_categories_as_choices( $field, '' ); + } - if(isset($field["inputs"]) && is_array($field["inputs"])){ + $inputs = $field->get_entry_inputs(); - foreach($field["inputs"] as $input) - self::save_input($form, $field, $lead, $current_fields, $input["id"]); - } - else{ - self::save_input($form, $field, $lead, $current_fields, $field["id"]); - } - } - } + if ( is_array( $inputs ) ) { + foreach ( $inputs as $input ) { + self::save_input( $form, $field, $lead, $current_fields, $input['id'] ); + } + } else { + self::save_input( $form, $field, $lead, $current_fields, $field->id ); + } + } + } - if(!empty($calculation_fields)) { - foreach($calculation_fields as $calculation_field) { + if ( ! empty( $calculation_fields ) ) { + foreach ( $calculation_fields as $calculation_field ) { - GFCommon::log_debug("Saving calculated field {$calculation_field["label"]}"); + GFCommon::log_debug( "GFFormsModel::save_lead(): Saving calculated field {$calculation_field->label}(#{$calculation_field->id} - {$calculation_field->type})." ); - if(isset($calculation_field["inputs"]) && is_array($calculation_field["inputs"])){ - foreach($calculation_field["inputs"] as $input) { - self::save_input($form, $calculation_field, $lead, $current_fields, $input["id"]); - self::refresh_lead_field_value($lead["id"], $input["id"]); - } - } - else{ - self::save_input($form, $calculation_field, $lead, $current_fields, $calculation_field["id"]); - self::refresh_lead_field_value($lead["id"], $calculation_field["id"]); - } + $inputs = $calculation_field->get_entry_inputs(); - } - self::refresh_product_cache($form, $lead = RGFormsModel::get_lead($lead['id'])); - } + if ( is_array( $inputs ) ) { + foreach ( $inputs as $input ) { + self::save_input( $form, $calculation_field, $lead, $current_fields, $input['id'] ); + self::refresh_lead_field_value( $lead['id'], $input['id'] ); + } + } else { + self::save_input( $form, $calculation_field, $lead, $current_fields, $calculation_field->id ); + self::refresh_lead_field_value( $lead['id'], $calculation_field->id ); + } + } + self::refresh_product_cache( $form, $lead = RGFormsModel::get_lead( $lead['id'] ) ); + } - //saving total field as the last field of the form. - if(!empty($total_fields)) { - foreach($total_fields as $total_field){ - GFCommon::log_debug("Saving total field."); - self::save_input($form, $total_field, $lead, $current_fields, $total_field["id"]); - self::refresh_lead_field_value($lead["id"], $total_field["id"]); - } - } - } + //saving total field as the last field of the form. + if ( ! empty( $total_fields ) ) { + foreach ( $total_fields as $total_field ) { + GFCommon::log_debug( 'GFFormsModel::save_lead(): Saving total field.' ); + self::save_input( $form, $total_field, $lead, $current_fields, $total_field->id ); + self::refresh_lead_field_value( $lead['id'], $total_field['id'] ); + } + } + } - public static function create_lead($form) { - global $current_user; + public static function create_lead( $form ) { + global $current_user; + + $total_fields = array(); + $calculation_fields = array(); + + $lead = array(); + $lead['id'] = null; + $lead['post_id'] = null; + $lead['date_created'] = null; + $lead['form_id'] = $form['id']; + $lead['ip'] = self::get_ip(); + $lead['source_url'] = self::truncate( self::get_current_page_url(), 200 ); + $lead['user_agent'] = strlen( $_SERVER['HTTP_USER_AGENT'] ) > 250 ? substr( $_SERVER['HTTP_USER_AGENT'], 0, 250 ) : $_SERVER['HTTP_USER_AGENT']; + $lead['currency'] = GFCommon::get_currency(); + $lead['created_by'] = $current_user && $current_user->ID ? $current_user->ID : 'NULL'; + + foreach ( $form['fields'] as $field ) { + /* @var $field GF_Field */ + + // ignore fields that are marked as display only + if ( $field->displayOnly && $field->type != 'password' ) { + continue; + } + + // process total field after all fields have been saved + if ( $field->type == 'total' ) { + $total_fields[] = $field; + continue; + } + + // process calculation fields after all fields have been saved + if ( $field->has_calculation() ) { + $calculation_fields[] = $field; + continue; + } + + // only save fields that are not hidden + if ( ! RGFormsModel::is_field_hidden( $form, $field, array() ) ) { + + if ( $field->type == 'post_category' ) { + $field = GFCommon::add_categories_as_choices( $field, '' ); + } - $total_fields = array(); - $calculation_fields = array(); - - $lead = array(); - $lead['id'] = null; - $lead['post_id'] = null; - $lead['date_created'] = null; - $lead['form_id'] = $form['id']; - $lead['ip'] = self::get_ip(); - $lead['source_url'] = self::truncate(self::get_current_page_url(), 200); - $lead['user_agent'] = strlen($_SERVER['HTTP_USER_AGENT']) > 250 ? substr($_SERVER['HTTP_USER_AGENT'], 0, 250) : $_SERVER['HTTP_USER_AGENT']; - $lead['currency'] = GFCommon::get_currency(); - $lead['created_by'] = $current_user && $current_user->ID ? $current_user->ID : 'NULL'; - - foreach($form['fields'] as $field) { - - // ignore fields that are marked as display only - if(rgget('displayOnly', $field) && $field['type'] != 'password'){ - continue; - } + $inputs = $field->get_entry_inputs(); - // process total field after all fields have been saved - if($field['type'] == 'total'){ - $total_fields[] = $field; - continue; - } + if ( is_array( $inputs ) ) { + foreach ( $field->inputs as $input ) { + $lead[ (string) $input['id'] ] = self::get_prepared_input_value( $form, $field, $lead, $input['id'] ); + } + } else { + $lead[ $field->id ] = self::get_prepared_input_value( $form, $field, $lead, $field->id ); + } + } + } - // process calculation fields after all fields have been saved - if(GFCommon::has_field_calculation($field)) { - $calculation_fields[] = $field; - continue; - } + if ( ! empty( $calculation_fields ) ) { + foreach ( $calculation_fields as $field ) { + /* @var $field GF_Field */ - // only save fields that are not hidden - if(!RGFormsModel::is_field_hidden($form, $field, array()) ){ + // only save fields that are not hidden + if ( RGFormsModel::is_field_hidden( $form, $field, array() ) ) { + continue; + } - if($field['type'] == 'post_category') - $field = GFCommon::add_categories_as_choices($field, ''); + $inputs = $field->get_entry_inputs(); - if(isset($field['inputs']) && is_array($field['inputs'])){ - foreach($field['inputs'] as $input) { - $lead[(string)$input['id']] = self::get_prepared_input_value($form, $field, $lead, $input["id"]); - } - } - else { - $lead[$field['id']] = self::get_prepared_input_value($form, $field, $lead, $field["id"]); - } - } - } + if ( is_array( $inputs ) ) { + foreach ( $inputs as $input ) { + $lead[ (string) $input['id'] ] = self::get_prepared_input_value( $form, $field, $lead, $input['id'] ); + } + } else { + $lead[ $field->id ] = self::get_prepared_input_value( $form, $field, $lead, $field->id ); + } + } + self::refresh_product_cache( $form, $lead ); + } - if(!empty($calculation_fields)) { - foreach($calculation_fields as $field) { + // saving total field as the last field of the form. + if ( ! empty( $total_fields ) ) { + foreach ( $total_fields as $total_field ) { + $lead[ $total_field->id ] = self::get_prepared_input_value( $form, $total_field, $lead, $total_field->id ); + } + } - // only save fields that are not hidden - if(RGFormsModel::is_field_hidden($form, $field, array()) ) - continue; + return $lead; + } - if(isset($field["inputs"]) && is_array($field["inputs"])){ - foreach($field["inputs"] as $input) { - $lead[(string)$input['id']] = self::get_prepared_input_value($form, $field, $lead, $input["id"]); - } - } - else{ - $lead[$field['id']] = self::get_prepared_input_value($form, $field, $lead, $field["id"]); - } + public static function get_prepared_input_value( $form, $field, $lead, $input_id ) { - } - self::refresh_product_cache($form, $lead); - } + $input_name = 'input_' . str_replace( '.', '_', $input_id ); + $value = rgpost( $input_name ); - // saving total field as the last field of the form. - if( ! empty( $total_fields ) ) { - foreach( $total_fields as $total_field ) { - $lead[$total_field['id']] = self::get_prepared_input_value( $form, $total_field, $lead, $total_field['id'] ); - } - } + $is_form_editor = GFCommon::is_form_editor(); + $is_entry_detail = GFCommon::is_entry_detail(); + $is_admin = $is_form_editor || $is_entry_detail; - return $lead; - } + if ( empty( $value ) && $field->adminOnly && ! $is_admin ) { + $value = self::get_default_value( $field, $input_id ); + } - public static function get_prepared_input_value($form, $field, $lead, $input_id) { + switch ( self::get_input_type( $field ) ) { - $input_name = "input_" . str_replace('.', '_', $input_id); - $value = rgpost($input_name); + case 'post_image': + $file_info = self::get_temp_filename( $form['id'], $input_name ); + if ( ! empty( $file_info ) ) { + $file_path = self::get_file_upload_path( $form['id'], $file_info['uploaded_filename'] ); + $url = $file_path['url']; - if(empty($value) && rgar($field, "adminOnly") && !IS_ADMIN){ - $value = self::get_default_value($field, $input_id); - } + $image_title = isset( $_POST[ "{$input_name}_1" ] ) ? strip_tags( $_POST[ "{$input_name}_1" ] ) : ''; + $image_caption = isset( $_POST[ "{$input_name}_4" ] ) ? strip_tags( $_POST[ "{$input_name}_4" ] ) : ''; + $image_description = isset( $_POST[ "{$input_name}_7" ] ) ? strip_tags( $_POST[ "{$input_name}_7" ] ) : ''; - switch(self::get_input_type($field)) { + $value = ! empty( $url ) ? $url . '|:|' . $image_title . '|:|' . $image_caption . '|:|' . $image_description : ''; + } + break; - case "post_image": - $file_info = self::get_temp_filename($form['id'], $input_name); - $file_path = self::get_file_upload_path($form['id'], $file_info["uploaded_filename"]); - $url = $file_path['url']; + case 'fileupload' : + if ( $field->multipleFiles ) { + if ( ! empty( $value ) ) { + $value = json_encode( $value ); + } + } else { + $file_info = self::get_temp_filename( $form['id'], $input_name ); + if ( ! empty( $file_info ) ) { + $file_path = self::get_file_upload_path( $form['id'], $file_info['uploaded_filename'] ); + $value = $file_path['url']; + } + } - $image_title = isset($_POST["{$input_name}_1"]) ? strip_tags($_POST["{$input_name}_1"]) : ""; - $image_caption = isset($_POST["{$input_name}_4"]) ? strip_tags($_POST["{$input_name}_4"]) : ""; - $image_description = isset($_POST["{$input_name}_7"]) ? strip_tags($_POST["{$input_name}_7"]) : ""; + break; - $value = !empty($url) ? $url . "|:|" . $image_title . "|:|" . $image_caption . "|:|" . $image_description : ""; - break; + default: - case "fileupload" : - if(rgar($field, "multipleFiles")){ - $value = json_encode($value); - } else{ - $file_info = self::get_temp_filename($form['id'], $input_name); - $file_path = self::get_file_upload_path($form['id'], $file_info["uploaded_filename"]); - $value = $file_path['url']; - } + // processing values so that they are in the correct format for each input type + $value = self::prepare_value( $form, $field, $value, $input_name, rgar( $lead, 'id' ), $lead ); - break; + } - default: + return apply_filters( 'gform_save_field_value', $value, $lead, $field, $form, $input_id ); + } - // processing values so that they are in the correct format for each input type - $value = self::prepare_value($form, $field, $value, $input_name, rgar($lead, 'id'), $lead); + public static function refresh_product_cache( $form, $lead, $use_choice_text = false, $use_admin_label = false ) { + + $cache_options = array( + array( false, false ), + array( false, true ), + array( true, false ), + array( true, true ), + ); + + foreach ( $form['fields'] as $field ) { + /* @var $field GF_Field */ + if ( $field->has_calculation() ) { + //deleting field value cache for calculated fields + $cache_key = 'GFFormsModel::get_lead_field_value_' . $lead['id'] . '_' . $field->id; + GFCache::delete( $cache_key ); + } + } - } + foreach ( $cache_options as $cache_option ) { + list( $use_choice_text, $use_admin_label ) = $cache_option; + if ( gform_get_meta( rgar( $lead, 'id' ), "gform_product_info_{$use_choice_text}_{$use_admin_label}" ) ) { + gform_delete_meta( rgar( $lead, 'id' ), "gform_product_info_{$use_choice_text}_{$use_admin_label}" ); + GFCommon::get_product_fields( $form, $lead, $use_choice_text, $use_admin_label ); + } + } - return apply_filters( 'gform_save_field_value', $value, $lead, $field, $form, $input_id ); - } + } - public static function refresh_product_cache($form, $lead, $use_choice_text = false, $use_admin_label = false) { + /** + * Check whether a field is hidden via conditional logic. + * + * @param array $form Form object. + * @param GF_Field $field Field object. + * @param array $field_values Default field values for this form. Used when form has not yet been submitted. Pass an array if no default field values are avilable/required. + * @param array $lead Optional, default is null. If lead object is available, pass the lead. + * + * @return mixed + */ + public static function is_field_hidden( $form, $field, $field_values, $lead = null ) { - $cache_options = array( - array(false, false), - array(false, true), - array(true, false), - array(true, true) - ); + if ( empty( $field ) ) { + return false; + } - foreach($form["fields"] as $field){ - if(GFCommon::has_field_calculation($field)){ - //deleting field value cache for calculated fields - $cache_key = "GFFormsModel::get_lead_field_value_" . $lead["id"] . "_" . $field["id"]; - GFCache::delete($cache_key); - } - } + $cache_key = 'GFFormsModel::is_field_hidden_' . $form['id'] . '_' . $field->id; + $display = GFCache::get( $cache_key ); + if ( $display !== false ) { + return $display; + } - foreach($cache_options as $cache_option) { - list($use_choice_text, $use_admin_label) = $cache_option; - if( gform_get_meta( rgar($lead,'id'), "gform_product_info_{$use_choice_text}_{$use_admin_label}") ) { - gform_delete_meta(rgar($lead,'id'), "gform_product_info_{$use_choice_text}_{$use_admin_label}"); - GFCommon::get_product_fields($form, $lead, $use_choice_text, $use_admin_label); - } - } + $section = self::get_section( $form, $field->id ); + $section_display = self::get_field_display( $form, $section, $field_values, $lead ); - } + //if section is hidden, hide field no matter what. if section is visible, see if field is supposed to be visible + if ( $section_display == 'hide' ) { + $display = 'hide'; + } else if ( self::is_page_hidden( $form, $field->pageNumber, $field_values, $lead ) ) { + $display = 'hide'; + } else { + $display = self::get_field_display( $form, $field, $field_values, $lead ); - /** - * Check whether a field is hidden via conditional logic. - * - * @param array $form Form object. - * @param array $field Field object. - * @param array $field_values Default field values for this form. Used when form has not yet been submitted. Pass an array if no default field values are avilable/required. - * @return array $lead Optional, default is null. If lead object is available, pass the lead. - */ - public static function is_field_hidden($form, $field, $field_values, $lead=null){ - - $cache_key = "GFFormsModel::is_field_hidden_" . $form["id"] . "_" . $field["id"]; - $display = GFCache::get($cache_key); - if($display !== false) - return $display; - - $section = self::get_section($form, $field["id"]); - $section_display = self::get_field_display($form, $section, $field_values, $lead); - - //if section is hidden, hide field no matter what. if section is visible, see if field is supposed to be visible - if($section_display == "hide"){ - $display = "hide"; - } - else if(self::is_page_hidden($form, rgar($field,"pageNumber"), $field_values, $lead)){ - $display = "hide"; - } - else{ - $display = self::get_field_display($form, $field, $field_values, $lead); - return $display == "hide"; - } + return $display == 'hide'; + } - GFCache::set($cache_key, $display); + GFCache::set( $cache_key, $display ); - return $display == "hide"; - } + return $display == 'hide'; + } - public static function is_page_hidden($form, $page_number, $field_values, $lead=null){ - $page = self::get_page_by_number($form, $page_number); + public static function is_page_hidden( $form, $page_number, $field_values, $lead = null ) { + $page = self::get_page_by_number( $form, $page_number ); - if(!$page) - return false; + if ( ! $page ) { + return false; + } - $display = self::get_field_display($form, $page, $field_values, $lead); - return $display == "hide"; - } + $display = self::get_field_display( $form, $page, $field_values, $lead ); - public static function get_page_by_number($form, $page_number){ - foreach($form["fields"] as $field){ - if($field["type"] == "page" && $field["pageNumber"] == $page_number) - return $field; - } - return null; - } + return $display == 'hide'; + } - public static function get_page_by_field($form, $field){ - return get_page_by_number($field["pageNumber"]); - } + public static function get_page_by_number( $form, $page_number ) { + foreach ( $form['fields'] as $field ) { + if ( $field->type == 'page' && $field->pageNumber == $page_number ) { + return $field; + } + } - //gets the section that the specified field belongs to, or null if none - public static function get_section($form, $field_id){ - $current_section = null; - foreach($form["fields"] as $field){ - if($field["type"] == "section") - $current_section = $field; + return null; + } - //stop section at a page break (sections don't go cross page) - if($field["type"] == "page") - $current_section = null; + //gets the section that the specified field belongs to, or null if none + public static function get_section( $form, $field_id ) { + $current_section = null; + foreach ( $form['fields'] as $field ) { + if ( $field->type == 'section' ) { + $current_section = $field; + } + + //stop section at a page break (sections don't go cross page) + if ( $field->type == 'page' ) { + $current_section = null; + } + + if ( $field->id == $field_id ) { + return $current_section; + } + } - if($field["id"] == $field_id) - return $current_section; - } + return null; + } - return null; - } + public static function is_value_match( $field_value, $target_value, $operation = 'is', $source_field = null, $rule = null, $form = null ) { - public static function is_value_match( $field_value, $target_value, $operation="is", $source_field = null, $rule = null, $form = null ) { + $is_match = false; - $is_match = false; + if ( $source_field && is_subclass_of( $source_field, 'GF_Field' ) && $source_field->type == 'post_category' ) { + $field_value = GFCommon::prepare_post_category_value( $field_value, $source_field, 'conditional_logic' ); + } - if($source_field && $source_field["type"] == "post_category") - $field_value = GFCommon::prepare_post_category_value($field_value, $source_field, "conditional_logic"); + if ( ! empty( $field_value ) && ! is_array( $field_value ) && is_subclass_of( $source_field, 'GF_Field' ) && $source_field->type == 'multiselect' ) { + $field_value = explode( ',', $field_value ); + } // convert the comma-delimited string into an array - if (!empty($field_value) && !is_array($field_value) && $source_field["type"] == "multiselect") - $field_value = explode(",", $field_value); // convert the comma-delimited string into an array + $form_id = $source_field instanceof GF_Field ? $source_field->formId : 0; - $target_value = GFFormsModel::maybe_trim_input($target_value, rgar($source_field, "formId"),$source_field); + $target_value = GFFormsModel::maybe_trim_input( $target_value, $form_id, $source_field ); - if(is_array($field_value)){ - $field_value = array_values($field_value); //returning array values, ignoring keys if array is associative - $match_count = 0; - foreach($field_value as $val){ - $val = GFFormsModel::maybe_trim_input(GFCommon::get_selection_value($val), rgar($source_field,"formId"),$source_field); - if(self::matches_operation($val, $target_value, $operation)){ - $match_count++; - } - } - // if operation is Is Not, none of the values in the array can match the target value. - $is_match = $operation == "isnot" ? $match_count == count($field_value) : $match_count > 0; - } - else if(self::matches_operation(GFFormsModel::maybe_trim_input(GFCommon::get_selection_value($field_value), rgar($source_field,"formId"),$source_field), $target_value, $operation)){ - $is_match = true; - } - return apply_filters( 'gform_is_value_match', $is_match, $field_value, $target_value, $operation, $source_field, $rule, $form ); - } + if ( is_array( $field_value ) ) { + $field_value = array_values( $field_value ); //returning array values, ignoring keys if array is associative + $match_count = 0; + foreach ( $field_value as $val ) { + $val = GFFormsModel::maybe_trim_input( GFCommon::get_selection_value( $val ), rgar( $source_field, 'formId' ), $source_field ); + if ( self::matches_operation( $val, $target_value, $operation ) ) { + $match_count ++; + } + } + // if operation is Is Not, none of the values in the array can match the target value. + $is_match = $operation == 'isnot' ? $match_count == count( $field_value ) : $match_count > 0; + } else if ( self::matches_operation( GFFormsModel::maybe_trim_input( GFCommon::get_selection_value( $field_value ), $form_id, $source_field ), $target_value, $operation ) ) { + $is_match = true; + } - private static function try_convert_float($text){ - global $wp_locale; - $number_format = $wp_locale->number_format['decimal_point'] == "," ? "decimal_comma" : "decimal_dot"; + return apply_filters( 'gform_is_value_match', $is_match, $field_value, $target_value, $operation, $source_field, $rule ); + } - if(is_numeric($text) && $number_format == "decimal_comma"){ - return GFCommon::format_number($text, "decimal_comma"); - } - else if(GFCommon::is_numeric($text, $number_format)){ - return GFCommon::clean_number($text, $number_format); - } + private static function try_convert_float( $text ) { + global $wp_locale; + $number_format = $wp_locale->number_format['decimal_point'] == ',' ? 'decimal_comma' : 'decimal_dot'; - return $text; - } + if ( is_numeric( $text ) && $number_format == 'decimal_comma' ) { + return GFCommon::format_number( $text, 'decimal_comma' ); + } else if ( GFCommon::is_numeric( $text, $number_format ) ) { + return GFCommon::clean_number( $text, $number_format ); + } - public static function matches_operation($val1, $val2, $operation){ + return $text; + } - $val1 = !rgblank($val1) ? strtolower($val1) : ""; - $val2 = !rgblank($val2) ? strtolower($val2) : ""; + public static function matches_operation( $val1, $val2, $operation ) { - switch($operation){ - case "is" : - return $val1 == $val2; - break; + $val1 = ! rgblank( $val1 ) ? strtolower( $val1 ) : ''; + $val2 = ! rgblank( $val2 ) ? strtolower( $val2 ) : ''; - case "isnot" : - return $val1 != $val2; - break; + switch ( $operation ) { + case 'is' : + return $val1 == $val2; + break; - case "greater_than": - case ">" : - $val1 = self::try_convert_float($val1); - $val2 = self::try_convert_float($val2); + case 'isnot' : + return $val1 != $val2; + break; - return $val1 > $val2; - break; + case 'greater_than': + case '>' : + $val1 = self::try_convert_float( $val1 ); + $val2 = self::try_convert_float( $val2 ); - case "less_than": - case "<" : - $val1 = self::try_convert_float($val1); - $val2 = self::try_convert_float($val2); + return $val1 > $val2; + break; - return $val1 < $val2; - break; + case 'less_than': + case '<' : + $val1 = self::try_convert_float( $val1 ); + $val2 = self::try_convert_float( $val2 ); - case "contains" : - return !empty($val2) && strpos($val1, $val2) !== false; - break; + return $val1 < $val2; + break; - case "starts_with" : - return !rgblank($val2) && strpos($val1, $val2) === 0; - break; + case 'contains' : + return ! empty( $val2 ) && strpos( $val1, $val2 ) !== false; + break; - case "ends_with" : - $start = strlen($val1) - strlen($val2); - if($start < 0) - return false; + case 'starts_with' : + return ! rgblank( $val2 ) && strpos( $val1, $val2 ) === 0; + break; - $tail = substr($val1, $start); - return $val2 == $tail; - break; - } + case 'ends_with' : + $start = strlen( $val1 ) - strlen( $val2 ); + if ( $start < 0 ) { + return false; + } + $tail = substr( $val1, $start ); - return false; - } + return $val2 == $tail; + break; + } - private static function get_field_display($form, $field, $field_values, $lead=null){ - $logic = rgar($field, "conditionalLogic"); + return false; + } - //if this field does not have any conditional logic associated with it, it won't be hidden - if(empty($logic)) - return "show"; + /** + * @param $form + * @param GF_Field $field + * @param $field_values + * @param null $lead + * + * @return string + */ + private static function get_field_display( $form, $field, $field_values, $lead = null ) { - $match_count = 0; - foreach($logic["rules"] as $rule){ - $source_field = RGFormsModel::get_field($form, $rule["fieldId"]); - $field_value = empty($lead) ? self::get_field_value($source_field, $field_values) : self::get_lead_field_value($lead, $source_field); + if ( empty( $field ) ) { + return 'show'; + } - $is_value_match = self::is_value_match( $field_value, $rule['value'], $rule['operator'], $source_field, $rule, $form ); + $logic = $field->conditionalLogic; - if($is_value_match) - $match_count++; - } + //if this field does not have any conditional logic associated with it, it won't be hidden + if ( empty( $logic ) ) { + return 'show'; + } - $do_action = ($logic["logicType"] == "all" && $match_count == sizeof($logic["rules"]) ) || ($logic["logicType"] == "any" && $match_count > 0); - $is_hidden = ($do_action && $logic["actionType"] == "hide") || (!$do_action && $logic["actionType"] == "show"); - return $is_hidden ? "hide" : "show"; - } + $match_count = 0; + foreach ( $logic['rules'] as $rule ) { + $source_field = RGFormsModel::get_field( $form, $rule['fieldId'] ); + $field_value = empty( $lead ) ? self::get_field_value( $source_field, $field_values ) : self::get_lead_field_value( $lead, $source_field ); - public static function get_custom_choices(){ - $choices = get_option("gform_custom_choices"); - if(!$choices) - $choices = array(); + $is_value_match = self::is_value_match( $field_value, $rule['value'], $rule['operator'], $source_field, $rule, $form ); - return $choices; - } + if ( $is_value_match ) { + $match_count ++; + } + } - public static function delete_custom_choice($name){ - $choices = self::get_custom_choices(); - if(array_key_exists($name, $choices)) - unset($choices[$name]); + $do_action = ( $logic['logicType'] == 'all' && $match_count == sizeof( $logic['rules'] ) ) || ( $logic['logicType'] == 'any' && $match_count > 0 ); + $is_hidden = ( $do_action && $logic['actionType'] == 'hide' ) || ( ! $do_action && $logic['actionType'] == 'show' ); - update_option("gform_custom_choices", $choices); - } + return $is_hidden ? 'hide' : 'show'; + } - public static function save_custom_choice($previous_name, $new_name, $choices){ - $all_choices = self::get_custom_choices(); + public static function get_custom_choices() { + $choices = get_option( 'gform_custom_choices' ); + if ( ! $choices ) { + $choices = array(); + } - if(array_key_exists($previous_name, $all_choices)) - unset($all_choices[$previous_name]); + return $choices; + } - $all_choices[$new_name] = $choices; + public static function delete_custom_choice( $name ) { + $choices = self::get_custom_choices(); + if ( array_key_exists( $name, $choices ) ) { + unset( $choices[ $name ] ); + } - update_option("gform_custom_choices", $all_choices); - } + update_option( 'gform_custom_choices', $choices ); + } - public static function get_field_value(&$field, $field_values = array(), $get_from_post=true){ - - if($field['type'] == 'post_category') - $field = GFCommon::add_categories_as_choices($field, ''); - - $value = array(); - switch(RGFormsModel::get_input_type($field)){ - case "post_image" : - $value[$field["id"] . ".1"] = self::get_input_value($field, "input_" . $field["id"] . "_1", $get_from_post); - $value[$field["id"] . ".4"] = self::get_input_value($field, "input_" . $field["id"] . "_4", $get_from_post); - $value[$field["id"] . ".7"] = self::get_input_value($field, "input_" . $field["id"] . "_7", $get_from_post); - break; - case "checkbox" : - $parameter_values = self::get_parameter_value( rgar( $field, 'inputName' ), $field_values, $field); - if(!empty($parameter_values) && !is_array($parameter_values)){ - $parameter_values = explode(",", $parameter_values); - } - - if(!is_array($field["inputs"])) - return ""; - - $choice_index = 0; - foreach($field["inputs"] as $input){ - if(!empty($_POST["is_submit_" . $field["formId"]]) && $get_from_post){ - $value[strval($input["id"])] = rgpost("input_" . str_replace('.', '_', strval($input["id"]))); - } - else{ - if(is_array($parameter_values)){ - foreach($parameter_values as $item){ - $item = trim($item); - if(self::choice_value_match($field, $field["choices"][$choice_index], $item)) - { - $value[$input["id"] . ""] = $item; - break; - } - } - } - } - $choice_index++; - } - - break; - - case "list" : - $value = self::get_input_value($field, "input_" . $field["id"], rgar($field, "inputName"), $field_values, $get_from_post); - $value = self::create_list_array($field, $value); - break; - - case "number" : - $value = self::get_input_value($field, "input_" . $field["id"], rgar($field, "inputName"), $field_values, $get_from_post); - $value = trim($value); - if($field["numberFormat"] == "currency"){ - require_once(GFCommon::get_base_path() . '/currency.php'); - $currency = new RGCurrency(GFCommon::get_currency()); - $value = $currency->to_number( $value ); - } - else if($field["numberFormat"] == "decimal_comma"){ - $value = GFCommon::clean_number($value, "decimal_comma"); - } - else if($field["numberFormat"] == "decimal_dot"){ - $value = GFCommon::clean_number($value, "decimal_dot"); - } - break; - - case "radio" : - $value = self::get_input_value($field, "input_" . $field["id"], rgar($field, "inputName"), $field_values, $get_from_post); - if ($value == "gf_other_choice"){ - //get value from text box - $value = self::get_input_value($field, "input_" . $field["id"] . "_other", rgar($field, "inputName"), $field_values, $get_from_post); - } - break; - - default: - - if(isset($field["inputs"]) && is_array($field["inputs"])){ - foreach($field["inputs"] as $input){ - $value[strval($input["id"])] = self::get_input_value($field, "input_" . str_replace('.', '_', strval($input["id"])), RGForms::get("name", $input), $field_values, $get_from_post); - } - } - else{ - $value = self::get_input_value($field, "input_" . $field["id"], rgar($field, "inputName"), $field_values, $get_from_post); - } - break; - } + public static function save_custom_choice( $previous_name, $new_name, $choices ) { + $all_choices = self::get_custom_choices(); - return $value; - } + if ( array_key_exists( $previous_name, $all_choices ) ) { + unset( $all_choices[ $previous_name ] ); + } - public static function maybe_trim_input($value, $form_id, $field){ - $trim_value = apply_filters("gform_trim_input_value", true, $form_id, $field); + $all_choices[ $new_name ] = $choices; - if($trim_value) - $value = is_array($value) ? array_map('trim', $value) : trim($value); + update_option( 'gform_custom_choices', $all_choices ); + } - return $value; - } - private static function get_input_value($field, $standard_name, $custom_name = "", $field_values=array(), $get_from_post=true){ - $form_id = rgar($field,"formId"); - if(!empty($_POST["is_submit_" . $form_id]) && $get_from_post){ - $value = rgpost($standard_name); - $value = self::maybe_trim_input($value, $form_id, $field); - return $value; - } - else if(rgar($field, "allowsPrepopulate")){ - return self::get_parameter_value($custom_name, $field_values, $field); - } - } + /** + * @param GF_Field $field + * @param array $field_values + * @param bool $get_from_post Whether to get the value from the $_POST array as opposed to $field_values + * + * @return array|mixed|string|void + */ + public static function get_field_value( &$field, $field_values = array(), $get_from_post = true ) { - public static function get_parameter_value($name, $field_values, $field){ - $value = stripslashes(rgget($name)); - if(empty($value)) - $value = rgget($name, $field_values); + if ( ! $field instanceof GF_Field ) { + $field = GF_Fields::create( $field ); + } - //converting list format - if(RGFormsModel::get_input_type($field) == "list"){ + if ( $field->type == 'post_category' ) { + $field = GFCommon::add_categories_as_choices( $field, '' ); + } - //transforms this: col1|col2,col1b|col2b into this: col1,col2,col1b,col2b - $column_count = count(rgar($field,"choices")); + $value = $field->get_value_submission( $field_values, $get_from_post ); - $rows = explode(",", $value); - $ary_rows = array(); - if(!empty($rows)){ - foreach($rows as $row) - $ary_rows = array_merge($ary_rows, rgexplode("|", $row, $column_count)); + return $value; + } - $value = $ary_rows; - } - } + public static function purge_expired_incomplete_submissions( $expiration_days = 30 ) { + global $wpdb; - return apply_filters( "gform_field_value_$name", apply_filters( 'gform_field_value', $value, $field, $name ), $field, $name ); - } + $expiration_days = apply_filters( 'gform_incomplete_submissions_expiration_days', $expiration_days ); - public static function get_default_value($field, $input_id){ - if(!is_array(rgar($field,"choices"))){ - if(is_array(rgar($field, "inputs"))){ - $input = RGFormsModel::get_input($field, $input_id); - return rgar($input, "defaultValue"); - } - else{ - return IS_ADMIN ? $field["defaultValue"] : GFCommon::replace_variables_prepopulate($field["defaultValue"]); - } - } - else if($field["type"] == "checkbox"){ - for($i=0, $count=sizeof($field["inputs"]); $i<$count; $i++){ - $input = $field["inputs"][$i]; - $choice = $field["choices"][$i]; - if($input["id"] == $input_id && rgar($choice, "isSelected")){ - return $choice["value"]; - } - } - return ""; - } - else{ - foreach($field["choices"] as $choice){ - if(rgar($choice,"isSelected") || $field["type"] == "post_category") - return $choice["value"]; - } - return ""; - } + $expiration_date = gmdate( 'Y-m-d H:i:s', time() - ( $expiration_days * 24 * 60 * 60 ) ); - } + $table = self::get_incomplete_submissions_table_name(); + $result = $wpdb->query( "DELETE FROM $table WHERE date_created < '$expiration_date'" ); - public static function get_input_type($field){ - return empty($field["inputType"]) ? rgar($field,"type") : $field["inputType"]; - } + return $result; + } - private static function get_post_field_value($field, $lead){ + public static function delete_incomplete_submission( $token ) { + global $wpdb; - if(isset($field["inputs"]) && is_array($field["inputs"])){ - $value = array(); - foreach($field["inputs"] as $input){ - $val = isset($lead[strval($input["id"])]) ? $lead[strval($input["id"])] : ""; - if(!empty($val)) { + $table = self::get_incomplete_submissions_table_name(); + $result = $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE uuid = %s", $token ) ); - // replace commas in individual values to prevent individual value from being split into multiple values (checkboxes, multiselects) - if( in_array(RGFormsModel::get_input_type($field), array('checkbox', 'multiselect')) ) - $val = str_replace(',', ',', $val); + return $result; + } - $value[] = $val; - } - } - $value = implode(",", $value); - } - else{ - $value = isset($lead[$field["id"]]) ? $lead[$field["id"]] : ""; - } - return $value; - } + public static function save_incomplete_submission( $form, $entry, $field_values, $page_number, $files, $form_unique_id, $ip, $source_url, $resume_token = '' ) { + if ( ! is_array( $form['fields'] ) ) { + return; + } + global $wpdb; - private static function get_post_fields($form, $lead) { + $submitted_values = array(); + foreach ( $form['fields'] as $field ) { + /* @var GF_Field $field */ + $submitted_values[ $field->id ] = RGFormsModel::get_field_value( $field, $field_values ); + } - $post_data = array(); - $post_data["post_custom_fields"] = array(); - $post_data["tags_input"] = array(); - $categories = array(); - $images = array(); + $submitted_values = apply_filters( 'gform_submission_values_pre_save', $submitted_values, $form ); + + $submission['submitted_values'] = $submitted_values; + $submission['partial_entry'] = $entry; + $submission['field_values'] = $field_values; + $submission['page_number'] = $page_number; + $submission['files'] = $files; + $submission['gform_unique_id'] = $form_unique_id; + if ( empty( $resume_token ) ) { + $resume_token = self::get_uuid(); + + $result = $wpdb->insert( + self::get_incomplete_submissions_table_name(), + array( + 'uuid' => $resume_token, + 'form_id' => $form['id'], + 'date_created' => current_time( 'mysql', true ), + 'submission' => json_encode( $submission ), + 'ip' => $ip, + 'source_url' => $source_url, + ), + array( + '%s', + '%d', + '%s', + '%s', + '%s', + '%s', + ) + ); + } else { + $result = $wpdb->update( + self::get_incomplete_submissions_table_name(), + array( + 'form_id' => $form['id'], + 'date_created' => current_time( 'mysql', true ), + 'submission' => json_encode( $submission ), + 'ip' => $ip, + 'source_url' => $source_url, + ), + array( 'uuid' => $resume_token ), + array( + '%d', + '%s', + '%s', + '%s', + '%s', + ), + array( '%s' ) ); + } - foreach($form["fields"] as $field){ + do_action( 'gform_incomplete_submission_post_save', $submission, $resume_token, $form, $entry ); - if($field['type'] == 'post_category') - $field = GFCommon::add_categories_as_choices($field, ''); + return $result ? $resume_token : $result; + } - $value = self::get_post_field_value($field, $lead); + /** + * Returns a UUID. Uses openssl_random_pseudo_bytes() if available and falls back to mt_rand(). + * + * source: http://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid + * + * @param string $s The separator e.g. '-' + * + * @return string + */ + public static function get_uuid( $s = '' ) { - switch($field["type"]){ - case "post_title" : - case "post_excerpt" : - case "post_content" : - $post_data[$field["type"]] = $value; - break; + if ( function_exists( 'openssl_random_pseudo_bytes' ) ) { // PHP 5 >= 5.3.0 + $data = openssl_random_pseudo_bytes( 16 ); - case "post_tags" : - $tags = explode(",", $value); - if(is_array($tags) && sizeof($tags) > 0) - $post_data["tags_input"] = array_merge($post_data["tags_input"], $tags) ; - break; + $data[6] = chr( ord( $data[6] ) & 0x0f | 0x40 ); // set version to 0100 + $data[8] = chr( ord( $data[8] ) & 0x3f | 0x80 ); // set bits 6-7 to 10 - case "post_custom_field" : + return vsprintf( "%s%s{$s}%s{$s}%s{$s}%s{$s}%s%s%s", str_split( bin2hex( $data ), 4 ) ); + } else { + return sprintf( + "%04x%04x{$s}%04x{$s}%04x{$s}%04x{$s}%04x%04x%04x", + // 32 bits for "time_low" + mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), + + // 16 bits for 'time_mid' + mt_rand( 0, 0xffff ), + + // 16 bits for 'time_hi_and_version', + // four most significant bits holds version number 4 + mt_rand( 0, 0x0fff ) | 0x4000, + + // 16 bits, 8 bits for 'clk_seq_hi_res', + // 8 bits for 'clk_seq_low', + // two most significant bits holds zero and one for variant DCE1.1 + mt_rand( 0, 0x3fff ) | 0x8000, + + // 48 bits for 'node' + mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) + ); + } - $type = self::get_input_type($field); - if("fileupload" === $type && rgar($field, "multipleFiles")) - $value = json_decode($value, true); + } - $meta_name = $field["postCustomFieldName"]; + public static function get_incomplete_submission_values( $token ) { + global $wpdb; - if(!isset($post_data["post_custom_fields"][$meta_name])){ - $post_data["post_custom_fields"][$meta_name] = $value; - } - else if(!is_array($post_data["post_custom_fields"][$meta_name])){ - $post_data["post_custom_fields"][$meta_name] = array($post_data["post_custom_fields"][$meta_name], $value); - } - else{ - $post_data["post_custom_fields"][$meta_name][] = $value; - } + self::purge_expired_incomplete_submissions(); - break; + $table = self::get_incomplete_submissions_table_name(); + $sql = $wpdb->prepare( "SELECT date_created, form_id, submission FROM {$table} WHERE uuid = %s", $token ); + $row = $wpdb->get_row( $sql, ARRAY_A ); - case "post_category" : - GFCommon::log_debug('post category:' . $value); - foreach(explode(',', $value) as $cat_string) { - list($cat_name, $cat_id) = rgexplode(":", $cat_string, 2); - GFCommon::log_debug("adding cat:{$cat_name}({$cat_id})"); - array_push($categories, $cat_id); - } - break; + return $row; + } - case "post_image" : - $ary = !empty($value) ? explode("|:|", $value) : array(); - $url = count($ary) > 0 ? $ary[0] : ""; - $title = count($ary) > 1 ? $ary[1] : ""; - $caption = count($ary) > 2 ? $ary[2] : ""; - $description = count($ary) > 3 ? $ary[3] : ""; + public static function add_email_to_incomplete_sumbmission( $token, $email ) { + global $wpdb; + self::purge_expired_incomplete_submissions(); + $table = self::get_incomplete_submissions_table_name(); + $sql = $wpdb->prepare( "UPDATE $table SET email = %s WHERE uuid = %s", $email, $token ); + $result = $wpdb->query( $sql ); - array_push($images, array("field_id" => $field["id"], "url" => $url, "title" => $title, "description" => $description, "caption" => $caption)); - break; - } - } + return $result; + } - $post_data["post_status"] = rgar($form, "postStatus"); - $post_data["post_category"] = !empty($categories) ? $categories : array(rgar($form, 'postCategory')); - $post_data["images"] = $images; + public static function maybe_trim_input( $value, $form_id, $field ) { + $trim_value = apply_filters( 'gform_trim_input_value', true, $form_id, $field ); - //setting current user as author depending on settings - $post_data["post_author"] = $form["useCurrentUserAsAuthor"] && !empty($lead["created_by"]) ? $lead["created_by"] : $form["postAuthor"]; + if ( $trim_value ) { + $value = is_array( $value ) ? array_map( 'trim', $value ) : trim( $value ); + } - return $post_data; - } + return $value; + } - public static function get_custom_field_names(){ - global $wpdb; - $keys = $wpdb->get_col( " - SELECT meta_key - FROM $wpdb->postmeta - WHERE meta_key NOT LIKE '\_%' - GROUP BY meta_key - ORDER BY meta_id DESC"); + public static function get_parameter_value( $name, $field_values, $field ) { + $value = stripslashes( rgget( $name ) ); + if ( empty( $value ) ) { + $value = rgget( $name, $field_values ); + } - if ( $keys ) - natcasesort($keys); + //converting list format + if ( RGFormsModel::get_input_type( $field ) == 'list' ) { - return $keys; - } + //transforms this: col1|col2,col1b|col2b into this: col1,col2,col1b,col2b + $column_count = count( $field->choices ); - public static function get_input_masks(){ + $rows = explode( ',', $value ); + $ary_rows = array(); + if ( ! empty( $rows ) ) { + foreach ( $rows as $row ) { + $ary_rows = array_merge( $ary_rows, rgexplode( '|', $row, $column_count ) ); + } - $masks = array( - 'US Phone' => '(999) 999-9999', - 'US Phone + Ext' => '(999) 999-9999? x99999', - 'Date' => '99/99/9999', - 'Tax ID' => '99-9999999', - 'SSN' => '999-99-9999', - 'Zip Code' => '99999', - 'Full Zip Code' => '99999?-9999' - ); + $value = $ary_rows; + } + } - return apply_filters('gform_input_masks', $masks); - } + return apply_filters( "gform_field_value_$name", apply_filters( 'gform_field_value', $value, $field, $name ), $field, $name ); + } - private static function get_default_post_title(){ - global $wpdb; - $title = "Untitled"; - $count = 1; - - $titles = $wpdb->get_col("SELECT post_title FROM $wpdb->posts WHERE post_title like '%Untitled%'"); - $titles = array_values($titles); - while(in_array($title, $titles)){ - $title = "Untitled_$count"; - $count++; - } - return $title; - } + public static function get_default_value( $field, $input_id ) { + if ( ! is_array( $field->choices ) ) { + if ( is_array( $field->inputs ) ) { + $input = RGFormsModel::get_input( $field, $input_id ); + + return rgar( $input, 'defaultValue' ); + } else { + return IS_ADMIN ? $field->defaultValue : GFCommon::replace_variables_prepopulate( $field->defaultValue ); + } + } else if ( $field->type == 'checkbox' ) { + for ( $i = 0, $count = sizeof( $field->inputs ); $i < $count; $i ++ ) { + $input = $field->inputs[ $i ]; + $choice = $field->choices[ $i ]; + if ( $input['id'] == $input_id && rgar( $choice, 'isSelected' ) ) { + return $choice['value']; + } + } - public static function prepare_date($date_format, $value){ - $format = empty($date_format) ? "mdy" : $date_format; - $date_info = GFCommon::parse_date($value, $format); - if(!empty($date_info) && !GFCommon::is_empty_array($date_info)) - $value = sprintf("%s-%02d-%02d", $date_info["year"], $date_info["month"], $date_info["day"]); - else - $value = ""; + return ''; + } else { + foreach ( $field->choices as $choice ) { + if ( rgar( $choice, 'isSelected' ) || $field->type == 'post_category' ) { + return $choice['value']; + } + } - return $value; - } + return ''; + } - /** - * Prepare the value before saving it to the lead. - * - * @param mixed $form - * @param mixed $field - * @param mixed $value - * @param mixed $input_name - * @param mixed $lead_id the current lead ID, used for fields that are processed after other fields have been saved (ie Total, Calculations) - * @param mixed $lead passed by the RGFormsModel::create_lead() method, lead ID is not available for leads created by this function - */ - public static function prepare_value($form, $field, $value, $input_name, $lead_id, $lead = array()){ - $form_id = $form["id"]; - - $input_type = self::get_input_type($field); - switch($input_type) - { - case "total" : - $lead = empty($lead) ? RGFormsModel::get_lead($lead_id) : $lead; - $value = GFCommon::get_order_total($form, $lead); - break; - - case "calculation" : - // ignore submitted value and recalculate price in backend - list(,,$input_id) = rgexplode("_", $input_name, 3); - if($input_id == 2) { - require_once(GFCommon::get_base_path() . '/currency.php'); - $currency = new RGCurrency(GFCommon::get_currency()); - $lead = empty($lead) ? RGFormsModel::get_lead($lead_id) : $lead; - $value = $currency->to_money(GFCommon::calculate($field, $form, $lead)); - } - break; - - case "phone" : - if($field["phoneFormat"] == "standard" && preg_match('/^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$/', $value, $matches)) - $value = sprintf("(%s)%s-%s", $matches[1], $matches[2], $matches[3]); - break; - - case "time": - - if(!is_array($value) && !empty($value)){ - preg_match('/^(\d*):(\d*) ?(.*)$/', $value, $matches); - $value = array(); - $value[0] = $matches[1]; - $value[1] = $matches[2]; - $value[2] = rgar($matches,3); - } - - $hour = empty($value[0]) ? "0" : strip_tags($value[0]); - $minute = empty($value[1]) ? "0" : strip_tags($value[1]); - $ampm = strip_tags(rgar($value,2)); - if(!empty($ampm)) - $ampm = " $ampm"; - - if(!(empty($hour) && empty($minute))) - $value = sprintf("%02d:%02d%s", $hour, $minute, $ampm); - else - $value = ""; - - break; - - case "date" : - $value = self::prepare_date( rgar( $field, 'dateFormat' ), $value); - - break; - - case "post_image": - $url = self::get_fileupload_value($form_id, $input_name); - $image_title = isset($_POST["{$input_name}_1"]) ? strip_tags($_POST["{$input_name}_1"]) : ""; - $image_caption = isset($_POST["{$input_name}_4"]) ? strip_tags($_POST["{$input_name}_4"]) : ""; - $image_description = isset($_POST["{$input_name}_7"]) ? strip_tags($_POST["{$input_name}_7"]) : ""; - - $value = !empty($url) ? $url . "|:|" . $image_title . "|:|" . $image_caption . "|:|" . $image_description : ""; - break; - - case "fileupload" : - if(rgar($field, "multipleFiles")){ - - global $_gf_uploaded_files; - - if ( isset( $_gf_uploaded_files[ $input_name ] ) ) { - $value = $_gf_uploaded_files[ $input_name ]; - } else { - if ( isset( GFFormsModel::$uploaded_files[ $form_id ][ $input_name ] ) ) { - $uploaded_temp_files = GFFormsModel::$uploaded_files[ $form_id ][ $input_name ]; - $uploaded_files = array(); - foreach ( $uploaded_temp_files as $i => $file_info ) { - $temp_filepath = self::get_upload_path( $form_id ) . '/tmp/' . $file_info['temp_filename']; - if ( $file_info && file_exists( $temp_filepath ) ) { - $uploaded_files[ $i ] = self::move_temp_file( $form_id, $file_info ); - } - } - - if ( ! empty( $value ) ) { // merge with existing files (admin edit entry) - $value = json_decode( $value, true ); - $value = array_merge( $value, $uploaded_files ); - $value = json_encode( $value ); - } else { - $value = json_encode( $uploaded_files ); - } - } else { - $value = ''; - } - $_gf_uploaded_files[ $input_name ] = $value; - } - - } else { - $value = self::get_fileupload_value($form_id, $input_name); - } - break; - - case "number" : - - $value = GFCommon::maybe_add_leading_zero($value); - - $is_hidden = RGFormsModel::is_field_hidden($form, $field, array()); - $lead = empty($lead) ? RGFormsModel::get_lead($lead_id) : $lead; - $value = GFCommon::has_field_calculation($field) ? GFCommon::round_number(GFCommon::calculate($field, $form, $lead), rgar($field, "calculationRounding")) : GFCommon::clean_number($value, rgar($field, "numberFormat")); - //return the value as a string when it is zero and a calc so that the "==" comparison done when checking if the field has changed isn't treated as false - if (GFCommon::has_field_calculation($field) && $value == 0){ - $value = "0"; - } - break; - - case "website" : - if($value == "http://") - $value = ""; - break; - - case "list" : - - if(rgar($field, "adminOnly") && rgar($field, "allowsPrepopulate")) - $value = json_decode($value); - - if(GFCommon::is_empty_array($value)){ - $value = ""; + } + + /** + * @param GF_Field $field + * + * @return string + */ + public static function get_input_type( $field ) { + if ( ! $field instanceof GF_Field ) { + return empty( $field['inputType'] ) ? $field['type'] : $field['inputType']; + } + + return empty( $field->inputType ) ? $field->type : $field->inputType; + } + + private static function get_post_field_value( $field, $lead ) { + + if ( is_array( $field->inputs ) ) { + $value = array(); + foreach ( $field->inputs as $input ) { + $val = isset( $lead[ strval( $input['id'] ) ] ) ? $lead[ strval( $input['id'] ) ] : ''; + if ( ! empty( $val ) ) { + + // replace commas in individual values to prevent individual value from being split into multiple values (checkboxes, multiselects) + if ( in_array( RGFormsModel::get_input_type( $field ), array( 'checkbox', 'multiselect' ) ) ) { + $val = str_replace( ',', ',', $val ); + } + + $value[] = $val; } - else{ + } + $value = implode( ',', $value ); + } else { + $value = isset( $lead[ $field->id ] ) ? $lead[ $field->id ] : ''; + } + + return $value; + } + + private static function get_post_fields( $form, $lead ) { + + $post_data = array(); + $post_data['post_custom_fields'] = array(); + $post_data['tags_input'] = array(); + $categories = array(); + $images = array(); + + foreach ( $form['fields'] as $field ) { + + if ( $field->type == 'post_category' ) { + $field = GFCommon::add_categories_as_choices( $field, '' ); + } + + $value = self::get_post_field_value( $field, $lead ); - foreach( $value as &$val ){ - $val = self::sanitize_entry_value( $field, $val, $input_type, $form_id ); + switch ( $field->type ) { + case 'post_title' : + case 'post_excerpt' : + case 'post_content' : + $post_data[ $field->type ] = $value; + break; + + case 'post_tags' : + $tags = explode( ',', $value ); + if ( is_array( $tags ) && sizeof( $tags ) > 0 ) { + $post_data['tags_input'] = array_merge( $post_data['tags_input'], $tags ); } + break; - $value = self::create_list_array($field, $value); - $value = serialize($value); - } - break; + case 'post_custom_field' : - case "radio" : - if(rgar($field, 'enableOtherChoice') && $value == 'gf_other_choice'){ - $value = rgpost("input_{$field['id']}_other"); - } - $value = self::sanitize_entry_value( $field, $value, $input_type, $form_id); + $type = self::get_input_type( $field ); + if ( 'fileupload' === $type && $field->multipleFiles ) { + $value = json_decode( $value, true ); + } - break; + $meta_name = $field->postCustomFieldName; - case "multiselect" : - $value = empty($value) ? "" : is_array($value) ? implode(",", $value) : $value; + if ( ! isset( $post_data['post_custom_fields'][ $meta_name ] ) ) { + $post_data['post_custom_fields'][ $meta_name ] = $value; + } else if ( ! is_array( $post_data['post_custom_fields'][ $meta_name ] ) ) { + $post_data['post_custom_fields'][ $meta_name ] = array( $post_data['post_custom_fields'][ $meta_name ], $value ); + } else { + $post_data['post_custom_fields'][ $meta_name ][] = $value; + } - $value = self::sanitize_entry_value( $field, $value, $input_type, $form_id ); + break; - break; + case 'post_category' : + foreach ( explode( ',', $value ) as $cat_string ) { + list( $cat_name, $cat_id ) = rgexplode( ':', $cat_string, 2 ); + array_push( $categories, $cat_id ); + } + break; + + case 'post_image' : + $ary = ! empty( $value ) ? explode( '|:|', $value ) : array(); + $url = count( $ary ) > 0 ? $ary[0] : ''; + $title = count( $ary ) > 1 ? $ary[1] : ''; + $caption = count( $ary ) > 2 ? $ary[2] : ''; + $description = count( $ary ) > 3 ? $ary[3] : ''; + + array_push( $images, array( 'field_id' => $field->id, 'url' => $url, 'title' => $title, 'description' => $description, 'caption' => $caption ) ); + break; + } + } - case "creditcard" : - //saving last 4 digits of credit card - list($input_token, $field_id_token, $input_id) = rgexplode("_", $input_name, 3); - if($input_id == "1"){ - $value = str_replace(" ", "", $value); - $card_number_length = strlen($value); - $value = substr($value, -4, 4); - $value = str_pad($value, $card_number_length, "X", STR_PAD_LEFT); - } - else if( $input_id == '4' ) { + $post_data['post_status'] = rgar( $form, 'postStatus' ); + $post_data['post_category'] = ! empty( $categories ) ? $categories : array( rgar( $form, 'postCategory' ) ); + $post_data['images'] = $images; - $value = rgpost( "input_{$field_id_token}_4" ); + //setting current user as author depending on settings + $post_data['post_author'] = $form['useCurrentUserAsAuthor'] && ! empty( $lead['created_by'] ) ? $lead['created_by'] : $form['postAuthor']; - if( ! $value ) { - $card_number = rgpost( "input_{$field_id_token}_1" ); - $card_type = GFCommon::get_card_type( $card_number ); - $value = $card_type ? $card_type['name'] : ''; - } + return $post_data; + } - } - else{ - $value = ""; - } + public static function get_custom_field_names() { + global $wpdb; + $keys = $wpdb->get_col( + " + SELECT meta_key + FROM $wpdb->postmeta + WHERE meta_key NOT LIKE '\_%' + GROUP BY meta_key + ORDER BY meta_id DESC" + ); - break; + if ( $keys ) { + natcasesort( $keys ); + } - case 'password': + return $keys; + } - $encrypt_password = apply_filters( 'gform_encrypt_password', false, $field, $form ); - if( $encrypt_password ) { - $value = GFCommon::encrypt( $value ); - self::set_encrypted_fields( $lead_id, $field['id'] ); - } + public static function get_input_masks() { - break; + $masks = array( + 'US Phone' => '(999) 999-9999', + 'US Phone + Ext' => '(999) 999-9999? x99999', + 'Date' => '99/99/9999', + 'Tax ID' => '99-9999999', + 'SSN' => '999-99-9999', + 'Zip Code' => '99999', + 'Full Zip Code' => '99999?-9999', + ); - default: + return apply_filters( 'gform_input_masks', $masks ); + } - // only filter HTML on non-array based values - if( ! is_array( $value ) ) { - $value = self::sanitize_entry_value( $field, $value, $input_type, $form_id ); - } + private static function get_default_post_title() { + global $wpdb; + $title = 'Untitled'; + $count = 1; + + $titles = $wpdb->get_col( "SELECT post_title FROM $wpdb->posts WHERE post_title like '%Untitled%'" ); + $titles = array_values( $titles ); + while ( in_array( $title, $titles ) ) { + $title = "Untitled_$count"; + $count ++; + } - break; - } + return $title; + } - // special format for Post Category fields - if($field['type'] == 'post_category') { + public static function prepare_date( $date_format, $value ) { + $format = empty( $date_format ) ? 'mdy' : $date_format; + $date_info = GFCommon::parse_date( $value, $format ); + if ( ! empty( $date_info ) && ! GFCommon::is_empty_array( $date_info ) ) { + $value = sprintf( '%s-%02d-%02d', $date_info['year'], $date_info['month'], $date_info['day'] ); + } else { + $value = ''; + } - $full_values = array(); + return $value; + } - if(!is_array($value)) - $value = explode(',', $value); + /** + * Prepare the value before saving it to the lead. + * + * @param mixed $form + * @param GF_Field $field + * @param mixed $value + * @param mixed $input_name + * @param mixed $lead_id the current lead ID, used for fields that are processed after other fields have been saved (ie Total, Calculations) + * @param mixed $lead passed by the RGFormsModel::create_lead() method, lead ID is not available for leads created by this function + * + * @return mixed + */ + public static function prepare_value( $form, $field, $value, $input_name, $lead_id, $lead = array() ) { - foreach($value as $cat_id) { - $cat = get_term($cat_id, 'category'); - $full_values[] = !is_wp_error($cat) && is_object($cat) ? $cat->name . ":" . $cat_id : ""; - } + $value = $field->get_value_save_entry( $value, $form, $input_name, $lead_id, $lead ); - $value = implode(',', $full_values); - } - //do not save price fields with blank price - if(rgar($field, "enablePrice")){ - $ary = explode("|", $value); - $label = count($ary) > 0 ? $ary[0] : ""; - $price = count($ary) > 1 ? $ary[1] : ""; + // special format for Post Category fields + if ( $field->type == 'post_category' ) { - $is_empty = (strlen(trim($price)) <= 0); - if($is_empty) - $value = ""; - } + $full_values = array(); - return $value; - } + if ( ! is_array( $value ) ) { + $value = explode( ',', $value ); + } - public static function strip_script_tag( $string ){ - - $do_strip = apply_filters("gform_strip_script_tag", true, $string); - if ( ! $do_strip ){ - return $string; - } - - $allowable_tags = '


    - - - - - - - - - - _slug, array( $this, 'results_cron' ), 10, 3 ); + + return; + } + parent::__construct(); + } + + public function init_ajax() { + parent::init_ajax(); + add_action( 'wp_ajax_gfwebapi_qrcode', array( $this, 'ajax_qrcode' ) ); + } + + public function init_admin() { + parent::init_admin(); + // update the cache meta + add_action( 'gform_after_update_entry', array( $this, 'entry_updated' ), 10, 2 ); + add_action( 'gform_update_status', array( $this, 'update_entry_status' ), 10, 2 ); + add_action( 'gform_after_save_form', array( $this, 'after_save_form' ), 10, 2 ); + } + + + public function init_frontend() { + $settings = $this->get_plugin_settings(); + $this->_enabled = rgar( $settings, 'enabled' ); + $this->_public_key = rgar( $settings, 'public_key' ); + $this->_private_key = rgar( $settings, 'private_key' ); + + if ( false == $this->_enabled ) { + return; } - else{ + + add_filter( 'option_rewrite_rules', array( $this, 'rewrite_rules' ) ); + + add_filter( 'query_vars', array( $this, 'query_vars' ) ); + + add_filter( 'pre_get_posts', array( $this, 'handle_page_request' ) ); + + // update the cache + add_action( 'gform_entry_created', array( $this, 'entry_created' ), 10, 2 ); + } + + // Scripts + public function scripts() { + $scripts = array( + array( + 'handle' => 'gfwebapi_hmac_sha1', + 'src' => 'https://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/hmac-sha1.js', + 'enqueue' => array( + array( 'admin_page' => array( 'plugin_settings' ) ), + ) + ), + array( + 'handle' => 'gfwebapi_enc_base64', + 'src' => 'https://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/enc-base64-min.js', + 'deps' => array( 'gfwebapi_hmac_sha1' ), + 'callback' => array( $this, 'localize_form_settings_scripts' ), + 'enqueue' => array( + array( 'admin_page' => array( 'plugin_settings' ) ), + ) + ), + array( + 'handle' => 'gfwebapi_settings.js', + 'src' => GFCommon::get_base_url() . '/includes/webapi/js/gfwebapi_settings.js', + 'version' => $this->_version, + 'deps' => array( 'jquery', 'thickbox' ), + 'enqueue' => array( + array( 'admin_page' => array( 'plugin_settings' ) ), + ) + ), + ); + + return array_merge( parent::scripts(), $scripts ); + } + + public function styles() { + $styles = array( + array( + 'handle' => 'gfwebap_settings', + 'src' => GFCommon::get_base_url() . '/includes/webapi/css/gfwebapi_settings.css', + 'version' => $this->_version, + 'deps' => array( 'thickbox' ), + 'enqueue' => array( + array( 'admin_page' => array( 'plugin_settings' ) ), + ) + ), + ); + + return array_merge( parent::scripts(), $styles ); + } + + public function render_uninstall() { + } + + // ------- Plugin settings ------- + + public function plugin_settings_title() { + return __( 'Gravity Forms API Settings', 'gravityforms' ); + } + + public function plugin_settings_fields() { + + $args = apply_filters( 'gform_webapi_get_users_settings_page', array( 'number' => 200 ) ); + + $accounts = get_users( $args ); + + $account_choices = array(); + foreach ( $accounts as $account ) { + $account_choices[] = array( 'label' => $account->user_login, 'value' => $account->ID ); + } + $permalink_structure = get_option( 'permalink_structure' ); + if ( ! $permalink_structure ) { + return array( + array( + 'description' => __( 'The Gravity Forms API allows developers to interact with this install via a JSON REST API.', 'gravityforms' ), + 'fields' => array( + array( + 'name' => 'requirements_check', + 'label' => __( 'Requirements check', 'gravityforms' ), + 'type' => 'requirements_check', + ), + ) + ), + ); + } + + + return array( + array( + 'description' => __( 'The Gravity Forms API allows developers to interact with this install via a JSON REST API.', 'gravityforms' ), + 'fields' => array( + array( + 'type' => 'checkbox', + 'label' => __( 'Enable access to the API', 'gravityforms' ), + 'name' => 'activate', + 'onclick' => 'gfapiToggleSettings(jQuery(this).prop("checked"))', + 'choices' => array( + array( 'label' => __( 'Enabled', 'gravityforms' ), 'name' => 'enabled' ), + ) + ), + array( + 'name' => 'public_key', + 'label' => __( 'Public API Key', 'gravityforms' ), + 'type' => 'text', + 'default_value' => substr( wp_hash( site_url() ), 0, 10 ), + 'class' => 'medium', + 'feedback_callback' => array( $this, 'is_valid_public_key' ), + ), + array( + 'name' => 'private_key', + 'label' => __( 'Private API Key', 'gravityforms' ), + 'type' => 'text', + 'default_value' => substr( wp_hash( get_bloginfo( 'admin_email' ) ), 0, 15 ), + 'class' => 'medium', + 'feedback_callback' => array( $this, 'is_valid_private_key' ) + ), + array( + 'name' => 'qrcode', + 'label' => __( 'QR Code', 'gravityforms' ), + 'type' => 'qrcode', + 'dependency' => array( 'field' => 'private_key', 'values' => array( '_notempty_' ) ) + ), + array( + 'name' => 'impersonate_account', + 'label' => __( 'Impersonate account', 'gravityforms' ), + 'type' => 'select', + 'choices' => $account_choices, + ), + array( + 'name' => 'developer_tools', + 'label' => __( 'Developer tools', 'gravityforms' ), + 'type' => 'developer_tools', + 'dependency' => array( 'field' => 'private_key', 'values' => array( '_notempty_' ) ) + ), + ) + ), + ); + } + + public function settings_requirements_check() { + $permalinks_url = admin_url( 'options-permalink.php' ); + echo " Permalinks are not in the correct format.
    Change the WordPress Permalink Settings from default to any of the other options to get started."; + } + + public function settings_qrcode() { + ?> + + + + + + + + + + + die_not_authorized(); + } + + $account_id = $settings['impersonate_account']; + wp_set_current_user( $account_id ); + + $route_parts = pathinfo( $route ); + + $format = rgar( $route_parts, 'extension' ); + if ( $format ) { + $route = str_replace( '.' . $format, '', $route ); + } + + $path_array = explode( '/', $route ); + $collection = strtolower( rgar( $path_array, 0 ) ); + + $id = rgar( $path_array, 1 ); + + if ( strpos( $id, ';' ) !== false ) { + $id = explode( ';', $id ); + } + + $collection2 = strtolower( rgar( $path_array, 2 ) ); + $id2 = rgar( $path_array, 3 ); + + if ( strpos( $id2, ';' ) !== false ) { + $id2 = explode( ';', $id2 ); + } + + + if ( empty( $format ) ) { + $format = 'json'; + } + + $schema = strtolower( ( rgget( 'schema' ) ) ); + $offset = isset( $_GET['paging']['offset'] ) ? strtolower( $_GET['paging']['offset'] ) : 0; + $page_size = isset( $_GET['paging']['page_size'] ) ? strtolower( $_GET['paging']['page_size'] ) : 10; + + $method = strtoupper( $_SERVER['REQUEST_METHOD'] ); + $args = compact( 'offset', 'page_size', 'schema' ); + if ( empty( $collection2 ) ) { + do_action( 'gform_webapi_' . strtolower( $method ) . '_' . $collection, $id, $format, $args ); + } else { + do_action( 'gform_webapi_' . strtolower( $method ) . '_' . $collection . '_' . $collection2, $id, $id2, $format, $args ); + } + + if ( ! isset( $HTTP_RAW_POST_DATA ) ) { + $HTTP_RAW_POST_DATA = file_get_contents( 'php://input' ); + } + + GFCommon::log_debug( 'GFWebAPI::handle_page_request(): HTTP_RAW_POST_DATA = ' . $HTTP_RAW_POST_DATA ); + + + $data = json_decode( $HTTP_RAW_POST_DATA, true ); + + switch ( $collection ) { + case 'forms' : + switch ( $collection2 ) { + case 'results' : + switch ( $method ) { + case 'GET' : + $this->get_results( $id ); + break; + case 'DELETE': + case 'PUT': + case 'POST': + default: + $this->die_bad_request(); + } + break; + case 'properties' : + switch ( $method ) { + case 'PUT' : + $this->put_forms_properties( $data, $id ); + break; + default: + $this->die_bad_request(); + } + break; + case 'feeds' : + if ( false == empty( $id2 ) ) { + $this->die_bad_request(); + } + switch ( $method ) { + case 'GET' : + $this->get_feeds( null, $id ); + break; + case 'DELETE' : + $this->delete_feeds( null, $id ); + break; + case 'PUT' : + $this->die_not_implemented(); + break; + case 'POST' : + $this->post_feeds( $data, $id ); + break; + default : + $this->die_bad_request(); + } + break; + case 'entries' : + if ( false == empty( $id2 ) ) { + $this->die_bad_request(); + } + switch ( $method ) { + case 'GET' : + $this->get_entries( null, $id, $schema ); + break; + case 'POST' : + $this->post_entries( $data, $id ); + break; + case 'PUT' : + case 'DELETE' : + $this->die_not_implemented(); + break; + default: + $this->die_bad_request(); + } + break; + + case '' : + switch ( $method ) { + case 'GET': + $this->get_forms( $id, $schema ); + break; + case 'DELETE': + $this->delete_forms( $id ); + break; + case 'PUT': + $this->put_forms( $data, $id, $id2 ); + break; + case 'POST': + if ( false === empty( $id ) ) { + $this->die_bad_request(); + } + $this->post_forms( $data, $id ); + break; + default: + $this->die_bad_request(); + } + break; + default : + $this->die_bad_request(); + break; + + } + break; + case 'entries' : // route = /entries/{id} + switch ( $method ) { + case 'GET': + switch ( $collection2 ) { + case 'fields' : // route = /entries/{id}/fields/{id2} + $this->get_entries( $id, null, $schema, $id2 ); + break; + case '' : + $this->get_entries( $id, null, $schema ); + break; + default : + $this->die_bad_request(); + } + + break; + case 'DELETE' : + $this->delete_entries( $id ); + break; + case 'PUT' : + switch ( $collection2 ) { + case 'properties' : // route = /entries/{id}/properties/{id2} + $this->put_entry_properties( $data, $id ); + break; + case '' : + $this->put_entries( $data, $id ); + break; + } + + break; + case 'POST' : + if ( false === empty( $id ) ) { + $this->die_bad_request(); + } + $this->post_entries( $data ); + break; + default: + $this->die_bad_request(); + } + break; + case 'feeds' : + switch ( $method ) { + case 'GET' : + $this->get_feeds( $id ); + break; + case 'DELETE' : + if ( empty( $id ) ) { + $this->die_bad_request(); + } + $this->delete_feeds( $id ); + break; + case 'PUT' : + $this->put_feeds( $data, $id ); + break; + case 'POST' : + if ( false === empty( $id ) ) { + $this->die_bad_request(); + } + $this->post_feeds( $data ); + break; + default : + $this->die_bad_request(); + } + break; + default : + $this->die_bad_request(); + break; + } + + + $this->die_bad_request(); + + } + + public function authorize( $caps = array() ) { + + if ( GFCommon::current_user_can_any( $caps ) ) { + + GFCommon::add_api_call(); + + return true; + } + + $this->die_permission_denied(); + } + + //----- Feeds ------ + + public function get_feeds( $feed_ids, $form_id = null ) { + + $this->authorize( 'gravityforms_edit_forms' ); + + $addon_slug = rgget( 'addon' ); + $output = GFAPI::get_feeds( $feed_ids, $form_id, $addon_slug ); + if ( is_wp_error( $output ) ) { + $this->die_not_found(); + } + + $response = false === empty( $feed_ids ) && false === is_array( $feed_ids ) && is_array( $output ) ? array_shift( $output ) : ''; + + $this->end( 200, $response ); + + } + + + public function delete_feeds( $feed_ids, $form_id = null ) { + + self::authorize( 'gravityforms_edit_forms' ); + + $count = 0; + if ( empty( $feed_ids ) ) { + $feeds = GFAPI::get_feeds( null, $form_id ); + foreach ( $feeds as $feed ) { + $result = GFAPI::delete_feed( $feed['id'] ); + if ( is_wp_error( $result ) ) { + break; + } + $count ++; + } + } else { + if ( is_array( $feed_ids ) ) { + foreach ( $feed_ids as $feed_id ) { + $result = GFAPI::delete_feed( $feed_id ); + if ( is_wp_error( $result ) ) { + break; + } + $count ++; + } + } else { + $result = GFAPI::delete_feed( $feed_ids ); + $count ++; + } + } + + if ( isset( $result ) && is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 200; + $response = sprintf( __( 'Feeds deleted successfully: %d', 'gravityforms' ), $count ); + } + + $this->end( $status, $response ); + } + + public function put_feeds( $feed_data, $feed_id = null ) { + + self::authorize( 'gravityforms_edit_forms' ); + + $count = 0; + $result = array(); + if ( empty( $feed_id ) ) { + foreach ( $feed_data as $feed ) { + //todo: validate feed id and form id + $result = GFAPI::update_feed( $feed['id'], $feed['meta'], $feed['form_id'] ); + if ( is_wp_error( $result ) ) { + break; + } + $count ++; + } + } else { + $result = GFAPI::update_feed( $feed_id, $feed_data['meta'], $feed_data['form_id'] ); + $count ++; + } + + + if ( isset( $results ) && is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 200; + $response = sprintf( __( 'Feeds updated: %d', 'gravityforms' ), $count ); + } + + $this->end( $status, $response ); + } + + public function post_feeds( $feeds, $form_id = null ) { + + $this->authorize( 'gravityforms_edit_forms' ); + + $feed_ids = array(); + $result = array(); + foreach ( $feeds as $feed ) { + $addon_slug = isset( $feed['addon_slug'] ) ? $feed['addon_slug'] : rgget( 'addon' ); + $f_id = empty( $form_id ) ? $feed['form_id'] : $form_id; + if ( empty( $f_id ) ) { + $result = new WP_Error( 'missing_form_id', __( 'Missing form id', 'gravityforms' ) ); + break; + } + $result = GFAPI::add_feed( $f_id, $feed['meta'], $addon_slug ); + if ( is_wp_error( $result ) ) { + break; + } + $feed_ids[] = $result; + } + if ( is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 201; + $response = $feed_ids; - public function query_vars($query_vars) { + } - $query_vars[] = GFWEBAPI_ROUTE_VAR; + $this->end( $status, $response ); + } - return $query_vars; - } + //----- Forms ------ + public function delete_forms( $form_ids ) { - public function handle_page_request() { + $this->authorize( 'gravityforms_delete_forms' ); - global $HTTP_RAW_POST_DATA; + $count = 0; + if ( is_array( $form_ids ) ) { + foreach ( $form_ids as $form_id ) { + $result = GFAPI::delete_form( $form_id ); + if ( is_wp_error( $result ) ) { + break; + } + $count ++; + } + } else { + $result = GFAPI::delete_form( $form_ids ); + $count ++; + } - $route = get_query_var(GFWEBAPI_ROUTE_VAR); - if (false == $route) - return; + if ( isset( $result ) && is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 200; + $response = sprintf( __( 'Forms deleted successfully: %d', 'gravityforms' ), $count ); - self::authenticate(); + } - $test_mode = rgget("test"); - if ($test_mode) - die("test mode"); + $this->end( $status, $response ); + } - $settings = get_option('gravityformsaddon_gravityformswebapi_settings'); - - if (empty($settings)){ - $this->die_not_authorized(); - } - - $account_id = $settings["impersonate_account"]; - wp_set_current_user($account_id); - - $route_parts = pathinfo($route); - - $format = rgar($route_parts, 'extension'); - if ($format) - $route = str_replace("." . $format, "", $route); - - $path_array = explode("/", $route); - $collection = strtolower(rgar($path_array, 0)); - - $id = rgar($path_array, 1); - - if (strpos($id, ";") !== false) - $id = explode(";", $id); - - $collection2 = strtolower(rgar($path_array, 2)); - $id2 = rgar($path_array, 3); - - if (strpos($id2, ";") !== false) - $id2 = explode(";", $id2); - - - if (empty($format)) - $format = "json"; - - $schema = strtolower((rgget("schema"))); - $offset = isset($_GET["paging"]["offset"]) ? strtolower($_GET["paging"]["offset"]) : 0; - $page_size = isset($_GET["paging"]["page_size"]) ? strtolower($_GET["paging"]["page_size"]) : 10; - - $method = strtoupper($_SERVER['REQUEST_METHOD']); - $args = compact("offset", "page_size", "schema"); - if(empty($collection2)){ - do_action("gform_webapi_" . strtolower($method) . "_" . $collection, $id, $format, $args); - } else { - do_action("gform_webapi_" . strtolower($method) . "_" . $collection . "_" . $collection2, $id, $id2, $format, $args); - } - - if (!isset($HTTP_RAW_POST_DATA)) { - $HTTP_RAW_POST_DATA = file_get_contents('php://input'); - } - - GFCommon::log_debug("WebAPI: HTTP_RAW_POST_DATA = " . $HTTP_RAW_POST_DATA); - - - $data = json_decode($HTTP_RAW_POST_DATA, true); - - - // todo: tidy up this mess - - switch ($collection) { - case "forms" : - switch ($collection2) { - case "results" : - switch ($method) { - case 'GET' : - $this->get_results($id); - break; - case 'DELETE': - case 'PUT': - case 'POST': - default: - $this->die_bad_request(); - } - break; - case "properties" : - switch ($method) { - case 'PUT' : - $this->put_forms_properties($data, $id); - break; - default: - $this->die_bad_request(); - } - break; - case "feeds" : - if (false == empty($id2)) - $this->die_bad_request(); - switch ($method) { - case 'GET' : - $this->get_feeds(null, $id); - break; - case 'DELETE' : - $this->delete_feeds(null, $id); - break; - case 'PUT' : - $this->die_not_implemented(); - break; - case 'POST' : - $this->post_feeds($data, $id); - break; - default : - $this->die_bad_request(); - } - break; - case "entries" : - if (false == empty($id2)) - $this->die_bad_request(); - switch ($method) { - case 'GET' : - $this->get_entries(null, $id, $schema); - break; - case 'POST' : - $this->post_entries($data, $id); - break; - case 'PUT' : - case 'DELETE' : - case 'POST' : - $this->die_not_implemented(); - break; - default: - $this->die_bad_request(); - } - break; - - case "" : - switch ($method) { - case 'GET': - $this->get_forms($id, $schema); - break; - case 'DELETE': - $this->delete_forms($id); - break; - case 'PUT': - $this->put_forms($data, $id, $id2); - break; - case 'POST': - if (false === empty($id)) - $this->die_bad_request(); - $this->post_forms($data, $id); - break; - default: - $this->die_bad_request(); - } - break; - default : - $this->die_bad_request(); - break; - - } - break; - case "entries" : // route = /entries/{id} - switch ($method) { - case 'GET': - switch ($collection2) { - case "fields" : // route = /entries/{id}/fields/{id2} - $this->get_entries($id, null, $schema, $id2); - break; - case "" : - $this->get_entries($id, null, $schema); - break; - default : - $this->die_bad_request(); - } - - break; - case 'DELETE' : - $this->delete_entries($id); - break; - case 'PUT' : - switch ($collection2) { - case "properties" : // route = /entries/{id}/properties/{id2} - $this->put_entry_properties($data, $id); - break; - case "" : - $this->put_entries($data, $id); - break; - } - - break; - case 'POST' : - if (false === empty($id)) - $this->die_bad_request(); - $this->post_entries($data); - break; - default: - $this->die_bad_request(); - } - break; - case "feeds" : - switch ($method) { - case 'GET' : - $this->get_feeds($id); - break; - case 'DELETE' : - if (empty($id)) - $this->die_bad_request(); - $this->delete_feeds($id); - break; - case 'PUT' : - $this->put_feeds($data, $id); - break; - case 'POST' : - if (false === empty($id)) - $this->die_bad_request(); - $this->post_feeds($data); - break; - default : - $this->die_bad_request(); - } - break; - default : - $this->die_bad_request(); - break; - } - - - $this->die_bad_request(); - - } - - public function authorize($caps = array()) { - - if (GFCommon::current_user_can_any($caps)) { - - GFCommon::add_api_call(); - - return true; - } - - $this->die_permission_denied(); - } - - //----- Feeds ------ - - public function get_feeds($feed_ids, $form_id = null) { - - $this->authorize("gravityforms_edit_forms"); - - $addon_slug = rgget("addon"); - $output = GFAPI::get_feeds($feed_ids, $form_id, $addon_slug); - if (is_wp_error($output)) - $this->die_not_found(); - - $response = false === empty($feed_ids) && false === is_array($feed_ids) && is_array($output) ? array_shift($output) : ""; - - $this->end(200, $response); - - } - - - public function delete_feeds($feed_ids, $form_id = null) { - - self::authorize("gravityforms_edit_forms"); - - $count = 0; - if (empty($feed_ids)) { - $feeds = GFAPI::get_feeds(null, $form_id); - foreach ($feeds as $feed) { - $result = GFAPI::delete_feed($feed["id"]); - if (is_wp_error($result)) - break; - $count++; - } - } else { - if (is_array($feed_ids)) { - foreach ($feed_ids as $feed_id) { - $result = GFAPI::delete_feed($feed_id); - if (is_wp_error($result)) - break; - $count++; - } - } else { - $result = GFAPI::delete_feed($feed_ids); - $count++; - } - } - - if (isset($result) && is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 200; - $response = sprintf(__("Feeds deleted successfully: %d", "gravityforms"), $count); - } - - $this->end($status, $response); - } - - public function put_feeds($feed_data, $feed_id = null) { - - self::authorize("gravityforms_edit_forms"); - - $count = 0; - $result = array(); - if (empty($feed_id)) { - foreach ($feed_data as $feed) { - //todo: validate feed id and form id - $result = GFAPI::update_feed($feed["id"], $feed["meta"], $feed["form_id"]); - if (is_wp_error($result)) - break; - $count++; - } - } else { - $result = GFAPI::update_feed($feed_id, $feed_data["meta"], $feed_data["form_id"]); - $count++; - } - - - if (isset($results) && is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 200; - $response = sprintf(__("Feeds updated: %d", "gravityforms"), $count); - } - - $this->end($status, $response); - } - - public function post_feeds($feeds, $form_id = null) { - - $this->authorize("gravityforms_edit_forms"); - - $feed_ids = array(); - $result = array(); - foreach ($feeds as $feed) { - $addon_slug = isset($feed["addon_slug"]) ? $feed["addon_slug"] : rgget("addon"); - $f_id = empty($form_id) ? $feed["form_id"] : $form_id; - if (empty($f_id)) { - $result = new WP_Error("missing_form_id", __("Missing form id", "gravityforms")); - break; - } - $result = GFAPI::add_feed($f_id, $feed["meta"], $addon_slug); - if (is_wp_error($result)) - break; - $feed_ids[] = $result; - } - if (is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 201; - $response = $feed_ids; - - } - - $this->end($status, $response); - } - - //----- Forms ------ - - public function delete_forms($form_ids) { - - $this->authorize("gravityforms_delete_forms"); - - $count = 0; - if (is_array($form_ids)) { - foreach ($form_ids as $form_id) { - $result = GFAPI::delete_form($form_id); - if (is_wp_error($result)) - break; - $count++; - } - } else { - $result = GFAPI::delete_form($form_ids); - $count++; - } - - if (isset($result) && is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 200; - $response = sprintf(__("Forms deleted successfully: %d", "gravityforms"), $count); - - } - - $this->end($status, $response); - } - - public function post_entries($data, $form_id = null) { - - $this->authorize("gravityforms_edit_entries"); - - $result = GFAPI::add_entries($data, $form_id); - - if (is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 201; - $response = $result; - } - - $this->end($status, $response); - } - - public function put_entries($data, $entry_id = null) { - - $this->authorize("gravityforms_edit_entries"); - - $result = empty($entry_id) ? GFAPI::update_entries($data) : $result = GFAPI::update_entry($data, $entry_id);; - - if (is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 200; - $response = empty($entry_id) ? __("Entries updated successfully", "gravityforms") : __("Entry updated successfully", "gravityforms"); - } - - $this->end($status, $response); - } - - public function put_forms_properties($property_values, $form_id){ - $this->authorize("gravityforms_edit_forms"); - - foreach($property_values as $key => $property_value){ - $result = GFAPI::update_form_property($form_id, $key, $property_value); - if(is_wp_error($result)){ - break; - } - } - - if (is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 200; - $response = __("Success", "gravityforms"); - } - - $this->end($status, $response); - - } - - public function put_entry_properties($property_values, $entry_id){ - $this->authorize("gravityforms_edit_entries"); - - if(is_array($property_values)){ - foreach($property_values as $key => $property_value){ - $result = GFAPI::update_entry_property($entry_id, $key, $property_value); - if(is_wp_error($result)){ - break; - } - } - - if (is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 200; - $response = __("Success", "gravityforms"); - } - - } else { - $status = 400; - if(empty($property_values)){ - $response = __("No property values were found in the request body", "gravityforms"); - } else { - $response = __("Property values should be sent as an array", "gravityforms"); - } - } - - $this->end($status, $response); - - } - - public function post_forms($data) { - - $this->authorize("gravityforms_create_form"); - - $form_ids = GFAPI::add_forms($data); - - if (is_wp_error($form_ids) || count($form_ids) == 0) { - $response = $this->get_error_response($form_ids); - $status = $this->get_error_status($form_ids); - } else { - $status = 201; - $response = $form_ids; - } - - $this->end($status, $response); - } - - public function put_forms($data, $form_id = null) { - - $this->authorize("gravityforms_create_form"); - - if (empty($form_id)) - $result = GFAPI::update_forms($data); - else - $result = GFAPI::update_form($data, $form_id); - - if (is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 200; - $response = empty($form_id) ? __("Forms updated successfully", "gravityforms") : __("Form updated successfully", "gravityforms"); - } - - $this->end($status, $response); - } - - public function delete_entries($entry_ids) { - - $this->authorize("gravityforms_delete_entries"); - - $count = 0; - if (is_array($entry_ids)) { - foreach ($entry_ids as $entry_id) { - $result = GFAPI::delete_entry($entry_id); - if (is_wp_error($result)) - break; - $count++; - } - } else { - $result = GFAPI::delete_entry($entry_ids); - $count++; - } - - if (isset($result) && is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } else { - $status = 200; - $response = sprintf(__("Entries deleted successfully: %d", "gravityforms"), $count); - } - - $this->end($status, $response); - } - - public function get_entries($entry_ids, $form_ids = null, $schema = "", $field_ids = array()) { - - $this->authorize("gravityforms_view_entries"); - $status = 200; - $response = array(); - $result = array(); - if ($entry_ids) { - - if (is_array($entry_ids)) { - foreach ($entry_ids as $entry_id) { - $result = GFAPI::get_entry($entry_id); - if (!is_wp_error($result)) { - $response[$entry_id] = $result; - if (!empty($field_ids) && (!empty($response[$entry_id]))) - $response[$entry_id] = $this->filter_entry_object($response[$entry_id], $field_ids); - } - } - } else { - $result = GFAPI::get_entry($entry_ids); - if (!is_wp_error($result)) { - $response = $result; - if (!empty($field_ids) && (!empty($response))) - $response = $this->filter_entry_object($response, $field_ids); - } - - } - - if ($schema == "mtd") - $response = self::mtd_transform_entry_data($response); - - } else { - - //sorting parameters - $sort_key = isset($_GET["sorting"]["key"]) && !empty($_GET["sorting"]["key"]) ? $_GET["sorting"]["key"] : "id"; - $sort_dir = isset($_GET["sorting"]["direction"]) && !empty($_GET["sorting"]["direction"]) ? $_GET["sorting"]["direction"] : "DESC"; - $sorting = array('key' => $sort_key, 'direction' => $sort_dir); - if(isset($_GET["sorting"]["is_numeric"])){ - $sorting["is_numeric"] = $_GET["sorting"]["is_numeric"]; - } - - //paging parameters - $page_size = isset($_GET["paging"]["page_size"]) ? intval($_GET["paging"]["page_size"]) : 10; - if (isset($_GET["paging"]["current_page"])) { - $current_page = intval($_GET["paging"]["current_page"]); - $offset = $page_size * ($current_page - 1); - } else { - $offset = isset($_GET["paging"]["offset"]) ? intval($_GET["paging"]["offset"]) : 0; - } - - $paging = array('offset' => $offset, 'page_size' => $page_size); - - $search = isset($_GET["search"]) ? $_GET["search"] : array(); - if (empty($form_ids)) - $form_ids = 0; // all forms - - $entry_count = GFAPI::count_entries($form_ids, $search); - - $result = $entry_count > 0 ? GFAPI::get_entries($form_ids, $search, $sorting, $paging) : array(); - - if (!is_wp_error($result)) { - $response = array("total_count" => $entry_count, "entries" => $result); - - if ($schema == "mtd") - $response = $this->mtd_transform_entries_data($response, $form_ids); - } - - } - - if (is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } - - $this->end($status, $response); - } - - public static function filter_entry_object($entry, $field_ids) { - - if (!is_array($field_ids)) - $field_ids = array($field_ids); - $new_entry = array(); - foreach ($entry as $key => $val) { - if (in_array($key, $field_ids) || (is_numeric($key) && in_array(intval($key), $field_ids))) - $new_entry[$key] = $val; - } - - return $new_entry; - } - - public function get_forms($form_ids = null, $schema = "") { - - $this->authorize("gravityforms_edit_forms"); - $status = 200; - $response = array(); - if (empty($form_ids)) { - $forms = RGFormsModel::get_forms(true); - foreach ($forms as $form) { - $form_id = $form->id; - $totals = GFFormsModel::get_form_counts($form_id); - $form_info = array( - "id" => $form_id, - "title" => $form->title, - "entries" => rgar($totals, "total") - ); - $response[$form_id] = $form_info; - } - if ($schema == "mtd") - $response = $this->mtd_transform_forms_data($response); - } else { - if (is_array($form_ids)) { - foreach ($form_ids as $form_id) { - $response[$form_id] = GFAPI::get_form($form_id); - } - } else { - $result = GFAPI::get_form($form_ids); - if (is_wp_error($result)) { - $response = $this->get_error_response($result); - $status = $this->get_error_status($result); - } elseif (!$result) { - $this->die_not_found(); - } else { - $response = $result; - } + public function post_entries( $data, $form_id = null ) { - } + $this->authorize( 'gravityforms_edit_entries' ); - } + $result = GFAPI::add_entries( $data, $form_id ); - $this->end($status, $response); - } + if ( is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 201; + $response = $result; + } + $this->end( $status, $response ); + } - // RESULTS - // todo: move to GFAPI or GFResults once stable + public function put_entries( $data, $entry_id = null ) { - public function get_results_cache_key($form_id, $fields, $search_criteria) { + $this->authorize( 'gravityforms_edit_entries' ); - $key = $this->get_results_cache_key_prefix($form_id); - $key .= wp_hash(json_encode($fields) . json_encode($search_criteria)); + $result = empty( $entry_id ) ? GFAPI::update_entries( $data ) : $result = GFAPI::update_entry( $data, $entry_id );; - return $key; - } + if ( is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 200; + $response = empty( $entry_id ) ? __( 'Entries updated successfully', 'gravityforms' ) : __( 'Entry updated successfully', 'gravityforms' ); + } - public function get_results_cache_key_prefix($form_id) { - global $blog_id; + $this->end( $status, $response ); + } - $key = is_multisite() ? $blog_id . '-' : ""; + public function put_forms_properties( $property_values, $form_id ) { + $this->authorize( 'gravityforms_edit_forms' ); - $key .= sprintf("%s-cache-%s-", $this->_slug, $form_id); + foreach ( $property_values as $key => $property_value ) { + $result = GFAPI::update_form_property( $form_id, $key, $property_value ); + if ( is_wp_error( $result ) ) { + break; + } + } - // The option_name column in the options table has a max length of 64 chars. - // Truncate the key if it's too long for column and allow space for the "tmp" prefix - $key = substr($key, 0, 60); + if ( is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 200; + $response = __( 'Success', 'gravityforms' ); + } - return $key; - } + $this->end( $status, $response ); + + } + + public function put_entry_properties( $property_values, $entry_id ) { + $this->authorize( 'gravityforms_edit_entries' ); + + if ( is_array( $property_values ) ) { + foreach ( $property_values as $key => $property_value ) { + $result = GFAPI::update_entry_property( $entry_id, $key, $property_value ); + if ( is_wp_error( $result ) ) { + break; + } + } + + if ( is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 200; + $response = __( 'Success', 'gravityforms' ); + } + } else { + $status = 400; + if ( empty( $property_values ) ) { + $response = __( 'No property values were found in the request body', 'gravityforms' ); + } else { + $response = __( 'Property values should be sent as an array', 'gravityforms' ); + } + } - public function update_entry_status($lead_id) { - $lead = RGFormsModel::get_lead($lead_id); - $form_id = $lead["form_id"]; - $form = GFFormsModel::get_form_meta($form_id); - $this->maybe_update_results_cache_meta($form); - } + $this->end( $status, $response ); - public function entry_updated($form, $lead_id) { - $this->maybe_update_results_cache_meta($form); - } + } - public function entry_created($entry, $form) { - $this->maybe_update_results_cache_meta($form); - } + public function post_forms( $data ) { - public function after_save_form($form, $is_new) { - if ($is_new) - return; - $form_id = $form["id"]; + $this->authorize( 'gravityforms_create_form' ); - // only need cache meta when a cache exists - if (false === $this->results_cache_exists($form_id)) - return; + $form_ids = GFAPI::add_forms( $data ); - $fields = rgar($form, "fields"); - $current_fields_hash = wp_hash(json_encode($fields)); + if ( is_wp_error( $form_ids ) || count( $form_ids ) == 0 ) { + $response = $this->get_error_response( $form_ids ); + $status = $this->get_error_status( $form_ids ); + } else { + $status = 201; + $response = $form_ids; + } - $cache_meta = $this->get_results_cache_meta($form_id); - $cached_fields_hash = rgar($cache_meta, "fields_hash"); + $this->end( $status, $response ); + } - if ($current_fields_hash !== $cached_fields_hash) { - // delete the meta for this form - $this->delete_results_cache_meta($form_id); - // delete all cached results for this form - $this->delete_cached_results($form_id); - } - } + public function put_forms( $data, $form_id = null ) { - public function results_cache_exists($form_id) { - global $wpdb; + $this->authorize( 'gravityforms_create_form' ); - $key = $this->get_results_cache_key_prefix($form_id); + if ( empty( $form_id ) ) { + $result = GFAPI::update_forms( $data ); + } else { + $result = GFAPI::update_form( $data, $form_id ); + } - $key = "%" . GFCommon::esc_like( $key ) . "%"; + if ( is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 200; + $response = empty( $form_id ) ? __( 'Forms updated successfully', 'gravityforms' ) : __( 'Form updated successfully', 'gravityforms' ); + } - $sql = $wpdb->prepare("SELECT count(option_id) FROM $wpdb->options WHERE option_name LIKE %s", $key); + $this->end( $status, $response ); + } + + public function delete_entries( $entry_ids ) { + + $this->authorize( 'gravityforms_delete_entries' ); + + $count = 0; + if ( is_array( $entry_ids ) ) { + foreach ( $entry_ids as $entry_id ) { + $result = GFAPI::delete_entry( $entry_id ); + if ( is_wp_error( $result ) ) { + break; + } + $count ++; + } + } else { + $result = GFAPI::delete_entry( $entry_ids ); + $count ++; + } - $result = $wpdb->get_var($sql); + if ( isset( $result ) && is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } else { + $status = 200; + $response = sprintf( __( 'Entries deleted successfully: %d', 'gravityforms' ), $count ); + } - return $result > 0; + $this->end( $status, $response ); + } + + public function get_entries( $entry_ids, $form_ids = null, $schema = '', $field_ids = array() ) { + + $this->authorize( 'gravityforms_view_entries' ); + $status = 200; + $response = array(); + $result = array(); + if ( $entry_ids ) { + + if ( is_array( $entry_ids ) ) { + foreach ( $entry_ids as $entry_id ) { + $result = GFAPI::get_entry( $entry_id ); + if ( ! is_wp_error( $result ) ) { + $response[ $entry_id ] = $result; + if ( ! empty( $field_ids ) && ( ! empty( $response[ $entry_id ] ) ) ) { + $response[ $entry_id ] = $this->filter_entry_object( $response[ $entry_id ], $field_ids ); + } + } + } + } else { + $result = GFAPI::get_entry( $entry_ids ); + if ( ! is_wp_error( $result ) ) { + $response = $result; + if ( ! empty( $field_ids ) && ( ! empty( $response ) ) ) { + $response = $this->filter_entry_object( $response, $field_ids ); + } + } + } + + if ( $schema == 'mtd' ) { + $response = self::mtd_transform_entry_data( $response ); + } + } else { + + //sorting parameters + $sort_key = isset( $_GET['sorting']['key'] ) && ! empty( $_GET['sorting']['key'] ) ? $_GET['sorting']['key'] : 'id'; + $sort_dir = isset( $_GET['sorting']['direction'] ) && ! empty( $_GET['sorting']['direction'] ) ? $_GET['sorting']['direction'] : 'DESC'; + $sorting = array( 'key' => $sort_key, 'direction' => $sort_dir ); + if ( isset( $_GET['sorting']['is_numeric'] ) ) { + $sorting['is_numeric'] = $_GET['sorting']['is_numeric']; + } + + //paging parameters + $page_size = isset( $_GET['paging']['page_size'] ) ? intval( $_GET['paging']['page_size'] ) : 10; + if ( isset( $_GET['paging']['current_page'] ) ) { + $current_page = intval( $_GET['paging']['current_page'] ); + $offset = $page_size * ( $current_page - 1 ); + } else { + $offset = isset( $_GET['paging']['offset'] ) ? intval( $_GET['paging']['offset'] ) : 0; + } + + $paging = array( 'offset' => $offset, 'page_size' => $page_size ); + + $search = isset( $_GET['search'] ) ? $_GET['search'] : array(); + if ( empty( $form_ids ) ) { + $form_ids = 0; + } // all forms + + $entry_count = GFAPI::count_entries( $form_ids, $search ); + + $result = $entry_count > 0 ? GFAPI::get_entries( $form_ids, $search, $sorting, $paging ) : array(); + + if ( ! is_wp_error( $result ) ) { + $response = array( 'total_count' => $entry_count, 'entries' => $result ); + + if ( $schema == 'mtd' ) { + $response = $this->mtd_transform_entries_data( $response, $form_ids ); + } + } + } - } + if ( is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } - public function delete_cached_results($form_id) { - global $wpdb; + $this->end( $status, $response ); + } - $form = GFAPI::get_form($form_id); - if (!($form) || !is_array($form)) - return; + public static function filter_entry_object( $entry, $field_ids ) { - $key = $this->get_results_cache_key_prefix($form_id); + if ( ! is_array( $field_ids ) ) { + $field_ids = array( $field_ids ); + } + $new_entry = array(); + foreach ( $entry as $key => $val ) { + if ( in_array( $key, $field_ids ) || ( is_numeric( $key ) && in_array( intval( $key ), $field_ids ) ) ) { + $new_entry[ $key ] = $val; + } + } - $key = "%" . GFCommon::esc_like( $key ) . "%"; + return $new_entry; + } + + public function get_forms( $form_ids = null, $schema = '' ) { + + $this->authorize( 'gravityforms_edit_forms' ); + $status = 200; + $response = array(); + if ( empty( $form_ids ) ) { + $forms = RGFormsModel::get_forms( true ); + foreach ( $forms as $form ) { + $form_id = $form->id; + $totals = GFFormsModel::get_form_counts( $form_id ); + $form_info = array( + 'id' => $form_id, + 'title' => $form->title, + 'entries' => rgar( $totals, 'total' ) + ); + $response[ $form_id ] = $form_info; + } + if ( $schema == 'mtd' ) { + $response = $this->mtd_transform_forms_data( $response ); + } + } else { + if ( is_array( $form_ids ) ) { + foreach ( $form_ids as $form_id ) { + $response[ $form_id ] = GFAPI::get_form( $form_id ); + } + } else { + $result = GFAPI::get_form( $form_ids ); + if ( is_wp_error( $result ) ) { + $response = $this->get_error_response( $result ); + $status = $this->get_error_status( $result ); + } elseif ( ! $result ) { + $this->die_not_found(); + } else { + $response = $result; + } + } + } - $sql = $wpdb->prepare("DELETE FROM $wpdb->options WHERE option_name LIKE %s", $key); + $this->end( $status, $response ); + } - $result = $wpdb->query($sql); - return $result; - } + // RESULTS - // When entries are added or updated the cache needs to be expired and rebuilt. - // This cache meta records the last updated time for each form and a hash of the fields array. - // Each time results are requested this value is checked to make sure the cache is still valid. - public function maybe_update_results_cache_meta($form) { - $form_id = $form["id"]; + public function get_results_cache_key( $form_id, $fields, $search_criteria ) { - // only need to expire the cache when a cache already exists - if (false === $this->results_cache_exists($form_id)) - return; + $key = $this->get_results_cache_key_prefix( $form_id ); + $key .= wp_hash( json_encode( $fields ) . json_encode( $search_criteria ) ); - $this->update_results_cache_meta($form_id, rgar($form, "fields")); - } + return $key; + } - public function update_results_cache_meta($form_id, $fields, $expiry = null) { + public function get_results_cache_key_prefix( $form_id ) { + global $blog_id; - if (empty($expiry)) - $expiry = time(); + $key = is_multisite() ? $blog_id . '-' : ''; - $data = array( - "fields_hash" => wp_hash(json_encode($fields)), - "timestamp" => $expiry - ); + $key .= sprintf( '%s-cache-%s-', $this->_slug, $form_id ); - $key = $this->get_results_cache_meta_key($form_id); + // The option_name column in the options table has a max length of 64 chars. + // Truncate the key if it's too long for column and allow space for the 'tmp' prefix + $key = substr( $key, 0, 60 ); - $this->update_results_cache($key, $data); + return $key; + } - } + public function update_entry_status( $lead_id ) { + $lead = RGFormsModel::get_lead( $lead_id ); + $form_id = $lead['form_id']; + $form = GFFormsModel::get_form_meta( $form_id ); + $this->maybe_update_results_cache_meta( $form ); + } - public function delete_results_cache_meta($form_id) { + public function entry_updated( $form, $lead_id ) { + $this->maybe_update_results_cache_meta( $form ); + } - $key = $this->get_results_cache_meta_key($form_id); + public function entry_created( $entry, $form ) { + $this->maybe_update_results_cache_meta( $form ); + } - delete_option($key); + public function after_save_form( $form, $is_new ) { + if ( $is_new ) { + return; + } + $form_id = $form['id']; - } + // only need cache meta when a cache exists + if ( false === $this->results_cache_exists( $form_id ) ) { + return; + } - public function get_results_cache_meta_key($form_id) { - global $blog_id; + $fields = rgar( $form, 'fields' ); + $current_fields_hash = wp_hash( json_encode( $fields ) ); - $key = is_multisite() ? $blog_id . '-' : ""; - $key .= "gfresults-cache-meta-form-" . $form_id; + $cache_meta = $this->get_results_cache_meta( $form_id ); + $cached_fields_hash = rgar( $cache_meta, 'fields_hash' ); - return $key; - } + if ( $current_fields_hash !== $cached_fields_hash ) { + // delete the meta for this form + $this->delete_results_cache_meta( $form_id ); + // delete all cached results for this form + $this->delete_cached_results( $form_id ); + } + } - public function get_results_cache_meta($form_id) { + public function results_cache_exists( $form_id ) { + global $wpdb; - $key = $this->get_results_cache_meta_key($form_id); - $cache_meta = get_option($key); + $key = $this->get_results_cache_key_prefix( $form_id ); - return $cache_meta; - } + $key = '%' . GFCommon::esc_like( $key ) . '%'; - public function update_results_cache($key, $data) { + $sql = $wpdb->prepare( "SELECT count(option_id) FROM $wpdb->options WHERE option_name LIKE %s", $key ); - delete_option($key); + $result = $wpdb->get_var( $sql ); - $result = add_option($key, $data, '', 'no'); + return $result > 0; - return $result; - } + } - // Recursive wp_cron task to continue the calculation of results - public function results_cron($form, $fields, $search_criteria) { + public function delete_cached_results( $form_id ) { + global $wpdb; - $form_id = $form["id"]; - $key = $this->get_results_cache_key($form_id, $fields, $search_criteria); - $key_tmp = "tmp" . $key; - $state = get_option($key_tmp, array()); + $form = GFAPI::get_form( $form_id ); + if ( ! ( $form ) || ! is_array( $form ) ) { + return; + } - if (!empty($state)) { - if (!class_exists("GFResults")) - require_once(GFCommon::get_base_path() . "/includes/addon/class-gf-results.php"); - $gf_results = new GFResults($this->_slug, array()); - $results = $gf_results->get_results_data($form, $fields, $search_criteria, $state); - if ("complete" == $results["status"]) { - if (isset($results["progress"])) - unset($results["progress"]); - $this->update_results_cache($key, $results); - if (false == empty($state)) - delete_option($key_tmp); + $key = $this->get_results_cache_key_prefix( $form_id ); - } else { - $this->update_results_cache($key_tmp, $results); + $key = '%' . GFCommon::esc_like( $key ) . '%'; - $data = get_option($key); - if ($data) { - $data["progress"] = $results["progress"]; - $this->update_results_cache($key, $data); - } + $sql = $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name LIKE %s", $key ); - $this->schedule_results_cron($form, $fields, $search_criteria); - } - } - } + $result = $wpdb->query( $sql ); - // Returns an array with the results for all the fields in the form. - // If the results can be calculated within the time allowed in GFResults then the results are returned and nothing is cached. - // If the calculation has not finished then a single recursive wp_cron task will be scheduled for immediate execution. - // While the cache is being built by the wp_cron task this function will return the expired cache results if available or the latest step in the cache build. - // Add-On-specific results are not included e.g. grade frequencies in the Quiz Add-On. - public function get_results($form_id) { + return $result; + } - $this->authorize("gravityforms_view_entries"); + // When entries are added or updated the cache needs to be expired and rebuilt. + // This cache meta records the last updated time for each form and a hash of the fields array. + // Each time results are requested this value is checked to make sure the cache is still valid. + public function maybe_update_results_cache_meta( $form ) { + $form_id = $form['id']; - $s = rgget("s"); // search criteria + // only need to expire the cache when a cache already exists + if ( false === $this->results_cache_exists( $form_id ) ) { + return; + } - $search_criteria = false === empty($s) && is_array($s) ? $s : array(); + $this->update_results_cache_meta( $form_id, rgar( $form, 'fields' ) ); + } - $form = GFAPI::get_form($form_id); + public function update_results_cache_meta( $form_id, $fields, $expiry = null ) { - if (!$form) - self::die_not_found(); + if ( empty( $expiry ) ) { + $expiry = time(); + } - // for the Web API return all fields - $fields = rgar($form, "fields"); + $data = array( + 'fields_hash' => wp_hash( json_encode( $fields ) ), + 'timestamp' => $expiry, + ); - $form_id = $form["id"]; - $key = $this->get_results_cache_key($form_id, $fields, $search_criteria); - $key_tmp = "tmp" . $key; + $key = $this->get_results_cache_meta_key( $form_id ); - $data = get_option($key, array()); + $this->update_results_cache( $key, $data ); - $cache_meta = $this->get_results_cache_meta($form_id); + } - // add the cache meta early so form editor updates can test for valid field hash - if (empty($cache_meta)) - $this->update_results_cache_meta($form_id, $fields, 0); + public function delete_results_cache_meta( $form_id ) { - $cache_expiry = rgar($cache_meta, "timestamp"); - $cache_timestamp = isset($data["timestamp"]) ? $data["timestamp"] : 0; - $cache_expired = $cache_expiry ? $cache_expiry > $cache_timestamp : false; + $key = $this->get_results_cache_meta_key( $form_id ); - // check for valid cached results first - if (!empty($data) && "complete" == rgar($data, "status") && !$cache_expired) { - $results = $data; - $status = 200; - if (isset($results["progress"])) - unset($results["progress"]); - } else { - - $state = get_option($key_tmp); - - if (empty($state) || ("complete" == rgar($data, "status") && $cache_expired)) { - if (!class_exists("GFResults")) - require_once(GFCommon::get_base_path() . "/includes/addon/class-gf-results.php"); - $gf_results = new GFResults($this->_slug, array()); - $max_execution_time = 5; - $results = $gf_results->get_results_data($form, $fields, $search_criteria, $state, $max_execution_time); - if ("complete" == $results["status"]) { - $status = 200; - if (false == empty($state)) - delete_option($key_tmp); - } else { - - if (false === empty($data) && "complete" == rgar($data, "status") && $cache_expired) { - $data["status"] = "expired"; - $data["progress"] = $results["progress"]; - $this->update_results_cache($key, $data); - } - - $this->update_results_cache($key_tmp, $results); - - $this->schedule_results_cron($form, $fields, $search_criteria); - - if ($data) - $results = $data; - - $status = 202; - } - } else { - - // The cron task is recursive, not periodic, so system restarts, script timeouts and memory issues can prevent the cron from restarting. - // Check timestamp and kick off the cron again if it appears to have stopped - $state_timestamp = rgar($state, "timestamp"); - $state_age = time() - $state_timestamp; - if ($state_age > 180 && !$this->results_cron_is_scheduled($form, $fields, $search_criteria)) { - $this->schedule_results_cron($form, $fields, $search_criteria); - } + delete_option( $key ); - if (false === empty($data) && "expired" == rgar($data, "status")) - $results = $data; - else - $results = $state; - $status = 202; - } - } + } - $fields = $results["field_data"]; + public function get_results_cache_meta_key( $form_id ) { + global $blog_id; - // add choice labels to the results so the client doesn't need to cross-reference with the form object - $results["field_data"] = $this->results_data_add_labels($form, $fields); + $key = is_multisite() ? $blog_id . '-' : ''; + $key .= 'gfresults-cache-meta-form-' . $form_id; - $this->end($status, $results); - } + return $key; + } - public function schedule_results_cron($form, $fields, $search_criteria, $delay_in_seconds = 10) { - // reduces problems with concurrency - wp_cache_delete('alloptions', 'options'); + public function get_results_cache_meta( $form_id ) { - $args = array($form, $fields, $search_criteria); + $key = $this->get_results_cache_meta_key( $form_id ); + $cache_meta = get_option( $key ); - wp_schedule_single_event(time() + $delay_in_seconds, $this->get_results_cron_hook(), $args); - } + return $cache_meta; + } - public function results_cron_is_scheduled($form, $fields, $search_criteria) { - $args = array($form, $fields, $search_criteria); + public function update_results_cache( $key, $data ) { - return wp_next_scheduled($this->get_results_cron_hook(), $args); - } + delete_option( $key ); - public function get_results_cron_hook() { - return 'gravityforms_results_cron_' . $this->_slug; - } + $result = add_option( $key, $data, '', 'no' ); - public function results_data_add_labels($form, $fields) { + return $result; + } - // replace the values/ids with text labels - foreach ($fields as $field_id => $choice_counts) { - $field = GFFormsModel::get_field($form, $field_id); - $type = GFFormsModel::get_input_type($field); - if (is_array($choice_counts)) { - $i = 0; - foreach ($choice_counts as $choice_value => $choice_count) { - if (class_exists("GFSurvey") && "likert" == $type && rgar($field, "gsurveyLikertEnableMultipleRows")) { - $row_text = GFSurvey::get_likert_row_text($field, $i++); - $counts_for_row = array(); - foreach ($choice_count as $col_val => $col_count) { - $text = GFSurvey::get_likert_column_text($field, $choice_value . ":" . $col_val); - $counts_for_row[$col_val] = array("text" => $text, "data" => $col_count); - } - $counts_for_row[$choice_value]["data"] = $counts_for_row; - $fields[$field_id][$choice_value] = array("text" => $row_text, "value" => "$choice_value", "count" => $counts_for_row); + // Recursive wp_cron task to continue the calculation of results + public function results_cron( $form, $fields, $search_criteria ) { - } else { - $text = GFFormsModel::get_choice_text($field, $choice_value); - $fields[$field_id][$choice_value] = array("text" => $text, "value" => "$choice_value", "count" => $choice_count); - } + $form_id = $form['id']; + $key = $this->get_results_cache_key( $form_id, $fields, $search_criteria ); + $key_tmp = 'tmp' . $key; + $state = get_option( $key_tmp, array() ); - } - } + if ( ! empty( $state ) ) { + if ( ! class_exists( 'GFResults' ) ) { + require_once( GFCommon::get_base_path() . '/includes/addon/class-gf-results.php' ); + } + $gf_results = new GFResults( $this->_slug, array() ); + $results = $gf_results->get_results_data( $form, $fields, $search_criteria, $state ); + if ( 'complete' == $results['status'] ) { + if ( isset( $results['progress'] ) ) { + unset( $results['progress'] ); + } + $this->update_results_cache( $key, $results ); + if ( false == empty( $state ) ) { + delete_option( $key_tmp ); + } + } else { + $this->update_results_cache( $key_tmp, $results ); - } + $data = get_option( $key ); + if ( $data ) { + $data['progress'] = $results['progress']; + $this->update_results_cache( $key, $data ); + } - return $fields; - } + $this->schedule_results_cron( $form, $fields, $search_criteria ); + } + } + } - // ----- end RESULTS + // Returns an array with the results for all the fields in the form. + // If the results can be calculated within the time allowed in GFResults then the results are returned and nothing is cached. + // If the calculation has not finished then a single recursive wp_cron task will be scheduled for immediate execution. + // While the cache is being built by the wp_cron task this function will return the expired cache results if available or the latest step in the cache build. + // Add-On-specific results are not included e.g. grade frequencies in the Quiz Add-On. + public function get_results( $form_id ) { + $this->authorize( 'gravityforms_view_entries' ); - private function authenticate() { - $authenticated = false; - if (isset($_GET["api_key"])) { - if (rgget("api_key") == $this->_public_key) { - if (self::check_signature()) - $authenticated = true; - } - } + $s = rgget( 's' ); // search criteria - if ($authenticated) - return true; + $search_criteria = false === empty( $s ) && is_array( $s ) ? $s : array(); - $this->die_not_authorized(); - } + $form = GFAPI::get_form( $form_id ); - private function check_signature() { - if (false === GFWEBAPI_REQUIRE_SIGNATURE) - return true; + if ( ! $form ) { + self::die_not_found(); + } - $expires = (int)rgget("expires"); + // for the Web API return all fields + $fields = rgar( $form, 'fields' ); - $api_key = rgget("api_key"); - $path = strtolower(get_query_var(GFWEBAPI_ROUTE_VAR)); - $method = strtoupper($_SERVER['REQUEST_METHOD']); + $form_id = $form['id']; + $key = $this->get_results_cache_key( $form_id, $fields, $search_criteria ); + $key_tmp = 'tmp' . $key; - $signature = rgget("signature"); + $data = get_option( $key, array() ); - $string_to_check = sprintf("%s:%s:%s:%s", $api_key, $method, $path, $expires); + $cache_meta = $this->get_results_cache_meta( $form_id ); - $calculated_sig = $this->calculate_signature($string_to_check); + // add the cache meta early so form editor updates can test for valid field hash + if ( empty( $cache_meta ) ) { + $this->update_results_cache_meta( $form_id, $fields, 0 ); + } - if (time() >= $expires) - return false; + $cache_expiry = rgar( $cache_meta, 'timestamp' ); + $cache_timestamp = isset( $data['timestamp'] ) ? $data['timestamp'] : 0; + $cache_expired = $cache_expiry ? $cache_expiry > $cache_timestamp : false; + + // check for valid cached results first + if ( ! empty( $data ) && 'complete' == rgar( $data, 'status' ) && ! $cache_expired ) { + $results = $data; + $status = 200; + if ( isset( $results['progress'] ) ) { + unset( $results['progress'] ); + } + } else { + + $state = get_option( $key_tmp ); + + if ( empty( $state ) || ( 'complete' == rgar( $data, 'status' ) && $cache_expired ) ) { + if ( ! class_exists( 'GFResults' ) ) { + require_once( GFCommon::get_base_path() . '/includes/addon/class-gf-results.php' ); + } + $gf_results = new GFResults( $this->_slug, array() ); + $max_execution_time = 5; + $results = $gf_results->get_results_data( $form, $fields, $search_criteria, $state, $max_execution_time ); + if ( 'complete' == $results['status'] ) { + $status = 200; + if ( false == empty( $state ) ) { + delete_option( $key_tmp ); + } + } else { + + if ( false === empty( $data ) && 'complete' == rgar( $data, 'status' ) && $cache_expired ) { + $data['status'] = 'expired'; + $data['progress'] = $results['progress']; + $this->update_results_cache( $key, $data ); + } + + $this->update_results_cache( $key_tmp, $results ); + + $this->schedule_results_cron( $form, $fields, $search_criteria ); + + if ( $data ) { + $results = $data; + } + + $status = 202; + } + } else { + + // The cron task is recursive, not periodic, so system restarts, script timeouts and memory issues can prevent the cron from restarting. + // Check timestamp and kick off the cron again if it appears to have stopped + $state_timestamp = rgar( $state, 'timestamp' ); + $state_age = time() - $state_timestamp; + if ( $state_age > 180 && ! $this->results_cron_is_scheduled( $form, $fields, $search_criteria ) ) { + $this->schedule_results_cron( $form, $fields, $search_criteria ); + } + + if ( false === empty( $data ) && 'expired' == rgar( $data, 'status' ) ) { + $results = $data; + } else { + $results = $state; + } + $status = 202; + } + } + + $fields = $results['field_data']; + + // add choice labels to the results so the client doesn't need to cross-reference with the form object + $results['field_data'] = $this->results_data_add_labels( $form, $fields ); + + $this->end( $status, $results ); + } + + public function schedule_results_cron( $form, $fields, $search_criteria, $delay_in_seconds = 10 ) { + // reduces problems with concurrency + wp_cache_delete( 'alloptions', 'options' ); + + $args = array( $form, $fields, $search_criteria ); + + wp_schedule_single_event( time() + $delay_in_seconds, $this->get_results_cron_hook(), $args ); + } + + public function results_cron_is_scheduled( $form, $fields, $search_criteria ) { + $args = array( $form, $fields, $search_criteria ); + + return wp_next_scheduled( $this->get_results_cron_hook(), $args ); + } + + public function get_results_cron_hook() { + return 'gravityforms_results_cron_' . $this->_slug; + } + + public function results_data_add_labels( $form, $fields ) { + + // replace the values/ids with text labels + foreach ( $fields as $field_id => $choice_counts ) { + $field = GFFormsModel::get_field( $form, $field_id ); + $type = GFFormsModel::get_input_type( $field ); + if ( is_array( $choice_counts ) ) { + $i = 0; + foreach ( $choice_counts as $choice_value => $choice_count ) { + if ( class_exists( 'GFSurvey' ) && 'likert' == $type && rgar( $field, 'gsurveyLikertEnableMultipleRows' ) ) { + $row_text = GFSurvey::get_likert_row_text( $field, $i ++ ); + $counts_for_row = array(); + foreach ( $choice_count as $col_val => $col_count ) { + $text = GFSurvey::get_likert_column_text( $field, $choice_value . ':' . $col_val ); + $counts_for_row[ $col_val ] = array( 'text' => $text, 'data' => $col_count ); + } + $counts_for_row[ $choice_value ]['data'] = $counts_for_row; + $fields[ $field_id ][ $choice_value ] = array( 'text' => $row_text, 'value' => "$choice_value", 'count' => $counts_for_row ); + + } else { + $text = GFFormsModel::get_choice_text( $field, $choice_value ); + $fields[ $field_id ][ $choice_value ] = array( 'text' => $text, 'value' => "$choice_value", 'count' => $choice_count ); + } + } + } + } + + return $fields; + } + + // ----- end RESULTS - $is_valid = $signature == $calculated_sig || $signature == rawurlencode($calculated_sig); - return $is_valid; - } + private function authenticate() { + $authenticated = false; + if ( isset( $_GET['api_key'] ) ) { + if ( rgget( 'api_key' ) == $this->_public_key ) { + if ( self::check_signature() ) { + $authenticated = true; + } + } + } + + if ( $authenticated ) { + return true; + } + + $this->die_not_authorized(); + } + + private function check_signature() { + if ( false === GFWEBAPI_REQUIRE_SIGNATURE ) { + return true; + } + + $expires = (int) rgget( 'expires' ); + + $api_key = rgget( 'api_key' ); + $path = strtolower( get_query_var( GFWEBAPI_ROUTE_VAR ) ); + $method = strtoupper( $_SERVER['REQUEST_METHOD'] ); + + $signature = rgget( 'signature' ); + + $string_to_check = sprintf( '%s:%s:%s:%s', $api_key, $method, $path, $expires ); + + $calculated_sig = $this->calculate_signature( $string_to_check ); + + if ( time() >= $expires ) { + return false; + } + + $is_valid = $signature == $calculated_sig || $signature == rawurlencode( $calculated_sig ); + + return $is_valid; + } + + private function calculate_signature( $string ) { + $hash = hash_hmac( 'sha1', $string, $this->_private_key, true ); + $sig = base64_encode( $hash ); + + return $sig; + } + + public static function end( $status, $response ) { + $output['status'] = $status; + $output['response'] = $response; + + // PHP > 5.3 + if ( function_exists( 'header_remove' ) ) { + header_remove( 'X-Pingback' ); + } + + + header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true ); + $output_json = json_encode( $output ); + + echo $output_json; + die(); + } + + public function die_not_authorized() { + $this->end( 401, __( 'Not authorized', 'gravityforms' ) ); + } + + public function die_permission_denied() { + $this->end( 401, __( 'Permission denied', 'gravityforms' ) ); + } + + public function die_bad_request() { + $this->end( 400, __( 'Bad request', 'gravityforms' ) ); + } + + public function die_not_found() { + $this->end( 404, __( 'Not found', 'gravityforms' ) ); + } + + public function die_not_implemented() { + $this->end( 501, __( 'Not implemented', 'gravityforms' ) ); + } + + public function die_error() { + $this->end( 500, __( 'Internal Error', 'gravityforms' ) ); + } + + public function get_error_response( $wp_error ) { + $response['code'] = $wp_error->get_error_code(); + $response['message'] = $wp_error->get_error_message(); + $data = $wp_error->get_error_data(); + if ( $data ) { + $output['data'] = $data; + } + + return $response; + } + + public function get_error_status( $wp_error ) { + $error_code = $wp_error->get_error_code(); + $mappings = array( + 'not_found' => 404, + 'not_allowed' => 401, + ); + $http_code = isset( $mappings[ $error_code ] ) ? $mappings[ $error_code ] : 400; + + return $http_code; + } + + public static function get_form_metas() { + $form_ids = array(); + $forms = RGFormsModel::get_forms( true ); + foreach ( $forms as $form ) { + $form_ids[] = $form->id; + } + $form_metas = GFFormsModel::get_form_meta_by_id( $form_ids ); + + return $form_metas; + } + + public static function ajax_qrcode() { + require_once GFCommon::get_base_path() . '/includes/phpqrcode/phpqrcode.php'; + $settings = get_option( 'gravityformsaddon_gravityformswebapi_settings' ); + if ( empty( $settings ) ) { + die(); + } + + $data['url'] = site_url(); + $data['name'] = get_bloginfo(); + $data['public_key'] = rgar( $settings, 'public_key' ); + $data['private_key'] = rgar( $settings, 'private_key' ); + + QRcode::png( json_encode( $data ), false, QR_ECLEVEL_L, 4, 1, false ); + die(); + } + + /** + * Support for MonoTouch.Dialog + */ + // todo: support array of form ids + public function mtd_transform_entries_data( $output, $form_id ) { + $form = GFFormsModel::get_form_meta( $form_id ); + $form_element = array(); + $form_element['title'] = $form['title']; + $form_element['type'] = 'root'; + $form_element['id'] = 'id-form-' . $form_id; + $form_element['count'] = rgar( $output, 'total_count' ); + $entries = rgar( $output, 'entries' ); + + $section['header'] = 'Entries'; + $entry_elements = array(); + if ( is_array( $entries ) ) { + foreach ( $entries as $entry ) { + $entry_element['type'] = 'root'; + $entry_element['title'] = $entry['id'] . ': ' . $entry['date_created']; + $entry_element['id'] = $entry['id']; + $entry_element['url'] = GFWEBAPI_API_BASE_URL . '/entries/' . rgar( $entry, 'id' ) . '?schema=mtd'; + $entry_elements[] = $entry_element; + } + } + + $section['elements'] = $entry_elements; + $form_element['sections'][] = $section; + + return $form_element; + } + + public function mtd_transform_forms_data( $forms ) { + $data = array(); + $data['title'] = 'Forms'; + $data['type'] = 'root'; + $data['id'] = 'forms'; + + foreach ( $forms as $form ) { + $element = array(); + $element['title'] = $form['title']; + $element['type'] = 'root'; + $element['id'] = 'id-form-' . $form['id']; + $element['url'] = GFWEBAPI_API_BASE_URL . '/forms/' . $form['id'] . '/entries.json?schema=mtd'; + $section = array(); + $section['elements'][] = $element; + $data['sections'][] = $section; + } + + return $data; + } + + public static function mtd_transform_entry_data( $entry ) { + $data = array(); + $root_element['type'] = 'root'; + $root_element['title'] = $entry['id'] . ': ' . $entry['date_created']; + $root_element['id'] = 'id-entry-' . $entry['id']; + + $form_id = rgar( $entry, 'form_id' ); + $form = RGFormsModel::get_form_meta( $form_id ); + $fields = $form['fields']; + + foreach ( $fields as $field ) { + $field_data = array(); + $field_data['header'] = $field['label']; + $elements = array(); + $value = RGFormsModel::get_lead_field_value( $entry, $field ); + + if ( is_array( $value ) && isset( $field['choices'] ) ) { + $choices = rgar( $field, 'choices' ); + + foreach ( $choices as $choice ) { + $found = false; + foreach ( $value as $item ) { + if ( $item == rgar( $choice, 'value' ) ) { + $found = true; + break; + } + } + $element = array(); + + $element['type'] = 'checkbox'; + $element['caption'] = $choice['text']; + $element['value'] = $found; + $elements[] = $element; + } + } else { + $element = array(); + $element['type'] = 'string'; + $element['caption'] = GFFormsModel::get_choice_text( $field, $value ); + + $elements[] = $element; + } + $field_data['elements'] = $elements; + $data[] = $field_data; + } + $root_element['sections'] = $data; - private function calculate_signature($string) { - $hash = hash_hmac("sha1", $string, $this->_private_key, true); - $sig = base64_encode($hash); + return $root_element; + } - return $sig; - } + } - public static function end($status, $response) { - $output["status"] = $status; - $output["response"] = $response; - - // PHP > 5.3 - if (function_exists("header_remove")) - header_remove("X-Pingback"); - - - header('Content-Type: application/json; charset=' . get_option('blog_charset'), true); - $output_json = json_encode($output); - - echo $output_json; - die(); - } - - public function die_not_authorized() { - $this->end(401, __("Not authorized", "gravityforms")); - } - - public function die_permission_denied() { - $this->end(401, __("Permission denied", "gravityforms")); - } - - public function die_bad_request() { - $this->end(400, __("Bad request", "gravityforms")); - } - - public function die_not_found() { - $this->end(404, __("Not found", "gravityforms")); - } - - public function die_not_implemented() { - $this->end(501, __("Not implemented", "gravityforms")); - } - - public function die_error() { - $this->end(500, __("Internal Error", "gravityforms")); - } - - public function get_error_response($wp_error) { - $response["code"] = $wp_error->get_error_code(); - $response["message"] = $wp_error->get_error_message(); - $data = $wp_error->get_error_data(); - if ($data) - $output["data"] = $data; - - return $response; - } - - public function get_error_status($wp_error) { - $error_code = $wp_error->get_error_code(); - $mappings = array( - "not_found" => 404, - "not_allowed" => 401 - ); - $http_code = isset($mappings[$error_code]) ? $mappings[$error_code] : 400; - - return $http_code; - } - - public static function get_form_metas() { - $form_ids = array(); - $forms = RGFormsModel::get_forms(true); - foreach ($forms as $form) { - $form_ids[] = $form->id; - } - $form_metas = GFFormsModel::get_form_meta_by_id($form_ids); - - return $form_metas; - } - - public static function ajax_qrcode() { - require_once GFCommon::get_base_path() . "/includes/phpqrcode/phpqrcode.php"; - $settings = get_option("gravityformsaddon_gravityformswebapi_settings"); - if (empty($settings)) - die(); - - $data["url"] = site_url(); - $data["name"] = get_bloginfo(); - $data["public_key"] = rgar($settings, "public_key"); - $data["private_key"] = rgar($settings, "private_key"); - - QRcode::png(json_encode($data), false, QR_ECLEVEL_L, 4, 1, false); - die(); - } - - /** - * Support for MonoTouch.Dialog - */ - // todo: support array of form ids - public function mtd_transform_entries_data($output, $form_id) { - $form = GFFormsModel::get_form_meta($form_id); - $form_element = array(); - $form_element["title"] = $form["title"]; - $form_element["type"] = "root"; - $form_element["id"] = "id-form-" . $form_id; - $form_element["count"] = rgar($output, "total_count"); - $entries = rgar($output, "entries"); - - $section["header"] = "Entries"; - $entry_elements = array(); - if (is_array($entries)) { - foreach ($entries as $entry) { - $entry_element["type"] = "root"; - $entry_element["title"] = $entry["id"] . ": " . $entry["date_created"]; - $entry_element["id"] = $entry["id"]; - $entry_element["url"] = GFWEBAPI_API_BASE_URL . "/entries/" . rgar($entry, "id") . "?schema=mtd"; - $entry_elements[] = $entry_element; - } - } - - $section["elements"] = $entry_elements; - $form_element["sections"][] = $section; - - return $form_element; - } - - public function mtd_transform_forms_data($forms) { - $data = array(); - $data["title"] = "Forms"; - $data["type"] = "root"; - $data["id"] = "forms"; - - foreach ($forms as $form) { - $element = array(); - $element["title"] = $form["title"]; - $element["type"] = "root"; - $element["id"] = "id-form-" . $form["id"]; - $element["url"] = GFWEBAPI_API_BASE_URL . "/forms/" . $form["id"] . "/entries.json?schema=mtd"; - $section = array(); - $section["elements"][] = $element; - $data["sections"][] = $section; - } - - return $data; - } - - public static function mtd_transform_entry_data($entry) { - $data = array(); - $root_element["type"] = "root"; - $root_element["title"] = $entry["id"] . ": " . $entry["date_created"]; - $root_element["id"] = "id-entry-" . $entry["id"]; - - $form_id = rgar($entry, "form_id"); - $form = RGFormsModel::get_form_meta($form_id); - $fields = $form["fields"]; - - foreach ($fields as $field) { - $field_data = array(); - $field_data["header"] = $field["label"]; - $elements = array(); - $value = RGFormsModel::get_lead_field_value($entry, $field); - - if (is_array($value) && isset($field["choices"])) { - $choices = rgar($field, "choices"); - - foreach ($choices as $choice) { - $found = false; - foreach ($value as $item) { - if ($item == rgar($choice, "value")) { - $found = true; - break; - } - } - $element = array(); - - $element["type"] = "checkbox"; - $element["caption"] = $choice["text"]; - $element["value"] = $found; - $elements[] = $element; - } - } else { - $element = array(); - $element["type"] = "string"; - $element["caption"] = GFFormsModel::get_choice_text($field, $value); - - $elements[] = $element; - } - $field_data["elements"] = $elements; - $data[] = $field_data; - } - $root_element["sections"] = $data; - - return $root_element; - } - - } - - new GFWebAPI(); + new GFWebAPI(); } diff --git a/index.php b/index.php new file mode 100644 index 0000000..12c197f --- /dev/null +++ b/index.php @@ -0,0 +1,2 @@ + - + - \ No newline at end of file + \ No newline at end of file diff --git a/js/conditional_logic.js b/js/conditional_logic.js index 8b31ffb..4b1abb9 100644 --- a/js/conditional_logic.js +++ b/js/conditional_logic.js @@ -179,14 +179,14 @@ function gf_matches_operation(val1, val2, operation){ val2 = gf_try_convert_float(val2); return gformIsNumber(val1) && gformIsNumber(val2) ? val1 > val2 : false; - break; + break; case "<" : val1 = gf_try_convert_float(val1); val2 = gf_try_convert_float(val2); return gformIsNumber(val1) && gformIsNumber(val2) ? val1 < val2 : false; - break; + break; case "contains" : return val1.indexOf(val2) >=0; @@ -240,49 +240,62 @@ function gf_do_next_button_action(formId, action, fieldId, isInit){ function gf_do_action(action, targetId, useAnimation, defaultValues, isInit, callback){ var $target = jQuery(targetId); if(action == "show"){ - if(useAnimation && !isInit){ - if($target.length > 0){ + + // reset tabindex for selects + $target.find( 'select' ).each( function() { + $select = jQuery( this ); + $select.attr( 'tabindex', $select.data( 'tabindex' ) ); + } ); + + if(useAnimation && !isInit){ + if($target.length > 0){ $target.slideDown(callback); } else if(callback){ callback(); } - } - else{ + } + else{ //$target.show(); //Getting around an issue with Chrome on Android. Does not like jQuery('xx').show() ... - if ($target.hasClass('gf_inline')) { + if ($target.is('.gf_inline, input.button')) { $target.css('display', 'inline-block'); } else { $target.css('display', 'block'); } - if(callback){ + if(callback){ callback(); } - } - } - else{ - //if field is not already hidden, reset its values to the default - var child = $target.children().first(); + } + } + else{ + //if field is not already hidden, reset its values to the default + var child = $target.children().first(); if (child.length > 0){ - if(!gformIsHidden(child)){ - gf_reset_to_default(targetId, defaultValues); - } + if(!gformIsHidden(child)){ + gf_reset_to_default(targetId, defaultValues); + } } - if(useAnimation && !isInit){ - if($target.length > 0 && $target.is(":visible")) { + // remove tabindex and stash as a data attr for selects + $target.find( 'select' ).each( function() { + $select = jQuery( this ); + $select.data( 'tabindex', $select.attr( 'tabindex' ) ).removeAttr( 'tabindex' ); + } ); + + if(useAnimation && !isInit){ + if($target.length > 0 && $target.is(":visible")) { $target.slideUp(callback); } else if(callback) { - callback(); + callback(); } - } else{ + } else{ $target.hide(); - if(callback){ - callback(); + if(callback){ + callback(); } - } - } + } + } } function gf_reset_to_default(targetId, defaultValue){ @@ -382,4 +395,4 @@ function gf_reset_to_default(targetId, defaultValue){ } }); -} +} \ No newline at end of file diff --git a/js/datepicker.js b/js/datepicker.js index 15ff1b1..6e01a1b 100644 --- a/js/datepicker.js +++ b/js/datepicker.js @@ -1,46 +1,45 @@ jQuery(document).ready(gformInitDatepicker); -function gformInitDatepicker(){ - jQuery('.datepicker').each( - function (){ - var element = jQuery(this); - var format = "mm/dd/yy"; - - if(element.hasClass("mdy")) - format = "mm/dd/yy"; - else if(element.hasClass("dmy")) - format = "dd/mm/yy"; - else if(element.hasClass("dmy_dash")) - format = "dd-mm-yy"; - else if(element.hasClass("dmy_dot")) - format = "dd.mm.yy"; - else if(element.hasClass("ymd_slash")) - format = "yy/mm/dd"; - else if(element.hasClass("ymd_dash")) - format = "yy-mm-dd"; - else if(element.hasClass("ymd_dot")) - format = "yy.mm.dd"; - - var image = ""; - var showOn = "focus"; - if(element.hasClass("datepicker_with_icon")){ - showOn = "both"; - image = jQuery('#gforms_calendar_icon_' + this.id).val(); - } - - element.datepicker( { - yearRange: '-100:+20', - showOn: showOn, - buttonImage: image, - buttonImageOnly: true, - dateFormat: format, - changeMonth: true, - changeYear: true, +function gformInitDatepicker() { + jQuery('.datepicker').each(function () { + var element = jQuery(this), + inputId = this.id, + optionsObj = { + yearRange: '-100:+20', + showOn: 'focus', + dateFormat: 'mm/dd/yy', + changeMonth: true, + changeYear: true, onClose: function () { element.closest('li').nextAll('li:visible:first').find(':input:first').focus(); } - } ); + }; + + if (element.hasClass('dmy')) { + optionsObj.dateFormat = 'dd/mm/yy'; + } else if (element.hasClass('dmy_dash')) { + optionsObj.dateFormat = 'dd-mm-yy'; + } else if (element.hasClass('dmy_dot')) { + optionsObj.dateFormat = 'dd.mm.yy'; + } else if (element.hasClass('ymd_slash')) { + optionsObj.dateFormat = 'yy/mm/dd'; + } else if (element.hasClass('ymd_dash')) { + optionsObj.dateFormat = 'yy-mm-dd'; + } else if (element.hasClass('ymd_dot')) { + optionsObj.dateFormat = 'yy.mm.dd'; } - ); -} + if (element.hasClass('datepicker_with_icon')) { + optionsObj.showOn = 'both'; + optionsObj.buttonImage = jQuery('#gforms_calendar_icon_' + inputId).val(); + optionsObj.buttonImageOnly = true; + } + + inputId = inputId.split('_'); + + // allow the user to override the datepicker options object + optionsObj = gform.applyFilters('gform_datepicker_options_pre_init', optionsObj, inputId[1], inputId[2]); + + element.datepicker(optionsObj); + }); +} \ No newline at end of file diff --git a/js/form_admin.js b/js/form_admin.js index e7ff428..11e58a3 100644 --- a/js/form_admin.js +++ b/js/form_admin.js @@ -1,4 +1,3 @@ - /** * Common JS functions for form settings and form editor pages. */ @@ -22,7 +21,6 @@ jQuery(document).ready(function($){ FormatCurrency(this); }); }); - }); function FormatCurrency(element){ @@ -55,35 +53,36 @@ function ToggleConditionalLogic(isInit, objectType){ } function GetConditionalObject(objectType){ - var obj = false; + + var object = false; switch(objectType){ case "page": case "field": - obj = GetSelectedField(); + object = GetSelectedField(); break; case "next_button" : var field = GetSelectedField(); - obj = field["nextButton"]; + object = field["nextButton"]; break; case "confirmation": - obj = confirmation; + object = confirmation; break; case "notification": - obj = current_notification; + object = current_notification; break; default: - obj = typeof form != 'undefined' ? form.button : false; + object = typeof form != 'undefined' ? form.button : false; break; } - obj = gform.applyFilters( 'gform_conditional_object', obj, objectType ) + object = gform.applyFilters( 'gform_conditional_object', object, objectType ) - return obj; + return object; } function CreateConditionalLogic(objectType, obj){ @@ -117,18 +116,17 @@ function CreateConditionalLogic(objectType, obj){ var descPiecesArr = makeArray( descPieces ); var str = descPiecesArr.join(' '); - var str = gform.applyFilters( 'gform_conditional_logic_description', str, descPieces, objectType, obj ); + str = gform.applyFilters( 'gform_conditional_logic_description', str, descPieces, objectType, obj ); var i, rule; for(i=0; i < obj.conditionalLogic.rules.length; i++){ rule = obj.conditionalLogic.rules[i]; - str += "
    "; str += GetRuleFields(objectType, i, rule.fieldId); str += GetRuleOperators(objectType, i, rule.fieldId, rule.operator); str += GetRuleValues(objectType, i, rule.fieldId, rule.value); - str += ""; + str += ""; if(obj.conditionalLogic.rules.length > 1 ) - str += ""; + str += ""; str += "
    "; } @@ -230,12 +228,11 @@ function GetEntryMetaFields( selectedFieldId ) { function IsConditionalLogicField(field){ var inputType = field.inputType ? field.inputType : field.type; - var supported_fields = ["checkbox", "radio", "select", "text", "website", "textarea", "email", "hidden", "number", "phone", "multiselect", "post_title", - "post_tags", "post_custom_field", "post_content", "post_excerpt"]; + var supported_fields = GetConditionalLogicFields(); var index = jQuery.inArray(inputType, supported_fields); var isConditionalLogicField = index >= 0 ? true : false; - isConditionalLogicField = gform.applyFilters( 'gform_is_conditional_logic_field', isConditionalLogicField, field ); + isConditionalLogicField = gform.applyFilters( 'gform_is_conditional_logic_field', isConditionalLogicField, field ); return isConditionalLogicField; } @@ -338,8 +335,9 @@ function GetRuleValuesDropDown(choices, objectType, ruleIndex, selectedValue, in var selected = isSelected ? "selected='selected'" : ""; if(isSelected) isAnySelected = true; - - str += ""; + choiceValue = choiceValue.replace(/'/g, "'"); + var choiceText = jQuery.trim(jQuery('
    '+choices[i].text+'
    ').text()) === '' ? choiceValue : choices[i].text; + str += ""; } if(!isAnySelected && selectedValue && selectedValue != "") @@ -350,6 +348,10 @@ function GetRuleValuesDropDown(choices, objectType, ruleIndex, selectedValue, in return str; } +function isEmpty(str){ + return +} + function SetRuleProperty(objectType, ruleIndex, name, value){ var obj = GetConditionalObject(objectType); @@ -422,11 +424,11 @@ function gfAjaxSpinner(elem, imageSrc, inlineStyles) { this.spinner = jQuery(this.image); jQuery(this.elem).after(this.spinner); return this; - } + }; this.destroy = function() { jQuery(this.spinner).remove(); - } + }; return this.init(); } @@ -436,20 +438,21 @@ function InsertVariable(element_id, callback, variable) { if(!variable) variable = jQuery('#' + element_id + '_variable_select').val(); - var messageElement = jQuery("#" + element_id); + var input = document.getElementById (element_id); + var $input = jQuery(input); if(document.selection) { // Go the IE way - messageElement[0].focus(); + $input[0].focus(); document.selection.createRange().text=variable; } - else if(messageElement[0].selectionStart) { - // Go the Gecko way - obj = messageElement[0] - obj.value = obj.value.substr(0, obj.selectionStart) + variable + obj.value.substr(obj.selectionEnd, obj.value.length); - } - else { - messageElement.val(variable + messageElement.val()); + else if('selectionStart' in input) { + var startPos = input.selectionStart; + input.value = input.value.substr(0, startPos) + variable + input.value.substr(input.selectionEnd, input.value.length); + input.selectionStart = startPos + input.value.length; + input.selectionEnd = startPos + input.value.length; + } else { + $input.val(variable + messageElement.val()); } var variableSelect = jQuery('#' + element_id + '_variable_select'); @@ -569,7 +572,6 @@ function DuplicateConfirmation(confirmationId) { function SetConfirmationConditionalLogic() { confirmation['conditionalLogic'] = jQuery('#conditional_logic').val() ? jQuery.parseJSON(jQuery('#conditional_logic').val()) : new ConditionalLogic(); - } function ToggleConfirmation() { @@ -709,7 +711,7 @@ function ConfirmationObj() { $("#single_action").val("delete"); $("#single_action_argument").val(id); $("#gform-settings").submit(); - } + }; function isValidJson(str) { try { @@ -767,7 +769,8 @@ var gfMergeTagsObj = function(form) { jQuery( ".merge-tag-support" ) // don't navigate away from the field on tab when selecting an item .bind( "keydown", function( event ) { - if ( event.keyCode === jQuery.ui.keyCode.TAB && jQuery( this ).data( "autocomplete" ).menu.active ) { + var menuActive = jQuery( this ).data( "autocomplete" ) && jQuery( this ).data( "autocomplete" ).menu ? jQuery( this ).data( "autocomplete" ).menu.active : false; + if ( event.keyCode === jQuery.ui.keyCode.TAB && menuActive ) { event.preventDefault(); } }) @@ -855,8 +858,7 @@ var gfMergeTagsObj = function(form) { InsertVariable( input.attr('id'), null, value ); } - // trigger the change event to fire any functions tied to this input's onchange - input.change(); + input.trigger('input').trigger('propertychange'); gfMergeTags.mergeTagList.hide(); @@ -881,19 +883,19 @@ var gfMergeTagsObj = function(form) { gfMergeTags.mergeTagList.hide(); }); - } + }; this.split = function( val ) { return val.split(' '); - } + }; this.extractLast = function( term ) { return this.split( term ).pop(); - } + }; this.startsWith = function(string, value) { return string.indexOf(value) === 0; - } + }; this.getMergeTags = function(fields, elementId, hideAllFields, excludeFieldTypes, isPrepop, option) { @@ -933,21 +935,38 @@ var gfMergeTagsObj = function(form) { case 'name': var requiredField = Copy(field); + var prefix, middle, suffix, optionalField; if(field['nameFormat'] == 'extended') { - var prefix = GetInput(field, field.id + '.2'); - var suffix = GetInput(field, field.id + '.8'); + prefix = GetInput(field, field.id + '.2'); + suffix = GetInput(field, field.id + '.8'); - var optionalField = Copy(field); + optionalField = Copy(field); optionalField['inputs'] = [prefix, suffix]; // add optional name fields to optional list optionalFields.push(optionalField); - // remove option name fields from required list + // remove optional name fields from required list delete requiredField.inputs[0]; delete requiredField.inputs[3]; + } else if(field['nameFormat'] == 'advanced') { + + prefix = GetInput(field, field.id + '.2'); + middle = GetInput(field, field.id + '.4'); + suffix = GetInput(field, field.id + '.8'); + + optionalField = Copy(field); + optionalField['inputs'] = [prefix, middle, suffix]; + + // add optional name fields to optional list + optionalFields.push(optionalField); + + // remove optional name fields from required list + delete requiredField.inputs[0]; + delete requiredField.inputs[2]; + delete requiredField.inputs[4]; } requiredFields.push(requiredField); @@ -1065,12 +1084,12 @@ var gfMergeTagsObj = function(form) { label: this.getMergeGroupLabel('custom'), tags: customGroup } - } + }; mergeTags = gform.applyFilters('gform_merge_tags', mergeTags, elementId, hideAllFields, excludeFieldTypes, isPrepop, option, this ); return mergeTags; - } + }; this.getMergeTagLabel = function(tag) { @@ -1091,11 +1110,11 @@ var gfMergeTagsObj = function(form) { } return ''; - } + }; this.getMergeGroupLabel = function(group) { return gf_vars.mergeTags[group].label; - } + }; this.getFieldMergeTags = function(field, option) { @@ -1107,6 +1126,10 @@ var gfMergeTagsObj = function(form) { var tagArgs = inputType == "list" ? ":" + option : ""; //option currently only supported by list field var value = '', label = ''; + if(jQuery.inArray(inputType, ['date', 'email', 'time', 'password'])>-1){ + field['inputs'] = null; + } + if( typeof field['inputs'] != 'undefined' && jQuery.isArray(field['inputs']) ) { if(inputType == 'checkbox') { @@ -1136,7 +1159,7 @@ var gfMergeTagsObj = function(form) { } return mergeTags; - } + }; this.getCustomMergeTags = function() { for(groupName in gf_vars.mergeTags) { @@ -1147,7 +1170,7 @@ var gfMergeTagsObj = function(form) { return gf_vars.mergeTags[groupName]; } return []; - } + }; this.getAutoCompleteMergeTags = function(elem) { @@ -1180,7 +1203,7 @@ var gfMergeTagsObj = function(form) { } return autoCompleteTags; - } + }; this.getMergeTagListItems = function(elem) { @@ -1226,7 +1249,7 @@ var gfMergeTagsObj = function(form) { } return optionsHTML; - } + }; this.hasMultipleGroups = function(mergeTags) { var count = 0; @@ -1239,7 +1262,7 @@ var gfMergeTagsObj = function(form) { count++; } return count > 1; - } + }; /** * Merge Tag inputs support a system for setting various properties for the merge tags via classes. @@ -1293,16 +1316,16 @@ var gfMergeTagsObj = function(form) { } return ''; - } + }; this.isWpEditor = function( mergeTagIcon ) { var mergeTagIcon = jQuery( mergeTagIcon ); return this.getClassProperty( mergeTagIcon, 'wp_editor' ) == true; - } + }; this.init(); -} +}; var FeedConditionObj = function( args ) { @@ -1324,10 +1347,20 @@ var FeedConditionObj = function( args ) { jQuery('input#feed_condition_conditional_logic_object').val( JSON.stringify( fcobj.logicObject ) ); }); - } + }; this.init(); +}; + +function SimpleConditionObject( object, objectType ) { + + if( objectType.indexOf('simple_condition') < 0 ) + return object; + + var objectName = objectType.substring(17) + "_object"; + + return window[objectName]; } function FeedConditionConditionalObject( object, objectType ) { @@ -1350,16 +1383,6 @@ function FeedConditionConditionalDescription( description, descPieces, objectTyp return descPiecesArr.join(' '); } -function SimpleConditionObject( object, objectType ) { - - if( objectType.indexOf('simple_condition') < 0 ) - return object; - - var objectName = objectType.substring(17) + "_object"; - - return window[objectName]; -} - function makeArray( object ) { var array = []; for( i in object ) { @@ -1369,7 +1392,5 @@ function makeArray( object ) { } function isSet( $var ) { - if (typeof $var != 'undefined') - return true - return false + return typeof $var != 'undefined'; } \ No newline at end of file diff --git a/js/form_editor.js b/js/form_editor.js index a7e9992..6f7fe3e 100644 --- a/js/form_editor.js +++ b/js/form_editor.js @@ -5,13 +5,108 @@ jQuery(document).ready(function() { - setTimeout("CloseStatus();", 5000) + setTimeout("CloseStatus();", 5000); + + jQuery('.field_type input').each(function(){ + var $this = jQuery(this); + var type = $this.data('type'); + var onClick = $this.attr('onclick'); + if(typeof type =='undefined'){ + // deprecate buttons without the type data attribute + + if(onClick.indexOf('StartAddField') > -1){ + if (/StartAddField\([ ]?'(.*?)[ ]?'/.test( onClick )){ + type = onClick.match( /'(.*?)'/ )[1]; + $this.data('type', type); + } + } + + if(window.console){ + console.log('Deprecated button for the ' + this.value + ' field. Since v1.9 the field type must be specified in the "type" data attribute.'); + } + } + if(typeof type != 'undefined' && (typeof onClick == 'undefined' || onClick == '')){ + jQuery(this).click(function(){ + StartAddField(type); + }) + } + }); jQuery('#gform_fields').sortable({ - axis: 'y', cancel: '#field_settings', handle: '.gfield_admin_icons', - start: function(event, ui){gforms_dragging = ui.item[0].id;} + start: function(event, ui){ + gforms_dragging = ui.item[0].id; + }, + containment: 'document', + tolerance: "pointer", + over: function( event, ui ) { + jQuery('#no-fields').hide(); + if(ui.helper.hasClass('ui-draggable-dragging')){ + ui.helper.data('original_width', ui.helper.width()) + ui.helper.data('original_height', ui.helper.height()) + ui.helper.width(ui.sender.width()-25); + ui.helper.height(ui.placeholder.height()); + } else { + var h = ui.helper.height(); + if(h > 300){ + h = 300; + } + ui.placeholder.height(h); + } + }, + out: function( event, ui ) { + jQuery('#no-fields').show(); + if(ui.helper && ui.helper.hasClass('ui-draggable-dragging')){ + ui.helper.width(ui.helper.data('original_width')); + ui.helper.height(ui.helper.data('original_height')); + } + }, + placeholder: "field-drop-zone", + beforeStop: function( event, ui ) { + + jQuery('#no-fields').remove(); + jQuery('#gform_fields').height('100%'); + + var type = ui.helper.data('type'); + + if(typeof type == 'undefined'){ + return; + } + + var li = "
  • "; + var index = ui.item.index(); + ui.item.replaceWith( li ); + StartAddField(type, index); + } + }); + + jQuery('#no-fields').droppable({ + over: function (event, ui) { + jQuery('#gform_fields').height(jQuery('#no-fields').height()); + jQuery('#no-fields').hide(); + }, + out : function (event, ui) { + jQuery('#no-fields').show(); + } + }); + + jQuery('.field_type input').draggable({ + connectToSortable: "#gform_fields", + helper: function(){ + return jQuery(this).clone(true); + }, + revert: 'invalid', + cancel: false, + appendTo: '#wpbody', + containment: 'document', + start: function(event, ui){ + + if(gf_vars["currentlyAddingField"] == true){ + return false; + } + + } }); jQuery('#field_choices').sortable({ @@ -24,6 +119,20 @@ jQuery(document).ready(function() { } }); + jQuery('.field_input_choices').sortable({ + axis: 'y', + handle: '.field-choice-handle', + update: function(event, ui){ + var fromIndex = ui.item.data("index"); + var toIndex = ui.item.index(); + var inputId = ui.item.data("input_id"); + var $ul = ui.item.parent(); + MoveInputChoice($ul, inputId, fromIndex, toIndex); + } + }); + + + if(typeof gf_global['view'] == 'undefined' || gf_global['view'] != 'settings') InitializeForm(form); @@ -51,12 +160,247 @@ jQuery(document).ready(function() { jQuery(this).data('previousValue', jQuery(this).val()); }); + InitializeFieldSettings(); }); function CloseStatus(){ jQuery('.updated_base, .error_base').slideUp(); } +function InitializeFieldSettings(){ + + jQuery('#field_max_file_size').on('input propertychange', function(){ + var $this = jQuery(this), + inputValue = parseInt($this.val()); + var value = inputValue ? inputValue : ''; + + SetFieldProperty('maxFileSize', value); + + }).on('change', function(){ + var field = GetSelectedField(); + var value = field.maxFileSize ? field.maxFileSize : ''; + var maskedValue = value === '' ? '' : value + "MB" + this.value = maskedValue; + }); + jQuery(document).on('input propertychange', '.field_default_value', function(){ + SetFieldDefaultValue(this.value); + }); + jQuery(document).on('input propertychange', '.field_placeholder, .field_placeholder_textarea', function(){ + SetFieldPlaceholder(this.value); + }); + + jQuery('#field_choices').on('change' , '.field-choice-price', function() { + var field = GetSelectedField(); + var i = jQuery(this).parent('li').index(); + var price = field.choices[i].price; + this.value = price; + }); + + jQuery('.field_input_choices') + .on('input propertychange', 'input', function () { + var $li = jQuery(this).closest('li'), + index = $li.data('index'), + inputId = $li.data('input_id'), + value = $li.find('.field-choice-value').val(), + text = $li.find('.field-choice-text').val(); + SetInputChoice(inputId, index, value, text); + }) + .on('click', 'input:radio, input:checkbox', function () { + var $li = jQuery(this).closest('li'), + index = $li.data('index'), + inputId = $li.data('input_id'), + value = $li.find('.field-choice-value').val(), + text = $li.find('.field-choice-text').val(); + SetInputChoice(inputId, index, value, text); + }) + .on('click', '.field-input-insert-choice', function () { + var $li = jQuery(this).closest('li'), + $ul = $li.closest('ul'), + index = $li.data('index'), + inputId = $li.data('input_id'); + InsertInputChoice($ul, inputId, index + 1); + }) + .on('click', '.field-input-delete-choice', function () { + var $li = jQuery(this).closest('li'), + $ul = $li.closest('ul'), + index = $li.data('index'), + inputId = $li.data('input_id'); + DeleteInputChoice($ul, inputId, index); + }); + + jQuery('.field_input_choice_values_enabled').on('click', function(){ + var $container = jQuery(this).parent().siblings('.gfield_settings_input_choices_container'); + ToggleInputChoiceValue($container, this.checked); + var $ul = $container.find('ul'); + SetInputChoices($ul); + }); + + jQuery('.input_placeholders_setting') + .on('input propertychange', '.input_placeholder', function(){ + var inputId = jQuery(this).closest('.input_placeholder_row').data('input_id'); + SetInputPlaceholder(this.value, inputId); + }) + .on('input propertychange', '#field_single_placeholder', function(){ + SetFieldPlaceholder(this.value); + }); + + jQuery('.prepopulate_field_setting') + .on('input propertychange', '.field_input_name', function(){ + var inputId = jQuery(this).closest('.field_input_name_row').data('input_id'); + SetInputName(this.value, inputId); + }) + .on('input propertychange', '#field_input_name', function(){ + SetInputName(this.value); + }); + + jQuery('.custom_inputs_setting, .custom_inputs_sub_setting, .sub_labels_setting') + .on('click', '.input_active_icon', function(){ + var inputId = jQuery(this).closest('.field_custom_input_row').data('input_id'); + ToggleInputHidden(this, inputId); + }) + .on('input propertychange', '.field_custom_input_default_label', function(){ + var inputId = jQuery(this).closest('.field_custom_input_row').data('input_id'); + SetInputCustomLabel(this.value, inputId); + }) + .on('input propertychange', '#field_single_custom_label', function(){ + SetInputCustomLabel(this.value); + }); + + jQuery('.default_input_values_setting') + .on('input propertychange', '.default_input_value', function(){ + var inputId = jQuery(this).closest('.default_input_value_row').data('input_id'); + SetInputDefaultValue(this.value, inputId); + }) + .on('input', '#field_single_default_value', function(){ + SetFieldDefaultValue(this.value); + }); + + + jQuery('.choices_setting, .columns_setting') + .on('input propertychange', '.field-choice-input', function(e){ + var $this = jQuery(this); + var li = $this.closest('li.field-choice-row'); + var inputType = li.data('input_type'); + var i = li.data('index'); + SetFieldChoice( inputType, i); + if($this.hasClass('field-choice-text') || $this.hasClass('field-choice-value')){ + CheckChoiceConditionalLogicDependency(this); + e.stopPropagation(); + } + + }); + + jQuery('#field_enable_copy_values_option').on('click', function(){ + SetCopyValuesOptionProperties(this.checked); + ToggleCopyValuesOption(false); + + if(this.checked == false){ + ToggleCopyValuesActivated(false); + } + }); + + jQuery('#field_copy_values_option_label').on('input propertychange', function(){ + SetCopyValuesOptionLabel(this.value); + }); + + jQuery('#field_copy_values_option_field').on('change', function(){ + SetFieldProperty('copyValuesOptionField', jQuery(this).val()); + }); + + jQuery('#field_copy_values_option_default').on('change', function(){ + SetFieldProperty('copyValuesOptionDefault', this.checked == true ? 1 : 0); + ToggleCopyValuesActivated(this.checked); + }); + + jQuery('#field_label').on('input propertychange', function(){ + SetFieldLabel(this.value); + }); + + jQuery('#field_description').on('input propertychange', function(){ + SetFieldDescription(this.value); + }); + + jQuery('#field_content').on('input propertychange', function(){ + SetFieldProperty('content', this.value); + }); + + jQuery('#next_button_text_input, #next_button_image_url').on('input propertychange', function(){ + SetPageButton('next'); + }); + + jQuery('#previous_button_image_url, #previous_button_text_input').on('input propertychange', function(){ + SetPageButton('previous'); + }); + + jQuery('#field_custom_field_name_text').on('input propertychange', function(){ + SetFieldProperty('postCustomFieldName', this.value); + }); + + jQuery('#field_customfield_content_template').on('input propertychange', function(){ + SetCustomFieldTemplate(); + }); + + jQuery('#gfield_calendar_icon_url').on('input propertychange', function(){ + SetFieldProperty('calendarIconUrl', this.value); + }); + + jQuery('#field_max_files').on('input propertychange', function(){ + SetFieldProperty('maxFiles', this.value); + }); + + jQuery('#field_maxrows').on('input propertychange', function(){ + SetFieldProperty('maxRows', this.value); + }); + + jQuery('#field_mask_text').on('input propertychange', function(){ + SetFieldProperty('inputMaskValue', this.value); + }); + + jQuery('#field_file_extension').on('input propertychange', function(){ + SetFieldProperty('allowedExtensions', this.value); + }); + + jQuery('#field_maxlen') + .on('keypress', function(){ + return ValidateKeyPress(event, GetMaxLengthPattern(), false) + }) + .on('change keyup', function(){ + SetMaxLength(this); + }); + + jQuery('#field_range_min').on('input propertychange', function(){ + SetFieldProperty('rangeMin', this.value); + }); + + jQuery('#field_range_max').on('input propertychange', function(){ + SetFieldProperty('rangeMax', this.value); + }); + + jQuery('#field_calculation_formula').on('input propertychange', function(){ + SetFieldProperty('calculationFormula', this.value.trim()); + }); + + jQuery('#field_error_message').on('input propertychange', function(){ + SetFieldProperty('errorMessage', this.value); + }); + + jQuery('#field_css_class').on('input propertychange', function(){ + SetFieldProperty('cssClass', this.value); + }); + + jQuery('#field_admin_label').on('input propertychange', function(){ + SetFieldProperty('adminLabel', this.value); + }); + + jQuery('#field_add_icon_url').on('input propertychange', function(){ + SetFieldProperty('addIconUrl', this.value); + }); + + jQuery('#field_delete_icon_url').on('input propertychange', function(){ + SetFieldProperty('deleteIconUrl', this.value); + }); +} + function InitializeForm(form){ if(form.lastPageButton && form.lastPageButton.type == "image") @@ -77,8 +421,6 @@ function InitializeForm(form){ //default to checked if(form.useCurrentUserAsAuthor == undefined) form.useCurrentUserAsAuthor = true; - else if(form.useCurrentUserAsAuthor == '0') - form.useCurrentUserAsAuthor = false; jQuery('#gfield_current_user_as_author').prop('checked', form.useCurrentUserAsAuthor ? true : false); @@ -88,7 +430,7 @@ function InitializeForm(form){ if(form.postFormat) jQuery('#field_post_format').val(form.postFormat); - if(form.postContentTemplateEnabled && form.postContentTemplateEnabled != '0' ){ + if(form.postContentTemplateEnabled){ jQuery('#gfield_post_content_enabled').prop("checked", true); jQuery('#field_post_content_template').val(form.postContentTemplate); } @@ -98,7 +440,7 @@ function InitializeForm(form){ } TogglePostContentTemplate(true); - if(form.postTitleTemplateEnabled && form.postTitleTemplateEnabled != '0'){ + if(form.postTitleTemplateEnabled){ jQuery('#gfield_post_title_enabled').prop("checked", true); jQuery('#field_post_title_template').val(form.postTitleTemplate); } @@ -168,10 +510,34 @@ function LoadFieldSettings(){ jQuery('#field_force_ssl').prop('checked', field.forceSSL ? true : false); jQuery('#credit_card_style').val(field.creditCardStyle ? field.creditCardStyle : "style1"); - if(field.adminOnly) + if(typeof field.labelPlacement == 'undefined'){ + field.labelPlacement = ''; + } + if(typeof field.descriptionPlacement == 'undefined'){ + field.descriptionPlacement = ''; + } + if(typeof field.subLabelPlacement == 'undefined'){ + field.subLabelPlacement = ''; + } + jQuery("#field_label_placement").val(field.labelPlacement); + jQuery("#field_description_placement").val(field.descriptionPlacement); + jQuery("#field_sub_label_placement").val(field.subLabelPlacement); + if((field.labelPlacement == 'left_label' || field.labelPlacement == 'right_label' || (field.labelPlacement == '' && form.labelPlacement != 'top_label'))){ + jQuery('#field_description_placement_container').hide(); + } else { + jQuery('#field_description_placement_container').show(); + } + + if(field.adminOnly){ jQuery("#field_visibility_admin").prop("checked", true); - else + } else { jQuery("#field_visibility_everyone").prop("checked", true); + } + + if(typeof field.placeholder == 'undefined'){ + field.placeholder = ''; + } + jQuery("#field_placeholder, #field_placeholder_textarea").val(field.placeholder); jQuery("#field_file_extension").val(field.allowedExtensions == undefined ? "" : field.allowedExtensions); jQuery("#field_multiple_files").prop("checked", field.multipleFiles ? true : false); @@ -180,22 +546,6 @@ function LoadFieldSettings(){ ToggleMultiFile(true); - jQuery(document).on('change', '#field_max_file_size', function(){ - var $this = jQuery(this), - inputValue = parseInt($this.val()); - var value = inputValue ? inputValue : ''; - var maskedValue = value === '' ? '' : value + "MB" - SetFieldProperty('maxFileSize', value); - $this.val( maskedValue ); - }); - - jQuery(document).on('onkeyup', '#field_max_file_size', function(){ - var value = parseInt(jQuery(this).val()) ? parseInt(jQuery(this).val()) : ''; - SetFieldProperty('maxFileSize', value); - }); - - - jQuery("#field_phone_format").val(field.phoneFormat); jQuery("#field_error_message").val(field.errorMessage); jQuery('#field_captcha_theme').val(field.captchaTheme == undefined ? "red" : field.captchaTheme); @@ -245,15 +595,14 @@ function LoadFieldSettings(){ var rounding = gformIsNumber(field.calculationRounding) ? field.calculationRounding : "norounding"; jQuery('#field_calculation_rounding').val(rounding); - - jQuery("#option_field_type").val(field.inputType); var productFieldType = jQuery("#product_field_type"); productFieldType.val(field.inputType); - if(has_entry(field.id)) + if(has_entry(field.id)){ productFieldType.prop("disabled", true); - else + } else{ productFieldType.prop("disabled", false); + } jQuery("#donation_field_type").val(field.inputType); jQuery("#quantity_field_type").val(field.inputType); @@ -264,6 +613,8 @@ function LoadFieldSettings(){ SetBasePrice(basePrice); } + jQuery("#shipping_field_type").val(field.inputType); + jQuery("#field_disable_quantity").prop("checked", field.disableQuantity == true ? true : false); SetDisableQuantity(field.disableQuantity == true); @@ -275,8 +626,17 @@ function LoadFieldSettings(){ var addressType = field.addressType == undefined ? "international" : field.addressType; jQuery('#field_address_type').val(addressType); - jQuery("#field_address_hide_address2").prop("checked", field.hideAddress2 == true ? true : false); - jQuery("#field_address_hide_state_" + addressType).prop("checked", field.hideState == true ? true : false); + + if(field.type == 'address'){ + field = UpgradeAddressField(field); + } + + if(field.type == 'email'){ + field = UpgradeEmailField(field); + } + if(field.type == 'password'){ + field = UpgradePasswordField(field); + } var defaultState = field.defaultState == undefined ? "" : field.defaultState; var defaultProvince = field.defaultProvince == undefined ? "" : field.defaultProvince; //for backwards compatibility @@ -284,7 +644,6 @@ function LoadFieldSettings(){ jQuery("#field_address_default_state_" + addressType).val(defaultStateProvince); jQuery("#field_address_default_country_" + addressType).val(field.defaultCountry == undefined ? "" : field.defaultCountry); - jQuery("#field_address_hide_country_" + addressType).prop("checked", field.hideCountry == true ? true : false); SetAddressType(true); @@ -343,6 +702,7 @@ function LoadFieldSettings(){ ToggleInputMaskOptions(true); if(inputType == "creditcard"){ + field = UpgradeCreditCardField(field); if(!field.creditCards || field.creditCards.length <= 0) field.creditCards = ['amex', 'visa', 'discover', 'mastercard']; @@ -354,8 +714,23 @@ function LoadFieldSettings(){ } } - if(!field["dateType"] && inputType == "date") + if(field.type == 'date'){ + field = UpgradeDateField(field); + } + + if(field.type == 'time'){ + field = UpgradeTimeField(field); + } + + CreateDefaultValuesUI(field); + CreatePlaceholdersUI(field); + CreateCustomizeInputsUI(field); + CreateInputLabelsUI(field); + + + if(!field["dateType"] && inputType == "date"){ field["dateType"] = "datepicker"; + } jQuery("#field_date_input_type").val(field["dateType"]); jQuery("#gfield_calendar_icon_url").val(field["calendarIconUrl"] == undefined ? "" : field["calendarIconUrl"]); @@ -374,6 +749,8 @@ function LoadFieldSettings(){ CreateInputNames(field); ToggleInputName(true); + + var canHaveConditionalLogic = GetFirstRuleField() > 0; if(field["type"] == "page"){ LoadFieldConditionalLogic(canHaveConditionalLogic, "next_button"); @@ -383,6 +760,21 @@ function LoadFieldSettings(){ LoadFieldConditionalLogic(canHaveConditionalLogic, "field"); } + jQuery("#field_enable_copy_values_option").prop("checked", field.enableCopyValuesOption == true ? true : false); + jQuery("#field_copy_values_option_default").prop("checked", field.copyValuesOptionDefault == true ? true : false); + var copyValueOptions = GetCopyValuesFieldsOptions(field.copyValuesFieldId, field); + if(copyValueOptions.length>0){ + jQuery("#field_enable_copy_values_option").prop("disabled", false); + jQuery("#field_copy_values_disabled").hide(); + jQuery("#field_copy_values_option_field").html(copyValueOptions); + + } else { + jQuery("#field_enable_copy_values_option").prop("disabled", true); + jQuery("#field_copy_values_disabled").show(); + } + + ToggleCopyValuesOption(field.enableCopyValuesOption, true); + if(field.nextButton){ if(field.nextButton.type == "image") @@ -420,9 +812,9 @@ function LoadFieldSettings(){ }); if(has_entry(field.id)) - jQuery("#field_type, #field_name_format, #field_multiple_files").prop("disabled", true); + jQuery("#field_type, #field_multiple_files").prop("disabled", true); else - jQuery("#field_type, #field_name_format, #field_multiple_files").prop("disabled", false); + jQuery("#field_type, #field_multiple_files").prop("disabled", false); jQuery("#field_custom_field_name").val(field.postCustomFieldName); @@ -493,11 +885,31 @@ function LoadFieldSettings(){ jQuery(".customfield_content_template_setting").show(); } + if(field["type"] == "name"){ - //Display default value setting and size setting for simple name field - if(field["type"] == "name" && field["nameFormat"] == "simple"){ - jQuery(".default_value_setting").show(); - jQuery(".size_setting").show(); + if(typeof field["nameFormat"] == 'undefined' || field["nameFormat"] != "advanced"){ + field = MaybeUpgradeNameField(field); + } else { + SetUpAdvancedNameField(); + } + + if(field["nameFormat"] == "simple"){ + jQuery(".default_value_setting").show(); + jQuery(".size_setting").show(); + jQuery('#field_name_fields_container').html('').hide(); + jQuery('.sub_label_placement_setting').hide(); + jQuery('.name_prefix_choices_setting').hide(); + jQuery('.name_format_setting').hide(); + jQuery('.name_setting').hide(); + jQuery('.default_input_values_setting').hide(); + jQuery('.default_value_setting').show(); + } else if(field["nameFormat"] == "extended") { + jQuery('.name_format_setting').show(); + jQuery('.name_prefix_choices_setting').hide(); + jQuery('.name_setting').hide(); + jQuery('.default_input_values_setting').hide(); + jQuery('.input_placeholders_setting').hide(); + } } // if a product or option field, hide "other choice" setting @@ -520,13 +932,19 @@ function LoadFieldSettings(){ if(field.type == 'product') { if(field.inputType == 'singleproduct') { - var ff=jQuery(".admin_label_setting"); jQuery(".admin_label_setting").hide(); } else { jQuery(".admin_label_setting").show(); } } + if(inputType == "date"){ + ToggleDateSettings(field); + } + + if(inputType == "email"){ + ToggleEmailSettings(field); + } jQuery(document).trigger('gform_load_field_settings', [field, form]); @@ -540,9 +958,101 @@ function LoadFieldSettings(){ SetProductField(field); + + var tabsToHide = []; + + // Hide the appearance tab if it has no settings + var $appearanceSettings = jQuery("#gform_tab_3 li.field_setting").filter(function() { + return jQuery(this).is(':hidden') && jQuery(this).css('display') != 'none'; + }); + if($appearanceSettings.length == 0){ + tabsToHide.push(1); + } + + // Hide the advanced tab if it has no settings + var $advancedSettings = jQuery("#gform_tab_2 li.field_setting").filter(function() { + return jQuery(this).is(':hidden') && jQuery(this).css('display') != 'none'; + }); + if($advancedSettings.length == 0){ + tabsToHide.push(2); + } + + + if(tabsToHide.length > 0){ + jQuery("#field_settings").tabs({disabled:tabsToHide}); + } else { + jQuery("#field_settings").tabs({disabled:[]}); + } + + Placeholders.enable(); } +function ToggleDateSettings(field){ + var isDateField = field["dateType"] == "datefield"; + var isDatePicker = field["dateType"] == "datepicker"; + var isDateDropDown = field["dateType"] == "datedropdown"; + jQuery('.placeholder_setting').toggle(isDatePicker); + jQuery('.default_value_setting').toggle(isDatePicker); + jQuery('.sub_label_placement_setting').toggle(isDateField); + jQuery('.sub_labels_setting').toggle(isDateField); + jQuery('.default_input_values_setting').toggle(isDateDropDown || isDateField); + jQuery('.input_placeholders_setting').toggle(isDateDropDown || isDateField); + +} + +function SetUpAdvancedNameField(){ + field = GetSelectedField(); + jQuery('.name_format_setting').hide(); + jQuery('.name_setting').show(); + jQuery('.name_prefix_choices_setting').show(); + var nameFields = GetCustomizeInputsUI(field); + jQuery('#field_name_fields_container').html(nameFields).show(); + + var prefixInput = GetInput(field, field.id + '.2'); + var prefixChoices = GetInputChoices(prefixInput); + jQuery('#field_prefix_choices').html(prefixChoices); + + ToggleNamePrefixUI(!prefixInput.isHidden); + + jQuery('.name_setting .custom_inputs_setting').on('click', '.input_active_icon', function(){ + var inputId = jQuery(this).data('input_id'); + if(inputId.toString().indexOf(".2") >=0){ + var isActive = this.src.indexOf("active1.png") >=0; + ToggleNamePrefixUI(isActive); + } + }); + + jQuery('.default_value_setting').hide(); + jQuery('.default_input_values_setting').show(); + jQuery('.input_placeholders_setting').show(); + + CreateDefaultValuesUI(field); + CreatePlaceholdersUI(field); + CreateInputNames(field); +} + +function GetCopyValuesFieldsOptions(selectedFieldId, currentField){ + var options = [], label, field, option, currentType = GetInputType(currentField), selected; + + for(var i = 0; i < form.fields.length;i++){ + field = form.fields[i]; + if(field.id != currentField.id && GetInputType(field) == currentType && !field.enableCopyValuesOption){ + label = GetLabel(field); + selected = selectedFieldId == field.id ? 'selected="selected"' : ''; + option = ''; + options.push(option); + } + } + + return options.join(''); + +} + +function ToggleNamePrefixUI(isActive){ + jQuery('.name_prefix_choices_setting').toggle(isActive); +} + function TogglePageBreakSettings(){ if(HasPageBreak()){ @@ -580,6 +1090,24 @@ function SetBasePrice(number){ jQuery(".field_selected .ginput_amount").val(price); } +function ChangeAddressType(){ + field = GetSelectedField(); + + if(field["type"] != "address") + return; + var addressType = jQuery("#field_address_type").val(); + var countryInput = GetInput(field, field.id + ".6"); + var country = jQuery("#field_address_country_" + addressType).val(); + if(country == ''){ + countryInput.isHidden = false + } else { + countryInput.isHidden = true; + } + + + SetAddressType(false); +} + function SetAddressType(isInit){ field = GetSelectedField(); @@ -590,30 +1118,45 @@ function SetAddressType(isInit){ jQuery(".gfield_address_type_container").hide(); var speed = isInit ? "" : "slow"; jQuery("#address_type_container_" + jQuery("#field_address_type").val()).show(speed); + CreatePlaceholdersUI(field); } function UpdateAddressFields(){ var addressType = jQuery("#field_address_type").val(); field = GetSelectedField(); + var address_fields_str = GetCustomizeInputsUI(field); + jQuery("#field_address_fields_container").html(address_fields_str); + //change zip label + var zipInput = GetInput(field, field.id + ".5"); var zip_label = jQuery("#field_address_zip_label_" + addressType).val(); - jQuery(".field_selected #input_" + field["id"] + "_5_label").html(zip_label); + jQuery("#field_custom_input_default_label_" + field.id + "_5").text(zip_label); + jQuery("#field_custom_input_label_" + field.id + "\\.5").attr("placeholder", zip_label); + if(!zipInput.customLabel){ + jQuery(".field_selected #input_" + field["id"] + "_5_label").html(zip_label); + } //change state label + var stateInput = GetInput(field, field.id + ".4"); var state_label = jQuery("#field_address_state_label_" + addressType).val(); - jQuery(".field_selected #input_" + field["id"] + "_4_label").html(state_label); + jQuery("#field_custom_input_default_label_" + field.id + "_4").text(state_label); + jQuery("#field_custom_input_label_" + field.id + "\\.4").attr("placeholder", state_label); + if(!stateInput.customLabel){ + jQuery(".field_selected #input_" + field["id"] + "_4_label").html(state_label); + } //hide country drop down if this address type applies to a specific country - var hide_country = jQuery("#field_address_country_" + addressType).val() != "" || jQuery("#field_address_hide_country_" + addressType).is(":checked"); + var countryInput = GetInput(field, field.id + ".6"); + var hide_country = jQuery("#field_address_country_" + addressType).val() != "" || countryInput.isHidden; + if(hide_country){ - //hides country drop down - jQuery(".field_selected #input_" + field["id"] + "_6_container").hide(); - } - else{ + jQuery('.field_custom_input_row_' + field.id + '_6').hide(); + } else { //selects default country and displays drop down jQuery(".field_selected #input_" + field["id"] + "_6").val(jQuery("#field_address_default_country_" + addressType).val()); jQuery(".field_selected #input_" + field["id"] + "_6_container").show(); + jQuery('.field_selected .field_custom_input_row_' + field.id + '_6').show(); } var has_state_drop_down = jQuery("#field_address_has_states_" + addressType).val() != ""; @@ -626,34 +1169,22 @@ function UpdateAddressFields(){ } else{ jQuery(".field_selected .state_dropdown").hide(); - jQuery(".field_selected .state_text").val("").show(); + jQuery(".field_selected .state_text").show(); } - - //hide/show address line 2 - if(jQuery("#field_address_hide_address2").is(":checked")) - jQuery(".field_selected #input_" + field["id"] + "_2_container").hide(); - else - jQuery(".field_selected #input_" + field["id"] + "_2_container").show(); - - //hide/show state field - if(jQuery("#field_address_hide_state_" + addressType).is(":checked")) - jQuery(".field_selected #input_" + field["id"] + "_4_container").hide(); - else - jQuery(".field_selected #input_" + field["id"] + "_4_container").show(); } function SetAddressProperties(){ + field = GetSelectedField(); + var addressType = jQuery("#field_address_type").val(); SetFieldProperty("addressType", addressType); - SetFieldProperty("hideAddress2", jQuery("#field_address_hide_address2").is(":checked")); - SetFieldProperty("hideState", jQuery("#field_address_hide_state_" + addressType).is(":checked")); SetFieldProperty("defaultState", jQuery("#field_address_default_state_" + addressType).val()); SetFieldProperty("defaultProvince",""); //for backwards compatibility //Only save the hide country property for address types that have that option (ones with no country) var country = jQuery("#field_address_country_" + addressType).val(); + if(country == ""){ - SetFieldProperty("hideCountry",jQuery("#field_address_hide_country_" + addressType).is(":checked")); country = jQuery("#field_address_default_country_" + addressType).val(); } @@ -662,6 +1193,101 @@ function SetAddressProperties(){ UpdateAddressFields(); } +function MaybeUpgradeNameField(field){ + + if(typeof field.nameFormat == 'undefined' || field.nameFormat == '' || field.nameFormat == 'normal' || (field.nameFormat == 'simple' && !has_entry(field.id))){ + field = UpgradeNameField(field, true, true, true); + } + + return field; +} + +function UpgradeNameField(field, prefixHiddex, middleHidden, suffixHidden){ + + field.nameFormat = 'advanced'; + field.inputs = MergeInputArrays(GetAdvancedNameFieldInputs(field, prefixHiddex, middleHidden, suffixHidden), field.inputs); + + RefreshSelectedFieldPreview(function(){ + SetUpAdvancedNameField(); + }); + + return field; +} + +function UpgradeDateField(field){ + if(field.type != 'date'){ + return field; + } + + if(typeof field.dateType != 'undefined' && field.dateType != 'datepicker' && !field.inputs){ + field.inputs = GetDateFieldInputs(field); + } + + return field; +} + +function UpgradeTimeField(field){ + if(field.type != 'time'){ + return field; + } + + if(!field.inputs){ + field.inputs = GetTimeFieldInputs(field); + } + + return field; +} + +function UpgradeEmailField(field){ + if(field.type != 'email'){ + return field; + } + + if(field.emailConfirmEnabled && !field.inputs){ + field.inputs = GetEmailFieldInputs(field); + field.inputs[0].placeholder = field.placeholder + } + + return field; +} + +function UpgradePasswordField(field){ + if(field.type != 'password'){ + return field; + } + + if(!field.inputs){ + field.inputs = GetPasswordFieldInputs(field); + field.inputs[0].placeholder = field.placeholder + } + + return field; +} + +function UpgradeAddressField(field){ + + if(field.hideCountry){ + var countryInput = GetInput(field, field.id + ".6"); + countryInput.isHidden = true; + } + delete field.hideCountry; + + if(field.hideAddress2){ + var address2Input = GetInput(field, field.id + ".2"); + address2Input.isHidden = true; + } + delete field.hideAddress2; + + if(field.hideState){ + var stateInput = GetInput(field, field.id + ".4"); + stateInput.isHidden = true; + } + delete field.hideState; + + return field; +} + + function TogglePasswordStrength(isInit){ var speed = isInit ? "" : "slow"; @@ -687,6 +1313,11 @@ function ToggleCategory(isInit){ } } +function SetCopyValuesOptionLabel(value){ + SetFieldProperty('copyValuesOptionLabel', value); + jQuery('.field_selected .copy_values_option_label').html(value); +} + function SetCustomFieldTemplate(){ var enabled = jQuery("#gfield_customfield_content_enabled").is(":checked"); SetFieldProperty("customFieldTemplate", enabled ? jQuery("#field_customfield_content_template").val() : null); @@ -782,6 +1413,28 @@ function ToggleChoiceValue(isInit){ } } +function ToggleInputChoiceValue($container, enabled){ + if(typeof enabled == 'undefined'){ + enabled = false; + } + var field = GetSelectedField(); + var inputId = $container.find('li').data('input_id'); + var input = GetInput(field, inputId); + input.enableChoiceValue = enabled; + //removing all classes + $container.removeClass("choice_with_value"); + + if(enabled){ + $container.addClass("choice_with_value"); + } +} + +function ToggleCopyValuesActivated(isActivated){ + jQuery('.field_selected .copy_values_activated').prop('checked', isActivated); + var field = GetSelectedField(); + jQuery('#input_'+ field.id).toggle(!isActivated); +} + function TogglePageButton(button_name, isInit){ var isText = jQuery("#" + button_name + "_button_text").is(":checked"); show_element = isText ? "#" + button_name + "_button_text_container" : "#" + button_name + "_button_image_container" @@ -1375,18 +2028,31 @@ function GetNextFieldId(){ return parseFloat(max) + 1; } -function EndAddField(field, fieldString){ +function EndAddField(field, fieldString, index){ gf_vars["currentlyAddingField"] = false; + jQuery('#gform_adding_field_spinner').remove(); + //sets up DOM for new field - jQuery("#gform_fields").append(fieldString); + if(typeof index != 'undefined'){ + form.fields.splice(index, 0, field); + if (index === 0) { + jQuery("#gform_fields").prepend(fieldString); + } else { + jQuery("#gform_fields").children().eq(index - 1).after(fieldString); + } + } else { + jQuery("#gform_fields").append(fieldString); + //creates new javascript field + form.fields.push(field); + } + var newFieldElement = jQuery("#field_" + field.id); newFieldElement.animate({ backgroundColor: '#FFFBCC' }, 'fast', function(){jQuery(this).animate({backgroundColor: '#FFF'}, 'fast', function(){jQuery(this).css('background-color', '');})}) newFieldElement.bind("click", function(){FieldClick(this);}); - //creates new javascript field - form.fields.push(field); + jQuery('#no-fields').hide(); //Unselects all fields @@ -1414,9 +2080,7 @@ function EndAddField(field, fieldString){ function StartChangeNameFormat(format){ field = GetSelectedField(); - field["nameFormat"] = format; - SetFieldProperty('nameFormat', format); - jQuery("#field_settings").slideUp(function(){StartChangeInputType(field["type"], field);}); + UpgradeNameField(field, false, true, false); } function StartChangeCaptchaType(captchaType){ @@ -1471,7 +2135,8 @@ function StartChangePostCategoryType(type){ } -function EndChangeInputType(fieldId, fieldType, fieldString){ +function EndChangeInputType(params){ + var fieldId = params.id, fieldType = params.type, fieldString = params.fieldString; jQuery("#field_" + fieldId).html(fieldString); @@ -1490,8 +2155,6 @@ function EndChangeInputType(fieldId, fieldType, fieldString){ InitializeFields(); LoadFieldSettings(); - - //UpdateDescriptionPlacement(); } function InitializeFields(){ @@ -1514,7 +2177,7 @@ function InitializeFields(){ event.stopPropagation(); }); - //UpdateLabelPlacement(true); + } function FieldClick(field){ @@ -1680,6 +2343,16 @@ function LoadFieldChoices(field){ gform.doAction('gform_load_field_choices', [field]); } +function LoadInputChoices($ul, input){ + + //loading ui + var $container = $ul.parent(); + $container.find('.field_input_choice_values_enabled').prop("checked", input.enableChoiceValue ? true : false); + ToggleInputChoiceValue($container, input.enableChoiceValue); + + jQuery($ul).html(GetInputChoices(input)); +} + function LoadBulkChoices(field){ LoadCustomChoices(); @@ -1716,7 +2389,7 @@ function LoadCustomChoices(){ jQuery(".choice_section_header, .bulk_custom_choice").remove(); if(!IsEmpty(gform_custom_choices)){ - var str = "
  • Custom Choices
  • "; + var str = "
  • " + gf_vars.customChoices + "
  • "; for(key in gform_custom_choices){ if(!gform_custom_choices.hasOwnProperty(key)) @@ -1724,7 +2397,7 @@ function LoadCustomChoices(){ str += "
  • " + key + "
  • "; } - str += "
  • Predefined Choices
  • "; + str += "
  • " + gf_vars.predefinedChoices + "
  • "; jQuery("#bulk_items").prepend(str); } } @@ -1822,12 +2495,9 @@ function IsEmpty(array){ function SetFieldChoice(inputType, index){ - text = jQuery("#" + inputType + "_choice_text_" + index).val(); - value = jQuery("#" + inputType + "_choice_value_" + index).val(); - price = jQuery("#" + inputType + "_choice_price_" + index).val(); - - var element = jQuery("#" + inputType + "_choice_selected_" + index); - isSelected = element.is(":checked"); + var text = jQuery("#" + inputType + "_choice_text_" + index).val(); + var value = jQuery("#" + inputType + "_choice_value_" + index).val(); + var price = jQuery("#" + inputType + "_choice_price_" + index).val(); field = GetSelectedField(); @@ -1841,7 +2511,7 @@ function SetFieldChoice(inputType, index){ price = ""; field.choices[index]["price"] = price; - jQuery("#" + inputType + "_choice_price_" + index).val(price); + //jQuery("#" + inputType + "_choice_price_" + index).val(price); } //set field selections @@ -1854,6 +2524,22 @@ function SetFieldChoice(inputType, index){ UpdateFieldChoices(GetInputType(field)); } +function SetInputChoice(inputId, index, value, text){ + var field = GetSelectedField(); + var input = GetInput(field, inputId); + inputId = inputId.toString().replace('.', '_'); + + input.choices[index].text = text; + input.choices[index].value = input.enableChoiceValue ? value : text; + + //set field selections + jQuery(".field-input-choice-" + inputId + ":radio, .field-input-choice-" + inputId + ":checkbox").each(function(index){ + input.choices[index].isSelected = this.checked; + }); + + UpdateInputChoices(input); +} + function UpdateFieldChoices(fieldType){ var choices = ''; var selector = ''; @@ -1941,6 +2627,19 @@ function UpdateFieldChoices(fieldType){ jQuery(".field_selected " + selector).html(choices); } +function UpdateInputChoices(input){ + var choices = ''; + + for(var i=0; i" + input.choices[i].text + ""; + } + var inputId = input.id.toString().replace('.', '_'); + + jQuery(".field_selected #input_" + inputId).html(choices); +} + function InsertFieldChoice(index){ field = GetSelectedField(); @@ -1955,6 +2654,18 @@ function InsertFieldChoice(index){ UpdateFieldChoices(GetInputType(field)); } +function InsertInputChoice($ul, inputId, index){ + var field = GetSelectedField(); + var input = GetInput(field, inputId); + + var new_choice = new Choice("", ""); + + input.choices.splice(index, 0, new_choice); + + LoadInputChoices($ul, input); + UpdateInputChoices(input); +} + function DeleteFieldChoice(index){ field = GetSelectedField(); @@ -1970,6 +2681,16 @@ function DeleteFieldChoice(index){ UpdateFieldChoices(GetInputType(field)); } +function DeleteInputChoice($ul, inputId, index){ + var field = GetSelectedField(); + var input = GetInput(field, inputId); + + input.choices.splice(index, 1); + + LoadInputChoices($ul, input); + UpdateInputChoices(input); +} + function MoveFieldChoice(fromIndex, toIndex){ field = GetSelectedField(); var choice = field.choices[fromIndex]; @@ -1984,6 +2705,21 @@ function MoveFieldChoice(fromIndex, toIndex){ UpdateFieldChoices(GetInputType(field)); } +function MoveInputChoice($ul, inputId, fromIndex, toIndex){ + var field = GetSelectedField(); + var input = GetInput(field, inputId); + var choice = input.choices[fromIndex]; + + //deleting from old position + input.choices.splice(fromIndex, 1); + + //inserting into new position + input.choices.splice(toIndex, 0, choice); + + LoadInputChoices($ul, input); + UpdateInputChoices(input); +} + function GetFieldType(fieldId){ return fieldId.substr(0, fieldId.lastIndexOf("_")); } @@ -2029,11 +2765,22 @@ function SetTimeFormat(format){ } function LoadTimeInputs(){ + var field = GetSelectedField(); + if(field.type != 'time'){ + return; + } var format = jQuery("#field_time_format").val(); - if(format == "24") + + + if(format == "24"){ + jQuery('#input_default_value_row_input_' + field.id +'_3').hide(); jQuery(".field_selected .gfield_time_ampm").hide(); - else + } else { + jQuery('#input_default_value_row_input_' + field.id +'_3').show(); jQuery(".field_selected .gfield_time_ampm").show(); + } + jQuery('#input_placeholder_row_input_' + field.id +'_3').hide(); // no support for placeholder + jQuery('.field_custom_input_row_' + field.id +'_3').hide(); } function SetDateFormat(format){ @@ -2135,7 +2882,17 @@ function SetDateInputType(type){ if(GetInputType(field) != "date") return; - SetFieldProperty('dateType', type); + field.dateType = type; + field.inputs = GetDateFieldInputs(field); + + CreateDefaultValuesUI(field); + CreatePlaceholdersUI(field); + CreateInputLabelsUI(field); + ToggleDateSettings(field); + + ResetDefaultInputValues(field); + ResetInputPlaceholders(field); + ToggleDateCalendar(); LoadDateInputs(); } @@ -2179,9 +2936,6 @@ function SetFeaturedImage() { } } - - - function SetFieldProperty(name, value){ if(value == undefined) value = ""; @@ -2202,7 +2956,127 @@ function SetInputName(value, inputId){ for(var i=0; i div > input, .field_selected > div > textarea").val(defaultValue); + + jQuery(".field_selected > div > input:visible, .field_selected > div > textarea:visible, .field_selected > div > select:visible").val(defaultValue); + SetFieldProperty('defaultValue', defaultValue); } +function SetFieldPlaceholder(placeholder){ + + jQuery(".field_selected > div > input:visible, .field_selected > div > textarea:visible, .field_selected > div > select:visible").each(function(){ + var type = this.nodeName; + var $this = jQuery(this); + if(type == 'INPUT' || type == 'TEXTAREA'){ + jQuery(this).prop("placeholder", placeholder); + } else if (type == 'SELECT'){ + var $option = $this.find('option[value=""]'); + if($option.length>0){ + if(placeholder.length > 0){ + $option.text(placeholder); + } else { + $option.remove(); + } + + } else { + $this.prepend(''); + $this.val(''); + } + } + }); + + SetFieldProperty('placeholder', placeholder); +} + function SetFieldDescription(description){ if(description == undefined) description = ""; @@ -2309,7 +3245,18 @@ function SetPasswordStrength(isEnabled){ SetFieldProperty('passwordStrengthEnabled', isEnabled); } +function ToggleEmailSettings(field){ + var isConfirmEnabled = typeof field.emailConfirmEnabled != 'undefined' && field.emailConfirmEnabled == true; + jQuery('.placeholder_setting').toggle(!isConfirmEnabled); + jQuery('.default_value_setting').toggle(!isConfirmEnabled); + jQuery('.sub_label_placement_setting').toggle(isConfirmEnabled); + jQuery('.sub_labels_setting').toggle(isConfirmEnabled); + jQuery('.default_input_values_setting').toggle(isConfirmEnabled); + jQuery('.input_placeholders_setting').toggle(isConfirmEnabled); +} + function SetEmailConfirmation(isEnabled){ + var field = GetSelectedField(); if(isEnabled){ jQuery(".field_selected .ginput_single_email").hide(); jQuery(".field_selected .ginput_confirm_email").show(); @@ -2319,8 +3266,16 @@ function SetEmailConfirmation(isEnabled){ jQuery(".field_selected .ginput_single_email").show(); } - SetFieldProperty('emailConfirmEnabled', isEnabled); - //UpdateDescriptionPlacement(); + field['emailConfirmEnabled'] = isEnabled; + field.inputs = GetEmailFieldInputs(field); + CreateDefaultValuesUI(field); + CreatePlaceholdersUI(field); + CreateCustomizeInputsUI(field); + CreateInputLabelsUI(field); + + + ToggleEmailSettings(field); + } @@ -2508,6 +3463,29 @@ function SetFieldChoices(){ } } +function SetInputChoices($ul){ + var field = GetSelectedField(), $this, value, text, inputId; + $ul.find('li').each(function(i){ + $this = jQuery(this); + inputId = $this.data('input_id'); + value = $this.find('.field-choice-value').val(); + text = $this.find('.field-choice-text').val(); + SetInputChoice(inputId, i, value, text); + }); +} + +function MergeInputArrays(inputs1, inputs2){ + var inputA, inputB; + for(var i=0; i"); + select.push(""; return str; } - function getFilterValues (filter) { + function getFilterValues (filter, selectedOperator) { var i, val, text, str, options = ""; - str = ""; - if (filter) { - if (filter.values) { - for (i = 0; i < filter.values.length; i++) { - val = filter.values[i].value; - text = filter.values[i].text; - options += "".format(val, text); - } - str = "".format(options); + if ( filter && filter.values && selectedOperator != 'contains' ) { + for (i = 0; i < filter.values.length; i++) { + val = filter.values[i].value; + text = filter.values[i].text; + options += ''.format(val, text); } + str = "".format(options); + } else { + str = ""; } return str; @@ -166,8 +203,8 @@ if(!allowMultiple) return str; - str += "{1}".format(imagesURL, gf_vars.addFieldFilter, gf_vars.addFieldFilter); - str += "" + gf_vars.removeFieldFilter + ""; + str += "{1}".format(imagesURL, gf_vars.addFieldFilter, gf_vars.addFieldFilter); + str += "" + gf_vars.removeFieldFilter + ""; return str; } @@ -201,7 +238,7 @@ function displayNoFiltersMessage () { var str = ""; - str += "
    " + gf_vars.addFieldFilter; + str += "
    " + gf_vars.addFieldFilter; str += "{1}
    ".format(imagesURL, gf_vars.addFieldFilter, gf_vars.addFieldFilter); $("#gform-field-filters").html(str); if(isResizable){ @@ -239,7 +276,7 @@ $filterRow.after(getFilterMode()); } - gfFilterUI.addNewFieldFilter = function (el) { + function addNewFieldFilter (el) { var $el, $filterRow; $el = $(el); if($el.is("img")) @@ -248,14 +285,17 @@ $filterRow = $el; $filterRow.after(getNewFilterRow()); - $filterRow.next("div").find(".gform-filter-field").change(); - if ($(".gform-field-filter").length == 1) + $filterRow.next("div") + .find(".gform-filter-field").change() + .find(".gform-filter-operator").change(); + if ($(".gform-field-filter").length == 1){ addFilterMode($filterRow); + } maybeMakeResizable(); } - gfFilterUI.removeFieldFilter = function (img) { + function removeFieldFilter (img) { $(img).parent().remove(); if ($(".gform-field-filter").length == 0) displayNoFiltersMessage(); diff --git a/js/gravityforms.js b/js/gravityforms.js index 8b7c587..006e0f1 100644 --- a/js/gravityforms.js +++ b/js/gravityforms.js @@ -4,8 +4,8 @@ if( typeof jQuery.fn.prop === 'undefined' ) { jQuery.fn.prop = jQuery.fn.attr; } -//Formatting free form currency fields to currency jQuery(document).ready(function(){ + //Formatting free form currency fields to currency jQuery(document).bind('gform_post_render', gformBindFormatPricingFields); }); @@ -19,7 +19,6 @@ function gformBindFormatPricingFields(){ }); } - //------------------------------------------------ //---------- CURRENCY ---------------------------- //------------------------------------------------ @@ -43,15 +42,22 @@ function Currency(currency){ number = number + ""; negative = ""; if(number[0] == "-"){ - negative = "-"; + number = parseFloat(number.substr(1)); + negative = '-'; } money = this.numberFormat(number, this.currency["decimals"], this.currency["decimal_separator"], this.currency["thousand_separator"]); + if ( money == '0.00' ){ + negative = ''; + } + var symbol_left = this.currency["symbol_left"] ? this.currency["symbol_left"] + this.currency["symbol_padding"] : ""; var symbol_right = this.currency["symbol_right"] ? this.currency["symbol_padding"] + this.currency["symbol_right"] : ""; - money = negative + this.htmlDecode(symbol_left) + money + this.htmlDecode(symbol_right); - return money; + + money = negative + this.htmlDecode(symbol_left) + money + this.htmlDecode(symbol_right); + + return money; }; this.numberFormat = function(number, decimals, dec_point, thousands_sep, padded){ @@ -276,9 +282,17 @@ function gformCalculateTotalPrice(formId){ //updating total var totalElement = jQuery(".ginput_total_" + formId); - if(totalElement.length > 0){ - totalElement.next().val(price); - totalElement.html(gformFormatMoney(price)); + if( totalElement.length > 0 ) { + + var currentTotal = totalElement.next().val(); + + if( currentTotal == price ) { + return; + } + + totalElement.next().val( price ).change(); + totalElement.html( gformFormatMoney( price ) ); + } } @@ -324,6 +338,7 @@ function gformCalculateProductPrice(form_id, productFieldId){ var label = gformGetOptionLabel(choice_element, choice_element.val(), selected_price, form_id, field_id); choice_element.html(label); }); + dropdown_field.trigger('chosen:updated'); }); @@ -331,7 +346,7 @@ function gformCalculateProductPrice(form_id, productFieldId){ jQuery(".gfield_option" + suffix).find(".gfield_checkbox").find("input").each(function(){ var checkbox_item = jQuery(this); var id = checkbox_item.attr("id"); - var field_id = id.split("_")[2]; + var field_id = id.split("_")[3]; var label_id = id.replace("choice_", "#label_"); var label_element = jQuery(label_id); var label = gformGetOptionLabel(label_element, checkbox_item.val(), 0, form_id, field_id); @@ -344,7 +359,7 @@ function gformCalculateProductPrice(form_id, productFieldId){ var selected_price = 0; var radio_field = jQuery(this); var id = radio_field.attr("id"); - var fieldId = id.split("_")[2]; + var fieldId = id.split("_")[3]; var selected_value = radio_field.find("input:checked").val(); if(selected_value) @@ -628,7 +643,12 @@ function gformAddListItem(element, max){ var tr = jQuery(element).closest('tr'); var clone = tr.clone(); - clone.find("input, select").val("").attr("tabindex", clone.find('input:last').attr("tabindex")); + var tabindex = clone.find(":input:last").attr("tabindex"); + + clone.find("input, select").attr("tabindex", tabindex).not(":checkbox, :radio").val(""); + clone.find(":checkbox, :radio").prop("checked", false); + clone = gform.applyFilters( 'gform_list_item_pre_add', clone ); + tr.after(clone); gformToggleIcons(tr.parent(), max); gformAdjustClasses(tr.parent()); @@ -737,9 +757,14 @@ function gformToggleCreditCard(){ function gformInitChosenFields(fieldList, noResultsText){ return jQuery(fieldList).each(function(){ - var element = jQuery(this); + var element = jQuery( this ); - //only initialize once + // RTL support + if( jQuery( 'html' ).attr( 'dir' ) == 'rtl' ) { + element.addClass( 'chosen-rtl chzn-rtl' ); + } + + // only initialize once if( element.is(":visible") && element.siblings(".chosen-container").length == 0 ){ var options = gform.applyFilters( 'gform_chosen_options', { no_results_text: noResultsText }, element ); element.chosen( options ); @@ -901,6 +926,9 @@ var GFCalc = function(formId, formulaFields){ }); } + // allow users to add custom methods for triggering calculations + gform.doAction( 'gform_post_calculation_events', matches[i], formulaField, formId, calcObj ); + } } @@ -963,6 +991,8 @@ var GFCalc = function(formId, formulaFields){ var decimalSeparator = gformGetDecimalSeparator(numberFormat); + // allow users to modify value with their own function + value = gform.applyFilters( 'gform_merge_tag_value_pre_calculation', value, matches[i], isVisible, formulaField, formId ); value = gformCleanNumber( value, '', '', decimalSeparator ); if( ! value ) @@ -1108,7 +1138,7 @@ var gform = { $(document).ready(function () { if((typeof adminpage !== 'undefined' && adminpage === 'toplevel_page_gf_edit_forms')|| typeof plupload == 'undefined'){ $(".gform_button_select_files").prop("disabled", true); - } else if (typeof adminpage !== 'undefined'){ + } else if (typeof adminpage !== 'undefined' && adminpage === 'forms_page_gf_entries' ){ $(".gform_fileupload_multifile").each(function(){ setup(this); }); @@ -1128,11 +1158,12 @@ var gform = { return false; } }); - if(pendingUploads){ - alert(strings.currently_uploading); - window["gf_submitting_" + formID] = false; - return false; - } + if(pendingUploads){ + alert(strings.currently_uploading); + window["gf_submitting_" + formID] = false; + $('#gform_ajax_spinner_' + formID).remove(); + return false; + } }); } @@ -1217,6 +1248,7 @@ var gform = { + ' (' + size + ') ' + '' + strings.cancel + '' + '
    '; + $('#' + up.settings.filelist).prepend(status); totalCount++; @@ -1238,11 +1270,13 @@ var gform = { $uid.val(uniqueID); } + if(max > 0 && totalCount >= max){ - addMessage(up.settings.gf_vars.message_id, strings.max_reached) gfMultiFileUploader.toggleDisabled(up.settings, true); + addMessage(up.settings.gf_vars.message_id, strings.max_reached) } + up.settings.multipart_params.gform_unique_id = uniqueID; up.start(); @@ -1265,9 +1299,9 @@ var gform = { (err.file ? ", File: " + err.file.name : "") + ""; - addMessage(up.settings.gf_vars.message_id, m); + addMessage(up.settings.gf_vars.message_id, m); } - $('#' + err.file.id ).html(''); + $('#' + err.file.id ).html(''); up.refresh(); // Reposition Flash }); @@ -1275,9 +1309,9 @@ var gform = { uploader.bind('FileUploaded', function(up, file, result) { var response = $.secureEvalJSON(result.response); if(response.status == "error"){ - addMessage(up.settings.gf_vars.message_id, file.name + " - " + response.error.message); - $('#' + file.id ).html(''); - return; + addMessage(up.settings.gf_vars.message_id, file.name + " - " + response.error.message); + $('#' + file.id ).html(''); + return; } var html = '' + file.name + ''; @@ -1292,7 +1326,9 @@ var gform = { + "' /> " + html; - $('#' + file.id ).html(html); + html = gform.applyFilters( 'gform_file_upload_markup', html, file, up, strings, imagesUrl ); + + $( '#' + file.id ).html( html ); var fieldID = up.settings.multipart_params["field_id"]; @@ -1300,10 +1336,12 @@ var gform = { if(response.status && response.status == 'ok'){ addFile(fieldID, response.data); } else { - addMessage(up.settings.gf_vars.message_id, strings.unknown_error); + addMessage(up.settings.gf_vars.message_id, strings.unknown_error + ': ' + file.name); } } + + }); @@ -1373,7 +1411,6 @@ var gform = { }(window.gfMultiFileUploader = window.gfMultiFileUploader || {}, jQuery)); - //---------------------------------------- //------ GENERAL FUNCTIONS ------- //---------------------------------------- diff --git a/js/gravityforms.min.js b/js/gravityforms.min.js new file mode 100644 index 0000000..4484743 --- /dev/null +++ b/js/gravityforms.min.js @@ -0,0 +1 @@ +function gformBindFormatPricingFields(){jQuery(".ginput_amount, .ginput_donation_amount").bind("change",function(){gformFormatPricingField(this)}),jQuery(".ginput_amount, .ginput_donation_amount").each(function(){gformFormatPricingField(this)})}function Currency(a){this.currency=a,this.toNumber=function(a){return this.isNumeric(a)?parseFloat(a):gformCleanNumber(a,this.currency.symbol_right,this.currency.symbol_left,this.currency.decimal_separator)},this.toMoney=function(a){if(this.isNumeric(a)||(a=this.toNumber(a)),a===!1)return"";a+="",negative="","-"==a[0]&&(a=parseFloat(a.substr(1)),negative="-"),money=this.numberFormat(a,this.currency.decimals,this.currency.decimal_separator,this.currency.thousand_separator),"0.00"==money&&(negative="");var b=this.currency.symbol_left?this.currency.symbol_left+this.currency.symbol_padding:"",c=this.currency.symbol_right?this.currency.symbol_padding+this.currency.symbol_right:"";return money=negative+this.htmlDecode(b)+money+this.htmlDecode(c),money},this.numberFormat=function(a,b,c,d,e){var e="undefined"==typeof e;a=(a+"").replace(",","").replace(" ","");var f=isFinite(+a)?+a:0,g=isFinite(+b)?Math.abs(b):0,h="undefined"==typeof d?",":d,i="undefined"==typeof c?".":c,j="",k=function(a,b){var c=Math.pow(10,b);return""+Math.round(a*c)/c};return j="0"==b?(""+Math.round(f)).split("."):-1==b?(""+f).split("."):k(f,g).split("."),j[0].length>3&&(j[0]=j[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,h)),e&&(j[1]||"").length=-32768&&65535>=b?d.replace(c,String.fromCharCode(b)):d.replace(c,"");return d}}function gformCleanNumber(a,b,c,d){a+=" ",a=a.replace(/&.*?;/,"",a),a=a.replace(b,""),a=a.replace(c,"");for(var e="",f=!1,g=0;g=0&&parseInt(h)<=9||h==d?e+=h:"-"==h&&(f=!0)}for(var i="",g=0;g="0"&&"9">=j?i+=j:j==d&&(i+=".")}return f&&(i="-"+i),gformIsNumber(i)?parseFloat(i):!1}function gformGetDecimalSeparator(a){var b;switch(a){case"currency":var c=new Currency(gf_global.gf_currency_config);b=c.currency.decimal_separator;break;case"decimal_comma":b=",";break;default:b="."}return b}function gformIsNumber(a){return!isNaN(parseFloat(a))&&isFinite(a)}function gformIsNumeric(a,b){switch(b){case"decimal_dot":var c=new RegExp("^(-?[0-9]{1,3}(?:,?[0-9]{3})*(?:.[0-9]+)?)$");return c.test(a);case"decimal_comma":var c=new RegExp("^(-?[0-9]{1,3}(?:.?[0-9]{3})*(?:,[0-9]+)?)$");return c.test(a)}return!1}function gformDeleteUploadedFile(a,b,c){var d=jQuery("#field_"+a+"_"+b),e=jQuery(c).parent().index();d.find(".ginput_preview").eq(e).remove(),d.find('input[type="file"]').removeClass("gform_hidden"),d.find(".ginput_post_image_file").show(),d.find('input[type="text"]').val("");var f=jQuery.secureEvalJSON(jQuery("#gform_uploaded_files_"+a).val());if(f){var g="input_"+b,h=d.find("#gform_multifile_upload_"+a+"_"+b);if(h.length>0){f[g].splice(e,1);var i=h.data("settings"),j=i.gf_vars.max_files;jQuery("#"+i.gf_vars.message_id).html(""),f[g].length0){var f=e.next().val();if(f==b)return;e.next().val(b).change(),e.html(gformFormatMoney(b))}}}function gformGetShippingPrice(a){var b=jQuery(".gfield_shipping_"+a+' input[type="hidden"], .gfield_shipping_'+a+" select, .gfield_shipping_"+a+" input:checked"),c=0;return 1!=b.length||gformIsHidden(b)||(c=b.attr("type")&&"hidden"==b.attr("type").toLowerCase()?b.val():gformGetPrice(b.val())),gformToNumber(c)}function gformGetFieldId(a){var b=jQuery(a).attr("id"),c=b.split("_");if(c.length<=0)return 0;var d=c[c.length-1];return d}function gformCalculateProductPrice(a,b){var c=gformGetBasePrice(a,b),d="_"+a+"_"+b;jQuery(".gfield_option"+d+", .gfield_shipping_"+a).find("select").each(function(){var b=jQuery(this),c=gformGetPrice(b.val()),d=b.attr("id").split("_")[2];b.children("option").each(function(){var b=jQuery(this),e=gformGetOptionLabel(b,b.val(),c,a,d);b.html(e)}),b.trigger("chosen:updated")}),jQuery(".gfield_option"+d).find(".gfield_checkbox").find("input").each(function(){var b=jQuery(this),c=b.attr("id"),d=c.split("_")[3],e=c.replace("choice_","#label_"),f=jQuery(e),g=gformGetOptionLabel(f,b.val(),0,a,d);f.html(g)}),jQuery(".gfield_option"+d+", .gfield_shipping_"+a).find(".gfield_radio").each(function(){var b=0,c=jQuery(this),d=c.attr("id"),e=d.split("_")[3],f=c.find("input:checked").val();f&&(b=gformGetPrice(f)),jQuery(this).find("input").each(function(){var c=jQuery(this),d=c.attr("id").replace("choice_","#label_"),f=jQuery(d),g=gformGetOptionLabel(f,c.val(),b,a,e);f.html(g)})}),jQuery(".gfield_option"+d).find("input:checked, select").each(function(){gformIsHidden(jQuery(this))||(c+=gformGetPrice(jQuery(this).val()))});var e=gformGetProductQuantity(a,b);return e>0&&(_anyProductSelected=!0),c*=e,c=Math.round(100*c)/100}function gformGetProductQuantity(a,b){var c,d=jQuery("#ginput_quantity_"+a+"_"+b);return d.length>0?c=gformIsNumber(d.val())?d.val():0:(quantityElement=jQuery(".gfield_quantity_"+a+"_"+b),c=1,quantityElement.find("select").length>0?c=quantityElement.find("select").val():quantityElement.find("input").length>0&&(c=quantityElement.find("input").val()),gformIsNumber(c)||(c=0)),c=parseFloat(c)}function gformGetBasePrice(a,b){var c="_"+a+"_"+b,d=0,e=jQuery("#ginput_base_price"+c+", .gfield_donation"+c+' input[type="text"], .gfield_product'+c+" .ginput_amount");if(e.length>0)d=e.val(),gformIsHidden(e)&&(d=0);else{e=jQuery(".gfield_product"+c+" select, .gfield_product"+c+" input:checked, .gfield_donation"+c+" select, .gfield_donation"+c+" input:checked");var f=e.val();f&&(f=f.split("|"),d=f.length>1?f[1]:0),gformIsHidden(e)&&(d=0)}var g=new Currency(gf_global.gf_currency_config);return d=g.toNumber(d),d===!1?0:d}function gformFormatMoney(a){if(!gf_global.gf_currency_config)return a;var b=new Currency(gf_global.gf_currency_config);return b.toMoney(a)}function gformFormatPricingField(a){if(gf_global.gf_currency_config){var b=new Currency(gf_global.gf_currency_config),c=b.toMoney(jQuery(a).val());jQuery(a).val(c)}}function gformToNumber(a){var b=new Currency(gf_global.gf_currency_config);return b.toNumber(a)}function gformGetPriceDifference(a,b){var c=parseFloat(b)-parseFloat(a);return price=gformFormatMoney(c),c>0&&(price="+"+price),price}function gformGetOptionLabel(a,b,c,d,e){a=jQuery(a);var f=gformGetPrice(b),g=a.attr("price"),h=a.html().replace(//i,"").replace(g,""),i=gformGetPriceDifference(c,f);i=0==gformToNumber(i)?"":" "+i,a.attr("price",i);var j="option"==a[0].tagName.toLowerCase()?" "+i:""+i+"",k=h+j;return window.gform_format_option_label&&(k=gform_format_option_label(k,h,j,c,f,d,e)),k}function gformGetProductIds(a,b){for(var c=jQuery(b).hasClass(a)?jQuery(b).attr("class").split(" "):jQuery(b).parents("."+a).attr("class").split(" "),d=0;d1&&c.toNumber(b[1])!==!1?c.toNumber(b[1]):0}function gformRegisterPriceField(a){_gformPriceFields[a.formId]||(_gformPriceFields[a.formId]=new Array);for(var b=0;b<_gformPriceFields[a.formId].length;b++)if(_gformPriceFields[a.formId][b]==a.productFieldId)return;_gformPriceFields[a.formId].push(a.productFieldId)}function gformInitPriceFields(){jQuery(".gfield_price").each(function(){var a=gformGetProductIds("gfield_price",this);gformRegisterPriceField(a),jQuery(this).find('input[type="text"], input[type="number"], select').change(function(){var a=gformGetProductIds("gfield_price",this);0==a.formId&&(a=gformGetProductIds("gfield_shipping",this)),jQuery(document).trigger("gform_price_change",[a,this]),gformCalculateTotalPrice(a.formId)}),jQuery(this).find('input[type="radio"], input[type="checkbox"]').click(function(){var a=gformGetProductIds("gfield_price",this);0==a.formId&&(a=gformGetProductIds("gfield_shipping",this)),jQuery(document).trigger("gform_price_change",[a,this]),gformCalculateTotalPrice(a.formId)})});for(formId in _gformPriceFields)_gformPriceFields.hasOwnProperty(formId)&&gformCalculateTotalPrice(formId)}function gformShowPasswordStrength(a){var b=jQuery("#"+a).val(),c=jQuery("#"+a+"_2").val(),d=gformPasswordStrength(b,c),e=window.gf_text["password_"+d];jQuery("#"+a+"_strength").val(d),jQuery("#"+a+"_strength_indicator").removeClass("blank mismatch short good bad strong").addClass(d).html(e)}function gformPasswordStrength(a,b){var c,d,e=0;return a.length<=0?"blank":a!=b&&b.length>0?"mismatch":a.length<4?"short":(a.match(/[0-9]/)&&(e+=10),a.match(/[a-z]/)&&(e+=26),a.match(/[A-Z]/)&&(e+=26),a.match(/[^a-zA-Z0-9]/)&&(e+=31),c=Math.log(Math.pow(e,a.length)),d=c/Math.LN2,40>d?"bad":56>d?"good":"strong")}function gformAddListItem(a,b){if(!jQuery(a).hasClass("gfield_icon_disabled")){var c=jQuery(a).closest("tr"),d=c.clone(),e=d.find(":input:last").attr("tabindex");d.find("input, select").attr("tabindex",e).not(":checkbox, :radio").val(""),d.find(":checkbox, :radio").prop("checked",!1),d=gform.applyFilters("gform_list_item_pre_add",d),c.after(d),gformToggleIcons(c.parent(),b),gformAdjustClasses(c.parent())}}function gformDeleteListItem(a,b){var c=jQuery(a).parent().parent(),d=c.parent();c.remove(),gformToggleIcons(d,b),gformAdjustClasses(d)}function gformAdjustClasses(a){for(var b=a.children(),c=0;c0&&c>=b)gfield_original_title=a.find(".add_list_item:first").attr("title"),a.find(".add_list_item").addClass("gfield_icon_disabled").attr("title","");else{var d=a.find(".add_list_item");d.removeClass("gfield_icon_disabled"),gfield_original_title&&d.attr("title",gfield_original_title)}}function gformMatchCard(a){var b=gformFindCardType(jQuery("#"+a).val()),c=jQuery("#"+a).parents(".gfield").find(".gform_card_icon_container");b?(jQuery(c).find(".gform_card_icon").removeClass("gform_card_icon_selected").addClass("gform_card_icon_inactive"),jQuery(c).find(".gform_card_icon_"+b).removeClass("gform_card_icon_inactive").addClass("gform_card_icon_selected")):jQuery(c).find(".gform_card_icon").removeClass("gform_card_icon_selected gform_card_icon_inactive")}function gformFindCardType(a){if(a.length<4)return!1;var b=window.gf_cc_rules,c=new Array;for(type in b)if(b.hasOwnProperty(type))for(i in b[type])if(b[type].hasOwnProperty(i)&&0===b[type][i].indexOf(a.substring(0,b[type][i].length))){c[c.length]=type;break}return 1==c.length?c[0].toLowerCase():!1}function gformToggleCreditCard(){jQuery("#gform_payment_method_creditcard").is(":checked")?jQuery(".gform_card_fields_container").slideDown():jQuery(".gform_card_fields_container").slideUp()}function gformInitChosenFields(a,b){return jQuery(a).each(function(){var a=jQuery(this);if("rtl"==jQuery("html").attr("dir")&&a.addClass("chosen-rtl chzn-rtl"),a.is(":visible")&&0==a.siblings(".chosen-container").length){var c=gform.applyFilters("gform_chosen_options",{no_results_text:b},a);a.chosen(c)}})}function gformInitCurrencyFormatFields(a){jQuery(a).each(function(){var a=jQuery(this);a.val(gformFormatMoney(jQuery(this).val()))}).change(function(){jQuery(this).val(gformFormatMoney(jQuery(this).val()))})}function gformFormatNumber(a,b,c,d){if("undefined"==typeof c)if(window.gf_global){var e=new Currency(gf_global.gf_currency_config);c=e.currency.decimal_separator}else c=".";if("undefined"==typeof d)if(window.gf_global){var e=new Currency(gf_global.gf_currency_config);d=e.currency.thousand_separator}else d=",";var e=new Currency;return e.numberFormat(a,b,c,d,!1)}function gformToNumber(a){var b=new Currency(gf_global.gf_currency_config);return b.toNumber(a)}function getMatchGroups(a,b){for(var c=new Array;b.test(a);){var d=c.length;c[d]=b.exec(a),a=a.replace(""+c[d][0],"")}return c}function gformInitSpinner(a,b){"undefined"!=typeof b&&b||(b=gform.applyFilters("gform_spinner_url",gf_global.spinnerUrl,a)),jQuery("#gform_"+a).submit(function(){0==jQuery("#gform_ajax_spinner_"+a).length&&jQuery("#gform_submit_button_"+a+", #gform_wrapper_"+a+" .gform_next_button").after('')})}"undefined"==typeof jQuery.fn.prop&&(jQuery.fn.prop=jQuery.fn.attr),jQuery(document).ready(function(){jQuery(document).bind("gform_post_render",gformBindFormatPricingFields)});var _gformPriceFields=new Array,_anyProductSelected,gfield_original_title="",GFCalc=function(formId,formulaFields){this.patt=/{[^{]*?:(\d+(\.\d+)?)(:(.*?))?}/i,this.exprPatt=/^[0-9 -/*\(\)]+$/i,this.isCalculating={},this.init=function(a,b){var c=this;jQuery(document).bind("gform_post_conditional_logic",function(){for(var d=0;d1||"checkbox"==h.prop("type"))&&(h=h.filter(":checked"));var j=window.gf_check_field_rule?"show"==gf_check_field_rule(a,f,!0,""):!0;if(h.length>0&&j){var k=h.val();k=k.split("|"),g=k.length>1?k[1]:h.val()}var l=gf_global.number_formats[a][f];l||(l=gf_global.number_formats[a][c.field_id]);var m=gformGetDecimalSeparator(l);g=gform.applyFilters("gform_merge_tag_value_pre_calculation",g,d[i],j,c,a),g=gformCleanNumber(g,"","",m),g||(g=0),b=b.replace(d[i][0],g)}return b},this.init(formId,formulaFields)},gform={hooks:{action:{},filter:{}},addAction:function(a,b,c,d){gform.addHook("action",a,b,c,d)},addFilter:function(a,b,c,d){gform.addHook("filter",a,b,c,d)},doAction:function(a){gform.doHook("action",a,arguments)},applyFilters:function(a){return gform.doHook("filter",a,arguments)},removeAction:function(a,b){gform.removeHook("action",a,b)},removeFilter:function(a,b,c){gform.removeHook("filter",a,b,c)},addHook:function(a,b,c,d,e){void 0==gform.hooks[a][b]&&(gform.hooks[a][b]=[]);var f=gform.hooks[a][b];void 0==e&&(e=b+"_"+f.length),gform.hooks[a][b].push({tag:e,callable:c,priority:d})},doHook:function(a,b,c){if(c=Array.prototype.slice.call(c,1),void 0!=gform.hooks[a][b]){var d,e=gform.hooks[a][b];e.sort(function(a,b){return a.priority-b.priority});for(var f=0;f=0;f--)void 0!=d&&d!=e[f].tag||void 0!=c&&c!=e[f].priority||e.splice(f,1)}};!function(a,b){function c(c){function g(a,c){b("#"+a).prepend("
  • "+c+"
  • ")}function h(){var a,c="#gform_uploaded_files_"+q,d=b(c);return a=d.val(),a=""===a?{}:b.parseJSON(a)}function i(a){var b=h(),c=m(a);return"undefined"==typeof b[c]&&(b[c]=[]),b[c]}function j(a){var b=i(a);return b.length}function k(a,b){var c=i(a);c.unshift(b),l(a,c)}function l(a,c){var d=h(),e=b("#gform_uploaded_files_"+q),f=m(a);d[f]=c,e.val(b.toJSON(d))}function m(a){return"input_"+a}function n(a){a.preventDefault()}var o=b(c).data("settings"),p=new plupload.Uploader(o);q=p.settings.multipart_params.form_id,a.uploaders[o.container]=p;var q,r;p.bind("Init",function(c){c.features.dragdrop||b(".gform_drop_instructions").hide();var d=c.settings.multipart_params.field_id,e=parseInt(c.settings.gf_vars.max_files),f=j(d);e>0&&f>=e&&a.toggleDisabled(c.settings,!0)}),a.toggleDisabled=function(a,c){var d=b("string"==typeof a.browse_button?"#"+a.browse_button:a.browse_button);d.prop("disabled",c)},p.init(),p.bind("FilesAdded",function(c,f){var h,i=parseInt(c.settings.gf_vars.max_files),k=c.settings.multipart_params.field_id,l=j(k),m=c.settings.gf_vars.disallowed_extensions;if(i>0&&l>=i)return void b.each(f,function(a,b){c.removeFile(b)});b.each(f,function(a,d){if(h=d.name.split(".").pop(),b.inArray(h,m)>-1)return g(c.settings.gf_vars.message_id,d.name+" - "+e.illegal_extension),void c.removeFile(d);if(d.status==plupload.FAILED||i>0&&l>=i)return void c.removeFile(d);var f="undefined"!=typeof d.size?plupload.formatSize(d.size):e.in_progress,j='
    '+d.name+" ("+f+') "+e.cancel+"
    ";b("#"+c.settings.filelist).prepend(j),l++}),c.refresh();var n="form#gform_"+q,o="input:hidden[name='gform_unique_id']",p=n+" "+o,s=b(p);0==s.length&&(s=b(o)),r=s.val(),""===r&&(r=d(),s.val(r)),i>0&&l>=i&&(a.toggleDisabled(c.settings,!0),g(c.settings.gf_vars.message_id,e.max_reached)),c.settings.multipart_params.gform_unique_id=r,c.start()}),p.bind("UploadProgress",function(a,c){var d=c.percent+"%";b("#"+c.id+" b").html(d)}),p.bind("Error",function(a,c){if(c.code===plupload.FILE_EXTENSION_ERROR){var d="undefined"!=typeof a.settings.filters.mime_types?a.settings.filters.mime_types[0].extensions:a.settings.filters[0].extensions;g(a.settings.gf_vars.message_id,c.file.name+" - "+e.invalid_file_extension+" "+d)}else if(c.code===plupload.FILE_SIZE_ERROR)g(a.settings.gf_vars.message_id,c.file.name+" - "+e.file_exceeds_limit);else{var f="
  • Error: "+c.code+", Message: "+c.message+(c.file?", File: "+c.file.name:"")+"
  • ";g(a.settings.gf_vars.message_id,f)}b("#"+c.file.id).html(""),a.refresh()}),p.bind("FileUploaded",function(a,c,d){var h=b.secureEvalJSON(d.response);if("error"==h.status)return g(a.settings.gf_vars.message_id,c.name+" - "+h.error.message),void b("#"+c.id).html("");var i=""+c.name+"",j=a.settings.multipart_params.form_id,l=a.settings.multipart_params.field_id;i=""+e.delete_file+" "+i,i=gform.applyFilters("gform_file_upload_markup",i,c,a,e,f),b("#"+c.id).html(i);var m=a.settings.multipart_params.field_id;100==c.percent&&(h.status&&"ok"==h.status?k(m,h.data):g(a.settings.gf_vars.message_id,e.unknown_error+": "+c.name))}),b("#"+o.drop_element).on({dragenter:n,dragover:n})}function d(){return"xxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"==a?b:3&b|8;return c.toString(16)})}a.uploaders={};var e="undefined"!=typeof gform_gravityforms?gform_gravityforms.strings:{},f="undefined"!=typeof gform_gravityforms?gform_gravityforms.vars.images_url:"";b(document).ready(function(){"undefined"!=typeof adminpage&&"toplevel_page_gf_edit_forms"===adminpage||"undefined"==typeof plupload?b(".gform_button_select_files").prop("disabled",!0):"undefined"!=typeof adminpage&&"forms_page_gf_entries"===adminpage?b(".gform_fileupload_multifile").each(function(){c(this)}):(b(document).bind("gform_post_render",function(d,f){b("form#gform_"+f+" .gform_fileupload_multifile").each(function(){c(this)});var g=b("form#gform_"+f);g.length>0&&g.submit(function(){var c=!1;return b.each(a.uploaders,function(a,b){return b.total.queued>0?(c=!0,!1):void 0}),c?(alert(e.currently_uploading),window["gf_submitting_"+f]=!1,b("#gform_ajax_spinner_"+f).remove(),!1):void 0})}),b(document).bind("gform_post_conditional_logic",function(c,d,e,f){f||b.each(a.uploaders,function(a,b){b.refresh()})}))})}(window.gfMultiFileUploader=window.gfMultiFileUploader||{},jQuery); \ No newline at end of file diff --git a/js/index.php b/js/index.php new file mode 100644 index 0000000..12c197f --- /dev/null +++ b/js/index.php @@ -0,0 +1,2 @@ +r;r++)if(t[r]===e)return!0;return!1}function n(t,e){var r;t.createTextRange?(r=t.createTextRange(),r.move("character",e),r.select()):t.selectionStart&&(t.focus(),t.setSelectionRange(e,e))}function a(t,e){try{return t.type=e,!0}catch(r){return!1}}t.Placeholders={Utils:{addEventListener:e,inArray:r,moveCaret:n,changeType:a}}})(this),function(t){"use strict";function e(){}function r(t,e){var r,n,a=!!e&&t.value!==e,u=t.value===t.getAttribute(V);return(a||u)&&"true"===t.getAttribute(D)?(t.setAttribute(D,"false"),t.value=t.value.replace(t.getAttribute(V),""),t.className=t.className.replace(R,""),n=t.getAttribute(z),n&&(t.setAttribute("maxLength",n),t.removeAttribute(z)),r=t.getAttribute(I),r&&(t.type=r),!0):!1}function n(t){var e,r,n=t.getAttribute(V);return""===t.value&&n?(t.setAttribute(D,"true"),t.value=n,t.className+=" "+k,r=t.getAttribute(z),r||(t.setAttribute(z,t.maxLength),t.removeAttribute("maxLength")),e=t.getAttribute(I),e?t.type="text":"password"===t.type&&K.changeType(t,"text")&&t.setAttribute(I,"password"),!0):!1}function a(t,e){var r,n,a,u,i;if(t&&t.getAttribute(V))e(t);else for(r=t?t.getElementsByTagName("input"):p,n=t?t.getElementsByTagName("textarea"):h,i=0,u=r.length+n.length;u>i;i++)a=r.length>i?r[i]:n[i-r.length],e(a)}function u(t){a(t,r)}function i(t){a(t,n)}function l(t){return function(){b&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(D)?K.moveCaret(t,0):r(t)}}function o(t){return function(){n(t)}}function c(t){return function(e){return m=t.value,"true"===t.getAttribute(D)&&m===t.getAttribute(V)&&K.inArray(C,e.keyCode)?(e.preventDefault&&e.preventDefault(),!1):void 0}}function s(t){return function(){r(t,m),""===t.value&&(t.blur(),K.moveCaret(t,0))}}function d(t){return function(){t===document.activeElement&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(D)&&K.moveCaret(t,0)}}function g(t){return function(){u(t)}}function v(t){t.form&&(L=t.form,L.getAttribute(P)||(K.addEventListener(L,"submit",g(L)),L.setAttribute(P,"true"))),K.addEventListener(t,"focus",l(t)),K.addEventListener(t,"blur",o(t)),b&&(K.addEventListener(t,"keydown",c(t)),K.addEventListener(t,"keyup",s(t)),K.addEventListener(t,"click",d(t))),t.setAttribute(U,"true"),t.setAttribute(V,E),n(t)}var p,h,b,f,m,A,y,E,x,L,T,N,S,w=["text","search","url","tel","email","password","number","textarea"],C=[27,33,34,35,36,37,38,39,40,8,46],B="#ccc",k="placeholdersjs",R=RegExp("(?:^|\\s)"+k+"(?!\\S)"),V="data-placeholder-value",D="data-placeholder-active",I="data-placeholder-type",P="data-placeholder-submit",U="data-placeholder-bound",j="data-placeholder-focus",q="data-placeholder-live",z="data-placeholder-maxlength",F=document.createElement("input"),G=document.getElementsByTagName("head")[0],H=document.documentElement,J=t.Placeholders,K=J.Utils;if(J.nativeSupport=void 0!==F.placeholder,!J.nativeSupport){for(p=document.getElementsByTagName("input"),h=document.getElementsByTagName("textarea"),b="false"===H.getAttribute(j),f="false"!==H.getAttribute(q),A=document.createElement("style"),A.type="text/css",y=document.createTextNode("."+k+" { color:"+B+"; }"),A.styleSheet?A.styleSheet.cssText=y.nodeValue:A.appendChild(y),G.insertBefore(A,G.firstChild),S=0,N=p.length+h.length;N>S;S++)T=p.length>S?p[S]:h[S-p.length],E=T.attributes.placeholder,E&&(E=E.nodeValue,E&&K.inArray(w,T.type)&&v(T));x=setInterval(function(){for(S=0,N=p.length+h.length;N>S;S++)T=p.length>S?p[S]:h[S-p.length],E=T.attributes.placeholder,E&&(E=E.nodeValue,E&&K.inArray(w,T.type)&&(T.getAttribute(U)||v(T),(E!==T.getAttribute(V)||"password"===T.type&&!T.getAttribute(I))&&("password"===T.type&&!T.getAttribute(I)&&K.changeType(T,"text")&&T.setAttribute(I,"password"),T.value===T.getAttribute(V)&&(T.value=E),T.setAttribute(V,E))));f||clearInterval(x)},100)}J.disable=J.nativeSupport?e:u,J.enable=J.nativeSupport?e:i}(this); \ No newline at end of file diff --git a/js/placeholders.jquery.min.js b/js/placeholders.jquery.min.js new file mode 100644 index 0000000..02845bf --- /dev/null +++ b/js/placeholders.jquery.min.js @@ -0,0 +1,2 @@ +/* Placeholders.js v3.0.2 */ +(function(t){"use strict";function e(t,e,r){return t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent?t.attachEvent("on"+e,r):void 0}function r(t,e){var r,n;for(r=0,n=t.length;n>r;r++)if(t[r]===e)return!0;return!1}function n(t,e){var r;t.createTextRange?(r=t.createTextRange(),r.move("character",e),r.select()):t.selectionStart&&(t.focus(),t.setSelectionRange(e,e))}function a(t,e){try{return t.type=e,!0}catch(r){return!1}}t.Placeholders={Utils:{addEventListener:e,inArray:r,moveCaret:n,changeType:a}}})(this),function(t){"use strict";function e(){}function r(){try{return document.activeElement}catch(t){}}function n(t,e){var r,n,a=!!e&&t.value!==e,u=t.value===t.getAttribute(V);return(a||u)&&"true"===t.getAttribute(P)?(t.removeAttribute(P),t.value=t.value.replace(t.getAttribute(V),""),t.className=t.className.replace(R,""),n=t.getAttribute(z),parseInt(n,10)>=0&&(t.setAttribute("maxLength",n),t.removeAttribute(z)),r=t.getAttribute(D),r&&(t.type=r),!0):!1}function a(t){var e,r,n=t.getAttribute(V);return""===t.value&&n?(t.setAttribute(P,"true"),t.value=n,t.className+=" "+I,r=t.getAttribute(z),r||(t.setAttribute(z,t.maxLength),t.removeAttribute("maxLength")),e=t.getAttribute(D),e?t.type="text":"password"===t.type&&K.changeType(t,"text")&&t.setAttribute(D,"password"),!0):!1}function u(t,e){var r,n,a,u,i,l,o;if(t&&t.getAttribute(V))e(t);else for(a=t?t.getElementsByTagName("input"):f,u=t?t.getElementsByTagName("textarea"):h,r=a?a.length:0,n=u?u.length:0,o=0,l=r+n;l>o;o++)i=r>o?a[o]:u[o-r],e(i)}function i(t){u(t,n)}function l(t){u(t,a)}function o(t){return function(){b&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(P)?K.moveCaret(t,0):n(t)}}function c(t){return function(){a(t)}}function s(t){return function(e){return A=t.value,"true"===t.getAttribute(P)&&A===t.getAttribute(V)&&K.inArray(C,e.keyCode)?(e.preventDefault&&e.preventDefault(),!1):void 0}}function d(t){return function(){n(t,A),""===t.value&&(t.blur(),K.moveCaret(t,0))}}function v(t){return function(){t===r()&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(P)&&K.moveCaret(t,0)}}function g(t){return function(){i(t)}}function p(t){t.form&&(T=t.form,"string"==typeof T&&(T=document.getElementById(T)),T.getAttribute(U)||(K.addEventListener(T,"submit",g(T)),T.setAttribute(U,"true"))),K.addEventListener(t,"focus",o(t)),K.addEventListener(t,"blur",c(t)),b&&(K.addEventListener(t,"keydown",s(t)),K.addEventListener(t,"keyup",d(t)),K.addEventListener(t,"click",v(t))),t.setAttribute(j,"true"),t.setAttribute(V,x),(b||t!==r())&&a(t)}var f,h,b,m,A,y,E,x,L,T,S,N,w,B=["text","search","url","tel","email","password","number","textarea"],C=[27,33,34,35,36,37,38,39,40,8,46],k="#ccc",I="placeholdersjs",R=RegExp("(?:^|\\s)"+I+"(?!\\S)"),V="data-placeholder-value",P="data-placeholder-active",D="data-placeholder-type",U="data-placeholder-submit",j="data-placeholder-bound",q="data-placeholder-focus",Q="data-placeholder-live",z="data-placeholder-maxlength",F=document.createElement("input"),G=document.getElementsByTagName("head")[0],H=document.documentElement,J=t.Placeholders,K=J.Utils;if(J.nativeSupport=void 0!==F.placeholder,!J.nativeSupport){for(f=document.getElementsByTagName("input"),h=document.getElementsByTagName("textarea"),b="false"===H.getAttribute(q),m="false"!==H.getAttribute(Q),y=document.createElement("style"),y.type="text/css",E=document.createTextNode("."+I+" { color:"+k+"; }"),y.styleSheet?y.styleSheet.cssText=E.nodeValue:y.appendChild(E),G.insertBefore(y,G.firstChild),w=0,N=f.length+h.length;N>w;w++)S=f.length>w?f[w]:h[w-f.length],x=S.attributes.placeholder,x&&(x=x.nodeValue,x&&K.inArray(B,S.type)&&p(S));L=setInterval(function(){for(w=0,N=f.length+h.length;N>w;w++)S=f.length>w?f[w]:h[w-f.length],x=S.attributes.placeholder,x?(x=x.nodeValue,x&&K.inArray(B,S.type)&&(S.getAttribute(j)||p(S),(x!==S.getAttribute(V)||"password"===S.type&&!S.getAttribute(D))&&("password"===S.type&&!S.getAttribute(D)&&K.changeType(S,"text")&&S.setAttribute(D,"password"),S.value===S.getAttribute(V)&&(S.value=x),S.setAttribute(V,x)))):S.getAttribute(P)&&(n(S),S.removeAttribute(V));m||clearInterval(L)},100)}K.addEventListener(t,"beforeunload",function(){J.disable()}),J.disable=J.nativeSupport?e:i,J.enable=J.nativeSupport?e:l}(this),function(t){"use strict";var e=t.fn.val,r=t.fn.prop;Placeholders.nativeSupport||(t.fn.val=function(t){var r=e.apply(this,arguments),n=this.eq(0).data("placeholder-value");return void 0===t&&this.eq(0).data("placeholder-active")&&r===n?"":r},t.fn.prop=function(t,e){return void 0===e&&this.eq(0).data("placeholder-active")&&"value"===t?"":r.apply(this,arguments)})}(jQuery); \ No newline at end of file diff --git a/js/shortcode-ui.js b/js/shortcode-ui.js new file mode 100755 index 0000000..4c0c7a8 --- /dev/null +++ b/js/shortcode-ui.js @@ -0,0 +1,678 @@ +var GformShortcodeUI; + +( function (gfShortCodeUI, $) { + + var sui = window.GformShortcodeUI = { + models: {}, + collections: {}, + views: {}, + utils: {}, + strings: {} + } + + /** + * Shortcode Attribute Model. + */ + sui.models.ShortcodeAttribute = Backbone.Model.extend({ + defaults: { + attr: '', + label: '', + type: '', + section: '', + description: '', + default: '', + value: '', + }, + }); + + /** + * Shortcode Attributes collection. + */ + sui.models.ShortcodeAttributes = Backbone.Collection.extend({ + model: sui.models.ShortcodeAttribute, + // Deep Clone. + clone: function () { + return new this.constructor(_.map(this.models, function (m) { + return m.clone(); + })); + } + + }); + + /** + * Shortcode Model + */ + sui.models.Shortcode = Backbone.Model.extend({ + + defaults: { + label: '', + shortcode_tag: '', + action_tag: '', + attrs: sui.models.ShortcodeAttributes, + }, + + /** + * Custom set method. + * Handles setting the attribute collection. + */ + set: function (attributes, options) { + + if (attributes.attrs !== undefined && !( attributes.attrs instanceof sui.models.ShortcodeAttributes )) { + + _.each(attributes.attrs, function (attr) { + if (attr.default != undefined) { + attr.value = attr.default + } + }); + + attributes.attrs = new sui.models.ShortcodeAttributes(attributes.attrs); + } + + return Backbone.Model.prototype.set.call(this, attributes, options); + }, + + /** + * Custom toJSON. + * Handles converting the attribute collection to JSON. + */ + toJSON: function (options) { + options = Backbone.Model.prototype.toJSON.call(this, options); + if (options.attrs !== undefined && ( options.attrs instanceof sui.models.ShortcodeAttributes )) { + options.attrs = options.attrs.toJSON(); + } + return options; + }, + + /** + * Custom clone + * Make sure we don't clone a reference to attributes. + */ + clone: function () { + var clone = Backbone.Model.prototype.clone.call(this); + clone.set('attrs', clone.get('attrs').clone()); + return clone; + }, + + /** + * Get the shortcode as... a shortcode! + * + * @return string eg [shortcode attr1=value] + */ + formatShortcode: function () { + + var template, shortcodeAttributes, attrs = [], content, action = '', actions = []; + + this.get('attrs').each(function (attr) { + + var val = attr.get('value'); + var type = attr.get('type'); + var def = attr.get('default'); + + // Skip empty attributes. + // Skip unchecked checkboxes that have don't have default='true'. + if (( ( !val || val.length < 1 ) && type != 'checkbox') || ( type == 'checkbox' && def != 'true' && !val )) { + return; + } + + // Handle content attribute as a special case. + if (attr.get('attr') === 'content') { + content = attr.get('value'); + } else { + attrs.push(attr.get('attr') + '="' + val + '"'); + } + + }); + + + template = "[{{ shortcode }} {{ attributes }}]" + + if (content && content.length > 0) { + template += "{{ content }}[/{{ shortcode }}]" + } + + template = template.replace(/{{ shortcode }}/g, this.get('shortcode_tag')); + template = template.replace(/{{ attributes }}/g, attrs.join(' ')); + template = template.replace(/{{ content }}/g, content); + + return template; + + }, + + validate: function (shortcode) { + var errors = []; + var id = shortcode.attrs.findWhere({attr: 'id'}); + if (!id.get('value')) { + errors.push({'id': sui.strings.pleaseSelectAForm}); + } + + return errors.length ? errors : null; + } + + }); + + // Shortcode Collection + sui.collections.Shortcodes = Backbone.Collection.extend({ + model: sui.models.Shortcode + }); + + + /** + * Single edit shortcode content view. + */ + sui.views.editShortcodeForm = wp.Backbone.View.extend({ + + el: '#gform-shortcode-ui-container', + + template: wp.template('gf-shortcode-default-edit-form'), + + hasAdvancedValue: false, + + events: { + 'click #gform-update-shortcode': 'insertShortcode', + 'click #gform-insert-shortcode': 'insertShortcode', + 'click #gform-cancel-shortcode': 'cancelShortcode' + }, + + initialize: function () { + + _.bindAll(this, 'beforeRender', 'render', 'afterRender'); + + var t = this; + this.render = _.wrap(this.render, function (render) { + t.beforeRender(); + render(); + t.afterRender(); + return t; + }); + + + this.model.get('attrs').each(function (attr) { + switch (attr.get('section')) { + case 'required': + t.views.add( + '.gf-edit-shortcode-form-required-attrs', + new sui.views.editAttributeField({model: attr, parent: t}) + ); + break; + case 'standard': + t.views.add( + '.gf-edit-shortcode-form-standard-attrs', + new sui.views.editAttributeField({model: attr, parent: t}) + ); + break; + default: + t.views.add( + '.gf-edit-shortcode-form-advanced-attrs', + new sui.views.editAttributeField({model: attr, parent: t}) + ); + if (!t.hasAdvancedVal) { + t.hasAdvancedVal = attr.get('value') !== ''; + } + } + }); + + this.listenTo(this.model, 'change', this.render); + }, + + beforeRender: function () { + // + }, + + afterRender: function () { + gform_initialize_tooltips(); + + $('#gform-insert-shortcode').toggle(this.options.viewMode == 'insert'); + $('#gform-update-shortcode').toggle(this.options.viewMode != 'insert'); + $('#gf-edit-shortcode-form-advanced-attrs').toggle(this.hasAdvancedVal); + }, + + insertShortcode: function (e) { + + var isValid = this.model.isValid({validate: true}); + + if (isValid) { + send_to_editor(this.model.formatShortcode()); + tb_remove(); + + this.dispose(); + + } else { + _.each(this.model.validationError, function (error) { + _.each(error, function (message, attr) { + alert(message); + }); + }); + } + }, + cancelShortcode: function (e) { + tb_remove(); + this.dispose(); + }, + dispose: function () { + this.remove(); + $('#gform-shortcode-ui-wrap').append('
    '); + } + }); + + sui.views.editAttributeField = Backbone.View.extend({ + + tagName: "div", + + initialize: function (options) { + this.parent = options.parent; + }, + + events: { + 'keyup input[type="text"]': 'updateValue', + 'keyup textarea': 'updateValue', + 'change select': 'updateValue', + 'change #gf-shortcode-attr-action': 'updateAction', + 'change input[type=checkbox]': 'updateCheckbox', + 'change input[type=radio]': 'updateValue', + 'change input[type=email]': 'updateValue', + 'change input[type=number]': 'updateValue', + 'change input[type=date]': 'updateValue', + 'change input[type=url]': 'updateValue', + + }, + + + render: function () { + this.template = wp.media.template('gf-shortcode-ui-field-' + this.model.get('type')); + return this.$el.html(this.template(this.model.toJSON())); + }, + + /** + * Input Changed Update Callback. + * + * If the input field that has changed is for content or a valid attribute, + * then it should update the model. + */ + updateValue: function (e) { + var $el = $(e.target); + this.model.set('value', $el.val()); + }, + + updateCheckbox: function (e) { + var $el = $(e.target); + var val = $el.prop('checked'); + + this.model.set('value', val); + }, + + updateAction: function (e) { + var $el = $(e.target), + val = $el.val(); + + this.model.set('value', val); + var m = this.parent.model; + var newShortcodeModel = sui.shortcodes.findWhere({shortcode_tag: 'gravityform', action_tag: val}); + + // copy over values to new shortcode model + + + var currentAttrs = m.get('attrs'); + newShortcodeModel.get('attrs').each(function (attr) { + var newAt = attr.get('attr'); + var currentAtModel = currentAttrs.findWhere({attr: newAt}); + if (typeof currentAtModel != 'undefined') { + var currentAt = currentAtModel.get('attr'); + if (newAt == currentAt) { + var currentVal = currentAtModel.get('value'); + attr.set( + 'value', + String(currentVal) + ); + } + } + + + }); + $(this.parent.el).empty(); + var viewMode = this.parent.options.viewMode; + this.parent.dispose(); + this.parent.model.set(newShortcodeModel); + GformShortcodeUI = new sui.views.editShortcodeForm({model: newShortcodeModel, viewMode: viewMode}); + GformShortcodeUI.render(); + + } + + }); + + /** + * Generic shortcode mce view constructor. + * This is cloned and used by each shortcode when registering a view. + */ + sui.utils.shortcodeViewConstructor = { + + View: { + overlay: true, + + shortcodeHTML: false, + + setContent: function (html, option) { + this.getNodes(function (editor, node, content) { + var el = ( option === 'wrap' || option === 'replace' ) ? node : content, + insert = html; + + if (_.isString(insert)) { + insert = editor.dom.createFragment(insert); + } + + if (option === 'replace') { + editor.dom.replace(insert, el); + } else if (option === 'remove') { + node.parentNode.insertBefore(insert, node.nextSibling); + $(node).remove(); + } else { + el.innerHTML = ''; + el.appendChild(insert); + } + }); + }, + + + initialize: function (options) { + var actionTag = typeof options.shortcode.attrs.named.action != 'undefined' ? options.shortcode.attrs.named.action : ''; + var shortcodeModel = sui.shortcodes.findWhere({action_tag: actionTag}); + + if (!shortcodeModel) { + this.shortcodeHTML = decodeURIComponent(options.encodedText); + this.shortcode = false; + return; + } + + var shortcode = shortcodeModel.clone(); + + shortcode.get('attrs').each(function (attr) { + + if (attr.get('attr') in options.shortcode.attrs.named) { + attr.set( + 'value', + options.shortcode.attrs.named[attr.get('attr')] + ); + } + + if (attr.get('attr') === 'content' && ( 'content' in options.shortcode )) { + attr.set('value', options.shortcode.content); + } + + }); + + this.shortcode = shortcode; + }, + + loadingPlaceholder: function () { + return '' + + '
    ' + + '
    ' + + '
    ' + + '
    '; + }, + + /** + * @see wp.mce.View.getEditors + */ + getEditors: function (callback) { + var editors = []; + + _.each(tinymce.editors, function (editor) { + if (editor.plugins.wpview) { + if (callback) { + callback(editor); + } + + editors.push(editor); + } + }, this); + + return editors; + }, + + /** + * @see wp.mce.View.getNodes + */ + getNodes: function (callback) { + var nodes = [], + self = this; + + this.getEditors(function (editor) { + $(editor.getBody()) + .find('[data-wpview-text="' + self.encodedText + '"]') + .each(function (i, node) { + if (callback) { + callback(editor, node, $(node).find('.wpview-content').get(0)); + } + + nodes.push(node); + }); + }); + + return nodes; + }, + + /** + * Set the HTML. Modeled after wp.mce.View.setIframes + * + */ + setIframes: function (body) { + var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; + + if (body.indexOf(' Visual. + setTimeout(function () { + iframe = dom.add(content, 'iframe', { + src: tinymce.Env.ie ? 'javascript:""' : '', + frameBorder: '0', + id: 'gf-shortcode-preview-' + new Date().getTime(), + allowTransparency: 'true', + scrolling: 'no', + 'class': 'wpview-sandbox', + style: { + width: '100%', + display: 'block' + } + }); + + iframeDoc = iframe.contentWindow.document; + + iframeDoc.open(); + iframeDoc.write( + '' + + '' + + '' + + '' + + head + + styles + + '' + + '' + + '' + + body + + '' + + '' + ); + iframeDoc.close(); + + resize = function () { + // Make sure the iframe still exists. + iframe.contentWindow && $(iframe).height($(iframeDoc.body).height()); + }; + + if (MutationObserver) { + new MutationObserver(_.debounce(function () { + resize(); + }, 100)) + .observe(iframeDoc.body, { + attributes: true, + childList: true, + subtree: true + }); + } else { + for (i = 1; i < 6; i++) { + setTimeout(resize, i * 700); + } + } + + resize(); + + editor.on('wp-body-class-change', function () { + iframeDoc.body.className = editor.getBody().className; + }); + + + }, 50); + }); + + }, + + /** + * Render the shortcode + * + * To ensure consistent rendering - this makes an ajax request to the admin and displays. + * @return string html + */ + getHtml: function () { + + if (!this.shortcode) { + this.setContent(this.shortcodeHTML, 'remove'); + return; + } + + var data; + + if (false === this.shortcodeHTML) { + var attr = this.shortcode.get('attrs').findWhere({attr: 'id'}); + var formId = attr.get('value'); + data = { + action: 'gf_do_shortcode', + post_id: $('#post_ID').val(), + form_id: formId, + shortcode: this.shortcode.formatShortcode(), + nonce: gfShortcodeUIData.previewNonce + }; + + $.post(ajaxurl, data, $.proxy(this.setIframes, this)); + + } + + return this.shortcodeHTML; + + }, + + }, + + edit: function (node) { + + var shortcodeString, model, attr, action; + + shortcodeString = decodeURIComponent($(node).attr('data-wpview-text')); + + var parsedShortcode = wp.shortcode.next('gravityform', shortcodeString); + + if (!parsedShortcode) { + return; + } + + action = parsedShortcode.shortcode.attrs.named.action ? parsedShortcode.shortcode.attrs.named.action : ''; + + var defaultShortcode = sui.shortcodes.findWhere({ + shortcode_tag: parsedShortcode.shortcode.tag, + action_tag: action + }); + + if (!defaultShortcode) { + return; + } + + var currentShortcode = defaultShortcode.clone(); + + // convert attribute strings to object. + _.each(parsedShortcode.shortcode.attrs.named, function (val, key) { + attr = currentShortcode.get('attrs').findWhere({attr: key}); + if (attr) { + attr.set('value', val); + } + }); + + + var idAttr = currentShortcode.get('attrs').findWhere({attr: 'id'}); + var formId = idAttr.get('value'); + $('#add_form_id').val(formId); + + GformShortcodeUI = new sui.views.editShortcodeForm({model: currentShortcode, viewMode: 'update'}); + GformShortcodeUI.render(); + + $('#gform-insert-shortcode').hide(); + $('#gform-update-shortcode').show(); + tb_show("Edit Gravity Form", "#TB_inline?inlineId=select_gravity_form&width=753&height=686", ""); + } + + }; + + $(document).ready(function () { + + sui.strings = gfShortcodeUIData.strings; + + sui.shortcodes = new sui.collections.Shortcodes( gfShortcodeUIData.shortcodes ); + + if( ! gfShortcodeUIData.previewDisabled ){ + wp.mce.views.register( 'gravityform', $.extend(true, {}, sui.utils.shortcodeViewConstructor) ); + } + + $(document).on('click', '.gform_media_link', function () { + sui.shortcodes = new sui.collections.Shortcodes(gfShortcodeUIData.shortcodes); + var shortcode = sui.shortcodes.findWhere({shortcode_tag: 'gravityform', action_tag: ''}); + GformShortcodeUI = new sui.views.editShortcodeForm({model: shortcode, viewMode: 'insert'}); + GformShortcodeUI.render(); + tb_show("Insert Gravity Form", "#TB_inline?inlineId=select_gravity_form&width=753&height=686", ""); + }); + + }); + +}(window.gfShortcodeUI = window.gfShortcodeUI || {}, jQuery)); + diff --git a/js/tooltip_init.js b/js/tooltip_init.js index a12a350..5352818 100644 --- a/js/tooltip_init.js +++ b/js/tooltip_init.js @@ -1,9 +1,13 @@ jQuery(document).ready(function() { + gform_initialize_tooltips(); +}); + +function gform_initialize_tooltips(){ jQuery( ".gf_tooltip" ).tooltip({ - show: 500, - hide: 1000, - content: function () { - return jQuery(this).prop('title'); - } - }); -}); \ No newline at end of file + show: 500, + hide: 1000, + content: function () { + return jQuery(this).prop('title'); + } + }); +} \ No newline at end of file diff --git a/languages/gravityforms-ar.mo b/languages/gravityforms-ar.mo new file mode 100644 index 0000000000000000000000000000000000000000..748bb56c97db3b051dcf39ab10f0ebd94338cc0a GIT binary patch literal 60328 zcmeFa2Y6i7)%SY<1GeeC!vSMcEo^L4j42~&Y>lmkij5rzjHIzNwxkg=Bil07*v5t4 z0-?9yN-?Gx2rbkAfe;{4LMREH&_YRpko)`Zy=F8r<>kHKeZTwM@455%%x|x?_g=e~ zv(Fj%)h+v767ad8Ul8mJZ`?Bow%Z^G_K!&$1PkLqunk-UH-^{1P2ftn6}%U24u1o; zfUg-pHLlm-_1nNL@!t!QL@*i-gvUdY3#P%1;E7P-PJuhY^WlzgCEO4`0SCb6Oztth zVfy!=?0#nYZ{YgK8#Ma-ZVY87gwpSAEQ0GIk2LvUF;U! z{f(pGX6TQAN~hA~W1zyf7(1Zabrw{;&xcC)GN^QJfU>g^svho#%FmNPcQ?2-903)s4EBT7Q0dj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5c8LM_4_t)^h;*7ieR4|gF zmogHgANjAYy8Yp7WkxTorL+TrE_@a z_|PsP@Ku#U-*t>K3?tu_B`f5vj~g-LWmcRJ`2|3Ls2$b}hAv}~aEA7*ry zl@0LlynVOY>nkB;wG~h{5VSEz(@EO~metgd(E(V}!f_A=NUTipC2|ZC!(e$b#W^k4 z{Gut{%5ryvG4TTj;XJ@!e}m2R1)4^fJ#{(%OmgI+zwXGe3vxXDT=!+v4oHf0zKiRN znV!Z literal 0 HcmV?d00001 diff --git a/languages/gravityforms-da_DK.mo b/languages/gravityforms-da_DK.mo index 10d2e5769e64871ee5c68564795f9f7c760b394e..8c474d2bce6843c23bf0bcf7b4a6a6ee779bab46 100644 GIT binary patch delta 14438 zcmXZicc9PZ9>DSM?`W90M^;0QLN zP|=p$l9sEKq>@VA_xn80U$19lKiV!1V6$L@N=w;8`4gh zWEqK1a4AmcoJpR<@?A2?Al!~OW3B5l$ryYPN8&%aW|Gl(H@b4aqJd|13l>8ID~&FB zIdny;;b~Y8OJUlOgpsvEJLrr>u{ZiaUd)d`+f785ZVEcH`RGbL8uKf0Hu>k#rT_2S~W|55NkR63+ZaG{Rx%(%psU;0$zWSD-8N0@{9C%)f?B z$iIz^u}I%c(gvHO{methS%OaVF*Lx{eYyV*_zDHSVD`iYhw&`(zn}w_>=zDC8Fb*P z=pNQa_x4hBfL7=s>xe$rA8j`{){lwa7Rx91OG89+C@4h3`(uM8(Z|pMpF%r)CYC=R z%U_E5*U_zc2c6+Tbml*z&;K6tnd`%$ErteMJ|*D{a?n#no!xRU2J_hUoJxtoQ!6H-X*pV!Q$E;Qm;?3|)~Y z(8!-hJNz)Z9}V;nI>V#rp8plgOWYXRmqGif7_En?17AtPj$5HKxDi|95Nw7U@t^n` zUWd&FWs<>|k0sfXOkVi#${w6auBUu0-iz5cg?^S`OY;B27Fd5sCbmj1FXax+=w2!kI@0YLnA+q4v;lGaqwRL11MEdt?jZWy zuV}x2qu03PSnhugi5p4S!9D1Ji_ych0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~&*d!{{r$#`R{N-O!gpB^qAG_ILtatI9W|r~au_H*7-v4eWyF(V4byl%D!K zT+`4%j^hF>*ElTE4t&Y`u^ujHlAijXdO3vCsP}2gtKQvshJt$_^NrzH-G&9J_r{Vq z7X4??+!R+V@DIa=Ykrtf)D=Czv z!GUU_Kl3#}Ul5JZ?{2N*_3mf~ebHk&1Pyd*ygol(UyKIya%^88+uue5-;VZwum$Je zUHK&q&g9qV6)nR61<@Pp#ClV7z#eG8!_b+GLhnmrX?y|=U@iJ#wmH@hqHn;H=#rlH z0Y6M~-JG5%fo0KmeM|JgK4`>a(V0JirgS#ezy;U@KSEDYu2$hYUuWz^{UNqY2J!WFw>pkRo)W4|Cv}njMq~yb65CO?Q<9BzdjAiX}A?n zMyq!V13ZeAXnzkU;+fb!ynA@Zuf;oQ{~G<&yuL^Hm>q%cmBr}kdI#Ub!}0pFJ;Q`P zNK$YQbnL~Nr?CmKE%i)&!V+}C^3)669X8iZ==b|xXyz87FQR4W8m~g%pl?Js#q00H z>+i?*{peC9Kc-Nc!U=Q}ruPkBKpLQ_x)*&PtVZ7l@1SqWkI}tyDw?%ldg>P$Ribxc zHLg!ZkMmn-fcw#aKMQsKm%-x=r_eXyMfBX}>K`^)F?4g5kM+9f9%+JZrkl}Bv_l8z zgl^7m=nVU#_l-dN9gV)|9>*)p{Xz;pumn5eD)e1`8I3&KJ)z^GXll!%fmTGHYl;rk z1`VuBZ0{8vga$S;*2klJ>T#^*+OMbJtMps+82ue@$T1+K@H({Pf#`t4(HT61&gf}0 z;Kk^yXf#l5i*1tYAC4pay2=!Svm>yNy$^~k*6CZt`R zw|cEAHS3qCQLjPux(#a9s8pT*n>XXpw5PM&)TwQW2WnIuy|Komv?JxyI&I9lCar#+ Ov;iA$+?saRk^cjm+PmTa diff --git a/languages/gravityforms-es_ES.mo b/languages/gravityforms-es_ES.mo index 8ab8663faba81423a0d6491c51606ccc59d3d523..b80732cea0169830542bb87e107c4b241f115071 100644 GIT binary patch literal 163683 z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y!THG^+msD{r*EJ0Wy<4#1S;RA@(Ci7bW{Bl@O-sDAE1cxK30y!q{X;)Py`{gQtGH3=KI#F$%6r(e&)=p)~VU! zAO=xllC)UvmV&9EU7QcDQ>(|gTJH$F_0UC_51fw!6M402Z*6J2kK4kL2t!nxJ9p*f06J*~Lo75;i)rLTQ zW2?eZyqzj*fasJ2*F@En^RUNJZBI0&PauU9uF=9tm&mmqb^v-kS(7AtJvJ6V40iL- zg=#lX*ruZVvu)~hrv^P~GwIStEOoqDO58Zv=Ag6^B)H;&Xwjgh1vW^xv zN#jMJAtf2nPTLJqexm|MpT+UJ5g!j>Yq{uRb?fSS8#zlo{*e`qF7#IJXoKn&2Ckvf z5voN^I_c|v!~aJASstohDS%baC6}n#oV-Lmz(w0tGauNlviUIwd-{Xzh^?hN)Gh$s zksWHK4F!bEDehT@t~N zoo8n#H9&SS29PV=L+FETAR5G{cp&bOJSW{p>HEybRNW^&w>j$Yy)G^GvYV7c{7eH{ zxbHQqQ{px^${&OI^{84t^64kQ%#v8^GQ7QPT!k@3&R{Nc|GHret}N zUh-qMnvp3I53VV#%tC$MitpbI1#-KiMsne9m6Pw+jUjV1IQoyKrJWA~EbXKgtMzh2L=0v|jfvaMi?_>7=GtL|{JplpAPYrv&h38#U3N0Q};DsAD{PkGeo{c%SOz@9tB#Wl4iuqi=U( zh__y<@}~71($M|4Aluh-2(_5ah+w&cAGlOaINuF@>`aGW9Pn?4a+cO?JAlN*(Gy`8 zFufJ>2M(b_CiMg{eyEzCzD#WyS{=t3&D2q;Ci24l%FT^fAg=8+^{o1?%T?(j2oWf2-B@s=A^pimA^AI| T=r_kg0VK*l*8sj)Zs@-O_dwM! diff --git a/languages/gravityforms-fi.mo b/languages/gravityforms-fi.mo index 9086576eeb6c52ee046bc26731839c60d2a3b1e6..d9b60a72c0192296aabb4f77856e033a10bcf148 100644 GIT binary patch delta 16816 zcmXZid7zEO|G@F*94c#tM3%ZmT;$r)&AxQkLv%rH;}{M2Sj8{R&AU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ZO4^8yWDlCiv1pz@!+9%%-oFw}JPUoZv_xM7UD1B; zDG)10uPHrn`SwazSFc&O`qi~EYSnL0vu3rLwQANZbaStJv#Z}aqSugn2lvVzI-)^F zzuvQpG)%o+yKD9KL;Ll;JG=VLy@vE3*{grQ1{t^9N5#DZ3jM!ZO^1#gl09M!ce*rh z*1T=b?+sHME=cvud82iz(zrbRM)b-#_(`ft!E<@8-;kUlJ5zhlE!3=Ec6P6fyWU?o ccy^sVsS30C)L#65DjWWP<(yG_Qkj?jFD`LaCIA2c diff --git a/languages/gravityforms.pot b/languages/gravityforms.pot index 77abca6..2bf58cb 100644 --- a/languages/gravityforms.pot +++ b/languages/gravityforms.pot @@ -1,7443 +1,7759 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# +# Copyright 2009-2015 Rocketgenius, Inc. msgid "" msgstr "" -"Project-Id-Version: Gravity Forms\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-24 16:42-0500\n" -"PO-Revision-Date: 2014-10-24 16:42-0500\n" -"Last-Translator: Dana Cobb \n" -"Language-Team: Rocketgenius \n" -"Language: en_EN\n" +"Project-Id-Version: Gravity Forms 1.9\n" +"Report-Msgid-Bugs-To: http://www.gravtiyhelp.com\n" +"POT-Creation-Date: 2015-01-28 19:55:54+00:00\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: _e;__;_x:1,2c\n" -"X-Poedit-Basepath: .\n" -"X-Generator: Poedit 1.6.10\n" +"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n" +"Last-Translator: Rocketgenius \n" +"Language-Team: Rocketgenius \n" +"X-Generator: Gravity Forms Build Server\n" +"X-Poedit-KeywordsList: " +"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_" +"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n" +"Project-Id-Version: Gravity Forms\n" +"Language: en_US\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SearchPath-0: ..\n" - -#: ../common.php:274 ../common.php:550 ../form_detail.php:2222 +"X-Poedit-Basepath: ../\n" +"X-Poedit-Bookmarks: \n" +"X-Poedit-Country: United States\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Textdomain-Support: yes\n" + +#: common.php:316 common.php:626 form_detail.php:2562 msgid "Insert Merge Tag" msgstr "" -#: ../common.php:328 ../js.php:900 +#: common.php:377 js.php:1204 msgid "All Submitted Fields" msgstr "" -#: ../common.php:397 +#: common.php:447 msgid "All Pricing Fields" msgstr "" -#: ../common.php:405 ../form_detail.php:2224 -msgid "Client IP Address" +#: common.php:455 form_detail.php:2564 js.php:1204 +msgid "User IP Address" msgstr "" -#: ../common.php:406 ../common.php:407 ../common.php:2306 -#: ../entry_detail.php:985 ../form_detail.php:701 ../form_detail.php:1580 -#: ../form_detail.php:2225 ../form_detail.php:2226 -#: ../includes/addon/class-gf-payment-addon.php:1686 ../js.php:510 -#: ../js.php:900 +#: common.php:456 common.php:457 entry_detail.php:1034 form_detail.php:748 +#: form_detail.php:1662 form_detail.php:2565 form_detail.php:2566 +#: includes/addon/class-gf-payment-addon.php:1704 +#: includes/fields/class-gf-field-date.php:13 js.php:658 js.php:1204 msgid "Date" msgstr "" -#: ../common.php:408 ../form_detail.php:2227 +#: common.php:458 form_detail.php:2567 msgid "Embed Post/Page Id" msgstr "" -#: ../common.php:409 ../form_detail.php:2228 +#: common.php:459 form_detail.php:2568 msgid "Embed Post/Page Title" msgstr "" -#: ../common.php:410 ../form_detail.php:2229 +#: common.php:460 form_detail.php:2569 msgid "Embed URL" msgstr "" -#: ../common.php:411 ../entry_detail.php:345 ../export.php:761 -#: ../select_columns.php:92 +#: common.php:461 entry_detail.php:374 export.php:779 select_columns.php:164 msgid "Entry Id" msgstr "" -#: ../common.php:412 +#: common.php:462 msgid "Entry URL" msgstr "" -#: ../common.php:413 +#: common.php:463 msgid "Form Id" msgstr "" -#: ../common.php:414 ../form_list.php:241 -#: ../includes/addon/class-gf-addon.php:1641 ../js.php:900 ../tooltips.php:33 +#: common.php:464 form_list.php:272 includes/addon/class-gf-addon.php:1694 +#: js.php:1204 tooltips.php:33 msgid "Form Title" msgstr "" -#: ../common.php:415 ../form_detail.php:2230 +#: common.php:465 form_detail.php:2570 msgid "HTTP User Agent" msgstr "" -#: ../common.php:416 ../form_detail.php:2231 +#: common.php:466 form_detail.php:2571 msgid "HTTP Referer URL" msgstr "" -#: ../common.php:419 ../export.php:769 +#: common.php:469 export.php:787 msgid "Post Id" msgstr "" -#: ../common.php:420 +#: common.php:470 msgid "Post Edit URL" msgstr "" -#: ../common.php:423 ../form_detail.php:2232 +#: common.php:473 form_detail.php:2572 msgid "User Display Name" msgstr "" -#: ../common.php:424 ../form_detail.php:2233 +#: common.php:474 form_detail.php:2573 msgid "User Email" msgstr "" -#: ../common.php:425 ../form_detail.php:2234 +#: common.php:475 form_detail.php:2574 msgid "User Login" msgstr "" -#: ../common.php:435 +#: common.php:487 msgid "Required form fields" msgstr "" -#: ../common.php:439 +#: common.php:491 msgid "Optional form fields" msgstr "" -#: ../common.php:443 +#: common.php:495 msgid "Pricing form fields" msgstr "" -#: ../common.php:447 ../common.php:5026 ../form_detail.php:1346 -#: ../form_detail.php:1348 +#: common.php:499 common.php:3016 form_detail.php:1420 form_detail.php:1422 msgid "Other" msgstr "" -#: ../common.php:451 ../common.php:580 ../form_detail.php:249 -#: ../form_detail.php:1554 +#: common.php:503 common.php:657 form_detail.php:259 form_detail.php:1634 msgid "Custom" msgstr "" -#: ../common.php:516 +#: common.php:591 msgid "Select image size" msgstr "" -#: ../common.php:517 +#: common.php:592 msgid "Thumbnail" msgstr "" -#: ../common.php:518 +#: common.php:593 msgid "Thumbnail - Left Aligned" msgstr "" -#: ../common.php:519 +#: common.php:594 msgid "Thumbnail - Centered" msgstr "" -#: ../common.php:520 +#: common.php:595 msgid "Thumbnail - Right Aligned" msgstr "" -#: ../common.php:522 ../form_detail.php:752 ../form_detail.php:1358 -#: ../form_detail.php:1757 +#: common.php:597 form_detail.php:799 form_detail.php:1432 form_detail.php:1983 msgid "Medium" msgstr "" -#: ../common.php:523 +#: common.php:598 msgid "Medium - Left Aligned" msgstr "" -#: ../common.php:524 +#: common.php:599 msgid "Medium - Centered" msgstr "" -#: ../common.php:525 +#: common.php:600 msgid "Medium - Right Aligned" msgstr "" -#: ../common.php:527 ../form_detail.php:753 ../form_detail.php:1358 -#: ../form_detail.php:1758 +#: common.php:602 form_detail.php:800 form_detail.php:1432 form_detail.php:1984 msgid "Large" msgstr "" -#: ../common.php:528 +#: common.php:603 msgid "Large - Left Aligned" msgstr "" -#: ../common.php:529 +#: common.php:604 msgid "Large - Centered" msgstr "" -#: ../common.php:530 +#: common.php:605 msgid "Large - Right Aligned" msgstr "" -#: ../common.php:532 +#: common.php:607 msgid "Full Size" msgstr "" -#: ../common.php:533 +#: common.php:608 msgid "Full Size - Left Aligned" msgstr "" -#: ../common.php:534 +#: common.php:609 msgid "Full Size - Centered" msgstr "" -#: ../common.php:535 +#: common.php:610 msgid "Full Size - Right Aligned" msgstr "" -#: ../common.php:551 +#: common.php:627 msgid "Allowable form fields" msgstr "" -#: ../common.php:1167 ../entry_detail.php:851 +#: common.php:1176 entry_detail.php:905 msgid "Order" msgstr "" -#: ../common.php:1198 ../common.php:2350 ../entry_detail.php:926 -#: ../gravityforms.php:1318 ../includes/addon/class-gf-payment-addon.php:1500 -#: ../js.php:612 +#: common.php:1208 entry_detail.php:980 gravityforms.php:1391 +#: includes/addon/class-gf-payment-addon.php:1516 +#: includes/fields/class-gf-field-total.php:24 js.php:760 msgid "Total" msgstr "" -#: ../common.php:1215 ../common.php:2342 ../entry_detail.php:863 +#: common.php:1225 entry_detail.php:917 +#: includes/fields/class-gf-field-product.php:13 msgid "Product" msgstr "" -#: ../common.php:1216 ../entry_detail.php:864 +#: common.php:1226 entry_detail.php:918 msgid "Qty" msgstr "" -#: ../common.php:1217 ../entry_detail.php:865 +#: common.php:1227 entry_detail.php:919 msgid "Unit Price" msgstr "" -#: ../common.php:1218 ../common.php:3014 ../entry_detail.php:866 -#: ../form_detail.php:527 ../form_detail.php:1325 ../js.php:589 ../js.php:648 +#: common.php:1228 entry_detail.php:920 form_detail.php:572 +#: form_detail.php:1399 includes/fields/class-gf-field-calculation.php:86 +#: includes/fields/class-gf-field-singleproduct.php:91 js.php:737 js.php:796 msgid "Price" msgstr "" -#: ../common.php:1270 +#: common.php:1280 msgid "Total:" msgstr "" -#: ../common.php:1910 -#, php-format +#: common.php:1915 msgid "" -"Gravity Forms require WordPress %s or greater. You must upgrade WordPress in " -"order to use Gravity Forms" +"Gravity Forms require WordPress %s or greater. You must upgrade WordPress " +"in order to use Gravity Forms" msgstr "" -#: ../common.php:2013 -#, php-format +#: common.php:2028 msgid "%s ago" msgstr "" -#: ../common.php:2015 ../common.php:2018 -#, php-format +#: common.php:2030 common.php:2033 msgid "%1$s at %2$s" msgstr "" -#: ../common.php:2200 ../common.php:2273 -#, php-format -msgid "%d of %d items shown. Edit field to view all" +#: common.php:2507 +msgid "Product fields are not editable" msgstr "" -#: ../common.php:2282 -msgid "Single Line Text" +#: common.php:2509 +msgid "Donations are not editable" msgstr "" -#: ../common.php:2284 ../form_detail.php:692 -msgid "Paragraph Text" +#: common.php:3501 form_list.php:325 form_list.php:387 form_list.php:508 +#: form_settings.php:1006 form_settings.php:1770 +#: includes/addon/class-gf-feed-addon.php:1137 js.php:257 js.php:317 +#: notification.php:446 notification.php:1184 +msgid "Active" msgstr "" -#: ../common.php:2286 ../form_detail.php:501 ../form_detail.php:518 -#: ../form_detail.php:552 ../form_detail.php:566 ../form_detail.php:581 -#: ../form_detail.php:693 ../form_detail.php:720 ../form_detail.php:914 -msgid "Drop Down" +#: common.php:3502 form_list.php:321 form_list.php:391 form_list.php:508 +#: form_settings.php:1002 form_settings.php:1770 +#: includes/addon/class-gf-feed-addon.php:1137 js.php:257 js.php:321 +#: notification.php:442 notification.php:1184 +msgid "Inactive" msgstr "" -#: ../common.php:2288 ../form_detail.php:694 ../form_detail.php:721 -#: ../form_detail.php:917 -msgid "Multi Select" +#: common.php:3503 common.php:3532 form_detail.php:1472 select_columns.php:228 +msgid "Save" msgstr "" -#: ../common.php:2290 ../form_detail.php:580 ../form_detail.php:695 -#: ../js.php:495 -msgid "Number" +#: common.php:3504 entry_detail.php:484 +msgid "Update" msgstr "" -#: ../common.php:2292 ../form_detail.php:553 ../form_detail.php:696 -#: ../form_detail.php:722 ../form_detail.php:915 -msgid "Checkboxes" +#: common.php:3505 form_display.php:754 form_display.php:2237 js.php:548 +msgid "Previous" msgstr "" -#: ../common.php:2294 ../form_detail.php:502 ../form_detail.php:519 -#: ../form_detail.php:554 ../form_detail.php:568 ../form_detail.php:697 -#: ../form_detail.php:723 ../form_detail.php:916 -msgid "Radio Buttons" +#: common.php:3506 +msgid "Select a format" msgstr "" -#: ../common.php:2296 ../form_detail.php:504 ../form_detail.php:582 -#: ../form_detail.php:698 -msgid "Hidden" +#: common.php:3507 +msgid "5 of %d items shown. Edit field to view all" msgstr "" -#: ../common.php:2298 -msgid "HTML" +#: common.php:3508 +msgid "Enter a value" msgstr "" -#: ../common.php:2300 ../js.php:383 -msgid "Section Break" +#: common.php:3509 +msgid "Untitled Form" msgstr "" -#: ../common.php:2302 ../form_display.php:2567 -msgid "Page Break" +#: common.php:3510 +msgid "" +"We would love to hear from you! Please fill out this form and we will get " +"in touch with you shortly." msgstr "" -#: ../common.php:2304 ../form_settings.php:1418 -#: ../includes/addon/class-gf-payment-addon.php:1076 -#: ../includes/addon/class-gf-payment-addon.php:1137 -#: ../includes/addon/class-gf-payment-addon.php:1141 ../js.php:414 -#: ../js.php:589 ../notification.php:509 ../notification.php:1033 -msgid "Name" +#: common.php:3511 common.php:3540 form_detail.php:2751 +msgid "Thanks for contacting us! We will get in touch with you shortly." msgstr "" -#: ../common.php:2308 ../form_detail.php:702 ../js.php:515 -msgid "Time" +#: common.php:3512 form_display.php:956 form_list.php:169 +msgid "Submit" msgstr "" -#: ../common.php:2310 ../form_detail.php:703 ../js.php:504 -msgid "Phone" +#: common.php:3513 notification.php:313 +msgid "Loading..." msgstr "" -#: ../common.php:2312 ../includes/addon/class-gf-payment-addon.php:1419 -#: ../js.php:469 -msgid "Address" +#: common.php:3514 +msgid "this field if" msgstr "" -#: ../common.php:2314 ../form_detail.php:704 ../js.php:520 -msgid "Website" +#: common.php:3515 +msgid "this page" msgstr "" -#: ../common.php:2316 ../form_detail.php:705 -#: ../includes/addon/class-gf-payment-addon.php:1418 ../js.php:488 -msgid "Email" +#: common.php:3516 +msgid "this form button if" msgstr "" -#: ../common.php:2318 ../js.php:526 -msgid "Password" +#: common.php:3517 +msgid "Show" msgstr "" -#: ../common.php:2320 ../form_detail.php:706 -msgid "File Upload" +#: common.php:3518 +msgid "Hide" msgstr "" -#: ../common.php:2322 -msgid "CAPTCHA" +#: common.php:3519 entry_list.php:773 form_list.php:383 +msgid "All" msgstr "" -#: ../common.php:2324 ../form_detail.php:707 ../js.php:406 -msgid "List" +#: common.php:3520 includes/addon/class-gf-payment-addon.php:1901 +msgid "Any" msgstr "" -#: ../common.php:2326 ../js.php:476 -msgid "Credit Card" +#: common.php:3521 +msgid "of the following match:" msgstr "" -#: ../common.php:2328 ../common.php:3289 ../common.php:4545 -#: ../form_detail.php:1026 ../form_list.php:409 ../form_list.php:427 -#: ../gravityforms.php:1316 ../widget.php:75 -msgid "Title" +#: common.php:3522 includes/addon/class-gf-addon.php:1958 notification.php:193 +#: notification.php:712 +msgid "is" msgstr "" -#: ../common.php:2330 -msgid "Body" +#: common.php:3523 includes/addon/class-gf-addon.php:1962 notification.php:194 +#: notification.php:713 +msgid "is not" msgstr "" -#: ../common.php:2332 -msgid "Excerpt" +#: common.php:3524 includes/addon/class-gf-addon.php:1966 notification.php:195 +#: notification.php:714 +msgid "greater than" msgstr "" -#: ../common.php:2334 -msgid "Tags" +#: common.php:3525 includes/addon/class-gf-addon.php:1970 notification.php:196 +#: notification.php:715 +msgid "less than" msgstr "" -#: ../common.php:2336 ../form_detail.php:926 -msgid "Category" +#: common.php:3526 includes/addon/class-gf-addon.php:1974 notification.php:197 +#: notification.php:716 +msgid "contains" msgstr "" -#: ../common.php:2338 ../form_detail.php:421 ../form_detail.php:614 -#: ../form_detail.php:651 ../form_settings.php:445 ../gravityforms.php:1437 -msgid "Image" +#: common.php:3527 includes/addon/class-gf-addon.php:1978 notification.php:198 +#: notification.php:717 +msgid "starts with" msgstr "" -#: ../common.php:2340 -msgid "Custom Field" +#: common.php:3528 includes/addon/class-gf-addon.php:1982 notification.php:199 +#: notification.php:718 +msgid "ends with" msgstr "" -#: ../common.php:2344 ../js.php:589 ../js.php:659 -msgid "Quantity" +#: common.php:3530 +msgid "Use this confirmation if" msgstr "" -#: ../common.php:2346 ../js.php:618 -msgid "Option" +#: common.php:3531 +msgid "Send this notification if" msgstr "" -#: ../common.php:2348 ../js.php:601 -msgid "Shipping" +#: common.php:3533 +msgid "Saving..." msgstr "" -#: ../common.php:2462 -msgid "Afghanistan" +#: common.php:3534 +msgid "Are you sure you wish to cancel these changes?" msgstr "" -#: ../common.php:2462 -msgid "Albania" +#: common.php:3535 form_settings.php:1508 +msgid "There was an issue saving this confirmation." msgstr "" -#: ../common.php:2462 -msgid "Algeria" +#: common.php:3536 +msgid "Are you sure you wish to delete this confirmation?" msgstr "" -#: ../common.php:2462 -msgid "American Samoa" +#: common.php:3537 form_settings.php:1528 +msgid "There was an issue deleting this confirmation." msgstr "" -#: ../common.php:2462 -msgid "Andorra" +#: common.php:3538 +msgid "" +"There are unsaved changes to the current confirmation. Would you like to " +"discard these changes?" msgstr "" -#: ../common.php:2462 -msgid "Angola" +#: common.php:3539 +msgid "Untitled Confirmation" msgstr "" -#: ../common.php:2462 -msgid "Antigua and Barbuda" +#: common.php:3541 +msgid "Please select a page." msgstr "" -#: ../common.php:2462 -msgid "Argentina" +#: common.php:3542 +msgid "Please enter a URL." msgstr "" -#: ../common.php:2462 -msgid "Armenia" +#: common.php:3543 +msgid "Please enter a confirmation name." msgstr "" -#: ../common.php:2462 ../form_detail.php:1340 -msgid "Australia" +#: common.php:3545 +msgid "" +"This form contains conditional logic dependent upon this field. Are you " +"sure you want to delete this field? 'OK' to delete, 'Cancel' to abort." msgstr "" -#: ../common.php:2462 -msgid "Austria" +#: common.php:3546 +msgid "" +"This form contains conditional logic dependent upon this choice. Are you " +"sure you want to delete this choice? 'OK' to delete, 'Cancel' to abort." msgstr "" -#: ../common.php:2462 -msgid "Azerbaijan" +#: common.php:3547 +msgid "" +"This form contains conditional logic dependent upon this choice. Are you " +"sure you want to modify this choice? 'OK' to delete, 'Cancel' to abort." msgstr "" -#: ../common.php:2462 -msgid "Bahamas" +#: common.php:3549 +msgid "" +"

    Merge Tags
    Merge tags allow you to dynamically populate submitted " +"field values in your form content wherever this merge tag icon is present." msgstr "" -#: ../common.php:2462 -msgid "Bahrain" +#: common.php:3557 +msgid "Add a condition" msgstr "" -#: ../common.php:2462 -msgid "Bangladesh" +#: common.php:3558 +msgid "Remove a condition" msgstr "" -#: ../common.php:2462 -msgid "Barbados" +#: common.php:3559 +msgid "Include results if {0} match:" msgstr "" -#: ../common.php:2462 -msgid "Belarus" +#: common.php:3561 +msgid "Custom Choices" msgstr "" -#: ../common.php:2462 -msgid "Belgium" +#: common.php:3562 +msgid "Predefined Choices" msgstr "" -#: ../common.php:2462 -msgid "Belize" +#: common.php:3696 +msgid "Any form field" msgstr "" -#: ../common.php:2462 -msgid "Benin" +#: common.php:3800 +msgid "Entry ID" msgstr "" -#: ../common.php:2462 -msgid "Bermuda" +#: common.php:3804 export.php:780 includes/addon/class-gf-addon.php:1691 +#: select_columns.php:165 +msgid "Entry Date" msgstr "" -#: ../common.php:2462 -msgid "Bhutan" +#: common.php:3806 +msgid "yyyy-mm-dd" msgstr "" -#: ../common.php:2462 -msgid "Bolivia" +#: common.php:3809 entry_list.php:781 +msgid "Starred" msgstr "" -#: ../common.php:2462 -msgid "Bosnia and Herzegovina" +#: common.php:3823 +msgid "IP Address" msgstr "" -#: ../common.php:2462 -msgid "Botswana" +#: common.php:3827 +msgid "Source URL" msgstr "" -#: ../common.php:2462 -msgid "Brazil" +#: common.php:3831 entry_detail.php:405 export.php:785 select_columns.php:168 +msgid "Payment Status" msgstr "" -#: ../common.php:2462 -msgid "Brunei" +#: common.php:3857 entry_detail.php:410 export.php:784 select_columns.php:171 +msgid "Payment Date" msgstr "" -#: ../common.php:2462 -msgid "Bulgaria" +#: common.php:3861 entry_detail.php:422 export.php:783 +#: includes/addon/class-gf-payment-addon.php:1211 +#: includes/addon/class-gf-payment-addon.php:1216 select_columns.php:170 +msgid "Payment Amount" msgstr "" -#: ../common.php:2462 -msgid "Burkina Faso" +#: common.php:3865 +msgid "Transaction ID" msgstr "" -#: ../common.php:2462 -msgid "Burundi" +#: common.php:3869 entry_detail.php:382 select_columns.php:172 +msgid "User" msgstr "" -#: ../common.php:2462 -msgid "Cambodia" +#: common.php:3958 +msgid "This type of file is not allowed. Must be one of the following: " msgstr "" -#: ../common.php:2462 -msgid "Cameroon" +#: common.php:3959 +msgid "Delete this file" msgstr "" -#: ../common.php:2462 -msgid "Canada" +#: common.php:3960 +msgid "in progress" msgstr "" -#: ../common.php:2462 -msgid "Cape Verde" +#: common.php:3961 +msgid "File exceeds size limit" msgstr "" -#: ../common.php:2462 -msgid "Cayman Islands" +#: common.php:3962 +msgid "This type of file is not allowed." msgstr "" -#: ../common.php:2462 -msgid "Central African Republic" +#: common.php:3963 +msgid "Maximum number of files reached" msgstr "" -#: ../common.php:2462 -msgid "Chad" +#: common.php:3964 +msgid "There was a problem while saving the file on the server" msgstr "" -#: ../common.php:2462 -msgid "Chile" +#: common.php:3965 +msgid "Please wait for the uploading to complete" msgstr "" -#: ../common.php:2462 -msgid "China" +#: common.php:3966 entry_detail.php:491 form_detail.php:1463 +#: form_detail.php:1473 includes/addon/class-gf-results.php:326 +#: includes/locking/class-gf-locking.php:198 +#: includes/templates/edit-shortcode-form.tpl.php:22 select_columns.php:229 +msgid "Cancel" msgstr "" -#: ../common.php:2462 -msgid "Colombia" +#: common.php:3967 +msgid "Cancel this upload" msgstr "" -#: ../common.php:2462 -msgid "Comoros" +#: common.php:3968 +msgid "Cancelled" msgstr "" -#: ../common.php:2462 -msgid "Congo, Democratic Republic of the" +#: currency.php:111 +msgid "Australian Dollar" msgstr "" -#: ../common.php:2462 -msgid "Congo, Republic of the" +#: currency.php:112 +msgid "Brazilian Real" msgstr "" -#: ../common.php:2462 -msgid "Costa Rica" +#: currency.php:113 +msgid "Canadian Dollar" msgstr "" -#: ../common.php:2462 -msgid "Côte d'Ivoire" +#: currency.php:114 +msgid "Czech Koruna" msgstr "" -#: ../common.php:2462 -msgid "Croatia" +#: currency.php:115 +msgid "Danish Krone" msgstr "" -#: ../common.php:2462 -msgid "Cuba" +#: currency.php:116 +msgid "Euro" msgstr "" -#: ../common.php:2462 -msgid "Cyprus" +#: currency.php:117 +msgid "Hong Kong Dollar" msgstr "" -#: ../common.php:2462 -msgid "Czech Republic" +#: currency.php:118 +msgid "Hungarian Forint" msgstr "" -#: ../common.php:2462 -msgid "Denmark" +#: currency.php:119 +msgid "Israeli New Sheqel" msgstr "" -#: ../common.php:2462 -msgid "Djibouti" +#: currency.php:120 +msgid "Japanese Yen" msgstr "" -#: ../common.php:2462 -msgid "Dominica" +#: currency.php:121 +msgid "Malaysian Ringgit" msgstr "" -#: ../common.php:2462 -msgid "Dominican Republic" +#: currency.php:122 +msgid "Mexican Peso" msgstr "" -#: ../common.php:2462 -msgid "East Timor" +#: currency.php:123 +msgid "Norwegian Krone" msgstr "" -#: ../common.php:2462 -msgid "Ecuador" +#: currency.php:124 +msgid "New Zealand Dollar" msgstr "" -#: ../common.php:2462 -msgid "Egypt" +#: currency.php:125 +msgid "Philippine Peso" msgstr "" -#: ../common.php:2462 -msgid "El Salvador" +#: currency.php:126 +msgid "Polish Zloty" msgstr "" -#: ../common.php:2462 -msgid "Equatorial Guinea" +#: currency.php:127 +msgid "Pound Sterling" msgstr "" -#: ../common.php:2462 -msgid "Eritrea" +#: currency.php:128 +msgid "Russian Ruble" msgstr "" -#: ../common.php:2462 -msgid "Estonia" +#: currency.php:129 +msgid "Singapore Dollar" msgstr "" -#: ../common.php:2462 -msgid "Ethiopia" +#: currency.php:130 +msgid "South African Rand" msgstr "" -#: ../common.php:2462 -msgid "Fiji" +#: currency.php:131 +msgid "Swedish Krona" msgstr "" -#: ../common.php:2462 -msgid "Finland" +#: currency.php:132 +msgid "Swiss Franc" msgstr "" -#: ../common.php:2462 -msgid "France" +#: currency.php:133 +msgid "Taiwan New Dollar" msgstr "" -#: ../common.php:2462 -msgid "French Polynesia" +#: currency.php:134 +msgid "Thai Baht" msgstr "" -#: ../common.php:2462 -msgid "Gabon" +#: currency.php:135 +msgid "U.S. Dollar" msgstr "" -#: ../common.php:2463 -msgid "Gambia" +#: entry_detail.php:100 +msgid "Oops! We couldn't find your entry. Please try again" msgstr "" -#: ../common.php:2463 -msgctxt "Country" -msgid "Georgia" +#: entry_detail.php:161 +msgid "You don't have adequate permission to delete notes." msgstr "" -#: ../common.php:2463 -msgid "Germany" +#: entry_detail.php:189 entry_list.php:102 entry_list.php:122 form_list.php:84 +msgid "You don't have adequate permission to delete entries." msgstr "" -#: ../common.php:2463 -msgid "Ghana" +#: entry_detail.php:212 +msgid "" +"'Would you like to delete this file? \\'Cancel\\' to stop. \\'OK\\' to " +"delete'" msgstr "" -#: ../common.php:2463 -msgid "Greece" +#: entry_detail.php:223 js.php:514 +msgid "Ajax error while deleting field." msgstr "" -#: ../common.php:2463 -msgid "Greenland" +#: entry_detail.php:278 entry_list.php:430 +msgid "You must select at least one type of notification to resend." msgstr "" -#: ../common.php:2463 -msgid "Grenada" +#: entry_detail.php:296 +msgid "Notifications were resent successfully." msgstr "" -#: ../common.php:2463 -msgid "Guam" +#: entry_detail.php:342 +msgid "Entry #" msgstr "" -#: ../common.php:2463 -msgid "Guatemala" +#: entry_detail.php:342 entry_list.php:758 form_detail.php:148 +#: form_settings.php:1377 includes/addon/class-gf-results.php:236 +msgid "Form Name" msgstr "" -#: ../common.php:2463 -msgid "Guinea" +#: entry_detail.php:367 +msgid "Entry" msgstr "" -#: ../common.php:2463 -msgid "Guinea-Bissau" +#: entry_detail.php:375 +msgid "Submitted on" msgstr "" -#: ../common.php:2463 -msgid "Guyana" +#: entry_detail.php:377 export.php:789 includes/addon/class-gf-addon.php:1692 +#: select_columns.php:166 +msgid "User IP" msgstr "" -#: ../common.php:2463 -msgid "Haiti" +#: entry_detail.php:383 +msgid "View user profile" msgstr "" -#: ../common.php:2463 -msgid "Honduras" +#: entry_detail.php:389 +msgid "Embed Url" msgstr "" -#: ../common.php:2463 -msgid "Hong Kong" +#: entry_detail.php:396 +msgid "Edit Post" msgstr "" -#: ../common.php:2463 -msgid "Hungary" +#: entry_detail.php:397 +msgid "Click to edit post" msgstr "" -#: ../common.php:2463 -msgid "Iceland" +#: entry_detail.php:405 +msgid "Subscription Status" msgstr "" -#: ../common.php:2463 -msgid "India" +#: entry_detail.php:410 entry_detail.php:1034 +msgid "Start Date" msgstr "" -#: ../common.php:2463 -msgid "Indonesia" +#: entry_detail.php:416 entry_detail.php:1044 export.php:782 +#: select_columns.php:169 +msgid "Transaction Id" msgstr "" -#: ../common.php:2463 -msgid "Iran" +#: entry_detail.php:416 +msgid "Subscriber Id" msgstr "" -#: ../common.php:2463 -msgid "Iraq" +#: entry_detail.php:422 +msgid "Subscription Amount" msgstr "" -#: ../common.php:2463 -msgid "Ireland" +#: entry_detail.php:440 entry_list.php:823 entry_list.php:1131 +#: entry_list.php:1263 +msgid "Not Spam" msgstr "" -#: ../common.php:2463 -msgid "Israel" +#: entry_detail.php:446 entry_detail.php:459 +msgid "" +"You are about to delete this entry. \\'Cancel\\' to stop, \\'OK\\' to " +"delete." msgstr "" -#: ../common.php:2463 -msgid "Italy" +#: entry_detail.php:446 entry_detail.php:459 entry_list.php:817 +#: entry_list.php:827 entry_list.php:1115 entry_list.php:1140 +#: entry_list.php:1257 entry_list.php:1267 +msgid "Delete Permanently" msgstr "" -#: ../common.php:2463 -msgid "Jamaica" +#: entry_detail.php:454 entry_list.php:813 entry_list.php:1106 +#: entry_list.php:1253 form_list.php:410 form_list.php:530 form_list.php:531 +#: form_list.php:619 +msgid "Restore" msgstr "" -#: ../common.php:2463 -msgid "Japan" +#: entry_detail.php:468 entry_list.php:1289 form_detail.php:2364 +msgid "Move to Trash" msgstr "" -#: ../common.php:2463 -msgid "Jordan" +#: entry_detail.php:474 +msgid "Mark as Spam" msgstr "" -#: ../common.php:2463 -msgid "Kazakhstan" +#: entry_detail.php:484 form_list.php:520 form_settings.php:1779 +#: gravityforms.php:2459 includes/addon/class-gf-feed-addon.php:723 +#: notification.php:1192 +msgid "Edit" msgstr "" -#: ../common.php:2463 -msgid "Kenya" +#: entry_detail.php:513 form_settings.php:1434 notification.php:115 +#: notification.php:429 notification.php:433 +msgid "Notifications" msgstr "" -#: ../common.php:2463 -msgid "Kiribati" +#: entry_detail.php:524 +msgid "" +"You cannot resend notifications for this entry because this form does not " +"currently have any notifications configured." msgstr "" -#: ../common.php:2463 -msgid "North Korea" +#: entry_detail.php:526 entry_list.php:879 +msgid "Configure Notifications" msgstr "" -#: ../common.php:2463 -msgid "South Korea" +#: entry_detail.php:542 entry_list.php:898 notification.php:597 +msgid "Send To" msgstr "" -#: ../common.php:2463 -msgid "Kosovo" +#: entry_detail.php:548 entry_list.php:386 entry_list.php:838 +#: entry_list.php:903 entry_list.php:1278 +msgid "Resend Notifications" msgstr "" -#: ../common.php:2463 -msgid "Kuwait" +#: entry_detail.php:551 entry_list.php:905 +msgid "Resending..." msgstr "" -#: ../common.php:2463 -msgid "Kyrgyzstan" +#: entry_detail.php:565 entry_list.php:839 entry_list.php:941 +msgid "Print" msgstr "" -#: ../common.php:2463 -msgid "Laos" +#: entry_detail.php:568 +msgid "include notes" msgstr "" -#: ../common.php:2463 -msgid "Latvia" +#: entry_detail.php:593 +msgid "Notes" msgstr "" -#: ../common.php:2463 -msgid "Lebanon" +#: entry_detail.php:632 +msgid "Entry Updated." msgstr "" -#: ../common.php:2463 -msgid "Lesotho" +#: entry_detail.php:644 +msgid "Details" msgstr "" -#: ../common.php:2463 -msgid "Liberia" +#: entry_detail.php:703 +msgid " Bulk action" msgstr "" -#: ../common.php:2463 -msgid "Libya" +#: entry_detail.php:705 entry_list.php:808 entry_list.php:1248 +msgid " Bulk action " msgstr "" -#: ../common.php:2463 -msgid "Liechtenstein" +#: entry_detail.php:706 form_detail.php:1474 form_settings.php:1781 +#: includes/addon/class-gf-feed-addon.php:691 +#: includes/addon/class-gf-feed-addon.php:724 notification.php:1194 +msgid "Delete" msgstr "" -#: ../common.php:2463 -msgid "Lithuania" +#: entry_detail.php:709 entry_list.php:856 entry_list.php:1295 +#: form_list.php:421 form_list.php:630 +msgid "Apply" msgstr "" -#: ../common.php:2463 -msgid "Luxembourg" +#: entry_detail.php:758 +msgid "added on" msgstr "" -#: ../common.php:2463 -msgid "Macedonia" +#: entry_detail.php:773 +msgid "Add Note" msgstr "" -#: ../common.php:2463 -msgid "Madagascar" +#: entry_detail.php:781 +msgid "Also email this note to" msgstr "" -#: ../common.php:2463 -msgid "Malawi" +#: entry_detail.php:789 +msgid "Subject:" msgstr "" -#: ../common.php:2463 -msgid "Malaysia" +#: entry_detail.php:820 print-entry.php:91 +msgid "Entry # " msgstr "" -#: ../common.php:2463 -msgid "Maldives" +#: entry_detail.php:829 +msgid "show empty fields" msgstr "" -#: ../common.php:2463 -msgid "Mali" +#: entry_detail.php:1013 +msgid "Subscription Details" msgstr "" -#: ../common.php:2463 -msgid "Malta" +#: entry_detail.php:1013 +msgid "Payment Details" msgstr "" -#: ../common.php:2463 -msgid "Marshall Islands" +#: entry_detail.php:1024 +msgid "Status" msgstr "" -#: ../common.php:2463 -msgid "Mauritania" +#: entry_detail.php:1044 +msgid "Subscription Id" msgstr "" -#: ../common.php:2463 -msgid "Mauritius" +#: entry_detail.php:1054 includes/addon/class-gf-payment-addon.php:1168 +#: includes/addon/class-gf-payment-addon.php:1172 +msgid "Recurring Amount" msgstr "" -#: ../common.php:2463 -msgid "Mexico" +#: entry_detail.php:1054 includes/addon/class-gf-payment-addon.php:1079 +msgid "Amount" msgstr "" -#: ../common.php:2463 -msgid "Micronesia" +#: entry_list.php:20 +msgid "You don't have any active forms. Let's go %screate one%s" msgstr "" -#: ../common.php:2463 -msgid "Moldova" +#: entry_list.php:100 +msgid "Entry deleted." msgstr "" -#: ../common.php:2463 -msgid "Monaco" +#: entry_list.php:114 +msgid "%d entries" msgstr "" -#: ../common.php:2463 -msgid "Mongolia" +#: entry_list.php:114 +msgid "1 entry" msgstr "" -#: ../common.php:2463 -msgid "Montenegro" +#: entry_list.php:120 +msgid "%s deleted." msgstr "" -#: ../common.php:2463 -msgid "Morocco" +#: entry_list.php:128 +msgid "%s moved to Trash." msgstr "" -#: ../common.php:2463 -msgid "Mozambique" +#: entry_list.php:133 +msgid "%s restored from the Trash." msgstr "" -#: ../common.php:2463 -msgid "Myanmar" +#: entry_list.php:138 +msgid "%s restored from the spam." msgstr "" -#: ../common.php:2463 -msgid "Namibia" +#: entry_list.php:143 +msgid "%s marked as spam." msgstr "" -#: ../common.php:2463 -msgid "Nauru" +#: entry_list.php:148 +msgid "%s marked as read." msgstr "" -#: ../common.php:2463 -msgid "Nepal" +#: entry_list.php:153 +msgid "%s marked as unread." msgstr "" -#: ../common.php:2463 -msgid "Netherlands" +#: entry_list.php:158 +msgid "%s starred." msgstr "" -#: ../common.php:2463 -msgid "New Zealand" +#: entry_list.php:163 +msgid "%s unstarred." msgstr "" -#: ../common.php:2464 -msgid "Nicaragua" +#: entry_list.php:225 +msgid "«" msgstr "" -#: ../common.php:2464 -msgid "Niger" +#: entry_list.php:226 +msgid "»" msgstr "" -#: ../common.php:2464 -msgid "Nigeria" +#: entry_list.php:324 +msgid "Ajax error while setting lead property" msgstr "" -#: ../common.php:2464 -msgid "Norway" +#: entry_list.php:378 +msgid "Please select at least one entry." msgstr "" -#: ../common.php:2464 -msgid "Northern Mariana Islands" +#: entry_list.php:392 entry_list.php:1279 +msgid "Print Entries" msgstr "" -#: ../common.php:2464 -msgid "Oman" +#: entry_list.php:455 +msgid "Notifications for %s were resent successfully." msgstr "" -#: ../common.php:2464 -msgid "Pakistan" +#: entry_list.php:457 +msgid "entry" msgstr "" -#: ../common.php:2464 -msgid "Palau" +#: entry_list.php:457 +msgid "entries" msgstr "" -#: ../common.php:2464 -msgid "Palestine" +#: entry_list.php:560 +msgid "All %s{0}%s entries on this page are selected." msgstr "" -#: ../common.php:2464 -msgid "Panama" +#: entry_list.php:561 +msgid "Select all %s{0}%s entries." msgstr "" -#: ../common.php:2464 -msgid "Papua New Guinea" +#: entry_list.php:562 +msgid "All %s{0}%s entries have been selected." msgstr "" -#: ../common.php:2464 -msgid "Paraguay" +#: entry_list.php:563 +msgid "Clear selection" msgstr "" -#: ../common.php:2464 -msgid "Peru" +#: entry_list.php:648 +msgid "Entry List" msgstr "" -#: ../common.php:2464 -msgid "Philippines" +#: entry_list.php:758 form_list.php:459 form_list.php:479 gravityforms.php:1048 +#: gravityforms.php:2491 +msgid "Entries" msgstr "" -#: ../common.php:2464 -msgid "Poland" +#: entry_list.php:777 gravityforms.php:1389 +msgid "Unread" msgstr "" -#: ../common.php:2464 -msgid "Portugal" +#: entry_list.php:788 entry_list.php:844 entry_list.php:1163 +#: entry_list.php:1283 +msgid "Spam" msgstr "" -#: ../common.php:2464 -msgid "Puerto Rico" +#: entry_list.php:795 entry_list.php:850 entry_list.php:1172 form_list.php:395 +#: form_list.php:559 +msgid "Trash" msgstr "" -#: ../common.php:2464 -msgid "Qatar" +#: entry_list.php:799 +msgid "Search" msgstr "" -#: ../common.php:2464 -msgid "Romania" +#: entry_list.php:806 entry_list.php:1246 form_list.php:406 form_list.php:408 +#: form_list.php:615 form_list.php:617 +msgid "Bulk action" msgstr "" -#: ../common.php:2464 -msgid "Russia" +#: entry_list.php:834 entry_list.php:1274 +msgid "Mark as Read" msgstr "" -#: ../common.php:2464 -msgid "Rwanda" +#: entry_list.php:835 entry_list.php:1275 +msgid "Mark as Unread" msgstr "" -#: ../common.php:2464 -msgid "Saint Kitts and Nevis" +#: entry_list.php:836 entry_list.php:1276 +msgid "Add Star" msgstr "" -#: ../common.php:2464 -msgid "Saint Lucia" +#: entry_list.php:837 entry_list.php:1277 +msgid "Remove Star" msgstr "" -#: ../common.php:2464 -msgid "Saint Vincent and the Grenadines" +#: entry_list.php:860 +msgid "" +"WARNING! This operation cannot be undone. Empty trash? \\'Ok\\' to empty " +"trash. \\'Cancel\\' to abort." msgstr "" -#: ../common.php:2464 -msgid "Samoa" +#: entry_list.php:860 +msgid "" +"WARNING! This operation cannot be undone. Permanently delete all spam? " +"\\'Ok\\' to delete. \\'Cancel\\' to abort." msgstr "" -#: ../common.php:2464 -msgid "San Marino" +#: entry_list.php:861 +msgid "Empty Trash" msgstr "" -#: ../common.php:2464 -msgid "Sao Tome and Principe" +#: entry_list.php:861 +msgid "Delete All Spam" msgstr "" -#: ../common.php:2464 -msgid "Saudi Arabia" +#: entry_list.php:877 +msgid "" +"You cannot resend notifications for these entries because this form does " +"not currently have any notifications configured." msgstr "" -#: ../common.php:2464 -msgid "Senegal" +#: entry_list.php:883 +msgid "" +"Specify which notifications you would like to resend for the selected " +"entries." msgstr "" -#: ../common.php:2464 -msgid "Serbia and Montenegro" +#: entry_list.php:914 +msgid "Close Window" msgstr "" -#: ../common.php:2464 -msgid "Seychelles" +#: entry_list.php:929 +msgid "Print all of the selected entries at once." msgstr "" -#: ../common.php:2464 -msgid "Sierra Leone" +#: entry_list.php:933 +msgid "Include notes" msgstr "" -#: ../common.php:2464 -msgid "Singapore" +#: entry_list.php:938 +msgid "Add page break between entries" msgstr "" -#: ../common.php:2464 -msgid "Slovakia" +#: entry_list.php:981 entry_list.php:1005 +msgid "click to select columns to display" msgstr "" -#: ../common.php:2464 -msgid "Slovenia" +#: entry_list.php:1101 entry_list.php:1126 entry_list.php:1152 +msgid "View this entry" msgstr "" -#: ../common.php:2464 -msgid "Solomon Islands" +#: entry_list.php:1101 entry_list.php:1126 entry_list.php:1152 +#: includes/addon/class-gf-payment-addon.php:1894 +msgid "View" msgstr "" -#: ../common.php:2464 -msgid "Somalia" +#: entry_list.php:1106 +msgid "Restore this entry" msgstr "" -#: ../common.php:2464 -msgid "South Africa" +#: entry_list.php:1115 entry_list.php:1140 +msgid "Delete this entry permanently" msgstr "" -#: ../common.php:2464 -msgid "Spain" +#: entry_list.php:1131 +msgid "Mark this entry as not spam" msgstr "" -#: ../common.php:2464 -msgid "Sri Lanka" +#: entry_list.php:1156 +msgid "Mark read" msgstr "" -#: ../common.php:2464 -msgid "Sudan" +#: entry_list.php:1156 +msgid "Mark this entry as unread" msgstr "" -#: ../common.php:2464 -msgid "Sudan, South" +#: entry_list.php:1156 +msgid "Mark unread" msgstr "" -#: ../common.php:2464 -msgid "Suriname" +#: entry_list.php:1163 +msgid "Mark this entry as spam" msgstr "" -#: ../common.php:2464 -msgid "Swaziland" +#: entry_list.php:1172 +msgid "Move this entry to the trash" msgstr "" -#: ../common.php:2464 -msgid "Sweden" +#: entry_list.php:1210 +msgid "This form does not have any unread entries matching the search criteria." msgstr "" -#: ../common.php:2464 -msgid "Switzerland" +#: entry_list.php:1210 +msgid "This form does not have any unread entries." msgstr "" -#: ../common.php:2464 -msgid "Syria" +#: entry_list.php:1214 +msgid "This form does not have any starred entries matching the search criteria." msgstr "" -#: ../common.php:2464 -msgid "Taiwan" +#: entry_list.php:1214 +msgid "This form does not have any starred entries." msgstr "" -#: ../common.php:2464 -msgid "Tajikistan" +#: entry_list.php:1218 +msgid "This form does not have any spam." msgstr "" -#: ../common.php:2464 -msgid "Tanzania" +#: entry_list.php:1223 +msgid "" +"This form does not have any entries in the trash matching the search " +"criteria." msgstr "" -#: ../common.php:2464 -msgid "Thailand" +#: entry_list.php:1223 +msgid "This form does not have any entries in the trash." msgstr "" -#: ../common.php:2464 -msgid "Togo" +#: entry_list.php:1228 +msgid "This form does not have any entries matching the search criteria." msgstr "" -#: ../common.php:2464 -msgid "Tonga" +#: entry_list.php:1228 +msgid "This form does not have any entries yet." msgstr "" -#: ../common.php:2464 -msgid "Trinidad and Tobago" +#: entry_list.php:1437 +msgid "Displaying %s - %s of %s" msgstr "" -#: ../common.php:2464 -msgid "Tunisia" +#: export.php:16 export.php:459 +msgid "Please select the fields to be exported" msgstr "" -#: ../common.php:2464 -msgid "Turkey" +#: export.php:39 +msgid "Please select the forms to be exported" msgstr "" -#: ../common.php:2464 -msgid "Turkmenistan" +#: export.php:306 +msgid "" +"Forms could not be imported. Please make sure your export file is in the " +"correct format." msgstr "" -#: ../common.php:2464 -msgid "Tuvalu" +#: export.php:308 +msgid "" +"Forms could not be imported. Your export file is not compatible with your " +"current version of Gravity Forms." msgstr "" -#: ../common.php:2464 -msgid "Uganda" +#: export.php:310 +msgid "forms" msgstr "" -#: ../common.php:2464 -msgid "Ukraine" +#: export.php:310 +msgid "form" msgstr "" -#: ../common.php:2464 -msgid "United Arab Emirates" +#: export.php:311 +msgid "Edit Form" msgstr "" -#: ../common.php:2464 -msgid "United Kingdom" +#: export.php:317 export.php:882 +msgid "Import Forms" msgstr "" -#: ../common.php:2465 ../common.php:4343 -msgid "United States" +#: export.php:322 +msgid "" +"Select the Gravity Forms export file you would like to import. When you " +"click the import button below, Gravity Forms will import the forms." msgstr "" -#: ../common.php:2465 -msgid "Uruguay" +#: export.php:333 tooltips.php:148 +msgid "Select File" msgstr "" -#: ../common.php:2465 -msgid "Uzbekistan" +#: export.php:339 +msgid "Import" msgstr "" -#: ../common.php:2465 -msgid "Vanuatu" +#: export.php:355 export.php:881 +msgid "Export Forms" msgstr "" -#: ../common.php:2465 -msgid "Vatican City" +#: export.php:359 +msgid "" +"Select the forms you would like to export. When you click the download " +"button below, Gravity Forms will create a JSON file for you to save to your " +"computer. Once you've saved the download file, you can use the Import tool " +"to import the forms." msgstr "" -#: ../common.php:2465 -msgid "Venezuela" +#: export.php:366 +msgid "Select Forms" msgstr "" -#: ../common.php:2465 -msgid "Vietnam" +#: export.php:387 export.php:539 +msgid "Download Export File" msgstr "" -#: ../common.php:2465 -msgid "Virgin Islands, British" +#: export.php:403 export.php:550 export.php:877 +msgid "Export Entries" msgstr "" -#: ../common.php:2465 -msgid "Virgin Islands, U.S." +#: export.php:428 +msgid "Ajax error while selecting a form" msgstr "" -#: ../common.php:2465 -msgid "Yemen" +#: export.php:444 +msgid "Deselect All" msgstr "" -#: ../common.php:2465 -msgid "Zambia" +#: export.php:444 +msgid "Select All" msgstr "" -#: ../common.php:2465 -msgid "Zimbabwe" +#: export.php:453 +msgid "Export entries if {0} of the following match:" msgstr "" -#: ../common.php:2472 -msgid "AFGHANISTAN" +#: export.php:468 +msgid "" +"Select a form below to export entries. Once you have selected a form you " +"may select the fields you would like to export and then define optional " +"filters for field values and the date range. When you click the download " +"button below, Gravity Forms will create a CSV file for you to save to your " +"computer." msgstr "" -#: ../common.php:2473 -msgid "ALBANIA" +#: export.php:476 gravityforms.php:2351 +msgid "Select A Form" msgstr "" -#: ../common.php:2474 -msgid "ALGERIA" +#: export.php:481 +msgid "Select a form" msgstr "" -#: ../common.php:2475 -msgid "AMERICAN SAMOA" +#: export.php:496 +msgid "Select Fields" msgstr "" -#: ../common.php:2476 -msgid "ANDORRA" +#: export.php:505 form_settings.php:1326 +#: includes/addon/class-gf-payment-addon.php:1256 +#: includes/addon/class-gf-payment-addon.php:1258 notification.php:880 +#: tooltips.php:108 tooltips.php:122 tooltips.php:145 +msgid "Conditional Logic" msgstr "" -#: ../common.php:2477 -msgid "ANGOLA" +#: export.php:516 +msgid "Select Date Range" msgstr "" -#: ../common.php:2478 -msgid "ANTIGUA AND BARBUDA" +#: export.php:522 includes/addon/class-gf-results.php:270 +msgid "Start" msgstr "" -#: ../common.php:2479 -msgid "ARGENTINA" +#: export.php:527 includes/addon/class-gf-results.php:278 +msgid "End" msgstr "" -#: ../common.php:2480 -msgid "ARMENIA" +#: export.php:531 +msgid "" +"Date Range is optional, if no date range is selected all entries will be " +"exported." msgstr "" -#: ../common.php:2481 -msgid "AUSTRALIA" +#: export.php:541 +msgid "Exporting entries. Please wait..." msgstr "" -#: ../common.php:2482 -msgid "AUSTRIA" +#: export.php:778 +msgid "Created By (User Id)" msgstr "" -#: ../common.php:2483 -msgid "AZERBAIJAN" +#: export.php:781 includes/addon/class-gf-addon.php:1693 select_columns.php:167 +msgid "Source Url" msgstr "" -#: ../common.php:2484 -msgid "BAHAMAS" +#: export.php:788 +msgid "User Agent" msgstr "" -#: ../common.php:2485 -msgid "BAHRAIN" +#: form_detail.php:145 gravityforms.php:1046 +msgid "New Form" msgstr "" -#: ../common.php:2486 -msgid "BANGLADESH" +#: form_detail.php:148 gravityforms.php:2459 +msgid "Form Editor" msgstr "" -#: ../common.php:2487 -msgid "BARBADOS" +#: form_detail.php:159 form_detail.php:2383 form_settings.php:289 +msgid "There was an error while saving your form." msgstr "" -#: ../common.php:2488 -msgid "BELARUS" +#: form_detail.php:160 form_detail.php:2384 form_settings.php:290 +msgid "Please %scontact our support team%s." msgstr "" -#: ../common.php:2489 -msgid "BELGIUM" +#: form_detail.php:168 +msgid "" +"The form title you have entered is already taken. Please enter a unique " +"form title." msgstr "" -#: ../common.php:2490 -msgid "BELIZE" +#: form_detail.php:176 form_detail.php:2379 +msgid "Form updated successfully." msgstr "" -#: ../common.php:2491 -msgid "BENIN" +#: form_detail.php:202 +msgid "click to edit page options" msgstr "" -#: ../common.php:2492 -msgid "BERMUDA" +#: form_detail.php:207 +msgid "begin form" msgstr "" -#: ../common.php:2493 -msgid "BHUTAN" +#: form_detail.php:208 +msgid "START PAGING" msgstr "" -#: ../common.php:2494 -msgid "BOLIVIA" +#: form_detail.php:209 +msgid "top of the first page" msgstr "" -#: ../common.php:2495 -msgid "BOSNIA AND HERZEGOVINA" +#: form_detail.php:215 form_detail.php:417 +msgid "Properties" msgstr "" -#: ../common.php:2496 -msgid "BOTSWANA" +#: form_detail.php:217 form_detail.php:498 form_detail.php:1186 +msgid "Advanced" msgstr "" -#: ../common.php:2497 -msgid "BRAZIL" +#: form_detail.php:224 tooltips.php:114 +msgid "Progress Indicator" msgstr "" -#: ../common.php:2498 -msgid "BRUNEI" +#: form_detail.php:231 +msgid "Progress Bar" msgstr "" -#: ../common.php:2499 -msgid "BULGARIA" +#: form_detail.php:236 +msgid "Steps" msgstr "" -#: ../common.php:2500 -msgid "BURKINA FASO" +#: form_detail.php:241 form_detail.php:1536 +msgid "None" msgstr "" -#: ../common.php:2501 -msgid "BURUNDI" +#: form_detail.php:250 +msgid "Style" msgstr "" -#: ../common.php:2502 -msgid "CAMBODIA" +#: form_detail.php:254 +msgid "Blue" msgstr "" -#: ../common.php:2503 -msgid "CAMEROON" +#: form_detail.php:255 +msgid "Gray" msgstr "" -#: ../common.php:2504 -msgid "CANADA" +#: form_detail.php:256 form_detail.php:1420 +msgid "Green" msgstr "" -#: ../common.php:2505 -msgid "CAPE VERDE" +#: form_detail.php:257 +msgid "Orange" msgstr "" -#: ../common.php:2506 -msgid "CAYMAN ISLANDS" +#: form_detail.php:258 form_detail.php:832 +msgid "Red" msgstr "" -#: ../common.php:2507 -msgid "CENTRAL AFRICAN REPUBLIC" +#: form_detail.php:265 +msgid "Text Color" msgstr "" -#: ../common.php:2508 -msgid "CHAD" +#: form_detail.php:272 form_detail.php:817 +msgid "Background Color" msgstr "" -#: ../common.php:2509 -msgid "CHILE" +#: form_detail.php:279 tooltips.php:116 +msgid "Page Names" msgstr "" -#: ../common.php:2510 -msgid "CHINA" +#: form_detail.php:291 +msgid "Display completed progress bar on confirmation" msgstr "" -#: ../common.php:2511 -msgid "COLOMBIA" +#: form_detail.php:299 +msgid "Completion Text" msgstr "" -#: ../common.php:2512 -msgid "COMOROS" +#: form_detail.php:311 form_settings.php:452 tooltips.php:104 +msgid "CSS Class Name" msgstr "" -#: ../common.php:2513 -msgid "CONGO, DEMOCRATIC REPUBLIC OF THE" +#: form_detail.php:331 +msgid "" +"This form doesn't have any fields yet. Follow the steps below to get " +"started." msgstr "" -#: ../common.php:2514 -msgid "CONGO, REPUBLIC OF THE" +#: form_detail.php:336 +msgid "Select A Field Type" msgstr "" -#: ../common.php:2515 -msgid "COSTA RICA" +#: form_detail.php:338 +msgid "Start by seleting a field type from the nifty floating panels on the right." msgstr "" -#: ../common.php:2516 -msgid "C&OCIRC;TE D'IVOIRE" +#: form_detail.php:341 +msgid "Start Over There" msgstr "" -#: ../common.php:2517 -msgid "CROATIA" +#: form_detail.php:342 +msgid "Pick a field.. any field. Don't be shy." msgstr "" -#: ../common.php:2518 -msgid "CUBA" +#: form_detail.php:347 +msgid "Click to Add A Field" msgstr "" -#: ../common.php:2519 -msgid "CYPRUS" +#: form_detail.php:349 +msgid "" +"Once you've found the field type you want, click to add it to the form " +"editor here on the left side of your screen." msgstr "" -#: ../common.php:2520 -msgid "CZECH REPUBLIC" +#: form_detail.php:352 +msgid "Now your new field magically appears over here." msgstr "" -#: ../common.php:2521 -msgid "DENMARK" +#: form_detail.php:357 +msgid "Edit Field Options" msgstr "" -#: ../common.php:2522 -msgid "DJIBOUTI" +#: form_detail.php:359 +msgid "Click on the edit link to configure the various field options" msgstr "" -#: ../common.php:2523 -msgid "DOMINICA" +#: form_detail.php:362 +msgid "Preview your changes up here." msgstr "" -#: ../common.php:2524 -msgid "DOMINICAN REPUBLIC" +#: form_detail.php:363 +msgid "Edit the field options. Go ahead.. go crazy." msgstr "" -#: ../common.php:2525 -msgid "EAST TIMOR" +#: form_detail.php:364 +msgid "If you get stuck, mouseover the tool tips for a little help." msgstr "" -#: ../common.php:2526 -msgid "ECUADOR" +#: form_detail.php:369 +msgid "Drag to Arrange Fields" msgstr "" -#: ../common.php:2527 -msgid "EGYPT" +#: form_detail.php:371 +msgid "Drag the fields to arrange them the way you prefer" msgstr "" -#: ../common.php:2528 -msgid "EL SALVADOR" +#: form_detail.php:374 +msgid "Grab here with your cursor." msgstr "" -#: ../common.php:2529 -msgid "EQUATORIAL GUINEA" +#: form_detail.php:375 +msgid "Drag up or down to arrange your fields." msgstr "" -#: ../common.php:2530 -msgid "ERITREA" +#: form_detail.php:380 +msgid "Save Your Form" msgstr "" -#: ../common.php:2531 -msgid "ESTONIA" +#: form_detail.php:382 +msgid "" +"Once you're happy with your form, remember to click on the "update " +"form" button to save all your hard work." msgstr "" -#: ../common.php:2532 -msgid "ETHIOPIA" +#: form_detail.php:385 +msgid "Save Your New Form" msgstr "" -#: ../common.php:2533 -msgid "FIJI" +#: form_detail.php:386 +msgid "You're done. That's it." msgstr "" -#: ../common.php:2534 -msgid "FINLAND" +#: form_detail.php:404 +msgid "Edit Last Page" msgstr "" -#: ../common.php:2535 -msgid "FRANCE" +#: form_detail.php:408 +msgid "end of last page" msgstr "" -#: ../common.php:2536 -msgid "GABON" +#: form_detail.php:409 +msgid "END PAGING" msgstr "" -#: ../common.php:2537 -msgid "GAMBIA" +#: form_detail.php:410 +msgid "end of form" msgstr "" -#: ../common.php:2538 -msgctxt "Country" -msgid "GEORGIA" +#: form_detail.php:423 form_detail.php:685 +msgid "Previous Button" msgstr "" -#: ../common.php:2539 -msgid "GERMANY" +#: form_detail.php:430 form_detail.php:654 form_detail.php:692 +msgid "Default" msgstr "" -#: ../common.php:2540 -msgid "GHANA" +#: form_detail.php:436 form_detail.php:660 form_detail.php:698 +#: form_settings.php:493 gravityforms.php:1521 +msgid "Image" msgstr "" -#: ../common.php:2541 -msgid "GREECE" +#: form_detail.php:442 form_detail.php:666 form_detail.php:704 +msgid "Text:" msgstr "" -#: ../common.php:2542 -msgid "GREENLAND" +#: form_detail.php:449 form_detail.php:673 form_detail.php:711 +msgid "Image Path:" msgstr "" -#: ../common.php:2543 -msgid "GRENADA" +#: form_detail.php:463 +msgid "You have successfully saved your form!" msgstr "" -#: ../common.php:2544 -msgid "GUAM" +#: form_detail.php:465 +msgid "What would you like to do next?" msgstr "" -#: ../common.php:2545 -msgid "GUATEMALA" +#: form_detail.php:468 form_detail.php:2380 gravityforms.php:2508 +msgid "Preview this form" msgstr "" -#: ../common.php:2546 -msgid "GUINEA" +#: form_detail.php:468 +msgid "Preview this Form" msgstr "" -#: ../common.php:2547 -msgid "GUINEA-BISSAU" +#: form_detail.php:473 +msgid "Setup email notifications for this form" msgstr "" -#: ../common.php:2548 -msgid "GUYANA" +#: form_detail.php:473 +msgid "Setup Email Notifications for this Form" msgstr "" -#: ../common.php:2549 -msgid "HAITI" +#: form_detail.php:478 +msgid "Continue editing this form" msgstr "" -#: ../common.php:2550 -msgid "HONDURAS" +#: form_detail.php:478 +msgid "Continue Editing this Form" msgstr "" -#: ../common.php:2551 -msgid "HONG KONG" +#: form_detail.php:482 +msgid "I am done. Take me back to form list" msgstr "" -#: ../common.php:2552 -msgid "HUNGARY" +#: form_detail.php:482 +msgid "Return to Form List" msgstr "" -#: ../common.php:2553 -msgid "ICELAND" +#: form_detail.php:492 +msgid "General" msgstr "" -#: ../common.php:2554 -msgid "INDIA" +#: form_detail.php:495 +msgid "Appearance" msgstr "" -#: ../common.php:2555 -msgid "INDONESIA" +#: form_detail.php:508 tooltips.php:48 tooltips.php:49 +msgid "Field Label" msgstr "" -#: ../common.php:2556 -msgid "IRAN" +#: form_detail.php:519 form_detail.php:1085 +#: includes/fields/class-gf-field-post-image.php:84 +#: includes/fields/class-gf-field-post-image.php:126 +msgid "Description" msgstr "" -#: ../common.php:2557 -msgid "IRAQ" +#: form_detail.php:529 +msgid "Product Field Mapping" msgstr "" -#: ../common.php:2558 -msgid "IRELAND" +#: form_detail.php:541 form_detail.php:558 form_detail.php:593 +#: form_detail.php:607 form_detail.php:621 form_detail.php:733 +#: form_detail.php:762 form_detail.php:959 +msgid "Field Type" msgstr "" -#: ../common.php:2559 -msgid "ISRAEL" +#: form_detail.php:545 +msgid "Single Product" msgstr "" -#: ../common.php:2560 -msgid "ITALY" +#: form_detail.php:546 form_detail.php:563 form_detail.php:597 +#: form_detail.php:611 form_detail.php:626 form_detail.php:740 +#: form_detail.php:767 form_detail.php:963 +#: includes/fields/class-gf-field-select.php:13 +msgid "Drop Down" msgstr "" -#: ../common.php:2561 -msgid "JAMAICA" +#: form_detail.php:547 form_detail.php:564 form_detail.php:599 +#: form_detail.php:613 form_detail.php:744 form_detail.php:770 +#: form_detail.php:965 includes/fields/class-gf-field-radio.php:13 +msgid "Radio Buttons" msgstr "" -#: ../common.php:2562 -msgid "JAPAN" +#: form_detail.php:548 form_detail.php:612 +msgid "User Defined Price" msgstr "" -#: ../common.php:2563 -msgid "JORDAN" +#: form_detail.php:549 form_detail.php:627 form_detail.php:745 +#: form_detail.php:1896 form_detail.php:1932 +#: includes/fields/class-gf-field-hidden.php:13 +msgid "Hidden" msgstr "" -#: ../common.php:2564 -msgid "KAZAKHSTAN" +#: form_detail.php:550 +msgid "Calculation" msgstr "" -#: ../common.php:2565 -msgid "KENYA" +#: form_detail.php:562 +msgid "Single Method" msgstr "" -#: ../common.php:2566 -msgid "KIRIBATI" +#: form_detail.php:583 +msgid "Disable quantity field" msgstr "" -#: ../common.php:2567 -msgid "NORTH KOREA" +#: form_detail.php:598 form_detail.php:743 form_detail.php:769 +#: form_detail.php:964 includes/fields/class-gf-field-checkbox.php:13 +msgid "Checkboxes" msgstr "" -#: ../common.php:2568 -msgid "SOUTH KOREA" +#: form_detail.php:625 form_detail.php:742 +#: includes/fields/class-gf-field-number.php:13 js.php:643 +msgid "Number" msgstr "" -#: ../common.php:2569 -msgid "KOSOVO" +#: form_detail.php:636 form_settings.php:1703 tooltips.php:134 +msgid "Content" msgstr "" -#: ../common.php:2570 -msgid "KUWAIT" +#: form_detail.php:648 +msgid "Next Button" msgstr "" -#: ../common.php:2571 -msgid "KYRGYZSTAN" +#: form_detail.php:724 +msgid "Disable default margins" msgstr "" -#: ../common.php:2572 -msgid "LAOS" +#: form_detail.php:737 form_detail.php:2326 tooltips.php:139 +msgid "Standard Fields" msgstr "" -#: ../common.php:2573 -msgid "LATVIA" +#: form_detail.php:738 form_detail.php:766 +msgid "Single line text" msgstr "" -#: ../common.php:2574 -msgid "LEBANON" +#: form_detail.php:739 includes/fields/class-gf-field-textarea.php:13 +msgid "Paragraph Text" msgstr "" -#: ../common.php:2575 -msgid "LESOTHO" +#: form_detail.php:741 form_detail.php:768 form_detail.php:966 +#: includes/fields/class-gf-field-multiselect.php:13 +msgid "Multi Select" msgstr "" -#: ../common.php:2576 -msgid "LIBERIA" +#: form_detail.php:747 form_detail.php:2327 tooltips.php:140 +msgid "Advanced Fields" msgstr "" -#: ../common.php:2577 -msgid "LIBYA" +#: form_detail.php:749 includes/fields/class-gf-field-time.php:13 js.php:663 +msgid "Time" msgstr "" -#: ../common.php:2578 -msgid "LIECHTENSTEIN" +#: form_detail.php:750 includes/fields/class-gf-field-phone.php:13 js.php:652 +msgid "Phone" msgstr "" -#: ../common.php:2579 -msgid "LITHUANIA" +#: form_detail.php:751 includes/fields/class-gf-field-website.php:13 js.php:668 +msgid "Website" msgstr "" -#: ../common.php:2580 -msgid "LUXEMBOURG" +#: form_detail.php:752 includes/addon/class-gf-payment-addon.php:1433 +#: includes/fields/class-gf-field-email.php:13 js.php:636 +msgid "Email" msgstr "" -#: ../common.php:2581 -msgid "MACEDONIA" +#: form_detail.php:753 includes/fields/class-gf-field-fileupload.php:13 +msgid "File Upload" msgstr "" -#: ../common.php:2582 -msgid "MADAGASCAR" +#: form_detail.php:754 includes/fields/class-gf-field-list.php:13 js.php:559 +msgid "List" msgstr "" -#: ../common.php:2583 -msgid "MALAWI" +#: form_detail.php:781 form_settings.php:1702 +msgid "Type" msgstr "" -#: ../common.php:2584 -msgid "MALAYSIA" +#: form_detail.php:785 +msgid "reCAPTCHA" msgstr "" -#: ../common.php:2585 -msgid "MALDIVES" +#: form_detail.php:786 +msgid "Really Simple CAPTCHA" msgstr "" -#: ../common.php:2586 -msgid "MALI" +#: form_detail.php:787 +msgid "Math Challenge" msgstr "" -#: ../common.php:2587 -msgid "MALTA" +#: form_detail.php:795 form_detail.php:1432 +msgid "Size" msgstr "" -#: ../common.php:2588 -msgid "MARSHALL ISLANDS" +#: form_detail.php:798 form_detail.php:1432 form_detail.php:1982 +msgid "Small" msgstr "" -#: ../common.php:2589 -msgid "MAURITANIA" +#: form_detail.php:808 +msgid "Font Color" msgstr "" -#: ../common.php:2590 -msgid "MAURITIUS" +#: form_detail.php:828 +msgid "Theme" msgstr "" -#: ../common.php:2591 -msgid "MEXICO" +#: form_detail.php:833 +msgid "White" msgstr "" -#: ../common.php:2592 -msgid "MICRONESIA" +#: form_detail.php:834 +msgid "Black Glass" msgstr "" -#: ../common.php:2593 -msgid "MOLDOVA" +#: form_detail.php:835 +msgid "Clean" msgstr "" -#: ../common.php:2594 -msgid "MONACO" +#: form_detail.php:843 tooltips.php:53 +msgid "Custom Field Name" msgstr "" -#: ../common.php:2595 -msgid "MONGOLIA" +#: form_detail.php:850 +msgid "Existing" msgstr "" -#: ../common.php:2596 -msgid "MONTENEGRO" +#: form_detail.php:856 +msgid "New" msgstr "" -#: ../common.php:2597 -msgid "MOROCCO" +#: form_detail.php:862 +msgid "Select an existing custom field" msgstr "" -#: ../common.php:2598 -msgid "MOZAMBIQUE" +#: form_detail.php:879 tooltips.php:124 +msgid "Post Status" msgstr "" -#: ../common.php:2599 -msgid "MYANMAR" +#: form_detail.php:899 +msgid "Default Post Author" msgstr "" -#: ../common.php:2600 -msgid "NAMIBIA" +#: form_detail.php:909 +msgid "Use logged in user as author" msgstr "" -#: ../common.php:2601 -msgid "NAURU" +#: form_detail.php:921 tooltips.php:126 +msgid "Post Format" msgstr "" -#: ../common.php:2602 -msgid "NEPAL" +#: form_detail.php:947 js.php:528 tooltips.php:123 tooltips.php:129 +msgid "Post Category" msgstr "" -#: ../common.php:2603 -msgid "NETHERLANDS" +#: form_detail.php:975 includes/fields/class-gf-field-post-category.php:12 +msgid "Category" msgstr "" -#: ../common.php:2604 -msgid "NEW ZEALAND" +#: form_detail.php:981 +msgid "All Categories" msgstr "" -#: ../common.php:2605 -msgid "NICARAGUA" +#: form_detail.php:987 +msgid "Select Categories" msgstr "" -#: ../common.php:2606 -msgid "NIGER" +#: form_detail.php:1010 +msgid "Display placeholder" msgstr "" -#: ../common.php:2607 -msgid "NIGERIA" +#: form_detail.php:1016 +msgid "Placeholder Label" msgstr "" -#: ../common.php:2608 -msgid "NORTHERN MARIANA ISLANDS" +#: form_detail.php:1026 form_detail.php:1043 form_detail.php:1057 +msgid "Create content template" msgstr "" -#: ../common.php:2609 -msgid "NORWAY" +#: form_detail.php:1072 +msgid "Image Metadata" msgstr "" -#: ../common.php:2610 -msgid "OMAN" +#: form_detail.php:1075 form_list.php:457 form_list.php:477 +#: gravityforms.php:1387 includes/fields/class-gf-field-post-image.php:76 +#: includes/fields/class-gf-field-post-image.php:124 +#: includes/fields/class-gf-field-post-title.php:13 widget.php:77 +msgid "Title" msgstr "" -#: ../common.php:2611 -msgid "PAKISTAN" +#: form_detail.php:1080 includes/fields/class-gf-field-post-image.php:80 +#: includes/fields/class-gf-field-post-image.php:125 +msgid "Caption" msgstr "" -#: ../common.php:2612 -msgid "PALAU" +#: form_detail.php:1095 tooltips.php:132 +msgid "Set as Featured Image" msgstr "" -#: ../common.php:2613 -msgid "PALESTINE" +#: form_detail.php:1107 tooltips.php:58 +msgid "Address Type" msgstr "" -#: ../common.php:2614 -msgid "PANAMA" +#: form_detail.php:1122 tooltips.php:93 +msgid "Address Fields" msgstr "" -#: ../common.php:2615 -msgid "PAPUA NEW GUINEA" +#: form_detail.php:1133 includes/addon/class-gf-payment-addon.php:1437 +#: includes/fields/class-gf-field-address.php:120 +#: includes/fields/class-gf-field-address.php:385 +msgid "State" msgstr "" -#: ../common.php:2616 -msgid "PARAGUAY" +#: form_detail.php:1137 includes/fields/class-gf-field-address.php:386 +msgid "Postal Code" msgstr "" -#: ../common.php:2617 -msgid "PERU" +#: form_detail.php:1145 +msgid "Default %s" msgstr "" -#: ../common.php:2618 -msgid "PHILIPPINES" +#: form_detail.php:1160 tooltips.php:61 +msgid "Default Country" msgstr "" -#: ../common.php:2619 -msgid "POLAND" +#: form_detail.php:1181 +msgid "Name Format" msgstr "" -#: ../common.php:2620 -msgid "PORTUGAL" +#: form_detail.php:1185 +msgid "Extended" msgstr "" -#: ../common.php:2621 -msgid "PUERTO RICO" +#: form_detail.php:1195 tooltips.php:91 +msgid "Name Fields" msgstr "" -#: ../common.php:2622 -msgid "QATAR" +#: form_detail.php:1210 tooltips.php:57 +msgid "Date Input Type" msgstr "" -#: ../common.php:2623 -msgid "ROMANIA" +#: form_detail.php:1214 +msgid "Date Field" msgstr "" -#: ../common.php:2624 -msgid "RUSSIA" +#: form_detail.php:1215 +msgid "Date Picker" msgstr "" -#: ../common.php:2625 -msgid "RWANDA" +#: form_detail.php:1216 +msgid "Date Drop Down" msgstr "" -#: ../common.php:2626 -msgid "SAINT KITTS AND NEVIS" +#: form_detail.php:1223 +msgid "No Icon" msgstr "" -#: ../common.php:2627 -msgid "SAINT LUCIA" +#: form_detail.php:1228 +msgid "Calendar Icon" msgstr "" -#: ../common.php:2628 -msgid "SAINT VINCENT AND THE GRENADINES" +#: form_detail.php:1233 +msgid "Custom Icon" msgstr "" -#: ../common.php:2629 -msgid "SAMOA" +#: form_detail.php:1238 +msgid "Image Path: " msgstr "" -#: ../common.php:2630 -msgid "SAN MARINO" +#: form_detail.php:1242 +msgid "Preview this form to see your custom icon." msgstr "" -#: ../common.php:2631 -msgid "SAO TOME AND PRINCIPE" +#: form_detail.php:1251 +msgid "Date Format" msgstr "" -#: ../common.php:2632 -msgid "SAUDI ARABIA" +#: form_detail.php:1269 +msgid "Customize Fields" msgstr "" -#: ../common.php:2633 -msgid "SENEGAL" +#: form_detail.php:1281 +msgid "Allowed file extensions" msgstr "" -#: ../common.php:2634 -msgid "SERBIA AND MONTENEGRO" +#: form_detail.php:1287 +msgid "Separated with commas (i.e. jpg, gif, png, pdf)" msgstr "" -#: ../common.php:2635 -msgid "SEYCHELLES" +#: form_detail.php:1296 tooltips.php:74 +msgid "Enable Multi-File Upload" msgstr "" -#: ../common.php:2636 -msgid "SIERRA LEONE" +#: form_detail.php:1305 tooltips.php:75 +msgid "Maximum Number of Files" msgstr "" -#: ../common.php:2637 -msgid "SINGAPORE" +#: form_detail.php:1319 tooltips.php:76 +msgid "Maximum File Size" msgstr "" -#: ../common.php:2638 -msgid "SLOVAKIA" +#: form_detail.php:1336 +msgid "Enable multiple columns" msgstr "" -#: ../common.php:2639 -msgid "SLOVENIA" +#: form_detail.php:1349 tooltips.php:56 +msgid "Maximum Rows" msgstr "" -#: ../common.php:2640 -msgid "SOLOMON ISLANDS" +#: form_detail.php:1361 tooltips.php:72 +msgid "Time Format" msgstr "" -#: ../common.php:2641 -msgid "SOMALIA" +#: form_detail.php:1365 +msgid "12 hour" msgstr "" -#: ../common.php:2642 -msgid "SOUTH AFRICA" +#: form_detail.php:1366 +msgid "24 hour" msgstr "" -#: ../common.php:2643 -msgid "SPAIN" +#: form_detail.php:1376 +msgid "Phone Format" msgstr "" -#: ../common.php:2644 -msgid "SRI LANKA" +#: form_detail.php:1381 includes/fields/class-gf-field-address.php:384 +msgid "International" msgstr "" -#: ../common.php:2645 -msgid "SUDAN" +#: form_detail.php:1391 +msgid "show values" msgstr "" -#: ../common.php:2646 -msgid "SUDAN, SOUTH" +#: form_detail.php:1394 +msgid "Choices" msgstr "" -#: ../common.php:2647 -msgid "SURINAME" +#: form_detail.php:1399 form_detail.php:2035 +msgid "Label" msgstr "" -#: ../common.php:2648 -msgid "SWAZILAND" +#: form_detail.php:1399 form_detail.php:2035 +msgid "Value" msgstr "" -#: ../common.php:2649 -msgid "SWEDEN" +#: form_detail.php:1403 +msgid "Bulk Add / Predefined Choices" msgstr "" -#: ../common.php:2650 -msgid "SWITZERLAND" +#: form_detail.php:1411 +msgid "Countries" msgstr "" -#: ../common.php:2651 -msgid "SYRIA" +#: form_detail.php:1412 +msgid "U.S. States" msgstr "" -#: ../common.php:2652 -msgid "TAIWAN" +#: form_detail.php:1413 +msgid "Canadian Province/Territory" msgstr "" -#: ../common.php:2653 -msgid "TAJIKISTAN" +#: form_detail.php:1414 +msgid "Continents" msgstr "" -#: ../common.php:2654 -msgid "TANZANIA" +#: form_detail.php:1414 +msgid "Africa" msgstr "" -#: ../common.php:2655 -msgid "THAILAND" +#: form_detail.php:1414 +msgid "Antarctica" msgstr "" -#: ../common.php:2656 -msgid "TOGO" +#: form_detail.php:1414 +msgid "Asia" msgstr "" -#: ../common.php:2657 -msgid "TONGA" +#: form_detail.php:1414 includes/fields/class-gf-field-address.php:447 +msgid "Australia" msgstr "" -#: ../common.php:2658 -msgid "TRINIDAD AND TOBAGO" +#: form_detail.php:1414 +msgid "Europe" msgstr "" -#: ../common.php:2659 -msgid "TUNISIA" +#: form_detail.php:1414 +msgid "North America" msgstr "" -#: ../common.php:2660 -msgid "TURKEY" +#: form_detail.php:1414 +msgid "South America" msgstr "" -#: ../common.php:2661 -msgid "TURKMENISTAN" +#: form_detail.php:1415 +msgid "Gender" msgstr "" -#: ../common.php:2662 -msgid "TUVALU" +#: form_detail.php:1415 +msgid "Male" msgstr "" -#: ../common.php:2663 -msgid "UGANDA" +#: form_detail.php:1415 +msgid "Female" msgstr "" -#: ../common.php:2664 -msgid "UKRAINE" +#: form_detail.php:1415 form_detail.php:1416 form_detail.php:1418 +#: form_detail.php:1421 form_detail.php:1422 +msgid "Prefer Not to Answer" msgstr "" -#: ../common.php:2665 -msgid "UNITED ARAB EMIRATES" +#: form_detail.php:1416 +msgid "Age" msgstr "" -#: ../common.php:2666 -msgid "UNITED KINGDOM" +#: form_detail.php:1416 +msgid "Under 18" msgstr "" -#: ../common.php:2667 -msgid "UNITED STATES" +#: form_detail.php:1416 +msgid "18-24" msgstr "" -#: ../common.php:2668 -msgid "URUGUAY" +#: form_detail.php:1416 +msgid "25-34" msgstr "" -#: ../common.php:2669 -msgid "UZBEKISTAN" +#: form_detail.php:1416 +msgid "35-44" msgstr "" -#: ../common.php:2670 -msgid "VANUATU" +#: form_detail.php:1416 +msgid "45-54" msgstr "" -#: ../common.php:2671 -msgid "VATICAN CITY" +#: form_detail.php:1416 +msgid "55-64" msgstr "" -#: ../common.php:2672 -msgid "VENEZUELA" +#: form_detail.php:1416 +msgid "65 or Above" msgstr "" -#: ../common.php:2673 -msgid "VIRGIN ISLANDS, BRITISH" +#: form_detail.php:1417 +msgid "Marital Status" msgstr "" -#: ../common.php:2674 -msgid "VIRGIN ISLANDS, U.S." +#: form_detail.php:1417 +msgid "Single" msgstr "" -#: ../common.php:2675 -msgid "VIETNAM" +#: form_detail.php:1417 +msgid "Married" msgstr "" -#: ../common.php:2676 -msgid "YEMEN" +#: form_detail.php:1417 +msgid "Divorced" msgstr "" -#: ../common.php:2677 -msgid "ZAMBIA" +#: form_detail.php:1417 +msgid "Widowed" msgstr "" -#: ../common.php:2678 -msgid "ZIMBABWE" +#: form_detail.php:1418 +msgid "Employment" msgstr "" -#: ../common.php:2685 ../common.php:2705 -msgid "Alabama" +#: form_detail.php:1418 +msgid "Employed Full-Time" msgstr "" -#: ../common.php:2685 ../common.php:2706 -msgid "Alaska" +#: form_detail.php:1418 +msgid "Employed Part-Time" msgstr "" -#: ../common.php:2685 ../common.php:2707 -msgid "Arizona" +#: form_detail.php:1418 +msgid "Self-employed" msgstr "" -#: ../common.php:2685 ../common.php:2708 -msgid "Arkansas" +#: form_detail.php:1418 +msgid "Not employed but looking for work" msgstr "" -#: ../common.php:2686 ../common.php:2709 -msgid "California" +#: form_detail.php:1418 +msgid "Not employed and not looking for work" msgstr "" -#: ../common.php:2686 ../common.php:2710 -msgid "Colorado" +#: form_detail.php:1418 +msgid "Homemaker" msgstr "" -#: ../common.php:2686 ../common.php:2711 -msgid "Connecticut" +#: form_detail.php:1418 +msgid "Retired" msgstr "" -#: ../common.php:2686 ../common.php:2712 -msgid "Delaware" +#: form_detail.php:1418 +msgid "Student" msgstr "" -#: ../common.php:2687 ../common.php:2713 -msgid "District of Columbia" +#: form_detail.php:1419 +msgid "Job Type" msgstr "" -#: ../common.php:2687 ../common.php:2714 -msgid "Florida" +#: form_detail.php:1419 +msgid "Full-Time" msgstr "" -#: ../common.php:2687 ../common.php:2715 -msgctxt "US State" -msgid "Georgia" +#: form_detail.php:1419 +msgid "Part-Time" msgstr "" -#: ../common.php:2688 ../common.php:2716 -msgid "Hawaii" +#: form_detail.php:1419 +msgid "Per Diem" msgstr "" -#: ../common.php:2688 ../common.php:2717 -msgid "Idaho" +#: form_detail.php:1419 +msgid "Employee" msgstr "" -#: ../common.php:2688 ../common.php:2718 -msgid "Illinois" +#: form_detail.php:1419 +msgid "Temporary" msgstr "" -#: ../common.php:2688 ../common.php:2719 -msgid "Indiana" +#: form_detail.php:1419 +msgid "Contract" msgstr "" -#: ../common.php:2689 ../common.php:2720 -msgid "Iowa" +#: form_detail.php:1419 +msgid "Intern" msgstr "" -#: ../common.php:2689 ../common.php:2721 -msgid "Kansas" +#: form_detail.php:1419 +msgid "Seasonal" msgstr "" -#: ../common.php:2689 ../common.php:2722 -msgid "Kentucky" +#: form_detail.php:1420 +msgid "Industry" msgstr "" -#: ../common.php:2689 ../common.php:2723 -msgid "Louisiana" +#: form_detail.php:1420 +msgid "Accounting/Finance" msgstr "" -#: ../common.php:2690 ../common.php:2724 -msgid "Maine" +#: form_detail.php:1420 +msgid "Advertising/Public Relations" msgstr "" -#: ../common.php:2690 ../common.php:2725 -msgid "Maryland" +#: form_detail.php:1420 +msgid "Aerospace/Aviation" msgstr "" -#: ../common.php:2690 ../common.php:2726 -msgid "Massachusetts" +#: form_detail.php:1420 +msgid "Arts/Entertainment/Publishing" msgstr "" -#: ../common.php:2690 ../common.php:2727 -msgid "Michigan" +#: form_detail.php:1420 +msgid "Automotive" msgstr "" -#: ../common.php:2691 ../common.php:2728 -msgid "Minnesota" +#: form_detail.php:1420 +msgid "Banking/Mortgage" msgstr "" -#: ../common.php:2691 ../common.php:2729 -msgid "Mississippi" +#: form_detail.php:1420 +msgid "Business Development" msgstr "" -#: ../common.php:2691 ../common.php:2730 -msgid "Missouri" +#: form_detail.php:1420 +msgid "Business Opportunity" msgstr "" -#: ../common.php:2691 ../common.php:2731 -msgid "Montana" +#: form_detail.php:1420 +msgid "Clerical/Administrative" msgstr "" -#: ../common.php:2692 ../common.php:2732 -msgid "Nebraska" +#: form_detail.php:1420 +msgid "Construction/Facilities" msgstr "" -#: ../common.php:2692 ../common.php:2733 -msgid "Nevada" +#: form_detail.php:1420 +msgid "Consumer Goods" msgstr "" -#: ../common.php:2692 ../common.php:2734 -msgid "New Hampshire" +#: form_detail.php:1420 +msgid "Customer Service" msgstr "" -#: ../common.php:2692 ../common.php:2735 -msgid "New Jersey" +#: form_detail.php:1420 +msgid "Education/Training" msgstr "" -#: ../common.php:2693 ../common.php:2736 -msgid "New Mexico" +#: form_detail.php:1420 +msgid "Energy/Utilities" msgstr "" -#: ../common.php:2693 ../common.php:2737 -msgid "New York" +#: form_detail.php:1420 +msgid "Engineering" msgstr "" -#: ../common.php:2693 ../common.php:2738 -msgid "North Carolina" +#: form_detail.php:1420 +msgid "Government/Military" msgstr "" -#: ../common.php:2694 ../common.php:2739 -msgid "North Dakota" +#: form_detail.php:1420 +msgid "Healthcare" msgstr "" -#: ../common.php:2694 ../common.php:2740 -msgid "Ohio" +#: form_detail.php:1420 +msgid "Hospitality/Travel" msgstr "" -#: ../common.php:2694 ../common.php:2741 -msgid "Oklahoma" +#: form_detail.php:1420 +msgid "Human Resources" msgstr "" -#: ../common.php:2694 ../common.php:2742 -msgid "Oregon" +#: form_detail.php:1420 +msgid "Installation/Maintenance" msgstr "" -#: ../common.php:2695 ../common.php:2743 -msgid "Pennsylvania" +#: form_detail.php:1420 +msgid "Insurance" msgstr "" -#: ../common.php:2695 ../common.php:2744 -msgid "Rhode Island" +#: form_detail.php:1420 +msgid "Internet" msgstr "" -#: ../common.php:2695 ../common.php:2745 -msgid "South Carolina" +#: form_detail.php:1420 +msgid "Job Search Aids" msgstr "" -#: ../common.php:2696 ../common.php:2746 -msgid "South Dakota" +#: form_detail.php:1420 +msgid "Law Enforcement/Security" msgstr "" -#: ../common.php:2696 ../common.php:2747 -msgid "Tennessee" +#: form_detail.php:1420 +msgid "Legal" msgstr "" -#: ../common.php:2696 ../common.php:2748 -msgid "Texas" +#: form_detail.php:1420 +msgid "Management/Executive" msgstr "" -#: ../common.php:2696 ../common.php:2749 -msgid "Utah" +#: form_detail.php:1420 +msgid "Manufacturing/Operations" msgstr "" -#: ../common.php:2697 ../common.php:2750 -msgid "Vermont" +#: form_detail.php:1420 +msgid "Marketing" msgstr "" -#: ../common.php:2697 ../common.php:2751 -msgid "Virginia" +#: form_detail.php:1420 +msgid "Non-Profit/Volunteer" msgstr "" -#: ../common.php:2697 ../common.php:2752 -msgid "Washington" +#: form_detail.php:1420 +msgid "Pharmaceutical/Biotech" msgstr "" -#: ../common.php:2697 ../common.php:2753 -msgid "West Virginia" +#: form_detail.php:1420 +msgid "Professional Services" msgstr "" -#: ../common.php:2698 ../common.php:2754 -msgid "Wisconsin" +#: form_detail.php:1420 +msgid "QA/Quality Control" msgstr "" -#: ../common.php:2698 ../common.php:2755 -msgid "Wyoming" +#: form_detail.php:1420 +msgid "Real Estate" msgstr "" -#: ../common.php:2698 ../common.php:2756 -msgid "Armed Forces Americas" +#: form_detail.php:1420 +msgid "Restaurant/Food Service" msgstr "" -#: ../common.php:2699 ../common.php:2757 -msgid "Armed Forces Europe" +#: form_detail.php:1420 +msgid "Retail" msgstr "" -#: ../common.php:2699 ../common.php:2758 -msgid "Armed Forces Pacific" +#: form_detail.php:1420 +msgid "Sales" msgstr "" -#: ../common.php:2768 -msgid "Alberta" +#: form_detail.php:1420 +msgid "Science/Research" msgstr "" -#: ../common.php:2768 -msgid "British Columbia" +#: form_detail.php:1420 +msgid "Skilled Labor" msgstr "" -#: ../common.php:2768 -msgid "Manitoba" +#: form_detail.php:1420 +msgid "Technology" msgstr "" -#: ../common.php:2768 -msgid "New Brunswick" +#: form_detail.php:1420 +msgid "Telecommunications" msgstr "" -#: ../common.php:2768 -msgid "Newfoundland & Labrador" +#: form_detail.php:1420 +msgid "Transportation/Logistics" msgstr "" -#: ../common.php:2768 -msgid "Northwest Territories" +#: form_detail.php:1421 +msgid "Income" msgstr "" -#: ../common.php:2768 -msgid "Nova Scotia" +#: form_detail.php:1421 +msgid "Under $20,000" msgstr "" -#: ../common.php:2768 -msgid "Nunavut" +#: form_detail.php:1421 +msgid "$20,000 - $30,000" msgstr "" -#: ../common.php:2768 -msgid "Ontario" +#: form_detail.php:1421 +msgid "$30,000 - $40,000" msgstr "" -#: ../common.php:2768 -msgid "Prince Edward Island" +#: form_detail.php:1421 +msgid "$40,000 - $50,000" msgstr "" -#: ../common.php:2768 -msgid "Quebec" +#: form_detail.php:1421 +msgid "$50,000 - $75,000" msgstr "" -#: ../common.php:2768 -msgid "Saskatchewan" +#: form_detail.php:1421 +msgid "$75,000 - $100,000" msgstr "" -#: ../common.php:2768 -msgid "Yukon" +#: form_detail.php:1421 +msgid "$100,000 - $150,000" msgstr "" -#: ../common.php:2828 -#, php-format -msgid "Please enter a value between %s and %s." +#: form_detail.php:1421 +msgid "$150,000 or more" msgstr "" -#: ../common.php:2830 -#, php-format -msgid "Please enter a value greater than or equal to %s." +#: form_detail.php:1422 +msgid "Education" msgstr "" -#: ../common.php:2832 -#, php-format -msgid "Please enter a value less than or equal to %s." +#: form_detail.php:1422 +msgid "High School" msgstr "" -#: ../common.php:2834 -msgid "Please enter a valid number" +#: form_detail.php:1422 +msgid "Associate Degree" msgstr "" -#: ../common.php:2872 ../common.php:4070 -#: ../includes/addon/class-gf-payment-addon.php:1672 -#: ../includes/addon/class-gf-payment-addon.php:1673 -msgid "Month" +#: form_detail.php:1422 +msgid "Bachelor's Degree" msgstr "" -#: ../common.php:2876 ../includes/addon/class-gf-payment-addon.php:1685 -#: ../includes/addon/class-gf-payment-addon.php:1686 -msgid "Day" +#: form_detail.php:1422 +msgid "Graduate of Professional Degree" msgstr "" -#: ../common.php:2882 ../common.php:4080 -msgid "Year" +#: form_detail.php:1422 +msgid "Some College" msgstr "" -#: ../common.php:2956 -msgid "Product fields are not editable" +#: form_detail.php:1423 +msgid "Days of the Week" msgstr "" -#: ../common.php:2959 -msgid "Donations are not editable" +#: form_detail.php:1423 +msgid "Sunday" msgstr "" -#: ../common.php:2999 ../common.php:3003 -msgid "Quantity:" +#: form_detail.php:1423 +msgid "Monday" msgstr "" -#: ../common.php:3082 ../common.php:3090 ../notification.php:564 -msgid "Enter Email" +#: form_detail.php:1423 +msgid "Tuesday" msgstr "" -#: ../common.php:3082 ../common.php:3090 -msgid "Confirm Email" +#: form_detail.php:1423 +msgid "Wednesday" msgstr "" -#: ../common.php:3115 -msgid "HTML Content" +#: form_detail.php:1423 +msgid "Thursday" msgstr "" -#: ../common.php:3115 -msgid "" -"This is a content placeholder. HTML content is not displayed in the form " -"admin. Preview this form to view the content." +#: form_detail.php:1423 +msgid "Friday" msgstr "" -#: ../common.php:3190 ../js.php:891 -msgid "Phone format:" +#: form_detail.php:1423 +msgid "Saturday" msgstr "" -#: ../common.php:3279 -msgid "delete" +#: form_detail.php:1424 +msgid "Months of the Year" msgstr "" -#: ../common.php:3283 ../js.php:531 -msgid "File" +#: form_detail.php:1424 +msgid "January" msgstr "" -#: ../common.php:3292 ../common.php:4546 ../form_detail.php:1031 -msgid "Caption" +#: form_detail.php:1424 +msgid "February" msgstr "" -#: ../common.php:3295 ../common.php:4547 ../form_detail.php:1036 -#: ../form_detail.php:1493 -msgid "Description" +#: form_detail.php:1424 +msgid "March" msgstr "" -#: ../common.php:3305 -msgid "Click to select..." +#: form_detail.php:1424 +msgid "April" msgstr "" -#: ../common.php:3344 ../form_display.php:2194 -msgid "Strength indicator" +#: form_detail.php:1424 includes/addon/class-gf-payment-addon.php:1779 +msgid "May" msgstr "" -#: ../common.php:3351 -msgid "Enter Password" +#: form_detail.php:1424 +msgid "June" msgstr "" -#: ../common.php:3351 -msgid "Confirm Password" +#: form_detail.php:1424 +msgid "July" msgstr "" -#: ../common.php:3371 ../js.php:420 -msgid "Prefix" +#: form_detail.php:1424 +msgid "August" msgstr "" -#: ../common.php:3371 ../common.php:3380 ../js.php:420 ../js.php:426 -msgid "First" +#: form_detail.php:1424 +msgid "September" msgstr "" -#: ../common.php:3371 ../common.php:3380 ../js.php:420 ../js.php:426 -msgid "Last" +#: form_detail.php:1424 +msgid "October" msgstr "" -#: ../common.php:3371 ../js.php:420 -msgid "Suffix" +#: form_detail.php:1424 +msgid "November" msgstr "" -#: ../common.php:3404 ../common.php:4343 ../form_detail.php:1073 -#: ../includes/addon/class-gf-payment-addon.php:1422 -msgid "State" +#: form_detail.php:1424 +msgid "December" msgstr "" -#: ../common.php:3405 -msgid "Zip Code" +#: form_detail.php:1425 +msgid "How Often" msgstr "" -#: ../common.php:3425 ../js.php:470 -msgid "Street Address" +#: form_detail.php:1425 +msgid "Everyday" msgstr "" -#: ../common.php:3432 ../js.php:470 -msgid "Address Line 2" +#: form_detail.php:1425 +msgid "Once a week" msgstr "" -#: ../common.php:3442 ../common.php:3458 -#: ../includes/addon/class-gf-payment-addon.php:1421 ../js.php:470 -msgid "City" +#: form_detail.php:1425 +msgid "2 to 3 times a week" msgstr "" -#: ../common.php:3479 ../includes/addon/class-gf-payment-addon.php:1424 -#: ../js.php:471 -msgid "Country" +#: form_detail.php:1425 +msgid "Once a month" msgstr "" -#: ../common.php:3501 ../common.php:3543 ../common.php:3560 ../common.php:3574 -#: ../common.php:3627 -msgid "MM" +#: form_detail.php:1425 +msgid " 2 to 3 times a month" msgstr "" -#: ../common.php:3502 ../common.php:3538 ../common.php:3565 ../common.php:3579 -msgid "DD" +#: form_detail.php:1425 +msgid "Less than once a month" msgstr "" -#: ../common.php:3503 ../common.php:3548 ../common.php:3556 ../common.php:3584 -msgid "YYYY" +#: form_detail.php:1426 +msgid "How Long" msgstr "" -#: ../common.php:3625 -msgid "AM" +#: form_detail.php:1426 +msgid "Less than a month" msgstr "" -#: ../common.php:3625 -msgid "PM" +#: form_detail.php:1426 +msgid "1-6 months" msgstr "" -#: ../common.php:3627 -msgid "HH" +#: form_detail.php:1426 +msgid "1-3 years" msgstr "" -#: ../common.php:3663 ../common.php:3682 -msgid "Allowed Files" +#: form_detail.php:1426 +msgid "Over 3 Years" msgstr "" -#: ../common.php:3695 -msgid "Drop files here or" +#: form_detail.php:1426 +msgid "Never used" msgstr "" -#: ../common.php:3695 -msgid "Select files" +#: form_detail.php:1427 +msgid "Satisfaction" msgstr "" -#: ../common.php:3723 -msgid "Download file" +#: form_detail.php:1427 +msgid "Very Satisfied" msgstr "" -#: ../common.php:3723 -msgid "Delete file" +#: form_detail.php:1427 +msgid "Satisfied" msgstr "" -#: ../common.php:3789 -msgid "To use the reCaptcha field you must first do the following:" +#: form_detail.php:1427 +msgid "Neutral" msgstr "" -#: ../common.php:3789 -#, php-format -msgid "Sign up%s for a free reCAPTCHA account" +#: form_detail.php:1427 +msgid "Unsatisfied" msgstr "" -#: ../common.php:3789 -#, php-format -msgid "Enter your reCAPTCHA keys in the %ssettings page%s" +#: form_detail.php:1427 +msgid "Very Unsatisfied" msgstr "" -#: ../common.php:3879 ../common.php:3903 -msgid "Only digits are allowed" +#: form_detail.php:1428 +msgid "Importance" msgstr "" -#: ../common.php:3880 ../js.php:478 -msgid "Card Number" +#: form_detail.php:1428 +msgid "Very Important" msgstr "" -#: ../common.php:3896 ../js.php:479 -msgid "Expiration Date" +#: form_detail.php:1428 form_settings.php:1105 +msgid "Important" msgstr "" -#: ../common.php:3907 ../js.php:480 -msgid "Security Code" +#: form_detail.php:1428 +msgid "Somewhat Important" msgstr "" -#: ../common.php:3912 -msgid "Cardholder Name" +#: form_detail.php:1428 +msgid "Not Important" msgstr "" -#: ../common.php:4000 -msgid "Add another row" +#: form_detail.php:1429 +msgid "Agreement" msgstr "" -#: ../common.php:4000 -msgid "Add a row" +#: form_detail.php:1429 +msgid "Strongly Agree" msgstr "" -#: ../common.php:4001 -msgid "Remove this row" +#: form_detail.php:1429 +msgid "Agree" msgstr "" -#: ../common.php:4342 ../form_detail.php:1307 -msgid "International" +#: form_detail.php:1429 +msgid "Disagree" msgstr "" -#: ../common.php:4342 ../js.php:471 -msgid "ZIP / Postal Code" +#: form_detail.php:1429 +msgid "Strongly Disagree" msgstr "" -#: ../common.php:4342 -msgid "State / Province / Region" +#: form_detail.php:1430 +msgid "Comparison" msgstr "" -#: ../common.php:4343 -msgid "ZIP Code" +#: form_detail.php:1430 +msgid "Much Better" msgstr "" -#: ../common.php:4344 -msgid "Canadian" +#: form_detail.php:1430 +msgid "Somewhat Better" msgstr "" -#: ../common.php:4344 ../form_detail.php:1077 -msgid "Postal Code" +#: form_detail.php:1430 +msgid "About the Same" msgstr "" -#: ../common.php:4344 -msgid "Province" +#: form_detail.php:1430 +msgid "Somewhat Worse" msgstr "" -#: ../common.php:4551 ../common.php:4572 ../entry_list.php:1040 -#: ../entry_list.php:1062 -msgid "Click to view" +#: form_detail.php:1430 +msgid "Much Worse" msgstr "" -#: ../common.php:4611 -msgid "Qty: " +#: form_detail.php:1431 +msgid "Would You" msgstr "" -#: ../common.php:4611 -msgid "Price: " +#: form_detail.php:1431 +msgid "Definitely" msgstr "" -#: ../common.php:5467 ../form_list.php:293 ../form_list.php:349 -#: ../form_list.php:456 ../form_settings.php:897 ../form_settings.php:1489 -#: ../includes/addon/class-gf-feed-addon.php:1023 ../notification.php:416 -#: ../notification.php:1095 -msgid "Active" +#: form_detail.php:1431 +msgid "Probably" msgstr "" -#: ../common.php:5468 ../form_list.php:289 ../form_list.php:350 -#: ../form_list.php:456 ../form_settings.php:893 ../form_settings.php:1489 -#: ../includes/addon/class-gf-feed-addon.php:1023 ../notification.php:412 -#: ../notification.php:1095 -msgid "Inactive" +#: form_detail.php:1431 +msgid "Not Sure" msgstr "" -#: ../common.php:5469 ../common.php:5498 ../form_detail.php:1393 -#: ../select_columns.php:153 -msgid "Save" +#: form_detail.php:1431 +msgid "Probably Not" msgstr "" -#: ../common.php:5470 ../entry_detail.php:451 -msgid "Update" +#: form_detail.php:1431 +msgid "Definitely Not" msgstr "" -#: ../common.php:5471 ../form_display.php:609 ../form_display.php:2435 -#: ../js.php:395 -msgid "Previous" +#: form_detail.php:1432 +msgid "Extra Small" msgstr "" -#: ../common.php:5472 -msgid "Select a format" +#: form_detail.php:1432 +msgid "Extra Large" msgstr "" -#: ../common.php:5473 -#, php-format -msgid "5 of %d items shown. Edit field to view all" +#: form_detail.php:1441 +msgid "" +"Select a category and customize the predefined choices or paste your own " +"list to bulk add choices." msgstr "" -#: ../common.php:5474 -msgid "Enter a value" +#: form_detail.php:1462 +msgid "Insert Choices" msgstr "" -#: ../common.php:5475 -msgid "Untitled Form" +#: form_detail.php:1467 +msgid "Save as new custom choice" msgstr "" -#: ../common.php:5476 -msgid "" -"We would love to hear from you! Please fill out this form and we will get in " -"touch with you shortly." +#: form_detail.php:1470 +msgid "Save as" msgstr "" -#: ../common.php:5477 ../common.php:5506 ../form_detail.php:2375 -msgid "Thanks for contacting us! We will get in touch with you shortly." +#: form_detail.php:1471 +msgid "Enter name" msgstr "" -#: ../common.php:5478 ../form_display.php:804 ../form_list.php:174 -msgid "Submit" +#: form_detail.php:1471 +msgid "enter name" msgstr "" -#: ../common.php:5479 ../notification.php:292 -msgid "Loading..." +#: form_detail.php:1498 +msgid "Enable \"other\" choice" msgstr "" -#: ../common.php:5480 -msgid "this field if" +#: form_detail.php:1511 +msgid "Enable Email Confirmation" msgstr "" -#: ../common.php:5481 -msgid "this page" +#: form_detail.php:1521 +msgid "Enable Password Strength" msgstr "" -#: ../common.php:5482 -msgid "this form button" +#: form_detail.php:1532 +msgid "Minimum Strength" msgstr "" -#: ../common.php:5483 -msgid "Show" +#: form_detail.php:1537 form_display.php:1951 +msgid "Short" msgstr "" -#: ../common.php:5484 -msgid "Hide" +#: form_detail.php:1538 form_display.php:1951 +msgid "Bad" msgstr "" -#: ../common.php:5485 ../entry_list.php:747 ../form_list.php:348 -msgid "All" +#: form_detail.php:1539 form_display.php:1951 +msgid "Good" msgstr "" -#: ../common.php:5486 -msgid "Any" +#: form_detail.php:1540 form_display.php:1951 +msgid "Strong" msgstr "" -#: ../common.php:5487 -msgid "of the following match:" +#: form_detail.php:1550 tooltips.php:68 +msgid "Number Format" msgstr "" -#: ../common.php:5488 ../includes/addon/class-gf-addon.php:1895 -#: ../notification.php:172 ../notification.php:659 -msgid "is" +#: form_detail.php:1556 settings.php:256 tooltips.php:155 +msgid "Currency" msgstr "" -#: ../common.php:5489 ../includes/addon/class-gf-addon.php:1899 -#: ../notification.php:173 ../notification.php:660 -msgid "is not" +#: form_detail.php:1565 tooltips.php:86 +msgid "Sub-Labels" msgstr "" -#: ../common.php:5490 ../includes/addon/class-gf-addon.php:1903 -#: ../notification.php:174 ../notification.php:661 -msgid "greater than" +#: form_detail.php:1581 +msgid "Supported Credit Cards" msgstr "" -#: ../common.php:5491 ../includes/addon/class-gf-addon.php:1907 -#: ../notification.php:175 ../notification.php:662 -msgid "less than" +#: form_detail.php:1602 +msgid "Card Icon Style" msgstr "" -#: ../common.php:5492 ../includes/addon/class-gf-addon.php:1911 -#: ../notification.php:176 ../notification.php:663 -msgid "contains" +#: form_detail.php:1606 form_detail.php:1628 +msgid "Standard" msgstr "" -#: ../common.php:5493 ../includes/addon/class-gf-addon.php:1915 -#: ../notification.php:177 ../notification.php:664 -msgid "starts with" +#: form_detail.php:1607 +msgid "3D" msgstr "" -#: ../common.php:5494 ../includes/addon/class-gf-addon.php:1919 -#: ../notification.php:178 ../notification.php:665 -msgid "ends with" +#: form_detail.php:1617 tooltips.php:138 +msgid "Input Mask" msgstr "" -#: ../common.php:5496 -msgid "Use this confirmation if" +#: form_detail.php:1643 +msgid "Enter a custom mask" msgstr "" -#: ../common.php:5497 -msgid "Send this notification if" +#: form_detail.php:1644 +msgid "Custom Mask Instructions" msgstr "" -#: ../common.php:5499 -msgid "Saving..." +#: form_detail.php:1644 gravityforms.php:1065 +msgid "Help" msgstr "" -#: ../common.php:5500 -msgid "Are you sure you wish to cancel these changes?" +#: form_detail.php:1650 +msgid "Usage" msgstr "" -#: ../common.php:5501 ../form_settings.php:1340 -msgid "There was an issue saving this confirmation." +#: form_detail.php:1652 +msgid "Use a '9' to indicate a numerical character." msgstr "" -#: ../common.php:5502 -msgid "Are you sure you wish to delete this confirmation?" +#: form_detail.php:1653 +msgid "Use a lower case 'a' to indicate an alphabetical character." msgstr "" -#: ../common.php:5503 ../form_settings.php:1360 -msgid "There was an issue deleting this confirmation." +#: form_detail.php:1654 +msgid "Use an asterick '*' to indicate any alphanumeric character." msgstr "" -#: ../common.php:5504 +#: form_detail.php:1655 msgid "" -"There are unsaved changes to the current confirmation. Would you like to " -"discard these changes?" +"Use a question mark '?' to indicate optional characters. " +"Note: All characters after the question mark will be optional." msgstr "" -#: ../common.php:5505 -msgid "Untitled Confirmation" +#: form_detail.php:1656 +msgid "All other characters are literal values and will be displayed automatically." msgstr "" -#: ../common.php:5507 -msgid "Please select a page." +#: form_detail.php:1659 +msgid "Examples" msgstr "" -#: ../common.php:5508 -msgid "Please enter a URL." +#: form_detail.php:1663 form_detail.php:1669 form_detail.php:1676 +#: form_detail.php:1683 form_detail.php:1690 +msgid "Mask" msgstr "" -#: ../common.php:5509 -msgid "Please enter a confirmation name." +#: form_detail.php:1664 form_detail.php:1671 form_detail.php:1678 +#: form_detail.php:1685 form_detail.php:1692 +msgid "Valid Input" msgstr "" -#: ../common.php:5511 -msgid "" -"This form contains conditional logic dependent upon this field. Are you sure " -"you want to delete this field? 'OK' to delete, 'Cancel' to abort." +#: form_detail.php:1668 +msgid "Social Security Number" msgstr "" -#: ../common.php:5512 -msgid "" -"This form contains conditional logic dependent upon this choice. Are you " -"sure you want to delete this choice? 'OK' to delete, 'Cancel' to abort." +#: form_detail.php:1675 +msgid "Course Code" msgstr "" -#: ../common.php:5513 -msgid "" -"This form contains conditional logic dependent upon this choice. Are you " -"sure you want to modify this choice? 'OK' to delete, 'Cancel' to abort." +#: form_detail.php:1682 +msgid "License Key" msgstr "" -#: ../common.php:5515 -msgid "" -"
    Merge Tags
    Merge tags allow you to dynamically populate submitted " -"field values in your form content wherever this merge tag icon is present." +#: form_detail.php:1689 +msgid "Zip Code w/ Optional Plus Four" msgstr "" -#: ../common.php:5523 -msgid "Add a condition" +#: form_detail.php:1701 +msgid "Select a Mask" msgstr "" -#: ../common.php:5524 -msgid "Remove a condition" +#: form_detail.php:1720 tooltips.php:55 +msgid "Maximum Characters" msgstr "" -#: ../common.php:5525 -msgid "Include results if {0} match:" +#: form_detail.php:1730 +msgid "Range" msgstr "" -#: ../common.php:5644 -msgid "Any form field" +#: form_detail.php:1736 +msgid "Min" msgstr "" -#: ../common.php:5748 -msgid "Entry ID" +#: form_detail.php:1742 +msgid "Max" msgstr "" -#: ../common.php:5752 ../export.php:762 -#: ../includes/addon/class-gf-addon.php:1638 ../select_columns.php:93 -msgid "Entry Date" +#: form_detail.php:1758 tooltips.php:82 +msgid "Enable Calculation" msgstr "" -#: ../common.php:5754 -msgid "yyyy-mm-dd" +#: form_detail.php:1766 tooltips.php:83 +msgid "Formula" msgstr "" -#: ../common.php:5757 ../entry_list.php:749 -msgid "Starred" +#: form_detail.php:1780 +msgid "The formula appears to be valid." msgstr "" -#: ../common.php:5771 -msgid "IP Address" +#: form_detail.php:1780 +msgid "There appears to be a problem with the formula." msgstr "" -#: ../common.php:5775 -msgid "Source URL" +#: form_detail.php:1780 +msgid "Validate Formula" msgstr "" -#: ../common.php:5779 ../entry_detail.php:373 ../export.php:767 -#: ../select_columns.php:96 -msgid "Payment Status" +#: form_detail.php:1784 tooltips.php:84 +msgid "Rounding" msgstr "" -#: ../common.php:5801 ../entry_detail.php:377 ../export.php:766 -#: ../select_columns.php:99 -msgid "Payment Date" +#: form_detail.php:1808 +msgid "Rules" msgstr "" -#: ../common.php:5805 ../entry_detail.php:389 ../export.php:765 -#: ../includes/addon/class-gf-payment-addon.php:1210 -#: ../includes/addon/class-gf-payment-addon.php:1215 ../select_columns.php:98 -msgid "Payment Amount" +#: form_detail.php:1811 +msgid "Required" msgstr "" -#: ../common.php:5809 -msgid "Transaction ID" +#: form_detail.php:1818 tooltips.php:80 +msgid "No Duplicates" msgstr "" -#: ../common.php:5813 ../entry_detail.php:353 ../select_columns.php:100 -msgid "User" +#: form_detail.php:1836 form_detail.php:1846 js.php:213 tooltips.php:96 +msgid "Placeholder" msgstr "" -#: ../common.php:5897 -msgid "This type of file is not allowed. Must be one of the following: " +#: form_detail.php:1857 tooltips.php:97 +msgid "Placeholders" msgstr "" -#: ../common.php:5898 -msgid "Delete this file" +#: form_detail.php:1872 form_settings.php:367 +msgid "Left aligned" msgstr "" -#: ../common.php:5899 -msgid "in progress" +#: form_detail.php:1875 form_settings.php:368 +msgid "Right aligned" msgstr "" -#: ../common.php:5900 -msgid "File exceeds size limit" +#: form_detail.php:1879 form_settings.php:366 +msgid "Top aligned" msgstr "" -#: ../common.php:5901 -msgid "This type of file is not allowed." +#: form_detail.php:1886 form_detail.php:1909 form_detail.php:1919 +#: form_detail.php:1931 form_settings.php:397 form_settings.php:424 +msgid "Above inputs" msgstr "" -#: ../common.php:5902 -msgid "Maximum number of files reached" +#: form_detail.php:1886 form_detail.php:1908 form_detail.php:1919 +#: form_detail.php:1930 form_settings.php:396 form_settings.php:423 +msgid "Below inputs" msgstr "" -#: ../common.php:5903 -msgid "There was a problem while saving the file on the server" +#: form_detail.php:1890 +msgid "Field Label Visibility" msgstr "" -#: ../common.php:5904 -msgid "Please wait for the uploading to complete" +#: form_detail.php:1895 +msgid "Visible (%s)" msgstr "" -#: ../common.php:5905 ../entry_detail.php:456 ../form_detail.php:1386 -#: ../form_detail.php:1394 ../gravityforms.php:1225 -#: ../includes/addon/class-gf-results.php:326 -#: ../includes/locking/class-gf-locking.php:198 ../select_columns.php:154 -msgid "Cancel" +#: form_detail.php:1901 tooltips.php:36 tooltips.php:88 +msgid "Description Placement" msgstr "" -#: ../common.php:5906 -msgid "Cancel this upload" +#: form_detail.php:1907 form_detail.php:1929 +msgid "Use Form Setting (%s)" msgstr "" -#: ../common.php:5907 -msgid "Cancelled" +#: form_detail.php:1923 tooltips.php:37 tooltips.php:89 +msgid "Sub-Label Placement" msgstr "" -#: ../currency.php:99 -msgid "Australian Dollar" +#: form_detail.php:1942 +msgid "Custom Validation Message" msgstr "" -#: ../currency.php:100 -msgid "Brazilian Real" +#: form_detail.php:1954 +msgid "Custom CSS Class" msgstr "" -#: ../currency.php:101 -msgid "Canadian Dollar" +#: form_detail.php:1967 +msgid "Enable enhanced user interface" msgstr "" -#: ../currency.php:102 -msgid "Czech Koruna" +#: form_detail.php:1978 tooltips.php:90 +msgid "Field Size" msgstr "" -#: ../currency.php:103 -msgid "Danish Krone" +#: form_detail.php:1997 +msgid "Admin Field Label" msgstr "" -#: ../currency.php:104 -msgid "Euro" +#: form_detail.php:2011 form_detail.php:2021 js.php:189 tooltips.php:94 +msgid "Default Value" msgstr "" -#: ../currency.php:105 -msgid "Hong Kong Dollar" +#: form_detail.php:2030 +msgid "Prefix Choices" msgstr "" -#: ../currency.php:106 -msgid "Hungarian Forint" +#: form_detail.php:2046 tooltips.php:95 +msgid "Default Values" msgstr "" -#: ../currency.php:107 -msgid "Israeli New Sheqel" +#: form_detail.php:2061 +msgid "Display option to use the values submitted in different field" msgstr "" -#: ../currency.php:108 -msgid "Japanese Yen" +#: form_detail.php:2067 +msgid "To activate this option, please add a field to be used as the source." msgstr "" -#: ../currency.php:109 -msgid "Malaysian Ringgit" +#: form_detail.php:2073 tooltips.php:99 +msgid "Option Label" msgstr "" -#: ../currency.php:110 -msgid "Mexican Peso" +#: form_detail.php:2078 tooltips.php:100 +msgid "Source Field" msgstr "" -#: ../currency.php:111 -msgid "Norwegian Krone" +#: form_detail.php:2088 +msgid "Activated by default" msgstr "" -#: ../currency.php:112 -msgid "New Zealand Dollar" +#: form_detail.php:2101 tooltips.php:70 +msgid "Credit Card Icon Style" msgstr "" -#: ../currency.php:113 -msgid "Philippine Peso" +#: form_detail.php:2122 +msgid "Language" msgstr "" -#: ../currency.php:114 -msgid "Polish Zloty" +#: form_detail.php:2126 +msgid "English" msgstr "" -#: ../currency.php:115 -msgid "Pound Sterling" +#: form_detail.php:2127 +msgid "Dutch" msgstr "" -#: ../currency.php:116 -msgid "Singapore Dollar" +#: form_detail.php:2128 +msgid "French" msgstr "" -#: ../currency.php:117 -msgid "Swedish Krona" +#: form_detail.php:2129 +msgid "German" msgstr "" -#: ../currency.php:118 -msgid "Swiss Franc" +#: form_detail.php:2130 +msgid "Portuguese" msgstr "" -#: ../currency.php:119 -msgid "Taiwan New Dollar" +#: form_detail.php:2131 +msgid "Russian" msgstr "" -#: ../currency.php:120 -msgid "Thai Baht" +#: form_detail.php:2132 +msgid "Spanish" msgstr "" -#: ../currency.php:121 -msgid "U.S. Dollar" +#: form_detail.php:2133 +msgid "Turkish" msgstr "" -#: ../entry_detail.php:96 -msgid "Oops! We couldn't find your entry. Please try again" +#: form_detail.php:2142 tooltips.php:41 +msgid "Add Icon URL" msgstr "" -#: ../entry_detail.php:172 ../entry_list.php:98 ../entry_list.php:118 -#: ../form_list.php:89 -msgid "You don't have adequate permissions to delete entries." +#: form_detail.php:2152 tooltips.php:42 +msgid "Delete Icon URL" msgstr "" -#: ../entry_detail.php:194 -msgid "" -"'Would you like to delete this file? \\'Cancel\\' to stop. \\'OK\\' to " -"delete'" +#: form_detail.php:2162 +msgid "Enable Password Input" msgstr "" -#: ../entry_detail.php:204 ../js.php:362 -msgid "Ajax error while deleting field." +#: form_detail.php:2170 tooltips.php:69 +msgid "Force SSL" msgstr "" -#: ../entry_detail.php:258 ../entry_list.php:425 -msgid "You must select at least one type of notification to resend." +#: form_detail.php:2177 tooltips.php:105 +msgid "Visibility" msgstr "" -#: ../entry_detail.php:276 -msgid "Notifications were resent successfully." +#: form_detail.php:2182 +msgid "Everyone" msgstr "" -#: ../entry_detail.php:319 -msgid "Entry #" +#: form_detail.php:2187 +msgid "Admin Only" msgstr "" -#: ../entry_detail.php:340 -msgid "Entry" +#: form_detail.php:2197 +msgid "Allow field to be populated dynamically" msgstr "" -#: ../entry_detail.php:346 -msgid "Submitted on" +#: form_detail.php:2209 form_settings.php:540 +msgid "Enable Conditional Logic" msgstr "" -#: ../entry_detail.php:348 ../export.php:771 -#: ../includes/addon/class-gf-addon.php:1639 ../select_columns.php:94 -msgid "User IP" +#: form_detail.php:2222 +msgid "Enable Page Conditional Logic" msgstr "" -#: ../entry_detail.php:353 -msgid "View user profile" +#: form_detail.php:2235 +msgid "Enable Next Button Conditional Logic" msgstr "" -#: ../entry_detail.php:359 -msgid "Embed Url" +#: form_detail.php:2328 tooltips.php:141 +msgid "Post Fields" msgstr "" -#: ../entry_detail.php:365 -msgid "Edit Post" +#: form_detail.php:2332 tooltips.php:142 +msgid "Pricing Fields" msgstr "" -#: ../entry_detail.php:365 -msgid "Click to edit post" +#: form_detail.php:2364 form_list.php:560 +msgid "Move this form to the trash" msgstr "" -#: ../entry_detail.php:373 -msgid "Subscription Status" +#: form_detail.php:2364 +msgid "" +"Would you like to move this form to the trash? \\'Cancel\\' to stop. " +"\\'OK\\' to continue" msgstr "" -#: ../entry_detail.php:377 ../entry_detail.php:985 -msgid "Start Date" +#: form_detail.php:2369 includes/templates/edit-shortcode-form.tpl.php:20 +msgid "Update Form" msgstr "" -#: ../entry_detail.php:383 -msgid "Subscriber Id" +#: form_detail.php:2369 +msgid "Save Form" msgstr "" -#: ../entry_detail.php:383 ../entry_detail.php:995 ../export.php:764 -#: ../select_columns.php:97 -msgid "Transaction Id" +#: form_detail.php:2380 gravityforms.php:2506 +msgid "Preview" msgstr "" -#: ../entry_detail.php:389 -msgid "Subscription Amount" +#: form_detail.php:2730 forms_model.php:453 +msgid "Admin Notification" msgstr "" -#: ../entry_detail.php:406 ../entry_list.php:783 ../entry_list.php:1171 -#: ../entry_list.php:1307 -msgid "Not Spam" +#: form_detail.php:2733 +msgid "New submission from" msgstr "" -#: ../entry_detail.php:412 ../entry_detail.php:425 -msgid "" -"You are about to delete this entry. \\'Cancel\\' to stop, \\'OK\\' to delete." +#: form_detail.php:2748 forms_model.php:3896 +msgid "Default Confirmation" msgstr "" -#: ../entry_detail.php:412 ../entry_detail.php:425 ../entry_list.php:777 -#: ../entry_list.php:787 ../entry_list.php:1155 ../entry_list.php:1181 -#: ../entry_list.php:1301 ../entry_list.php:1311 -msgid "Delete Permanently" +#: form_display.php:587 +msgid "Oops! We could not locate your form." msgstr "" -#: ../entry_detail.php:420 ../entry_list.php:773 ../entry_list.php:1145 -#: ../entry_list.php:1297 ../form_list.php:364 ../form_list.php:478 -#: ../form_list.php:479 ../form_list.php:567 -msgid "Restore" +#: form_display.php:606 +msgid "Sorry. You must be logged in to view this form." msgstr "" -#: ../entry_detail.php:434 ../entry_list.php:1333 ../form_detail.php:2039 -msgid "Move to Trash" +#: form_display.php:715 +msgid "There was a problem with your submission." msgstr "" -#: ../entry_detail.php:440 -msgid "Mark as Spam" +#: form_display.php:715 +msgid "Errors have been highlighted below." msgstr "" -#: ../entry_detail.php:451 ../form_list.php:468 ../form_settings.php:1497 -#: ../gravityforms.php:2293 ../includes/addon/class-gf-feed-addon.php:621 -#: ../notification.php:1102 -msgid "Edit" +#: form_display.php:754 form_display.php:2237 +msgid "Previous Page" msgstr "" -#: ../entry_detail.php:477 ../form_settings.php:1266 ../notification.php:107 -#: ../notification.php:401 ../notification.php:405 -msgid "Notifications" +#: form_display.php:1015 +msgid "This field is for validation purposes and should be left unchanged." msgstr "" -#: ../entry_detail.php:485 -msgid "" -"You cannot resend notifications for this entry because this form does not " -"currently have any notifications configured." +#: form_display.php:1269 includes/addon/class-gf-addon.php:2242 +#: includes/fields/class-gf-field-calculation.php:32 +#: includes/fields/class-gf-field-hiddenproduct.php:28 +#: includes/fields/class-gf-field-radio.php:45 +#: includes/fields/class-gf-field-singleproduct.php:34 +#: includes/fields/class-gf-field-website.php:44 +msgid "This field is required." msgstr "" -#: ../entry_detail.php:487 ../entry_list.php:839 -msgid "Configure Notifications" +#: form_display.php:1278 +msgid "This date has already been taken. Please select a new date." msgstr "" -#: ../entry_detail.php:503 ../entry_list.php:858 ../notification.php:556 -msgid "Send To" +#: form_display.php:1282 +msgid "" +"This field requires a unique entry and the values you entered have been " +"already been used." msgstr "" -#: ../entry_detail.php:509 ../entry_list.php:381 ../entry_list.php:798 -#: ../entry_list.php:863 ../entry_list.php:1322 -msgid "Resend Notifications" +#: form_display.php:1283 +msgid "This field requires a unique entry and '%s' has already been used" msgstr "" -#: ../entry_detail.php:511 ../entry_list.php:865 -msgid "Resending..." +#: form_display.php:1292 +msgid "Please enter a valid value." msgstr "" -#: ../entry_detail.php:525 ../entry_list.php:799 ../entry_list.php:900 -msgid "Print" +#: form_display.php:1292 +msgid "Invalid selection. Please select one of the available choices." msgstr "" -#: ../entry_detail.php:528 -msgid "include notes" +#: form_display.php:1886 +msgid "No results matched" msgstr "" -#: ../entry_detail.php:551 -msgid "Notes" +#: form_display.php:1930 form_display.php:2418 gravityforms.php:1522 +msgid "of" msgstr "" -#: ../entry_detail.php:589 -msgid "Entry Updated." +#: form_display.php:1930 +msgid "max characters" msgstr "" -#: ../entry_detail.php:601 -msgid "Details" +#: form_display.php:1951 includes/fields/class-gf-field-password.php:87 +msgid "Strength indicator" msgstr "" -#: ../entry_detail.php:656 -msgid " Bulk action" +#: form_display.php:1951 +msgid "Mismatch" msgstr "" -#: ../entry_detail.php:658 ../entry_list.php:768 ../entry_list.php:1292 -msgid " Bulk action " +#: form_display.php:2234 js.php:546 +msgid "Next" msgstr "" -#: ../entry_detail.php:659 ../form_detail.php:1395 ../form_settings.php:1499 -#: ../includes/addon/class-gf-feed-addon.php:590 -#: ../includes/addon/class-gf-feed-addon.php:622 ../notification.php:1104 -msgid "Delete" +#: form_display.php:2234 +msgid "Next Page" msgstr "" -#: ../entry_detail.php:662 ../entry_list.php:816 ../entry_list.php:1339 -#: ../form_list.php:375 ../form_list.php:578 -msgid "Apply" +#: form_display.php:2368 +msgid "" +"This page is unsecured. Do not enter a real credit card number. Use this " +"field only for testing purposes. " msgstr "" -#: ../entry_detail.php:710 -msgid "added on" +#: form_display.php:2418 +msgid "Step" msgstr "" -#: ../entry_detail.php:724 -msgid "Add Note" +#: form_display.php:2446 +msgid "Sorry. This form is no longer accepting new submissions." msgstr "" -#: ../entry_detail.php:731 -msgid "Also email this note to" +#: form_display.php:2463 +msgid "This form is not yet available." msgstr "" -#: ../entry_detail.php:739 -msgid "Subject:" +#: form_display.php:2465 +msgid "Sorry. This form is no longer available." msgstr "" -#: ../entry_detail.php:769 ../print-entry.php:87 -msgid "Entry # " +#: form_display.php:2580 +msgid "Send Email" msgstr "" -#: ../entry_detail.php:775 -msgid "show empty fields" +#: form_display.php:2581 includes/fields/class-gf-field-email.php:54 +msgid "Please enter a valid email address." msgstr "" -#: ../entry_detail.php:964 -msgid "Subscription Details" +#: form_list.php:26 +msgid "Form moved to the trash." msgstr "" -#: ../entry_detail.php:964 -msgid "Payment Details" +#: form_list.php:31 +msgid "Form restored." msgstr "" -#: ../entry_detail.php:975 -msgid "Status" +#: form_list.php:37 +msgid "Form deleted." msgstr "" -#: ../entry_detail.php:995 -msgid "Subscription Id" +#: form_list.php:39 +msgid "You don't have adequate permission to delete forms." msgstr "" -#: ../entry_detail.php:1005 ../includes/addon/class-gf-payment-addon.php:1167 -#: ../includes/addon/class-gf-payment-addon.php:1171 -msgid "Recurring Amount" +#: form_list.php:45 +msgid "Form duplicated." msgstr "" -#: ../entry_detail.php:1005 ../includes/addon/class-gf-payment-addon.php:1078 -msgid "Amount" -msgstr "" +#: form_list.php:57 +msgid "%s form moved to the trash." +msgid_plural "%s forms moved to the trash." +msgstr[0] "" +msgstr[1] "" -#: ../entry_list.php:20 -#, php-format -msgid "You don't have any active forms. Let's go %screate one%s" -msgstr "" +#: form_list.php:61 +msgid "%s form restored." +msgid_plural "%s forms restored." +msgstr[0] "" +msgstr[1] "" -#: ../entry_list.php:96 -msgid "Entry deleted." -msgstr "" +#: form_list.php:66 +msgid "%s form deleted." +msgid_plural "%s forms deleted." +msgstr[0] "" +msgstr[1] "" -#: ../entry_list.php:110 -#, php-format -msgid "%d entries" +#: form_list.php:68 +msgid "You don't have adequate permissions to delete forms." msgstr "" -#: ../entry_list.php:110 -msgid "1 entry" -msgstr "" +#: form_list.php:75 +msgid "Views for %s form have been reset." +msgid_plural "Views for %s forms have been reset." +msgstr[0] "" +msgstr[1] "" -#: ../entry_list.php:116 -#, php-format -msgid "%s deleted." -msgstr "" +#: form_list.php:82 +msgid "Entries for %s form have been deleted." +msgid_plural "Entries for %s forms have been deleted." +msgstr[0] "" +msgstr[1] "" -#: ../entry_list.php:124 -#, php-format -msgid "%s moved to Trash." -msgstr "" +#: form_list.php:92 +msgid "%s form has been marked as active." +msgid_plural "%s forms have been marked as active." +msgstr[0] "" +msgstr[1] "" -#: ../entry_list.php:129 -#, php-format -msgid "%s restored from the Trash." +#: form_list.php:98 +msgid "%s form has been marked as inactive." +msgid_plural "%s forms have been marked as inactive." +msgstr[0] "" +msgstr[1] "" + +#: form_list.php:146 +msgid "Create a New Form" msgstr "" -#: ../entry_list.php:134 -#, php-format -msgid "%s restored from the spam." +#: form_list.php:160 +msgid "Creating Form..." msgstr "" -#: ../entry_list.php:139 -#, php-format -msgid "%s marked as spam." +#: form_list.php:192 +msgid "Saved! Redirecting..." msgstr "" -#: ../entry_list.php:144 -#, php-format -msgid "%s marked as read." +#: form_list.php:278 tooltips.php:34 +msgid "Form Description" msgstr "" -#: ../entry_list.php:149 -#, php-format -msgid "%s marked as unread." +#: form_list.php:283 +msgid "Create Form" msgstr "" -#: ../entry_list.php:154 -#, php-format -msgid "%s starred." +#: form_list.php:339 +msgid "Ajax error while updating form" msgstr "" -#: ../entry_list.php:159 -#, php-format -msgid "%s unstarred." +#: form_list.php:354 +msgid "" +"WARNING: You are about to delete these forms and ALL entries associated " +"with them. " msgstr "" -#: ../entry_list.php:219 -msgid "«" +#: form_list.php:354 form_list.php:358 form_settings.php:1781 +#: includes/addon/class-gf-feed-addon.php:724 notification.php:1194 +msgid "\\'Cancel\\' to stop, \\'OK\\' to delete." msgstr "" -#: ../entry_list.php:220 -msgid "»" +#: form_list.php:356 +msgid "Are you sure you would like to reset the Views for the selected forms? " msgstr "" -#: ../entry_list.php:318 -msgid "Ajax error while setting lead property" +#: form_list.php:356 +msgid "\\'Cancel\\' to stop, \\'OK\\' to reset." msgstr "" -#: ../entry_list.php:373 -msgid "Please select at least one entry." +#: form_list.php:358 +msgid "" +"WARNING: You are about to delete ALL entries associated with the selected " +"forms. " msgstr "" -#: ../entry_list.php:387 ../entry_list.php:1323 -msgid "Print Entries" +#: form_list.php:368 gravityforms.php:1041 gravityforms.php:1044 +#: gravityforms.php:1373 +msgid "Forms" msgstr "" -#: ../entry_list.php:450 -#, php-format -msgid "Notifications for %s were resent successfully." +#: form_list.php:369 form_settings.php:990 +#: includes/addon/class-gf-feed-addon.php:472 +#: includes/addon/class-gf-feed-addon.php:575 notification.php:434 +msgid "Add New" msgstr "" -#: ../entry_list.php:452 -msgid "entry" +#: form_list.php:411 form_list.php:537 form_list.php:538 form_list.php:620 +msgid "Delete permanently" msgstr "" -#: ../entry_list.php:452 -msgid "entries" +#: form_list.php:413 form_list.php:622 +msgid "Mark as Active" msgstr "" -#: ../entry_list.php:551 -#, php-format -msgid "All %s{0}%s entries on this page are selected." +#: form_list.php:414 form_list.php:623 +msgid "Mark as Inactive" msgstr "" -#: ../entry_list.php:552 -#, php-format -msgid "Select all %s{0}%s entries." +#: form_list.php:415 form_list.php:624 +msgid "Reset Views" msgstr "" -#: ../entry_list.php:553 -#, php-format -msgid "All %s{0}%s entries have been selected." +#: form_list.php:416 form_list.php:625 +msgid "Permanently Delete Entries" msgstr "" -#: ../entry_list.php:554 -msgid "Clear selection" +#: form_list.php:417 form_list.php:626 +msgid "Move to trash" msgstr "" -#: ../entry_list.php:639 -msgid "Entry List" +#: form_list.php:452 form_list.php:476 +msgid "Id" msgstr "" -#: ../entry_list.php:734 ../form_list.php:411 ../form_list.php:429 -#: ../gravityforms.php:971 ../gravityforms.php:2325 -msgid "Entries" +#: form_list.php:458 form_list.php:478 +msgid "Views" msgstr "" -#: ../entry_list.php:734 ../form_detail.php:141 ../form_settings.php:1213 -msgid "Form Name" +#: form_list.php:460 form_list.php:480 +msgid "Conversion" msgstr "" -#: ../entry_list.php:748 ../gravityforms.php:1317 -msgid "Unread" +#: form_list.php:540 +msgid "" +"WARNING: You are about to delete this form and ALL entries associated with " +"it. " msgstr "" -#: ../entry_list.php:753 ../entry_list.php:804 ../entry_list.php:1204 -#: ../entry_list.php:1327 -msgid "Spam" +#: form_list.php:540 +msgid "\\\"Cancel\\\" to stop, \\\"OK\\\" to delete." msgstr "" -#: ../entry_list.php:757 ../entry_list.php:810 ../entry_list.php:1214 -#: ../form_list.php:351 ../form_list.php:507 -msgid "Trash" +#: form_list.php:551 form_settings.php:1780 notification.php:1193 +msgid "Duplicate" msgstr "" -#: ../entry_list.php:760 -msgid "Search" +#: form_list.php:552 +msgid "Duplicate this form" msgstr "" -#: ../entry_list.php:766 ../entry_list.php:1290 ../form_list.php:360 -#: ../form_list.php:362 ../form_list.php:563 ../form_list.php:565 -msgid "Bulk action" +#: form_list.php:598 +msgid "There are no forms in the trash." msgstr "" -#: ../entry_list.php:794 ../entry_list.php:1318 -msgid "Mark as Read" +#: form_list.php:600 +msgid "You don't have any forms. Let's go %screate one%s!" msgstr "" -#: ../entry_list.php:795 ../entry_list.php:1319 -msgid "Mark as Unread" +#: form_list.php:645 form_list.php:665 +msgid "There was an issue creating your form." msgstr "" -#: ../entry_list.php:796 ../entry_list.php:1320 -msgid "Add Star" +#: form_list.php:657 +msgid "Please enter a form title." msgstr "" -#: ../entry_list.php:797 ../entry_list.php:1321 -msgid "Remove Star" +#: form_list.php:669 +msgid "Please enter a unique form title." msgstr "" -#: ../entry_list.php:820 -msgid "" -"WARNING! This operation cannot be undone. Empty trash? \\'Ok\\' to empty " -"trash. \\'Cancel\\' to abort." +#: form_settings.php:110 form_settings.php:907 form_settings.php:1432 +#: gravityforms.php:2474 +msgid "Form Settings" msgstr "" -#: ../entry_list.php:820 +#: form_settings.php:300 msgid "" -"WARNING! This operation cannot be undone. Permanently delete all spam? \\'Ok" -"\\' to delete. \\'Cancel\\' to abort." +"The form title you have entered has already been used. Please enter a " +"unique form title." msgstr "" -#: ../entry_list.php:821 -msgid "Empty Trash" +#: form_settings.php:311 +msgid "Form settings updated successfully." msgstr "" -#: ../entry_list.php:821 -msgid "Delete All Spam" +#: form_settings.php:341 +msgid "Form title" msgstr "" -#: ../entry_list.php:837 -msgid "" -"You cannot resend notifications for these entries because this form does not " -"currently have any notifications configured." +#: form_settings.php:355 +msgid "Form description" msgstr "" -#: ../entry_list.php:844 -msgid "" -"Specify which notifications you would like to resend for the selected " -"entries." +#: form_settings.php:381 +msgid "Label placement" msgstr "" -#: ../entry_list.php:874 -msgid "Close Window" +#: form_settings.php:408 +msgid "Description placement" msgstr "" -#: ../entry_list.php:888 -msgid "Print all of the selected entries at once." +#: form_settings.php:435 +msgid "Sub-label placement" msgstr "" -#: ../entry_list.php:892 -msgid "Include notes" +#: form_settings.php:480 +msgid "Input type" msgstr "" -#: ../entry_list.php:897 -msgid "Add page break between entries" +#: form_settings.php:486 form_settings.php:1218 form_settings.php:1843 +msgid "Text" msgstr "" -#: ../entry_list.php:936 ../entry_list.php:959 -msgid "click to select columns to display" +#: form_settings.php:504 +msgid "Button text" msgstr "" -#: ../entry_list.php:1050 -#, php-format -msgid "%d files" +#: form_settings.php:518 +msgid "Button image path" msgstr "" -#: ../entry_list.php:1140 ../entry_list.php:1166 ../entry_list.php:1193 -msgid "View this entry" +#: form_settings.php:536 +msgid "Button conditional logic" msgstr "" -#: ../entry_list.php:1140 ../entry_list.php:1166 ../entry_list.php:1193 -#: ../includes/addon/class-gf-payment-addon.php:1863 -msgid "View" +#: form_settings.php:564 +msgid "Save and Continue Later" msgstr "" -#: ../entry_list.php:1145 -msgid "Restore this entry" +#: form_settings.php:569 form_settings.php:897 +msgid "Save and Continue" msgstr "" -#: ../entry_list.php:1155 ../entry_list.php:1181 -msgid "Delete this entry permanently" +#: form_settings.php:573 +msgid "Enable Save and Continue" msgstr "" -#: ../entry_list.php:1171 -msgid "Mark this entry as not spam" +#: form_settings.php:587 +msgid "" +"This feature stores potentially private and sensitive data on this server " +"and protects it with a unique link which is displayed to the user on the " +"page in plain, unencrypted text. The link is similar to a password so it's " +"strongly advisable to ensure that the page enforces a secure connection " +"(HTTPS) before activating this setting." msgstr "" -#: ../entry_list.php:1197 -msgid "Mark read" +#: form_settings.php:592 +msgid "" +"When this setting is activated two confirmations and one notification are " +"automatically generated and can be modified in their respective editors. " +"When this setting is deactivated the confirmations and the notification " +"will be deleted automatically and any modifications will be lost." msgstr "" -#: ../entry_list.php:1197 -msgid "Mark this entry as unread" +#: form_settings.php:604 +msgid "Link text" msgstr "" -#: ../entry_list.php:1197 -msgid "Mark unread" +#: form_settings.php:626 +msgid "total entries" msgstr "" -#: ../entry_list.php:1204 -msgid "Mark this entry as spam" +#: form_settings.php:627 +msgid "per day" msgstr "" -#: ../entry_list.php:1214 -msgid "Move this entry to the trash" +#: form_settings.php:628 +msgid "per week" msgstr "" -#: ../entry_list.php:1254 -msgid "" -"This form does not have any unread entries matching the search criteria." +#: form_settings.php:629 +msgid "per month" msgstr "" -#: ../entry_list.php:1254 -msgid "This form does not have any unread entries." +#: form_settings.php:630 +msgid "per year" msgstr "" -#: ../entry_list.php:1258 -msgid "" -"This form does not have any starred entries matching the search criteria." +#: form_settings.php:640 +msgid "Limit number of entries" msgstr "" -#: ../entry_list.php:1258 -msgid "This form does not have any starred entries." +#: form_settings.php:644 +msgid "Enable entry limit" msgstr "" -#: ../entry_list.php:1262 -msgid "This form does not have any spam." +#: form_settings.php:654 +msgid "Number of Entries" msgstr "" -#: ../entry_list.php:1267 -msgid "" -"This form does not have any entries in the trash matching the search " -"criteria." +#: form_settings.php:673 +msgid "Entry Limit Reached Message" msgstr "" -#: ../entry_list.php:1267 -msgid "This form does not have any entries in the trash." +#: form_settings.php:737 form_settings.php:741 +msgid "Schedule form" msgstr "" -#: ../entry_list.php:1272 -msgid "This form does not have any entries matching the search criteria." +#: form_settings.php:750 +msgid "Schedule Start Date/Time" msgstr "" -#: ../entry_list.php:1272 -msgid "This form does not have any entries yet." +#: form_settings.php:775 +msgid "Schedule Form End Date/Time" msgstr "" -#: ../entry_list.php:1487 -#, php-format -msgid "Displaying %s - %s of %s" +#: form_settings.php:800 +msgid "Form Pending Message" msgstr "" -#: ../export.php:16 ../export.php:462 -msgid "Please select the fields to be exported" +#: form_settings.php:813 +msgid "Form Expired Message" msgstr "" -#: ../export.php:39 -msgid "Please select the forms to be exported" +#: form_settings.php:829 +msgid "Anti-spam honeypot" msgstr "" -#: ../export.php:313 -msgid "" -"Forms could not be imported. Please make sure your XML export file is in the " -"correct format." +#: form_settings.php:833 +msgid "Enable anti-spam honeypot" msgstr "" -#: ../export.php:316 -msgid "" -"Forms could not be imported. Your XML export file is not compatible with " -"your current version of Gravity Forms." +#: form_settings.php:845 +msgid "Animated transitions" msgstr "" -#: ../export.php:320 -msgid "forms" +#: form_settings.php:849 +msgid "Enable animations" msgstr "" -#: ../export.php:320 -msgid "form" +#: form_settings.php:864 form_settings.php:868 tooltips.php:111 +msgid "Require user to be logged in" msgstr "" -#: ../export.php:321 -msgid "Edit Form" +#: form_settings.php:877 tooltips.php:112 +msgid "Require Login Message" msgstr "" -#: ../export.php:327 ../export.php:900 -msgid "Import Forms" +#: form_settings.php:894 +msgid "Form Basics" msgstr "" -#: ../export.php:332 -msgid "" -"Select the Gravity Forms XML file you would like to import. When you click " -"the import button below, Gravity Forms will import the forms." +#: form_settings.php:895 +msgid "Form Layout" msgstr "" -#: ../export.php:342 ../tooltips.php:133 -msgid "Select File" +#: form_settings.php:896 +msgid "Form Button" msgstr "" -#: ../export.php:347 -msgid "Import" +#: form_settings.php:898 +msgid "Restrictions" msgstr "" -#: ../export.php:362 ../export.php:899 -msgid "Export Forms" +#: form_settings.php:899 +msgid "Form Options" msgstr "" -#: ../export.php:366 -msgid "" -"Select the forms you would like to export. When you click the download " -"button below, Gravity Forms will create an XML file for you to save to your " -"computer. Once you've saved the download file, you can use the Import tool " -"to import the forms." +#: form_settings.php:957 +msgid "Update Form Settings" msgstr "" -#: ../export.php:372 -msgid "Select Forms" +#: form_settings.php:984 form_settings.php:989 form_settings.php:1081 +#: form_settings.php:1433 +msgid "Confirmations" msgstr "" -#: ../export.php:392 ../export.php:533 -msgid "Download Export File" +#: form_settings.php:1018 +msgid "Ajax error while updating confirmation" msgstr "" -#: ../export.php:407 ../export.php:544 ../export.php:895 -msgid "Export Entries" +#: form_settings.php:1105 +msgid "" +"Ensure that the conditional logic for this confirmation is different from " +"all the other confirmations for this form and then press save to create the " +"new confirmation." msgstr "" -#: ../export.php:431 -msgid "Ajax error while selecting a form" +#: form_settings.php:1120 notification.php:149 +msgid "Save & Continue Link" msgstr "" -#: ../export.php:447 -msgid "Deselect All" +#: form_settings.php:1121 notification.php:150 +msgid "Save & Continue Token" msgstr "" -#: ../export.php:447 -msgid "Select All" +#: form_settings.php:1125 +msgid "Save & Continue Email Input" msgstr "" -#: ../export.php:456 -msgid "Export entries if {0} of the following match:" +#: form_settings.php:1161 +msgid "Save Confirmation" msgstr "" -#: ../export.php:471 -msgid "" -"Select a form below to export entries. Once you have selected a form you may " -"select the fields you would like to export and then define optional filters " -"for field values and the date range. When you click the download button " -"below, Gravity Forms will create a CSV file for you to save to your computer." +#: form_settings.php:1204 +msgid "Confirmation Name" msgstr "" -#: ../export.php:478 ../gravityforms.php:2190 -msgid "Select A Form" +#: form_settings.php:1214 +msgid "Confirmation Type" msgstr "" -#: ../export.php:482 -msgid "Select a form" +#: form_settings.php:1224 form_settings.php:1266 form_settings.php:1846 +#: includes/fields/class-gf-field-page.php:12 js.php:84 +msgid "Page" msgstr "" -#: ../export.php:496 -msgid "Select Fields" +#: form_settings.php:1230 form_settings.php:1849 +msgid "Redirect" msgstr "" -#: ../export.php:503 ../form_settings.php:1167 -#: ../includes/addon/class-gf-payment-addon.php:1255 -#: ../includes/addon/class-gf-payment-addon.php:1257 ../notification.php:814 -#: ../tooltips.php:93 ../tooltips.php:107 ../tooltips.php:130 -msgid "Conditional Logic" +#: form_settings.php:1241 notification.php:832 +msgid "Message" msgstr "" -#: ../export.php:512 -msgid "Select Date Range" +#: form_settings.php:1254 +msgid "Disable Auto-formatting" msgstr "" -#: ../export.php:517 ../includes/addon/class-gf-results.php:269 -msgid "Start" +#: form_settings.php:1268 +msgid "Select a page" msgstr "" -#: ../export.php:522 ../includes/addon/class-gf-results.php:277 -msgid "End" +#: form_settings.php:1277 form_settings.php:1308 +msgid "Redirect Query String" msgstr "" -#: ../export.php:525 -msgid "" -"Date Range is optional, if no date range is selected all entries will be " -"exported." +#: form_settings.php:1280 form_settings.php:1311 +msgid "Pass Field Data Via Query String" msgstr "" -#: ../export.php:535 -msgid "Exporting entries. Please wait..." +#: form_settings.php:1285 form_settings.php:1316 +msgid "Sample: phone={Phone:1}&email={Email:2}" msgstr "" -#: ../export.php:760 -msgid "Created By (User Id)" +#: form_settings.php:1296 +msgid "Redirect URL" msgstr "" -#: ../export.php:763 ../includes/addon/class-gf-addon.php:1640 -#: ../select_columns.php:95 -msgid "Source Url" +#: form_settings.php:1472 +msgid "You must specify a Confirmation Name." msgstr "" -#: ../export.php:770 -msgid "User Agent" +#: form_settings.php:1479 +msgid "You must select a Confirmation Page." msgstr "" -#: ../form_detail.php:139 ../gravityforms.php:969 -msgid "New Form" +#: form_settings.php:1485 +msgid "You must specify a valid Redirect URL." msgstr "" -#: ../form_detail.php:141 ../gravityforms.php:2293 -msgid "Form Editor" +#: form_settings.php:1506 +msgid "Confirmation saved successfully. %sBack to confirmations.%s" msgstr "" -#: ../form_detail.php:151 ../form_detail.php:2058 ../form_settings.php:263 -msgid "There was an error while saving your form." +#: form_settings.php:1526 +msgid "Confirmation deleted." msgstr "" -#: ../form_detail.php:152 ../form_detail.php:2059 ../form_settings.php:264 -#, php-format -msgid "Please %scontact our support team%s." +#: form_settings.php:1610 +msgid "Save and Continue Email" msgstr "" -#: ../form_detail.php:160 +#: form_settings.php:1614 +msgid "Link to continue {form_title}" +msgstr "" + +#: form_settings.php:1615 msgid "" -"The form title you have entered is already taken. Please enter a unique form " -"title." +"Thank you for saving {form_title}. Please use the unique link below to " +"return to the form from any computer.

    {save_link}

    " +"Remember that the link will expire after 30 days so please return via the " +"provided link to complete your form submission." msgstr "" -#: ../form_detail.php:168 ../form_detail.php:2054 -msgid "Form updated successfully." +#: form_settings.php:1634 +msgid "Save and Continue Confirmation" msgstr "" -#: ../form_detail.php:194 -msgid "click to edit page options" +#: form_settings.php:1637 +msgid "" +"Please use the following link to return to your form from any computer.
    {save_link}
    This link will expire after 30 days.
    Enter your " +"email address to send the link by email.
    {save_email_input}" msgstr "" -#: ../form_detail.php:200 -msgid "begin form" +#: form_settings.php:1646 +msgid "Save and Continue Email Sent Confirmation" msgstr "" -#: ../form_detail.php:201 -msgid "START PAGING" +#: form_settings.php:1649 +msgid "The link was sent to the following email address: {save_email}" msgstr "" -#: ../form_detail.php:202 -msgid "top of the first page" +#: form_settings.php:1701 includes/addon/class-gf-payment-addon.php:1077 +#: includes/addon/class-gf-payment-addon.php:1138 +#: includes/addon/class-gf-payment-addon.php:1142 +#: includes/fields/class-gf-field-name.php:12 js.php:567 js.php:737 +#: notification.php:542 notification.php:1122 +msgid "Name" msgstr "" -#: ../form_detail.php:207 ../form_detail.php:403 ../form_detail.php:466 -msgid "Properties" +#: form_settings.php:1779 notification.php:1192 +msgid "Edit this item" msgstr "" -#: ../form_detail.php:208 ../form_detail.php:467 -msgid "Advanced" +#: form_settings.php:1780 +msgid "Duplicate this confirmation" msgstr "" -#: ../form_detail.php:215 ../tooltips.php:99 -msgid "Progress Indicator" +#: form_settings.php:1781 +msgid "Delete this item" msgstr "" -#: ../form_detail.php:221 -msgid "Progress Bar" +#: form_settings.php:1781 +msgid "WARNING: You are about to delete this confirmation." msgstr "" -#: ../form_detail.php:226 -msgid "Steps" +#: form_settings.php:1825 +msgid "This page does not exist." msgstr "" -#: ../form_detail.php:231 ../form_detail.php:1464 -msgid "None" +#: forms_model.php:477 +msgid "User Notification" msgstr "" -#: ../form_detail.php:240 -msgid "Style" +#: forms_model.php:577 forms_model.php:597 +msgid "Notification not found" msgstr "" -#: ../form_detail.php:244 -msgid "Blue" +#: forms_model.php:865 +msgid "You don't have adequate permission to create forms." msgstr "" -#: ../form_detail.php:245 -msgid "Gray" +#: forms_model.php:1271 +msgid "You don't have adequate permission to edit entries." msgstr "" -#: ../form_detail.php:246 ../form_detail.php:1346 -msgid "Green" +#: gravityforms.php:1037 +msgid "Update Available" msgstr "" -#: ../form_detail.php:247 -msgid "Orange" +#: gravityforms.php:1056 gravityforms.php:1311 gravityforms.php:2474 +#: includes/addon/class-gf-addon.php:2701 +#: includes/addon/class-gf-addon.php:2916 +#: includes/addon/class-gf-addon.php:3074 +#: includes/addon/class-gf-addon.php:3249 settings.php:474 +msgid "Settings" msgstr "" -#: ../form_detail.php:248 ../form_detail.php:785 -msgid "Red" +#: gravityforms.php:1058 +msgid "Import/Export" msgstr "" -#: ../form_detail.php:255 -msgid "Text Color" +#: gravityforms.php:1061 +msgid "Updates" msgstr "" -#: ../form_detail.php:262 ../form_detail.php:770 -msgid "Background Color" +#: gravityforms.php:1062 help.php:49 +msgid "Add-Ons" msgstr "" -#: ../form_detail.php:269 ../tooltips.php:101 -msgid "Page Names" +#: gravityforms.php:1125 +msgid "%1$s ‹ %2$s — WordPress" msgstr "" -#: ../form_detail.php:280 -msgid "Display completed progress bar on confirmation" +#: gravityforms.php:1236 gravityforms.php:1259 +msgid "Add Gravity Form" msgstr "" -#: ../form_detail.php:288 -msgid "Completion Text" +#: gravityforms.php:1259 +msgid "Add Form" msgstr "" -#: ../form_detail.php:300 ../form_detail.php:1835 ../form_settings.php:402 -#: ../tooltips.php:89 -msgid "CSS Class Name" +#: gravityforms.php:1271 +msgid "Please select a form" msgstr "" -#: ../form_detail.php:322 -msgid "" -"This form doesn't have any fields yet. Follow the steps below to get started." +#: gravityforms.php:1325 update.php:38 +msgid "There is a new version of Gravity Forms available." msgstr "" -#: ../form_detail.php:326 -msgid "Select A Field Type" +#: gravityforms.php:1325 includes/addon/class-gf-auto-upgrade.php:60 +#: includes/addon/class-gf-auto-upgrade.php:148 +msgid "View version %s Details" msgstr "" -#: ../form_detail.php:327 +#: gravityforms.php:1357 msgid "" -"Start by seleting a field type from the nifty floating panels on the right." +"Oops!! Something went wrong.
    Please try again or
    contact us." msgstr "" -#: ../form_detail.php:330 -msgid "Start Over There" +#: gravityforms.php:1403 gravityforms.php:1409 +msgid "View All Entries" msgstr "" -#: ../form_detail.php:331 -msgid "Pick a field.. any field. Don't be shy." +#: gravityforms.php:1406 +msgid "Last Entry: %s" msgstr "" -#: ../form_detail.php:336 -msgid "Click to Add A Field" +#: gravityforms.php:1421 +msgid "View All Forms" msgstr "" -#: ../form_detail.php:337 -msgid "" -"Once you've found the field type you want, click to add it to the form " -"editor here on the left side of your screen." +#: gravityforms.php:1428 +msgid "You don't have any forms. Let's go %s create one %s!" msgstr "" -#: ../form_detail.php:340 -msgid "Now your new field magically appears over here." +#: gravityforms.php:1459 +msgid "There is an update available for Gravity Forms. %sView Details%s %s" msgstr "" -#: ../form_detail.php:345 -msgid "Edit Field Options" +#: gravityforms.php:1462 +msgid "Dismiss" msgstr "" -#: ../form_detail.php:346 -msgid "Click on the edit link to configure the various field options" +#: gravityforms.php:1519 +msgid "Next >" msgstr "" -#: ../form_detail.php:349 -msgid "Preview your changes up here." +#: gravityforms.php:1520 +msgid "< Prev" msgstr "" -#: ../form_detail.php:350 -msgid "Edit the field options. Go ahead.. go crazy." +#: gravityforms.php:1523 +msgid "Close" msgstr "" -#: ../form_detail.php:351 -msgid "If you get stuck, mouseover the tool tips for a little help." +#: gravityforms.php:1524 +msgid "" +"This feature requires inline frames. You have iframes disabled or your " +"browser does not support them." msgstr "" -#: ../form_detail.php:356 -msgid "Drag to Arrange Fields" +#: gravityforms.php:1664 +msgid "Please select a form." msgstr "" -#: ../form_detail.php:357 -msgid "Drag the fields to arrange them the way you prefer" +#: gravityforms.php:1852 +msgid "Add-On browser is currently unavailable. Please try again later." msgstr "" -#: ../form_detail.php:360 -msgid "Grab here with your cursor." +#: gravityforms.php:2038 +msgid "There was an error while resending the notifications." msgstr "" -#: ../form_detail.php:361 -msgid "Drag up or down to arrange your fields." +#: gravityforms.php:2044 +msgid "" +"No notifications have been selected. Please select a notification to be " +"sent." msgstr "" -#: ../form_detail.php:366 -msgid "Save Your Form" +#: gravityforms.php:2048 +msgid "The Send To email address provided is not valid." msgstr "" -#: ../form_detail.php:367 -msgid "" -"Once you're happy with your form, remember to click on the "update " -"form" button to save all your hard work." +#: gravityforms.php:2357 +msgid "Switch Form" msgstr "" -#: ../form_detail.php:370 -msgid "Save Your New Form" +#: gravityforms.php:2461 +msgid "Edit this form" msgstr "" -#: ../form_detail.php:371 -msgid "You're done. That's it." +#: gravityforms.php:2476 +msgid "Edit settings for this form" msgstr "" -#: ../form_detail.php:390 -msgid "Edit Last Page" +#: gravityforms.php:2493 +msgid "View entries generated by this form" msgstr "" -#: ../form_detail.php:394 -msgid "end of last page" +#: gravityforms.php:2624 widget.php:27 +msgid "Form" msgstr "" -#: ../form_detail.php:395 -msgid "END PAGING" +#: gravityforms.php:2712 includes/locking/class-gf-locking.php:206 +msgid "Error" msgstr "" -#: ../form_detail.php:396 -msgid "end of form" +#: gravityforms.php:2791 widget.php:81 +msgid "Select a Form" msgstr "" -#: ../form_detail.php:409 ../form_detail.php:639 -msgid "Previous Button" +#: gravityforms.php:2798 +msgid "Select a form below to add it to your post or page." msgstr "" -#: ../form_detail.php:415 ../form_detail.php:608 ../form_detail.php:645 -msgid "Default" +#: gravityforms.php:2799 +msgid "Select a form from the list to add it to your post or page." msgstr "" -#: ../form_detail.php:427 ../form_detail.php:620 ../form_detail.php:657 -msgid "Text:" +#: gravityforms.php:2803 +msgid "Can't find your form? Make sure it is active." msgstr "" -#: ../form_detail.php:434 ../form_detail.php:627 ../form_detail.php:664 -msgid "Image Path:" +#: gravityforms.php:2807 widget.php:97 +msgid "Display form title" msgstr "" -#: ../form_detail.php:448 -msgid "You have successfully saved your form!" +#: gravityforms.php:2812 +msgid "Whether or not do display the form title." msgstr "" -#: ../form_detail.php:449 -msgid "What would you like to do next?" +#: gravityforms.php:2815 widget.php:99 +msgid "Display form description" msgstr "" -#: ../form_detail.php:450 ../form_detail.php:2055 ../gravityforms.php:2342 -msgid "Preview this form" +#: gravityforms.php:2820 +msgid "Whether or not do display the form description." msgstr "" -#: ../form_detail.php:450 -msgid "Preview this Form" +#: gravityforms.php:2823 widget.php:106 +msgid "Enable AJAX" msgstr "" -#: ../form_detail.php:453 -msgid "Setup email notifications for this form" +#: gravityforms.php:2827 +msgid "Specify whether or not to use AJAX to submit the form." msgstr "" -#: ../form_detail.php:453 -msgid "Setup Email Notifications for this Form" +#: gravityforms.php:2833 +msgid "Specify the starting tab index for the fields of this form." msgstr "" -#: ../form_detail.php:456 -msgid "Continue editing this form" +#: gravityforms.php:2841 +msgid "Select an action" msgstr "" -#: ../form_detail.php:456 -msgid "Continue Editing this Form" +#: gravityforms.php:2853 +msgid "Select an action for this shortcode. Actions are added by some add-ons." msgstr "" -#: ../form_detail.php:458 -msgid "I am done. Take me back to form list" +#: help.php:18 +msgid "Gravity Forms Help" msgstr "" -#: ../form_detail.php:458 -msgid "Return to Form List" +#: help.php:23 +msgid "" +"IMPORTANT NOTICE: We do not provide support via e-mail. " +"Please open a " +"support ticket." msgstr "" -#: ../form_detail.php:476 ../tooltips.php:47 ../tooltips.php:48 -msgid "Field Label" +#: help.php:25 +msgid "" +"Please review the plugin documentation and frequently " +"asked questions (FAQ) first. If you still can't find the answer open a support " +"ticket and we will be happy to answer your questions and assist you " +"with any problems. Please note: If you have not purchased a " +"license from us, you won't have access to these help resources." msgstr "" -#: ../form_detail.php:484 ../tooltips.php:122 -msgid "Product Field" +#: help.php:30 +msgid "Gravity Forms Documentation" msgstr "" -#: ../form_detail.php:496 ../form_detail.php:513 ../form_detail.php:548 -#: ../form_detail.php:562 ../form_detail.php:576 ../form_detail.php:686 -#: ../form_detail.php:715 ../form_detail.php:910 -msgid "Field Type" +#: help.php:39 +msgid "Documentation (please select a topic)" msgstr "" -#: ../form_detail.php:500 -msgid "Single Product" +#: help.php:41 +msgid "Getting Started" msgstr "" -#: ../form_detail.php:503 ../form_detail.php:567 -msgid "User Defined Price" +#: help.php:43 +msgid "Using Gravity Forms" msgstr "" -#: ../form_detail.php:505 -msgid "Calculation" +#: help.php:45 +msgid "Design and Layout" msgstr "" -#: ../form_detail.php:517 -msgid "Single Method" +#: help.php:47 +msgid "Developer Docs" msgstr "" -#: ../form_detail.php:538 -msgid "Disable quantity field" +#: help.php:51 +msgid "How To" msgstr "" -#: ../form_detail.php:591 ../form_settings.php:1420 ../tooltips.php:119 -msgid "Content" +#: help.php:56 help.php:83 help.php:110 +msgid "GO" msgstr "" -#: ../form_detail.php:603 -msgid "Next Button" +#: help.php:65 +msgid "Gravity Forms FAQ" msgstr "" -#: ../form_detail.php:677 -msgid "Disable default margins" +#: help.php:73 +msgid "FAQ (please select a topic)" msgstr "" -#: ../form_detail.php:690 ../form_detail.php:2007 ../tooltips.php:124 -msgid "Standard Fields" +#: help.php:74 +msgid "Installation Questions" msgstr "" -#: ../form_detail.php:691 ../form_detail.php:719 -msgid "Single line text" +#: help.php:75 +msgid "Formatting/Styling Questions" msgstr "" -#: ../form_detail.php:700 ../form_detail.php:2008 ../tooltips.php:125 -msgid "Advanced Fields" +#: help.php:76 +msgid "Notification Questions" msgstr "" -#: ../form_detail.php:734 ../form_settings.php:1419 -msgid "Type" +#: help.php:77 +msgid "General Questions" msgstr "" -#: ../form_detail.php:738 -msgid "reCAPTCHA" +#: help.php:93 +msgid "Gravity Forms Downloads" msgstr "" -#: ../form_detail.php:739 -msgid "Really Simple CAPTCHA" +#: help.php:94 +msgid "" +"Please Note: Only licensed Gravity Forms customers are " +"granted access to the downloads section." msgstr "" -#: ../form_detail.php:740 -msgid "Math Challenge" +#: help.php:102 +msgid "Downloads (please select a product)" msgstr "" -#: ../form_detail.php:748 ../form_detail.php:1358 -msgid "Size" +#. Plugin Name of the plugin/theme +msgid "Gravity Forms" msgstr "" -#: ../form_detail.php:751 ../form_detail.php:1358 ../form_detail.php:1756 -msgid "Small" +#: help.php:104 +msgid "Gravity Forms Add-Ons" msgstr "" -#: ../form_detail.php:761 -msgid "Font Color" +#: help.php:121 +msgid "Gravity Forms Tutorials & Resources" msgstr "" -#: ../form_detail.php:781 -msgid "Theme" +#: help.php:122 +msgid "" +"Please note: The Gravity Forms support team does not " +"provide support for third party scripts, widgets, etc." msgstr "" -#: ../form_detail.php:786 -msgid "White" +#: includes/addon/class-gf-addon.php:1032 +msgid "Field type '%s' has not been implemented" msgstr "" -#: ../form_detail.php:787 -msgid "Black Glass" +#: includes/addon/class-gf-addon.php:1280 +msgid "Settings updated" msgstr "" -#: ../form_detail.php:788 -msgid "Clean" +#: includes/addon/class-gf-addon.php:1286 +msgid "There was an error while saving your settings" msgstr "" -#: ../form_detail.php:796 ../tooltips.php:52 -msgid "Custom Field Name" +#: includes/addon/class-gf-addon.php:1639 +#: includes/addon/class-gf-addon.php:1793 +msgid "Form Field" msgstr "" -#: ../form_detail.php:802 -msgid "Existing" +#: includes/addon/class-gf-addon.php:1680 +msgid "Field" msgstr "" -#: ../form_detail.php:808 -msgid "New" +#: includes/addon/class-gf-addon.php:1709 +#: includes/addon/class-gf-addon.php:1713 +#: includes/addon/class-gf-addon.php:1873 +#: includes/addon/class-gf-addon.php:1877 +msgid "Full" msgstr "" -#: ../form_detail.php:814 -msgid "Select an existing custom field" +#: includes/addon/class-gf-addon.php:1717 +#: includes/addon/class-gf-addon.php:1881 +msgid "Selected" msgstr "" -#: ../form_detail.php:831 ../tooltips.php:109 -msgid "Post Status" +#: includes/addon/class-gf-addon.php:1778 +msgid "Add Custom" msgstr "" -#: ../form_detail.php:850 -msgid "Default Post Author" +#: includes/addon/class-gf-addon.php:1912 +msgid "Update Settings" msgstr "" -#: ../form_detail.php:860 -msgid "Use logged in user as author" +#: includes/addon/class-gf-addon.php:2277 settings.php:188 +msgid "Validation Error" msgstr "" -#: ../form_detail.php:872 ../tooltips.php:111 -msgid "Post Format" +#: includes/addon/class-gf-addon.php:2829 +#: includes/addon/class-gf-addon.php:2835 +msgid "You don't have adequate permission to view this page" msgstr "" -#: ../form_detail.php:898 ../js.php:375 ../tooltips.php:108 -#: ../tooltips.php:114 -msgid "Post Category" +#: includes/addon/class-gf-addon.php:2935 +msgid "This add-on needs to be updated. Please contact the developer." msgstr "" -#: ../form_detail.php:932 -msgid "All Categories" +#: includes/addon/class-gf-addon.php:2974 +msgid "%s Settings" msgstr "" -#: ../form_detail.php:938 -msgid "Select Categories" +#: includes/addon/class-gf-addon.php:3079 settings.php:491 +msgid "Uninstall" msgstr "" -#: ../form_detail.php:961 -msgid "Display placeholder" +#: includes/addon/class-gf-addon.php:3107 +#: includes/addon/class-gf-addon.php:3117 +msgid "Uninstall %" msgstr "" -#: ../form_detail.php:967 -msgid "Placeholder Label" +#: includes/addon/class-gf-addon.php:3112 settings.php:105 +msgid "Warning" msgstr "" -#: ../form_detail.php:977 ../form_detail.php:994 ../form_detail.php:1008 -msgid "Create content template" +#: includes/addon/class-gf-addon.php:3115 +msgid "Warning! This operation deletes ALL settings and data." msgstr "" -#: ../form_detail.php:1023 -msgid "Image Metadata" +#: includes/addon/class-gf-addon.php:3117 +msgid "" +"Warning! ALL settings will be deleted. This cannot be undone. \\'OK\\' to " +"delete, \\'Cancel\\' to stop" msgstr "" -#: ../form_detail.php:1046 ../tooltips.php:117 -msgid "Set as Featured Image" +#: includes/addon/class-gf-addon.php:3380 +msgid "Uninstall %s Add-On" msgstr "" -#: ../form_detail.php:1058 ../tooltips.php:57 -msgid "Address Type" +#: includes/addon/class-gf-addon.php:3386 +msgid "Uninstall Add-On" msgstr "" -#: ../form_detail.php:1086 -#, php-format -msgid "Default %s" +#: includes/addon/class-gf-addon.php:3397 +msgid "" +"%sThis operation deletes ALL %s settings%s. If you continue, you will NOT " +"be able to retrieve these settings." msgstr "" -#: ../form_detail.php:1102 ../tooltips.php:60 -msgid "Default Country" +#: includes/addon/class-gf-addon.php:3401 +msgid "" +"Warning! ALL %s settings will be deleted. This cannot be undone. \\'OK\\' " +"to delete, \\'Cancel\\' to stop" msgstr "" -#: ../form_detail.php:1112 -msgid "Hide Country Field" +#: includes/addon/class-gf-auto-upgrade.php:61 +msgid "" +"%sRegister%s your copy of Gravity Forms to receive access to automatic " +"upgrades and support. Need a license key? %sPurchase one now%s." msgstr "" -#: ../form_detail.php:1124 -#, php-format -msgid "Hide %s Field" +#: includes/addon/class-gf-auto-upgrade.php:177 +msgid "Oops!! Something went wrong.%sPlease try again or %scontact us%s." msgstr "" -#: ../form_detail.php:1136 -msgid "Hide Address Line 2 Field" +#: includes/addon/class-gf-auto-upgrade.php:234 +msgid "" +"There is a new version of %1$s available. View version %4$s details." msgstr "" -#: ../form_detail.php:1146 -msgid "Name Format" +#: includes/addon/class-gf-auto-upgrade.php:238 update.php:42 +msgid "" +"

    You can update to the latest version automatically or download the " +"update and install it manually. %sUpdate Automatically%s %sDownload Update%s" msgstr "" -#: ../form_detail.php:1150 -msgid "Normal" +#: includes/addon/class-gf-auto-upgrade.php:246 +msgid "Your version of %s is up to date." msgstr "" -#: ../form_detail.php:1151 -msgid "Extended" +#: includes/addon/class-gf-feed-addon.php:477 +#: includes/addon/class-gf-feed-addon.php:575 +msgid "%s Feeds" msgstr "" -#: ../form_detail.php:1152 -msgid "Simple" +#: includes/addon/class-gf-feed-addon.php:516 +msgid "Feed Settings" msgstr "" -#: ../form_detail.php:1160 ../tooltips.php:56 -msgid "Date Input Type" +#: includes/addon/class-gf-feed-addon.php:626 +msgid "Feed updated successfully." msgstr "" -#: ../form_detail.php:1164 -msgid "Date Field" +#: includes/addon/class-gf-feed-addon.php:632 +msgid "" +"There was an error updating this feed. Please review all errors below and " +"try again." msgstr "" -#: ../form_detail.php:1165 -msgid "Date Picker" +#: includes/addon/class-gf-feed-addon.php:723 +msgid "Edit this feed" msgstr "" -#: ../form_detail.php:1166 -msgid "Date Drop Down" +#: includes/addon/class-gf-feed-addon.php:724 +msgid "Delete this feed" msgstr "" -#: ../form_detail.php:1172 -msgid "No Icon" +#: includes/addon/class-gf-feed-addon.php:724 +msgid "WARNING: You are about to delete this item." msgstr "" -#: ../form_detail.php:1177 -msgid "Calendar Icon" +#: includes/addon/class-gf-feed-addon.php:739 +msgid "You don't have any feeds configured. Let's go %screate one%s!" msgstr "" -#: ../form_detail.php:1182 -msgid "Custom Icon" +#: includes/addon/class-gf-feed-addon.php:785 +msgid "Enable Condition" msgstr "" -#: ../form_detail.php:1187 -msgid "Image Path: " +#: includes/addon/class-gf-feed-addon.php:811 +msgid "Process this feed if" msgstr "" -#: ../form_detail.php:1190 -msgid "Preview this form to see your custom icon." +#: includes/addon/class-gf-feed-addon.php:1048 +msgid "Checkbox" msgstr "" -#: ../form_detail.php:1199 -msgid "Date Format" +#: includes/addon/class-gf-feed-addon.php:1062 +msgid "feed" msgstr "" -#: ../form_detail.php:1217 -msgid "Allowed file extensions" +#: includes/addon/class-gf-feed-addon.php:1063 +msgid "feeds" msgstr "" -#: ../form_detail.php:1221 -msgid "Separated with commas (i.e. jpg, gif, png, pdf)" +#: includes/addon/class-gf-payment-addon.php:407 +msgid "Payment failed to be captured. Reason: %s" msgstr "" -#: ../form_detail.php:1229 ../tooltips.php:73 -msgid "Enable Multi-File Upload" +#: includes/addon/class-gf-payment-addon.php:425 +msgid "Initial payment" msgstr "" -#: ../form_detail.php:1236 ../tooltips.php:74 -msgid "Maximum Number of Files" +#: includes/addon/class-gf-payment-addon.php:432 +msgid "%s has been captured successfully. Amount: %s. Transaction Id: %s" msgstr "" -#: ../form_detail.php:1250 ../tooltips.php:75 -msgid "Maximum File Size" +#: includes/addon/class-gf-payment-addon.php:437 +msgid "Failed to capture %s. Reason: %s." msgstr "" -#: ../form_detail.php:1263 -msgid "Enable multiple columns" +#: includes/addon/class-gf-payment-addon.php:451 +msgid "Subscription failed to be created. Reason: %s" msgstr "" -#: ../form_detail.php:1275 ../tooltips.php:55 -msgid "Maximum Rows" +#: includes/addon/class-gf-payment-addon.php:606 +msgid "options: " msgstr "" -#: ../form_detail.php:1287 ../tooltips.php:71 -msgid "Time Format" +#: includes/addon/class-gf-payment-addon.php:724 +msgid "This webhook has already been processed (Event Id: %s)" msgstr "" -#: ../form_detail.php:1291 -msgid "12 hour" +#: includes/addon/class-gf-payment-addon.php:820 +msgid "Payment is pending. Amount: %s. Transaction Id: %s." msgstr "" -#: ../form_detail.php:1292 -msgid "24 hour" +#: includes/addon/class-gf-payment-addon.php:854 +msgid "Payment has been completed. Amount: %s. Transaction Id: %s." msgstr "" -#: ../form_detail.php:1302 -msgid "Phone Format" +#: includes/addon/class-gf-payment-addon.php:878 +msgid "Payment has been refunded. Amount: %s. Transaction Id: %s." msgstr "" -#: ../form_detail.php:1317 -msgid "show values" +#: includes/addon/class-gf-payment-addon.php:898 +msgid "Payment has failed. Amount: %s." msgstr "" -#: ../form_detail.php:1320 -msgid "Choices" +#: includes/addon/class-gf-payment-addon.php:914 +msgid "Authorization has been voided. Transaction Id: %s" msgstr "" -#: ../form_detail.php:1325 -msgid "Label" +#: includes/addon/class-gf-payment-addon.php:944 +msgid "Subscription has been created. Subscription Id: %s." msgstr "" -#: ../form_detail.php:1325 -msgid "Value" +#: includes/addon/class-gf-payment-addon.php:968 +msgid "Subscription has been paid. Amount: %s. Subscription Id: %s" msgstr "" -#: ../form_detail.php:1329 -msgid "Bulk Add / Predefined Choices" +#: includes/addon/class-gf-payment-addon.php:985 +msgid "Subscription payment has failed. Amount: %s. Subscription Id: %s." msgstr "" -#: ../form_detail.php:1337 -msgid "Countries" +#: includes/addon/class-gf-payment-addon.php:1001 +msgid "Subscription has been cancelled. Subscription Id: %s." msgstr "" -#: ../form_detail.php:1338 -msgid "U.S. States" +#: includes/addon/class-gf-payment-addon.php:1023 +msgid "Subscription has expired. Subscriber Id: %s" msgstr "" -#: ../form_detail.php:1339 -msgid "Canadian Province/Territory" +#: includes/addon/class-gf-payment-addon.php:1078 +#: includes/addon/class-gf-payment-addon.php:1146 +#: includes/addon/class-gf-payment-addon.php:1154 +msgid "Transaction Type" msgstr "" -#: ../form_detail.php:1340 -msgid "Continents" +#: includes/addon/class-gf-payment-addon.php:1086 +#: includes/addon/class-gf-payment-addon.php:1152 +msgid "Subscription" msgstr "" -#: ../form_detail.php:1340 -msgid "Africa" +#: includes/addon/class-gf-payment-addon.php:1089 +#: includes/addon/class-gf-payment-addon.php:1151 +msgid "Products and Services" msgstr "" -#: ../form_detail.php:1340 -msgid "Antarctica" +#: includes/addon/class-gf-payment-addon.php:1092 +msgid "Donations" msgstr "" -#: ../form_detail.php:1340 -msgid "Asia" +#: includes/addon/class-gf-payment-addon.php:1096 +msgid "Unsupported transaction type" msgstr "" -#: ../form_detail.php:1340 -msgid "Europe" +#: includes/addon/class-gf-payment-addon.php:1103 +#: includes/addon/class-gf-payment-addon.php:1408 +#: includes/addon/class-gf-payment-addon.php:1416 +msgid "Form Total" msgstr "" -#: ../form_detail.php:1340 -msgid "North America" +#: includes/addon/class-gf-payment-addon.php:1125 +msgid "" +"You must add a Credit Card field to your form before creating a feed. Let's " +"go %sadd one%s!" msgstr "" -#: ../form_detail.php:1340 -msgid "South America" +#: includes/addon/class-gf-payment-addon.php:1142 +msgid "Enter a feed name to uniquely identify this setup." msgstr "" -#: ../form_detail.php:1341 -msgid "Gender" +#: includes/addon/class-gf-payment-addon.php:1150 +#: includes/addon/class-gf-payment-addon.php:1154 +msgid "Select a transaction type" msgstr "" -#: ../form_detail.php:1341 -msgid "Male" +#: includes/addon/class-gf-payment-addon.php:1172 +msgid "" +"Select which field determines the recurring payment amount, or select 'Form " +"Total' to use the total of all pricing fields as the recurring amount." msgstr "" -#: ../form_detail.php:1341 -msgid "Female" +#: includes/addon/class-gf-payment-addon.php:1176 +#: includes/addon/class-gf-payment-addon.php:1178 +msgid "Billing Cycle" msgstr "" -#: ../form_detail.php:1341 ../form_detail.php:1342 ../form_detail.php:1344 -#: ../form_detail.php:1347 ../form_detail.php:1348 -msgid "Prefer Not to Answer" +#: includes/addon/class-gf-payment-addon.php:1178 +msgid "" +"Select your billing cycle. This determines how often the recurring payment " +"should occur." msgstr "" -#: ../form_detail.php:1342 -msgid "Age" +#: includes/addon/class-gf-payment-addon.php:1182 +#: includes/addon/class-gf-payment-addon.php:1185 +msgid "Recurring Times" msgstr "" -#: ../form_detail.php:1342 -msgid "Under 18" +#: includes/addon/class-gf-payment-addon.php:1184 +msgid "infinite" msgstr "" -#: ../form_detail.php:1342 -msgid "18-24" +#: includes/addon/class-gf-payment-addon.php:1185 +msgid "" +"Select how many times the recurring payment should be made. The default is " +"to bill the customer until the subscription is canceled." msgstr "" -#: ../form_detail.php:1342 -msgid "25-34" +#: includes/addon/class-gf-payment-addon.php:1189 +msgid "Setup Fee" msgstr "" -#: ../form_detail.php:1342 -msgid "35-44" +#: includes/addon/class-gf-payment-addon.php:1194 +msgid "Trial" msgstr "" -#: ../form_detail.php:1342 -msgid "45-54" +#: includes/addon/class-gf-payment-addon.php:1197 +msgid "Trial Period" msgstr "" -#: ../form_detail.php:1342 -msgid "55-64" +#: includes/addon/class-gf-payment-addon.php:1197 +msgid "" +"Enable a trial period. The users recurring payment will not begin until " +"after this trial period." msgstr "" -#: ../form_detail.php:1342 -msgid "65 or Above" +#: includes/addon/class-gf-payment-addon.php:1216 +msgid "" +"Select which field determines the payment amount, or select 'Form Total' to " +"use the total of all pricing fields as the payment amount." msgstr "" -#: ../form_detail.php:1343 -msgid "Marital Status" +#: includes/addon/class-gf-payment-addon.php:1222 +msgid "Other Settings" msgstr "" -#: ../form_detail.php:1343 -msgid "Single" +#: includes/addon/class-gf-payment-addon.php:1237 +#: includes/addon/class-gf-payment-addon.php:1240 +msgid "Billing Information" msgstr "" -#: ../form_detail.php:1343 -msgid "Married" +#: includes/addon/class-gf-payment-addon.php:1240 +msgid "Map your Form Fields to the available listed fields." msgstr "" -#: ../form_detail.php:1343 -msgid "Divorced" +#: includes/addon/class-gf-payment-addon.php:1248 +msgid "Options" msgstr "" -#: ../form_detail.php:1343 -msgid "Widowed" +#: includes/addon/class-gf-payment-addon.php:1258 +msgid "" +"When conditions are enabled, form submissions will only be sent to the " +"payment gateway when the conditions are met. When disabled, all form " +"submissions will be sent to the payment gateway." msgstr "" -#: ../form_detail.php:1344 -msgid "Employment" +#: includes/addon/class-gf-payment-addon.php:1319 +#: includes/addon/class-gf-payment-addon.php:1364 +#: includes/webapi/webapi.php:186 +msgid "Enabled" msgstr "" -#: ../form_detail.php:1344 -msgid "Employed Full-Time" +#: includes/addon/class-gf-payment-addon.php:1376 +msgid "Enter an amount" msgstr "" -#: ../form_detail.php:1344 -msgid "Employed Part-Time" +#: includes/addon/class-gf-payment-addon.php:1424 +msgid "Sample Option" msgstr "" -#: ../form_detail.php:1344 -msgid "Self-employed" +#: includes/addon/class-gf-payment-addon.php:1434 +#: includes/fields/class-gf-field-address.php:12 js.php:613 +msgid "Address" msgstr "" -#: ../form_detail.php:1344 -msgid "Not employed" +#: includes/addon/class-gf-payment-addon.php:1435 +msgid "Address 2" msgstr "" -#: ../form_detail.php:1344 -msgid " but looking for work" +#: includes/addon/class-gf-payment-addon.php:1436 +#: includes/fields/class-gf-field-address.php:149 js.php:614 +msgid "City" msgstr "" -#: ../form_detail.php:1344 -msgid "Not employed and not looking for work" +#: includes/addon/class-gf-payment-addon.php:1438 +msgid "Zip" msgstr "" -#: ../form_detail.php:1344 -msgid "Homemaker" +#: includes/addon/class-gf-payment-addon.php:1439 +#: includes/fields/class-gf-field-address.php:153 js.php:615 +msgid "Country" msgstr "" -#: ../form_detail.php:1344 -msgid "Retired" +#: includes/addon/class-gf-payment-addon.php:1457 +msgid "day(s)" msgstr "" -#: ../form_detail.php:1344 -msgid "Student" +#: includes/addon/class-gf-payment-addon.php:1458 +msgid "week(s)" msgstr "" -#: ../form_detail.php:1345 -msgid "Job Type" +#: includes/addon/class-gf-payment-addon.php:1459 +msgid "month(s)" msgstr "" -#: ../form_detail.php:1345 -msgid "Full-Time" +#: includes/addon/class-gf-payment-addon.php:1460 +msgid "year(s)" msgstr "" -#: ../form_detail.php:1345 -msgid "Part-Time" +#: includes/addon/class-gf-payment-addon.php:1469 +msgid "Select a product field" msgstr "" -#: ../form_detail.php:1345 -msgid "Per Diem" +#: includes/addon/class-gf-payment-addon.php:1513 +msgid "Today" msgstr "" -#: ../form_detail.php:1345 -msgid "Employee" +#: includes/addon/class-gf-payment-addon.php:1514 +msgid "Yesterday" msgstr "" -#: ../form_detail.php:1345 -msgid "Temporary" +#: includes/addon/class-gf-payment-addon.php:1515 +msgid "Last 30 Days" msgstr "" -#: ../form_detail.php:1345 -msgid "Contract" +#: includes/addon/class-gf-payment-addon.php:1522 +#: includes/addon/class-gf-payment-addon.php:1529 +#: includes/addon/class-gf-payment-addon.php:1537 +#: includes/addon/class-gf-payment-addon.php:1544 +msgid "subscriptions" msgstr "" -#: ../form_detail.php:1345 -msgid "Intern" +#: includes/addon/class-gf-payment-addon.php:1523 +#: includes/addon/class-gf-payment-addon.php:1530 +#: includes/addon/class-gf-payment-addon.php:1538 +#: includes/addon/class-gf-payment-addon.php:1545 +msgid "orders" msgstr "" -#: ../form_detail.php:1345 -msgid "Seasonal" +#: includes/addon/class-gf-payment-addon.php:1553 +msgid "There aren't any transactions that match your criteria." msgstr "" -#: ../form_detail.php:1346 -msgid "Industry" +#: includes/addon/class-gf-payment-addon.php:1657 +#: includes/addon/class-gf-payment-addon.php:1658 +msgid "Revenue" msgstr "" -#: ../form_detail.php:1346 -msgid "Accounting/Finance" +#: includes/addon/class-gf-payment-addon.php:1658 +msgid "Orders" msgstr "" -#: ../form_detail.php:1346 -msgid "Advertising/Public Relations" +#: includes/addon/class-gf-payment-addon.php:1658 +msgid "Subscriptions" msgstr "" -#: ../form_detail.php:1346 -msgid "Aerospace/Aviation" +#: includes/addon/class-gf-payment-addon.php:1658 +msgid "Recurring Payments" msgstr "" -#: ../form_detail.php:1346 -msgid "Arts/Entertainment/Publishing" +#: includes/addon/class-gf-payment-addon.php:1658 +msgid "Refunds" msgstr "" -#: ../form_detail.php:1346 -msgid "Automotive" +#: includes/addon/class-gf-payment-addon.php:1677 +#: includes/addon/class-gf-payment-addon.php:1678 +msgid "Week" msgstr "" -#: ../form_detail.php:1346 -msgid "Banking/Mortgage" +#: includes/addon/class-gf-payment-addon.php:1690 +#: includes/addon/class-gf-payment-addon.php:1691 +#: includes/fields/class-gf-field-creditcard.php:280 +#: includes/fields/class-gf-field-date.php:440 js.php:866 js.php:867 +msgid "Month" msgstr "" -#: ../form_detail.php:1346 -msgid "Business Development" +#: includes/addon/class-gf-payment-addon.php:1703 +#: includes/addon/class-gf-payment-addon.php:1704 +#: includes/fields/class-gf-field-date.php:448 js.php:869 +msgid "Day" msgstr "" -#: ../form_detail.php:1346 -msgid "Business Opportunity" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Jan" msgstr "" -#: ../form_detail.php:1346 -msgid "Clerical/Administrative" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Feb" msgstr "" -#: ../form_detail.php:1346 -msgid "Construction/Facilities" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Mar" msgstr "" -#: ../form_detail.php:1346 -msgid "Consumer Goods" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Apr" msgstr "" -#: ../form_detail.php:1346 -msgid "Customer Service" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Jun" msgstr "" -#: ../form_detail.php:1346 -msgid "Education/Training" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Jul" msgstr "" -#: ../form_detail.php:1346 -msgid "Energy/Utilities" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Aug" msgstr "" -#: ../form_detail.php:1346 -msgid "Engineering" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Sep" msgstr "" -#: ../form_detail.php:1346 -msgid "Government/Military" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Oct" msgstr "" -#: ../form_detail.php:1346 -msgid "Healthcare" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Nov" msgstr "" -#: ../form_detail.php:1346 -msgid "Hospitality/Travel" +#: includes/addon/class-gf-payment-addon.php:1779 +msgid "Dec" msgstr "" -#: ../form_detail.php:1346 -msgid "Human Resources" +#: includes/addon/class-gf-payment-addon.php:1889 +msgid "Daily" msgstr "" -#: ../form_detail.php:1346 -msgid "Installation/Maintenance" +#: includes/addon/class-gf-payment-addon.php:1890 +msgid "Weekly" msgstr "" -#: ../form_detail.php:1346 -msgid "Insurance" +#: includes/addon/class-gf-payment-addon.php:1891 +msgid "Monthly" msgstr "" -#: ../form_detail.php:1346 -msgid "Internet" +#: includes/addon/class-gf-payment-addon.php:1894 +msgid "

    View
    Select how you would like the sales data to be displayed." msgstr "" -#: ../form_detail.php:1346 -msgid "Job Search Aids" +#: includes/addon/class-gf-payment-addon.php:1910 +msgid "Payment Method" msgstr "" -#: ../form_detail.php:1346 -msgid "Law Enforcement/Security" +#: includes/addon/class-gf-payment-addon.php:1966 +msgid "" +"Warning! This subscription will be canceled. This cannot be undone. 'OK' to " +"cancel subscription, 'Cancel' to stop" msgstr "" -#: ../form_detail.php:1346 -msgid "Legal" +#: includes/addon/class-gf-payment-addon.php:1968 +msgid "Canceled" msgstr "" -#: ../form_detail.php:1346 -msgid "Management/Executive" +#: includes/addon/class-gf-payment-addon.php:1969 +msgid "The subscription could not be canceled. Please try again later." msgstr "" -#: ../form_detail.php:1346 -msgid "Manufacturing/Operations" +#: includes/addon/class-gf-payment-addon.php:2013 +msgid "Cancel Subscription" msgstr "" -#: ../form_detail.php:1346 -msgid "Marketing" +#: includes/addon/class-gf-payment-addon.php:2121 +msgid "sale" msgstr "" -#: ../form_detail.php:1346 -msgid "Non-Profit/Volunteer" +#: includes/addon/class-gf-payment-addon.php:2122 +msgid "sales" msgstr "" -#: ../form_detail.php:1346 -msgid "Pharmaceutical/Biotech" +#: includes/addon/class-gf-payment-addon.php:2136 +msgid "There hasn't been any sales in the specified date range." msgstr "" -#: ../form_detail.php:1346 -msgid "Professional Services" -msgstr "" +#: includes/addon/class-gf-payment-addon.php:2155 +msgid "1 item" +msgid_plural "%s items" +msgstr[0] "" +msgstr[1] "" -#: ../form_detail.php:1346 -msgid "QA/Quality Control" +#: includes/addon/class-gf-payment-addon.php:2172 +msgid "Go to the first page" msgstr "" -#: ../form_detail.php:1346 -msgid "Real Estate" +#: includes/addon/class-gf-payment-addon.php:2179 +msgid "Go to the previous page" msgstr "" -#: ../form_detail.php:1346 -msgid "Restaurant/Food Service" +#: includes/addon/class-gf-payment-addon.php:2193 +msgid "Go to the next page" msgstr "" -#: ../form_detail.php:1346 -msgid "Retail" +#: includes/addon/class-gf-payment-addon.php:2201 +msgid "Go to the last page" msgstr "" -#: ../form_detail.php:1346 -msgid "Sales" +#: includes/addon/class-gf-results.php:21 +msgid "Results Filters" msgstr "" -#: ../form_detail.php:1346 -msgid "Science/Research" +#: includes/addon/class-gf-results.php:82 +msgid "Error retrieving results. If the problem persists, please contact support." msgstr "" -#: ../form_detail.php:1346 -msgid "Skilled Labor" +#: includes/addon/class-gf-results.php:128 +#: includes/addon/class-gf-results.php:158 +msgid "View results generated by this form" msgstr "" -#: ../form_detail.php:1346 -msgid "Technology" +#: includes/addon/class-gf-results.php:150 +#: includes/addon/class-gf-results.php:156 +msgid "Results" msgstr "" -#: ../form_detail.php:1346 -msgid "Telecommunications" +#: includes/addon/class-gf-results.php:259 +#: includes/addon/class-gf-results.php:348 +msgid "Filters" msgstr "" -#: ../form_detail.php:1346 -msgid "Transportation/Logistics" +#: includes/addon/class-gf-results.php:266 +#: includes/addon/class-gf-results.php:347 +msgid "Date Range" msgstr "" -#: ../form_detail.php:1347 -msgid "Income" +#: includes/addon/class-gf-results.php:307 +msgid "Apply filters" msgstr "" -#: ../form_detail.php:1347 -msgid "Under $20,000" +#: includes/addon/class-gf-results.php:310 +msgid "Clear" msgstr "" -#: ../form_detail.php:1347 -msgid "$20,000 - $30,000" +#: includes/addon/class-gf-results.php:315 +msgid "Loading" msgstr "" -#: ../form_detail.php:1347 -msgid "$30,000 - $40,000" +#: includes/addon/class-gf-results.php:336 +msgid "This form does not have any fields that can be used for results" msgstr "" -#: ../form_detail.php:1347 -msgid "$40,000 - $50,000" +#: includes/addon/class-gf-results.php:345 +#: includes/addon/class-gf-results.php:648 +msgid "Total Score" msgstr "" -#: ../form_detail.php:1347 -msgid "$50,000 - $75,000" +#: includes/addon/class-gf-results.php:345 +msgid "" +"Scores are weighted calculations. Items ranked higher are given a greater " +"score than items that are ranked lower. The total score for each item is " +"the sum of the weighted scores." msgstr "" -#: ../form_detail.php:1347 -msgid "$75,000 - $100,000" +#: includes/addon/class-gf-results.php:346 +#: includes/addon/class-gf-results.php:651 +msgid "Aggregate Rank" msgstr "" -#: ../form_detail.php:1347 -msgid "$100,000 - $150,000" +#: includes/addon/class-gf-results.php:346 +msgid "" +"The aggregate rank is the overall rank for all entries based on the " +"weighted scores for each item." msgstr "" -#: ../form_detail.php:1347 -msgid "$150,000 or more" +#: includes/addon/class-gf-results.php:347 +msgid "Date Range is optional, if no date range is specified it will be ignored." msgstr "" -#: ../form_detail.php:1348 -msgid "Education" +#: includes/addon/class-gf-results.php:348 +msgid "" +"Narrow the results by adding filters. Note that some field types support " +"more options than others." msgstr "" -#: ../form_detail.php:1348 -msgid "High School" +#: includes/addon/class-gf-results.php:349 +msgid "Average Row Score" msgstr "" -#: ../form_detail.php:1348 -msgid "Associate Degree" +#: includes/addon/class-gf-results.php:349 +msgid "" +"The average (mean) score for each row: the sum of all the scores for each " +"row divided by the total number of entries." msgstr "" -#: ../form_detail.php:1348 -msgid "Bachelor's Degree" +#: includes/addon/class-gf-results.php:350 +msgid "Average Global Score" msgstr "" -#: ../form_detail.php:1348 -msgid "Graduate of Professional Degree" +#: includes/addon/class-gf-results.php:350 +msgid "" +"The average (mean) score for the whole field. The sum of the total scores " +"divided by the number of entries." msgstr "" -#: ../form_detail.php:1348 -msgid "Some College" +#: includes/addon/class-gf-results.php:351 +#: includes/addon/class-gf-results.php:572 +msgid "Average Score" msgstr "" -#: ../form_detail.php:1349 -msgid "Days of the Week" +#: includes/addon/class-gf-results.php:351 +msgid "" +"The average (mean) score: The sum of the scores divided by the number of " +"entries." msgstr "" -#: ../form_detail.php:1349 -msgid "Sunday" +#: includes/addon/class-gf-results.php:372 +msgid "No results." msgstr "" -#: ../form_detail.php:1349 -msgid "Monday" +#: includes/addon/class-gf-results.php:396 +msgid "There was an error while processing the entries. Please contact support." msgstr "" -#: ../form_detail.php:1349 -msgid "Tuesday" +#: includes/addon/class-gf-results.php:410 +msgid "Entries processed: %1$d of %2$d" msgstr "" -#: ../form_detail.php:1349 -msgid "Wednesday" +#: includes/addon/class-gf-results.php:427 +msgid "No results" msgstr "" -#: ../form_detail.php:1349 -msgid "Thursday" +#: includes/addon/class-gf-results.php:481 +#: includes/addon/class-gf-results.php:495 +msgid "No entries for this field" msgstr "" -#: ../form_detail.php:1349 -msgid "Friday" +#: includes/addon/class-gf-results.php:502 +msgid "Choice" msgstr "" -#: ../form_detail.php:1349 -msgid "Saturday" +#: includes/addon/class-gf-results.php:502 +#: includes/addon/class-gf-results.php:531 +msgid "Frequency" msgstr "" -#: ../form_detail.php:1350 -msgid "Months of the Year" +#: includes/addon/class-gf-results.php:630 +msgid "Average global score" msgstr "" -#: ../form_detail.php:1350 -msgid "January" +#: includes/addon/class-gf-results.php:632 +msgid "Average score" msgstr "" -#: ../form_detail.php:1350 -msgid "February" +#: includes/addon/class-gf-results.php:645 +msgid "Item" msgstr "" -#: ../form_detail.php:1350 -msgid "March" +#: includes/addon/class-gf-results.php:681 +msgid "Latest values:" msgstr "" -#: ../form_detail.php:1350 -msgid "April" +#: includes/addon/class-gf-results.php:689 +msgid "Show more" msgstr "" -#: ../form_detail.php:1350 ../includes/addon/class-gf-payment-addon.php:1759 -msgid "May" +#: includes/api.php:106 +msgid "Form with id: %s not found" msgstr "" -#: ../form_detail.php:1350 -msgid "June" +#: includes/api.php:152 includes/api.php:313 +msgid "Invalid form object" msgstr "" -#: ../form_detail.php:1350 -msgid "July" +#: includes/api.php:173 includes/webapi/webapi.php:692 +msgid "Missing form id" msgstr "" -#: ../form_detail.php:1350 -msgid "August" +#: includes/api.php:179 +msgid "Form not found" msgstr "" -#: ../form_detail.php:1350 -msgid "September" +#: includes/api.php:189 +msgid "Error updating form" msgstr "" -#: ../form_detail.php:1350 -msgid "October" +#: includes/api.php:195 +msgid "Error updating form confirmations" msgstr "" -#: ../form_detail.php:1350 -msgid "November" +#: includes/api.php:202 +msgid "Error updating form notifications" msgstr "" -#: ../form_detail.php:1350 -msgid "December" +#: includes/api.php:210 +msgid "Error updating title" msgstr "" -#: ../form_detail.php:1351 -msgid "How Often" +#: includes/api.php:284 +msgid "Invalid form objects" msgstr "" -#: ../form_detail.php:1351 -msgid "Everyday" +#: includes/api.php:317 +msgid "The form title is missing" msgstr "" -#: ../form_detail.php:1351 -msgid "Once a week" +#: includes/api.php:352 +msgid "There was a problem while inserting the form" msgstr "" -#: ../form_detail.php:1351 -msgid "2 to 3 times a week" +#: includes/api.php:486 +msgid "Entry with id %s not found" msgstr "" -#: ../form_detail.php:1351 -msgid "Once a month" +#: includes/api.php:566 +msgid "Missing entry id" msgstr "" -#: ../form_detail.php:1351 -msgid " 2 to 3 times a month" +#: includes/api.php:572 +msgid "Entry not found" msgstr "" -#: ../form_detail.php:1351 -msgid "Less than once a month" +#: includes/api.php:586 includes/api.php:755 +msgid "The form for this entry does not exist" msgstr "" -#: ../form_detail.php:1352 -msgid "How Long" +#: includes/api.php:646 +msgid "There was a problem while updating the entry properties" msgstr "" -#: ../form_detail.php:1352 -msgid "Less than a month" +#: includes/api.php:669 +msgid "There was a problem while updating one of the input values for the entry" msgstr "" -#: ../form_detail.php:1352 -msgid "1-6 months" +#: includes/api.php:682 includes/api.php:718 +msgid "There was a problem while updating the field values" msgstr "" -#: ../form_detail.php:1352 -msgid "1-3 years" +#: includes/api.php:745 +msgid "The entry object must be an array" msgstr "" -#: ../form_detail.php:1352 -msgid "Over 3 Years" +#: includes/api.php:751 +msgid "The form id must be specified" msgstr "" -#: ../form_detail.php:1352 -msgid "Never used" +#: includes/api.php:795 +msgid "There was a problem while inserting the entry properties" msgstr "" -#: ../form_detail.php:1353 -msgid "Satisfaction" +#: includes/api.php:814 +msgid "There was a problem while inserting one of the input values for the entry" msgstr "" -#: ../form_detail.php:1353 -msgid "Very Satisfied" +#: includes/api.php:823 +msgid "There was a problem while inserting the field values" msgstr "" -#: ../form_detail.php:1353 -msgid "Satisfied" +#: includes/api.php:856 +msgid "Invalid entry id: %s" msgstr "" -#: ../form_detail.php:1353 -msgid "Neutral" +#: includes/api.php:957 +msgid "Feed not found" msgstr "" -#: ../form_detail.php:1353 -msgid "Unsatisfied" +#: includes/api.php:988 +msgid "There was an an error while deleting feed id %s" msgstr "" -#: ../form_detail.php:1353 -msgid "Very Unsatisfied" +#: includes/api.php:992 includes/api.php:1016 +msgid "Feed id %s not found" msgstr "" -#: ../form_detail.php:1354 -msgid "Importance" +#: includes/api.php:1012 +msgid "There was an an error while updating feed id %s" msgstr "" -#: ../form_detail.php:1354 -msgid "Very Important" +#: includes/api.php:1045 +msgid "There was an an error while inserting a feed" msgstr "" -#: ../form_detail.php:1354 ../form_settings.php:989 -msgid "Important" +#: includes/fields/class-gf-field-address.php:34 +msgid "This field is required. Please enter a complete address." msgstr "" -#: ../form_detail.php:1354 -msgid "Somewhat Important" +#: includes/fields/class-gf-field-address.php:121 +msgid "Zip Code" msgstr "" -#: ../form_detail.php:1354 -msgid "Not Important" +#: includes/fields/class-gf-field-address.php:143 js.php:614 +msgid "Street Address" msgstr "" -#: ../form_detail.php:1355 -msgid "Agreement" +#: includes/fields/class-gf-field-address.php:145 js.php:614 +msgid "Address Line 2" msgstr "" -#: ../form_detail.php:1355 -msgid "Strongly Agree" +#: includes/fields/class-gf-field-address.php:384 js.php:615 +msgid "ZIP / Postal Code" msgstr "" -#: ../form_detail.php:1355 -msgid "Agree" +#: includes/fields/class-gf-field-address.php:384 +msgid "State / Province / Region" msgstr "" -#: ../form_detail.php:1355 -msgid "Disagree" +#: includes/fields/class-gf-field-address.php:385 +#: includes/fields/class-gf-field-address.php:450 +msgid "United States" msgstr "" -#: ../form_detail.php:1355 -msgid "Strongly Disagree" +#: includes/fields/class-gf-field-address.php:385 +msgid "ZIP Code" msgstr "" -#: ../form_detail.php:1356 -msgid "Comparison" +#: includes/fields/class-gf-field-address.php:386 +msgid "Canadian" msgstr "" -#: ../form_detail.php:1356 -msgid "Much Better" +#: includes/fields/class-gf-field-address.php:386 +msgid "Province" msgstr "" -#: ../form_detail.php:1356 -msgid "Somewhat Better" +#: includes/fields/class-gf-field-address.php:447 +msgid "Afghanistan" msgstr "" -#: ../form_detail.php:1356 -msgid "About the Same" +#: includes/fields/class-gf-field-address.php:447 +msgid "Albania" msgstr "" -#: ../form_detail.php:1356 -msgid "Somewhat Worse" +#: includes/fields/class-gf-field-address.php:447 +msgid "Algeria" msgstr "" -#: ../form_detail.php:1356 -msgid "Much Worse" +#: includes/fields/class-gf-field-address.php:447 +msgid "American Samoa" msgstr "" -#: ../form_detail.php:1357 -msgid "Would You" +#: includes/fields/class-gf-field-address.php:447 +msgid "Andorra" msgstr "" -#: ../form_detail.php:1357 -msgid "Definitely" +#: includes/fields/class-gf-field-address.php:447 +msgid "Angola" msgstr "" -#: ../form_detail.php:1357 -msgid "Probably" +#: includes/fields/class-gf-field-address.php:447 +msgid "Antigua and Barbuda" msgstr "" -#: ../form_detail.php:1357 -msgid "Not Sure" +#: includes/fields/class-gf-field-address.php:447 +msgid "Argentina" msgstr "" -#: ../form_detail.php:1357 -msgid "Probably Not" +#: includes/fields/class-gf-field-address.php:447 +msgid "Armenia" msgstr "" -#: ../form_detail.php:1357 -msgid "Definitely Not" +#: includes/fields/class-gf-field-address.php:447 +msgid "Austria" msgstr "" -#: ../form_detail.php:1358 -msgid "Extra Small" +#: includes/fields/class-gf-field-address.php:447 +msgid "Azerbaijan" msgstr "" -#: ../form_detail.php:1358 -msgid "Extra Large" +#: includes/fields/class-gf-field-address.php:447 +msgid "Bahamas" msgstr "" -#: ../form_detail.php:1367 -msgid "" -"Select a category and customize the predefined choices or paste your own " -"list to bulk add choices." +#: includes/fields/class-gf-field-address.php:447 +msgid "Bahrain" msgstr "" -#: ../form_detail.php:1385 -msgid "Insert Choices" +#: includes/fields/class-gf-field-address.php:447 +msgid "Bangladesh" msgstr "" -#: ../form_detail.php:1390 -msgid "Save as new custom choice" +#: includes/fields/class-gf-field-address.php:447 +msgid "Barbados" msgstr "" -#: ../form_detail.php:1392 -msgid "Save as" +#: includes/fields/class-gf-field-address.php:447 +msgid "Belarus" msgstr "" -#: ../form_detail.php:1392 -msgid "Enter name" +#: includes/fields/class-gf-field-address.php:447 +msgid "Belgium" msgstr "" -#: ../form_detail.php:1392 -msgid "enter name" +#: includes/fields/class-gf-field-address.php:447 +msgid "Belize" msgstr "" -#: ../form_detail.php:1419 -msgid "Enable \"other\" choice" +#: includes/fields/class-gf-field-address.php:447 +msgid "Benin" msgstr "" -#: ../form_detail.php:1432 -msgid "Enable Email Confirmation" +#: includes/fields/class-gf-field-address.php:447 +msgid "Bermuda" msgstr "" -#: ../form_detail.php:1442 -msgid "Enable Password Strength" +#: includes/fields/class-gf-field-address.php:447 +msgid "Bhutan" msgstr "" -#: ../form_detail.php:1453 -msgid "Enable enhanced user interface" +#: includes/fields/class-gf-field-address.php:447 +msgid "Bolivia" msgstr "" -#: ../form_detail.php:1460 -msgid "Minimum Strength" +#: includes/fields/class-gf-field-address.php:447 +msgid "Bosnia and Herzegovina" msgstr "" -#: ../form_detail.php:1465 ../form_display.php:2194 -msgid "Short" +#: includes/fields/class-gf-field-address.php:447 +msgid "Botswana" msgstr "" -#: ../form_detail.php:1466 ../form_display.php:2194 -msgid "Bad" +#: includes/fields/class-gf-field-address.php:447 +msgid "Brazil" msgstr "" -#: ../form_detail.php:1467 ../form_display.php:2194 -msgid "Good" +#: includes/fields/class-gf-field-address.php:447 +msgid "Brunei" msgstr "" -#: ../form_detail.php:1468 ../form_display.php:2194 -msgid "Strong" +#: includes/fields/class-gf-field-address.php:447 +msgid "Bulgaria" msgstr "" -#: ../form_detail.php:1478 ../tooltips.php:67 -msgid "Number Format" +#: includes/fields/class-gf-field-address.php:447 +msgid "Burkina Faso" msgstr "" -#: ../form_detail.php:1484 ../settings.php:219 ../tooltips.php:140 -msgid "Currency" +#: includes/fields/class-gf-field-address.php:447 +msgid "Burundi" msgstr "" -#: ../form_detail.php:1502 -msgid "Supported Credit Cards" +#: includes/fields/class-gf-field-address.php:447 +msgid "Cambodia" msgstr "" -#: ../form_detail.php:1522 -msgid "Card Icon Style" +#: includes/fields/class-gf-field-address.php:447 +msgid "Cameroon" msgstr "" -#: ../form_detail.php:1526 ../form_detail.php:1548 -msgid "Standard" +#: includes/fields/class-gf-field-address.php:447 +msgid "Canada" msgstr "" -#: ../form_detail.php:1527 -msgid "3D" +#: includes/fields/class-gf-field-address.php:447 +msgid "Cape Verde" msgstr "" -#: ../form_detail.php:1537 ../tooltips.php:123 -msgid "Input Mask" +#: includes/fields/class-gf-field-address.php:447 +msgid "Cayman Islands" msgstr "" -#: ../form_detail.php:1562 -msgid "Enter a custom mask" +#: includes/fields/class-gf-field-address.php:447 +msgid "Central African Republic" msgstr "" -#: ../form_detail.php:1563 -msgid "Custom Mask Instructions" +#: includes/fields/class-gf-field-address.php:447 +msgid "Chad" msgstr "" -#: ../form_detail.php:1563 ../gravityforms.php:987 -msgid "Help" +#: includes/fields/class-gf-field-address.php:447 +msgid "Chile" msgstr "" -#: ../form_detail.php:1568 -msgid "Usage" +#: includes/fields/class-gf-field-address.php:447 +msgid "China" msgstr "" -#: ../form_detail.php:1570 -msgid "Use a '9' to indicate a numerical character." +#: includes/fields/class-gf-field-address.php:447 +msgid "Colombia" msgstr "" -#: ../form_detail.php:1571 -msgid "Use a lower case 'a' to indicate an alphabetical character." +#: includes/fields/class-gf-field-address.php:447 +msgid "Comoros" msgstr "" -#: ../form_detail.php:1572 -msgid "Use an asterick '*' to indicate any alphanumeric character." +#: includes/fields/class-gf-field-address.php:447 +msgid "Congo, Democratic Republic of the" msgstr "" -#: ../form_detail.php:1573 -msgid "" -"Use a question mark '?' to indicate optional characters. Note: All characters after the question mark will be optional." +#: includes/fields/class-gf-field-address.php:447 +msgid "Congo, Republic of the" msgstr "" -#: ../form_detail.php:1574 -msgid "" -"All other characters are literal values and will be displayed automatically." +#: includes/fields/class-gf-field-address.php:447 +msgid "Costa Rica" msgstr "" -#: ../form_detail.php:1577 -msgid "Examples" +#: includes/fields/class-gf-field-address.php:447 +msgid "Côte d'Ivoire" msgstr "" -#: ../form_detail.php:1581 ../form_detail.php:1586 ../form_detail.php:1591 -#: ../form_detail.php:1596 ../form_detail.php:1601 -msgid "Mask" +#: includes/fields/class-gf-field-address.php:447 +msgid "Croatia" msgstr "" -#: ../form_detail.php:1582 ../form_detail.php:1587 ../form_detail.php:1592 -#: ../form_detail.php:1597 ../form_detail.php:1602 -msgid "Valid Input" +#: includes/fields/class-gf-field-address.php:447 +msgid "Cuba" msgstr "" -#: ../form_detail.php:1585 -msgid "Social Security Number" +#: includes/fields/class-gf-field-address.php:447 +msgid "Cyprus" msgstr "" -#: ../form_detail.php:1590 -msgid "Course Code" +#: includes/fields/class-gf-field-address.php:447 +msgid "Czech Republic" msgstr "" -#: ../form_detail.php:1595 -msgid "License Key" +#: includes/fields/class-gf-field-address.php:447 +msgid "Denmark" msgstr "" -#: ../form_detail.php:1600 -msgid "Zip Code w/ Optional Plus Four" +#: includes/fields/class-gf-field-address.php:447 +msgid "Djibouti" msgstr "" -#: ../form_detail.php:1610 -msgid "Select a Mask" +#: includes/fields/class-gf-field-address.php:447 +msgid "Dominica" msgstr "" -#: ../form_detail.php:1629 ../tooltips.php:54 -msgid "Maximum Characters" +#: includes/fields/class-gf-field-address.php:447 +msgid "Dominican Republic" msgstr "" -#: ../form_detail.php:1639 -msgid "Range" +#: includes/fields/class-gf-field-address.php:447 +msgid "East Timor" msgstr "" -#: ../form_detail.php:1645 -msgid "Min" +#: includes/fields/class-gf-field-address.php:447 +msgid "Ecuador" msgstr "" -#: ../form_detail.php:1651 -msgid "Max" +#: includes/fields/class-gf-field-address.php:447 +msgid "Egypt" msgstr "" -#: ../form_detail.php:1667 ../tooltips.php:81 -msgid "Enable Calculation" +#: includes/fields/class-gf-field-address.php:447 +msgid "El Salvador" msgstr "" -#: ../form_detail.php:1675 ../tooltips.php:82 -msgid "Formula" +#: includes/fields/class-gf-field-address.php:447 +msgid "Equatorial Guinea" msgstr "" -#: ../form_detail.php:1688 -msgid "The formula appears to be valid." +#: includes/fields/class-gf-field-address.php:447 +msgid "Eritrea" msgstr "" -#: ../form_detail.php:1688 -msgid "There appears to be a problem with the formula." +#: includes/fields/class-gf-field-address.php:447 +msgid "Estonia" msgstr "" -#: ../form_detail.php:1688 -msgid "Validate Formula" +#: includes/fields/class-gf-field-address.php:447 +msgid "Ethiopia" msgstr "" -#: ../form_detail.php:1691 ../tooltips.php:83 -msgid "Rounding" +#: includes/fields/class-gf-field-address.php:447 +msgid "Fiji" msgstr "" -#: ../form_detail.php:1715 -msgid "Rules" +#: includes/fields/class-gf-field-address.php:447 +msgid "Finland" msgstr "" -#: ../form_detail.php:1718 -msgid "Required" +#: includes/fields/class-gf-field-address.php:447 +msgid "France" msgstr "" -#: ../form_detail.php:1724 ../tooltips.php:79 -msgid "No Duplicates" +#: includes/fields/class-gf-field-address.php:447 +msgid "French Polynesia" msgstr "" -#: ../form_detail.php:1742 ../tooltips.php:84 -msgid "Admin Label" +#: includes/fields/class-gf-field-address.php:447 +msgid "Gabon" msgstr "" -#: ../form_detail.php:1752 ../tooltips.php:85 -msgid "Field Size" +#: includes/fields/class-gf-field-address.php:448 +msgid "Gambia" msgstr "" -#: ../form_detail.php:1766 ../form_detail.php:1776 ../tooltips.php:86 -msgid "Default Value" +#: includes/fields/class-gf-field-address.php:448 +msgid "Germany" msgstr "" -#: ../form_detail.php:1786 ../tooltips.php:87 -msgid "Validation Message" +#: includes/fields/class-gf-field-address.php:448 +msgid "Ghana" msgstr "" -#: ../form_detail.php:1796 ../tooltips.php:69 -msgid "Credit Card Icon Style" +#: includes/fields/class-gf-field-address.php:448 +msgid "Greece" msgstr "" -#: ../form_detail.php:1816 -msgid "Language" +#: includes/fields/class-gf-field-address.php:448 +msgid "Greenland" msgstr "" -#: ../form_detail.php:1820 -msgid "English" +#: includes/fields/class-gf-field-address.php:448 +msgid "Grenada" msgstr "" -#: ../form_detail.php:1821 -msgid "Dutch" +#: includes/fields/class-gf-field-address.php:448 +msgid "Guam" msgstr "" -#: ../form_detail.php:1822 -msgid "French" +#: includes/fields/class-gf-field-address.php:448 +msgid "Guatemala" msgstr "" -#: ../form_detail.php:1823 -msgid "German" +#: includes/fields/class-gf-field-address.php:448 +msgid "Guinea" msgstr "" -#: ../form_detail.php:1824 -msgid "Portuguese" +#: includes/fields/class-gf-field-address.php:448 +msgid "Guinea-Bissau" msgstr "" -#: ../form_detail.php:1825 -msgid "Russian" +#: includes/fields/class-gf-field-address.php:448 +msgid "Guyana" msgstr "" -#: ../form_detail.php:1826 -msgid "Spanish" +#: includes/fields/class-gf-field-address.php:448 +msgid "Haiti" msgstr "" -#: ../form_detail.php:1827 -msgid "Turkish" +#: includes/fields/class-gf-field-address.php:448 +msgid "Honduras" msgstr "" -#: ../form_detail.php:1845 ../tooltips.php:40 -msgid "Add Icon URL" +#: includes/fields/class-gf-field-address.php:448 +msgid "Hong Kong" msgstr "" -#: ../form_detail.php:1855 ../tooltips.php:41 -msgid "Delete Icon URL" +#: includes/fields/class-gf-field-address.php:448 +msgid "Hungary" msgstr "" -#: ../form_detail.php:1864 -msgid "Enable Password Input" +#: includes/fields/class-gf-field-address.php:448 +msgid "Iceland" msgstr "" -#: ../form_detail.php:1871 ../tooltips.php:68 -msgid "Force SSL" +#: includes/fields/class-gf-field-address.php:448 +msgid "India" msgstr "" -#: ../form_detail.php:1878 ../tooltips.php:90 -msgid "Visibility" +#: includes/fields/class-gf-field-address.php:448 +msgid "Indonesia" msgstr "" -#: ../form_detail.php:1882 -msgid "Everyone" +#: includes/fields/class-gf-field-address.php:448 +msgid "Iran" msgstr "" -#: ../form_detail.php:1887 -msgid "Admin Only" +#: includes/fields/class-gf-field-address.php:448 +msgid "Iraq" msgstr "" -#: ../form_detail.php:1897 -msgid "Allow field to be populated dynamically" +#: includes/fields/class-gf-field-address.php:448 +msgid "Ireland" msgstr "" -#: ../form_detail.php:1907 ../form_settings.php:492 -msgid "Enable Conditional Logic" +#: includes/fields/class-gf-field-address.php:448 +msgid "Israel" msgstr "" -#: ../form_detail.php:1918 -msgid "Enable Page Conditional Logic" +#: includes/fields/class-gf-field-address.php:448 +msgid "Italy" msgstr "" -#: ../form_detail.php:1930 -msgid "Enable Next Button Conditional Logic" +#: includes/fields/class-gf-field-address.php:448 +msgid "Jamaica" msgstr "" -#: ../form_detail.php:2009 ../tooltips.php:126 -msgid "Post Fields" +#: includes/fields/class-gf-field-address.php:448 +msgid "Japan" msgstr "" -#: ../form_detail.php:2013 ../tooltips.php:127 -msgid "Pricing Fields" +#: includes/fields/class-gf-field-address.php:448 +msgid "Jordan" msgstr "" -#: ../form_detail.php:2039 ../form_list.php:508 -msgid "Move this form to the trash" +#: includes/fields/class-gf-field-address.php:448 +msgid "Kazakhstan" msgstr "" -#: ../form_detail.php:2039 -msgid "" -"Would you like to move this form to the trash? \\'Cancel\\' to stop. \\'OK" -"\\' to continue" +#: includes/fields/class-gf-field-address.php:448 +msgid "Kenya" msgstr "" -#: ../form_detail.php:2044 -msgid "Update Form" +#: includes/fields/class-gf-field-address.php:448 +msgid "Kiribati" msgstr "" -#: ../form_detail.php:2044 -msgid "Save Form" +#: includes/fields/class-gf-field-address.php:448 +msgid "North Korea" msgstr "" -#: ../form_detail.php:2055 ../gravityforms.php:2340 -msgid "Preview" +#: includes/fields/class-gf-field-address.php:448 +msgid "South Korea" msgstr "" -#: ../form_detail.php:2355 ../forms_model.php:410 -msgid "Admin Notification" +#: includes/fields/class-gf-field-address.php:448 +msgid "Kosovo" msgstr "" -#: ../form_detail.php:2358 -msgid "New submission from" +#: includes/fields/class-gf-field-address.php:448 +msgid "Kuwait" msgstr "" -#: ../form_detail.php:2372 ../forms_model.php:3678 -msgid "Default Confirmation" +#: includes/fields/class-gf-field-address.php:448 +msgid "Kyrgyzstan" msgstr "" -#: ../form_display.php:455 -msgid "Oops! We could not locate your form." +#: includes/fields/class-gf-field-address.php:448 +msgid "Laos" msgstr "" -#: ../form_display.php:472 -msgid "Sorry. You must be logged in to view this form." +#: includes/fields/class-gf-field-address.php:448 +msgid "Latvia" msgstr "" -#: ../form_display.php:578 -msgid "There was a problem with your submission." +#: includes/fields/class-gf-field-address.php:448 +msgid "Lebanon" msgstr "" -#: ../form_display.php:578 -msgid "Errors have been highlighted below." +#: includes/fields/class-gf-field-address.php:448 +msgid "Lesotho" msgstr "" -#: ../form_display.php:609 ../form_display.php:2435 -msgid "Previous Page" +#: includes/fields/class-gf-field-address.php:448 +msgid "Liberia" msgstr "" -#: ../form_display.php:851 -msgid "This field is for validation purposes and should be left unchanged." +#: includes/fields/class-gf-field-address.php:448 +msgid "Libya" msgstr "" -#: ../form_display.php:1164 ../form_display.php:1406 ../form_display.php:1544 -#: ../form_display.php:1560 ../includes/addon/class-gf-addon.php:2169 -msgid "This field is required." +#: includes/fields/class-gf-field-address.php:448 +msgid "Liechtenstein" msgstr "" -#: ../form_display.php:1175 -msgid "This date has already been taken. Please select a new date." +#: includes/fields/class-gf-field-address.php:448 +msgid "Lithuania" msgstr "" -#: ../form_display.php:1179 -msgid "" -"This field requires a unique entry and the values you entered have been " -"already been used." +#: includes/fields/class-gf-field-address.php:448 +msgid "Luxembourg" msgstr "" -#: ../form_display.php:1180 -#, php-format -msgid "This field requires a unique entry and '%s' has already been used" +#: includes/fields/class-gf-field-address.php:448 +msgid "Macedonia" msgstr "" -#: ../form_display.php:1190 -msgid "Please enter a valid value." +#: includes/fields/class-gf-field-address.php:448 +msgid "Madagascar" msgstr "" -#: ../form_display.php:1190 -msgid "Invalid selection. Please select one of the available choices." +#: includes/fields/class-gf-field-address.php:448 +msgid "Malawi" msgstr "" -#: ../form_display.php:1199 -msgid "Your passwords do not match." +#: includes/fields/class-gf-field-address.php:448 +msgid "Malaysia" msgstr "" -#: ../form_display.php:1207 -msgid "" -"Your password does not meet the required strength.
    Hint: To make it " -"stronger, use upper and lower case letters, numbers and symbols like ! \" ? " -"$ % ^ & )." +#: includes/fields/class-gf-field-address.php:448 +msgid "Maldives" msgstr "" -#: ../form_display.php:1219 -msgid "This field is required. Please enter the first and last name." +#: includes/fields/class-gf-field-address.php:448 +msgid "Mali" msgstr "" -#: ../form_display.php:1235 -msgid "This field is required. Please enter a complete address." +#: includes/fields/class-gf-field-address.php:448 +msgid "Malta" msgstr "" -#: ../form_display.php:1248 -msgid "Please enter your credit card information." +#: includes/fields/class-gf-field-address.php:448 +msgid "Marshall Islands" msgstr "" -#: ../form_display.php:1256 -msgid "Please enter your card's security code." +#: includes/fields/class-gf-field-address.php:448 +msgid "Mauritania" msgstr "" -#: ../form_display.php:1260 -msgid "Invalid credit card number." +#: includes/fields/class-gf-field-address.php:448 +msgid "Mauritius" msgstr "" -#: ../form_display.php:1264 -msgid "is not supported. Please enter one of the supported credit cards." +#: includes/fields/class-gf-field-address.php:448 +msgid "Mexico" msgstr "" -#: ../form_display.php:1272 -msgid "Please enter a valid email address." +#: includes/fields/class-gf-field-address.php:448 +msgid "Micronesia" msgstr "" -#: ../form_display.php:1278 -msgid "Your emails do not match." +#: includes/fields/class-gf-field-address.php:448 +msgid "Moldova" msgstr "" -#: ../form_display.php:1292 -msgid "Please enter a valid amount." +#: includes/fields/class-gf-field-address.php:448 +msgid "Monaco" msgstr "" -#: ../form_display.php:1314 -msgid "Please enter a valid quantity. Quantity cannot contain decimals." +#: includes/fields/class-gf-field-address.php:448 +msgid "Mongolia" msgstr "" -#: ../form_display.php:1317 ../form_display.php:1548 -msgid "Please enter a valid quantity" +#: includes/fields/class-gf-field-address.php:448 +msgid "Montenegro" msgstr "" -#: ../form_display.php:1367 -#, php-format -msgid "Please enter a valid date in the format (%s)." +#: includes/fields/class-gf-field-address.php:448 +msgid "Morocco" msgstr "" -#: ../form_display.php:1367 -msgid "Please enter a valid date." +#: includes/fields/class-gf-field-address.php:448 +msgid "Mozambique" msgstr "" -#: ../form_display.php:1397 -msgid "Please enter a valid time." +#: includes/fields/class-gf-field-address.php:448 +msgid "Myanmar" msgstr "" -#: ../form_display.php:1412 -msgid "Please enter a valid Website URL (i.e. http://www.gravityforms.com)." +#: includes/fields/class-gf-field-address.php:448 +msgid "Namibia" msgstr "" -#: ../form_display.php:1425 ../form_display.php:1460 -msgid "The CAPTCHA wasn't entered correctly. Go back and try it again." +#: includes/fields/class-gf-field-address.php:448 +msgid "Nauru" msgstr "" -#: ../form_display.php:1481 -msgid "The reCAPTCHA wasn't entered correctly. Go back and try it again." +#: includes/fields/class-gf-field-address.php:448 +msgid "Nepal" msgstr "" -#: ../form_display.php:1502 ../form_display.php:1513 ../includes/upload.php:72 -#, php-format -msgid "File exceeds size limit. Maximum file size: %dMB" +#: includes/fields/class-gf-field-address.php:448 +msgid "Netherlands" msgstr "" -#: ../form_display.php:1505 -#, php-format -msgid "There was an error while uploading the file. Error code: %d" +#: includes/fields/class-gf-field-address.php:448 +msgid "New Zealand" msgstr "" -#: ../form_display.php:1526 ../includes/upload.php:77 -msgid "The uploaded file type is not allowed." +#: includes/fields/class-gf-field-address.php:449 +msgid "Nicaragua" msgstr "" -#: ../form_display.php:1530 ../includes/upload.php:80 -#, php-format -msgid "The uploaded file type is not allowed. Must be one of the following: %s" +#: includes/fields/class-gf-field-address.php:449 +msgid "Niger" msgstr "" -#: ../form_display.php:2125 -msgid "No results matched" +#: includes/fields/class-gf-field-address.php:449 +msgid "Nigeria" msgstr "" -#: ../form_display.php:2151 ../form_display.php:2708 ../gravityforms.php:1438 -msgid "of" +#: includes/fields/class-gf-field-address.php:449 +msgid "Northern Mariana Islands" msgstr "" -#: ../form_display.php:2151 -msgid "max characters" +#: includes/fields/class-gf-field-address.php:449 +msgid "Norway" msgstr "" -#: ../form_display.php:2194 -msgid "Mismatch" +#: includes/fields/class-gf-field-address.php:449 +msgid "Oman" msgstr "" -#: ../form_display.php:2432 ../js.php:393 -msgid "Next" +#: includes/fields/class-gf-field-address.php:449 +msgid "Pakistan" msgstr "" -#: ../form_display.php:2432 -msgid "Next Page" +#: includes/fields/class-gf-field-address.php:449 +msgid "Palau" msgstr "" -#: ../form_display.php:2538 -msgid "click to duplicate this field" +#: includes/fields/class-gf-field-address.php:449 +msgid "Palestine, State of" msgstr "" -#: ../form_display.php:2541 -msgid "click to delete this field" +#: includes/fields/class-gf-field-address.php:449 +msgid "Panama" msgstr "" -#: ../form_display.php:2544 -msgid "Field ID" +#: includes/fields/class-gf-field-address.php:449 +msgid "Papua New Guinea" msgstr "" -#: ../form_display.php:2544 -msgid "click to expand and edit the options for this field" +#: includes/fields/class-gf-field-address.php:449 +msgid "Paraguay" msgstr "" -#: ../form_display.php:2568 -msgid "end of page" +#: includes/fields/class-gf-field-address.php:449 +msgid "Peru" msgstr "" -#: ../form_display.php:2568 -msgid "PAGE BREAK" +#: includes/fields/class-gf-field-address.php:449 +msgid "Philippines" msgstr "" -#: ../form_display.php:2568 -msgid "top of new page" +#: includes/fields/class-gf-field-address.php:449 +msgid "Poland" msgstr "" -#: ../form_display.php:2622 -msgid "" -"This page is unsecured. Do not enter a real credit card number. Use this " -"field only for testing purposes. " +#: includes/fields/class-gf-field-address.php:449 +msgid "Portugal" msgstr "" -#: ../form_display.php:2708 -msgid "Step" +#: includes/fields/class-gf-field-address.php:449 +msgid "Puerto Rico" msgstr "" -#: ../form_display.php:2735 -msgid "Sorry. This form is no longer accepting new submissions." +#: includes/fields/class-gf-field-address.php:449 +msgid "Qatar" msgstr "" -#: ../form_display.php:2751 -msgid "This form is not yet available." +#: includes/fields/class-gf-field-address.php:449 +msgid "Romania" msgstr "" -#: ../form_display.php:2753 -msgid "Sorry. This form is no longer available." +#: includes/fields/class-gf-field-address.php:449 +msgid "Russia" msgstr "" -#: ../form_list.php:26 -msgid "Form moved to the trash." +#: includes/fields/class-gf-field-address.php:449 +msgid "Rwanda" msgstr "" -#: ../form_list.php:32 -msgid "Form restored." +#: includes/fields/class-gf-field-address.php:449 +msgid "Saint Kitts and Nevis" msgstr "" -#: ../form_list.php:40 -msgid "Form deleted." +#: includes/fields/class-gf-field-address.php:449 +msgid "Saint Lucia" msgstr "" -#: ../form_list.php:42 ../form_list.php:73 -msgid "You don't have adequate permissions to delete forms." +#: includes/fields/class-gf-field-address.php:449 +msgid "Saint Vincent and the Grenadines" msgstr "" -#: ../form_list.php:50 -msgid "Form duplicated." +#: includes/fields/class-gf-field-address.php:449 +msgid "Samoa" msgstr "" -#: ../form_list.php:151 -msgid "Create a New Form" +#: includes/fields/class-gf-field-address.php:449 +msgid "San Marino" msgstr "" -#: ../form_list.php:165 -msgid "Creating Form..." +#: includes/fields/class-gf-field-address.php:449 +msgid "Sao Tome and Principe" msgstr "" -#: ../form_list.php:197 -msgid "Saved! Redirecting..." +#: includes/fields/class-gf-field-address.php:449 +msgid "Saudi Arabia" msgstr "" -#: ../form_list.php:246 ../tooltips.php:34 -msgid "Form Description" +#: includes/fields/class-gf-field-address.php:449 +msgid "Senegal" msgstr "" -#: ../form_list.php:251 -msgid "Create Form" +#: includes/fields/class-gf-field-address.php:449 +msgid "Serbia and Montenegro" msgstr "" -#: ../form_list.php:306 -msgid "Ajax error while updating form" +#: includes/fields/class-gf-field-address.php:449 +msgid "Seychelles" msgstr "" -#: ../form_list.php:320 -msgid "" -"WARNING: You are about to delete these forms and ALL entries associated with " -"them. " +#: includes/fields/class-gf-field-address.php:449 +msgid "Sierra Leone" msgstr "" -#: ../form_list.php:320 ../form_list.php:324 ../form_settings.php:1499 -#: ../includes/addon/class-gf-feed-addon.php:622 ../notification.php:1104 -msgid "\\'Cancel\\' to stop, \\'OK\\' to delete." +#: includes/fields/class-gf-field-address.php:449 +msgid "Singapore" msgstr "" -#: ../form_list.php:322 -msgid "Are you sure you would like to reset the Views for the selected forms? " +#: includes/fields/class-gf-field-address.php:449 +msgid "Slovakia" msgstr "" -#: ../form_list.php:322 -msgid "\\'Cancel\\' to stop, \\'OK\\' to reset." +#: includes/fields/class-gf-field-address.php:449 +msgid "Slovenia" msgstr "" -#: ../form_list.php:324 -msgid "" -"WARNING: You are about to delete ALL entries associated with the selected " -"forms. " +#: includes/fields/class-gf-field-address.php:449 +msgid "Solomon Islands" msgstr "" -#: ../form_list.php:334 ../gravityforms.php:964 ../gravityforms.php:967 -#: ../gravityforms.php:1303 -msgid "Forms" +#: includes/fields/class-gf-field-address.php:449 +msgid "Somalia" msgstr "" -#: ../form_list.php:335 ../form_settings.php:882 -#: ../includes/addon/class-gf-feed-addon.php:394 -#: ../includes/addon/class-gf-feed-addon.php:484 ../notification.php:405 -msgid "Add New" +#: includes/fields/class-gf-field-address.php:449 +msgid "South Africa" msgstr "" -#: ../form_list.php:365 ../form_list.php:485 ../form_list.php:486 -#: ../form_list.php:568 -msgid "Delete permanently" +#: includes/fields/class-gf-field-address.php:449 +msgid "Spain" msgstr "" -#: ../form_list.php:367 ../form_list.php:570 -msgid "Mark as Active" +#: includes/fields/class-gf-field-address.php:449 +msgid "Sri Lanka" msgstr "" -#: ../form_list.php:368 ../form_list.php:571 -msgid "Mark as Inactive" +#: includes/fields/class-gf-field-address.php:449 +msgid "Sudan" msgstr "" -#: ../form_list.php:369 ../form_list.php:572 -msgid "Reset Views" +#: includes/fields/class-gf-field-address.php:449 +msgid "Sudan, South" msgstr "" -#: ../form_list.php:370 ../form_list.php:573 -msgid "Permanently Delete Entries" +#: includes/fields/class-gf-field-address.php:449 +msgid "Suriname" msgstr "" -#: ../form_list.php:371 ../form_list.php:574 -msgid "Move to trash" +#: includes/fields/class-gf-field-address.php:449 +msgid "Swaziland" msgstr "" -#: ../form_list.php:404 ../form_list.php:426 -msgid "Id" +#: includes/fields/class-gf-field-address.php:449 +msgid "Sweden" msgstr "" -#: ../form_list.php:410 ../form_list.php:428 -msgid "Views" +#: includes/fields/class-gf-field-address.php:449 +msgid "Switzerland" msgstr "" -#: ../form_list.php:412 ../form_list.php:430 -msgid "Conversion" +#: includes/fields/class-gf-field-address.php:449 +msgid "Syria" msgstr "" -#: ../form_list.php:488 -msgid "" -"WARNING: You are about to delete this form and ALL entries associated with " -"it. " +#: includes/fields/class-gf-field-address.php:449 +msgid "Taiwan" msgstr "" -#: ../form_list.php:488 -msgid "\\\"Cancel\\\" to stop, \\\"OK\\\" to delete." +#: includes/fields/class-gf-field-address.php:449 +msgid "Tajikistan" msgstr "" -#: ../form_list.php:499 ../form_settings.php:1498 ../notification.php:1103 -msgid "Duplicate" +#: includes/fields/class-gf-field-address.php:449 +msgid "Tanzania" msgstr "" -#: ../form_list.php:500 -msgid "Duplicate this form" +#: includes/fields/class-gf-field-address.php:449 +msgid "Thailand" msgstr "" -#: ../form_list.php:546 -msgid "There are no forms in the trash." +#: includes/fields/class-gf-field-address.php:449 +msgid "Togo" msgstr "" -#: ../form_list.php:548 -#, php-format -msgid "You don't have any forms. Let's go %screate one%s!" +#: includes/fields/class-gf-field-address.php:449 +msgid "Tonga" msgstr "" -#: ../form_list.php:593 ../form_list.php:626 -msgid "There was an issue creating your form." +#: includes/fields/class-gf-field-address.php:449 +msgid "Trinidad and Tobago" msgstr "" -#: ../form_list.php:605 -msgid "Please enter a form title." +#: includes/fields/class-gf-field-address.php:449 +msgid "Tunisia" msgstr "" -#: ../form_list.php:630 -msgid "Please enter a unique form title." +#: includes/fields/class-gf-field-address.php:449 +msgid "Turkey" msgstr "" -#: ../form_settings.php:97 ../form_settings.php:800 ../form_settings.php:1264 -#: ../gravityforms.php:2308 -msgid "Form Settings" +#: includes/fields/class-gf-field-address.php:449 +msgid "Turkmenistan" msgstr "" -#: ../form_settings.php:274 -msgid "" -"The form title you have entered has already been used. Please enter a unique " -"form title." +#: includes/fields/class-gf-field-address.php:449 +msgid "Tuvalu" msgstr "" -#: ../form_settings.php:285 -msgid "Form settings updated successfully." +#: includes/fields/class-gf-field-address.php:449 +msgid "Uganda" msgstr "" -#: ../form_settings.php:317 -msgid "Form title" +#: includes/fields/class-gf-field-address.php:449 +msgid "Ukraine" msgstr "" -#: ../form_settings.php:331 -msgid "Form description" +#: includes/fields/class-gf-field-address.php:449 +msgid "United Arab Emirates" msgstr "" -#: ../form_settings.php:342 -msgid "Top aligned" +#: includes/fields/class-gf-field-address.php:449 +msgid "United Kingdom" msgstr "" -#: ../form_settings.php:343 -msgid "Left aligned" +#: includes/fields/class-gf-field-address.php:450 +msgid "Uruguay" msgstr "" -#: ../form_settings.php:344 -msgid "Right aligned" +#: includes/fields/class-gf-field-address.php:450 +msgid "Uzbekistan" msgstr "" -#: ../form_settings.php:357 -msgid "Label placement" +#: includes/fields/class-gf-field-address.php:450 +msgid "Vanuatu" msgstr "" -#: ../form_settings.php:372 -msgid "Below inputs" +#: includes/fields/class-gf-field-address.php:450 +msgid "Vatican City" msgstr "" -#: ../form_settings.php:373 -msgid "Above inputs" +#: includes/fields/class-gf-field-address.php:450 +msgid "Venezuela" msgstr "" -#: ../form_settings.php:384 -msgid "Description placement" +#: includes/fields/class-gf-field-address.php:450 +msgid "Vietnam" msgstr "" -#: ../form_settings.php:432 -msgid "Input type" +#: includes/fields/class-gf-field-address.php:450 +msgid "Virgin Islands, British" msgstr "" -#: ../form_settings.php:438 ../form_settings.php:1079 -#: ../form_settings.php:1557 -msgid "Text" +#: includes/fields/class-gf-field-address.php:450 +msgid "Virgin Islands, U.S." msgstr "" -#: ../form_settings.php:456 -msgid "Button text" +#: includes/fields/class-gf-field-address.php:450 +msgid "Yemen" msgstr "" -#: ../form_settings.php:470 -msgid "Button image path" +#: includes/fields/class-gf-field-address.php:450 +msgid "Zambia" msgstr "" -#: ../form_settings.php:488 -msgid "Button conditional logic" +#: includes/fields/class-gf-field-address.php:450 +msgid "Zimbabwe" msgstr "" -#: ../form_settings.php:518 -msgid "total entries" +#: includes/fields/class-gf-field-address.php:457 +msgid "AFGHANISTAN" msgstr "" -#: ../form_settings.php:519 -msgid "per day" +#: includes/fields/class-gf-field-address.php:458 +msgid "ALBANIA" msgstr "" -#: ../form_settings.php:520 -msgid "per week" +#: includes/fields/class-gf-field-address.php:459 +msgid "ALGERIA" msgstr "" -#: ../form_settings.php:521 -msgid "per month" +#: includes/fields/class-gf-field-address.php:460 +msgid "AMERICAN SAMOA" msgstr "" -#: ../form_settings.php:522 -msgid "per year" +#: includes/fields/class-gf-field-address.php:461 +msgid "ANDORRA" msgstr "" -#: ../form_settings.php:532 -msgid "Limit number of entries" +#: includes/fields/class-gf-field-address.php:462 +msgid "ANGOLA" msgstr "" -#: ../form_settings.php:536 -msgid "Enable entry limit" +#: includes/fields/class-gf-field-address.php:463 +msgid "ANTIGUA AND BARBUDA" msgstr "" -#: ../form_settings.php:546 -msgid "Number of Entries" +#: includes/fields/class-gf-field-address.php:464 +msgid "ARGENTINA" msgstr "" -#: ../form_settings.php:565 -msgid "Entry Limit Reached Message" +#: includes/fields/class-gf-field-address.php:465 +msgid "ARMENIA" msgstr "" -#: ../form_settings.php:632 ../form_settings.php:636 -msgid "Schedule form" +#: includes/fields/class-gf-field-address.php:466 +msgid "AUSTRALIA" msgstr "" -#: ../form_settings.php:645 -msgid "Schedule Start Date/Time" +#: includes/fields/class-gf-field-address.php:467 +msgid "AUSTRIA" msgstr "" -#: ../form_settings.php:670 -msgid "Schedule Form End Date/Time" +#: includes/fields/class-gf-field-address.php:468 +msgid "AZERBAIJAN" msgstr "" -#: ../form_settings.php:695 -msgid "Form Pending Message" +#: includes/fields/class-gf-field-address.php:469 +msgid "BAHAMAS" msgstr "" -#: ../form_settings.php:708 -msgid "Form Expired Message" +#: includes/fields/class-gf-field-address.php:470 +msgid "BAHRAIN" msgstr "" -#: ../form_settings.php:724 -msgid "Anti-spam honeypot" +#: includes/fields/class-gf-field-address.php:471 +msgid "BANGLADESH" msgstr "" -#: ../form_settings.php:728 -msgid "Enable anti-spam honeypot" +#: includes/fields/class-gf-field-address.php:472 +msgid "BARBADOS" msgstr "" -#: ../form_settings.php:740 -msgid "Animated transitions" +#: includes/fields/class-gf-field-address.php:473 +msgid "BELARUS" msgstr "" -#: ../form_settings.php:744 -msgid "Enable animations" +#: includes/fields/class-gf-field-address.php:474 +msgid "BELGIUM" msgstr "" -#: ../form_settings.php:760 ../form_settings.php:764 ../tooltips.php:96 -msgid "Require user to be logged in" +#: includes/fields/class-gf-field-address.php:475 +msgid "BELIZE" msgstr "" -#: ../form_settings.php:773 ../tooltips.php:97 -msgid "Require Login Message" +#: includes/fields/class-gf-field-address.php:476 +msgid "BENIN" msgstr "" -#: ../form_settings.php:789 -msgid "Form Basics" +#: includes/fields/class-gf-field-address.php:477 +msgid "BERMUDA" msgstr "" -#: ../form_settings.php:790 -msgid "Form Layout" +#: includes/fields/class-gf-field-address.php:478 +msgid "BHUTAN" msgstr "" -#: ../form_settings.php:791 -msgid "Form Button" +#: includes/fields/class-gf-field-address.php:479 +msgid "BOLIVIA" msgstr "" -#: ../form_settings.php:792 -msgid "Restrictions" +#: includes/fields/class-gf-field-address.php:480 +msgid "BOSNIA AND HERZEGOVINA" msgstr "" -#: ../form_settings.php:793 -msgid "Form Options" +#: includes/fields/class-gf-field-address.php:481 +msgid "BOTSWANA" msgstr "" -#: ../form_settings.php:849 -msgid "Update Form Settings" +#: includes/fields/class-gf-field-address.php:482 +msgid "BRAZIL" msgstr "" -#: ../form_settings.php:877 ../form_settings.php:882 ../form_settings.php:970 -#: ../form_settings.php:1265 -msgid "Confirmations" +#: includes/fields/class-gf-field-address.php:483 +msgid "BRUNEI" msgstr "" -#: ../form_settings.php:908 -msgid "Ajax error while updating confirmation" +#: includes/fields/class-gf-field-address.php:484 +msgid "BULGARIA" msgstr "" -#: ../form_settings.php:989 -msgid "" -"Ensure that the conditional logic for this confirmation is different from " -"all the other confirmations for this form and then press save to create the " -"new confirmation." +#: includes/fields/class-gf-field-address.php:485 +msgid "BURKINA FASO" msgstr "" -#: ../form_settings.php:1025 -msgid "Save Confirmation" +#: includes/fields/class-gf-field-address.php:486 +msgid "BURUNDI" msgstr "" -#: ../form_settings.php:1068 -msgid "Confirmation Name" +#: includes/fields/class-gf-field-address.php:487 +msgid "CAMBODIA" msgstr "" -#: ../form_settings.php:1075 -msgid "Confirmation Type" +#: includes/fields/class-gf-field-address.php:488 +msgid "CAMEROON" msgstr "" -#: ../form_settings.php:1085 ../form_settings.php:1117 -#: ../form_settings.php:1560 ../js.php:84 -msgid "Page" +#: includes/fields/class-gf-field-address.php:489 +msgid "CANADA" msgstr "" -#: ../form_settings.php:1091 ../form_settings.php:1563 -msgid "Redirect" +#: includes/fields/class-gf-field-address.php:490 +msgid "CAPE VERDE" msgstr "" -#: ../form_settings.php:1101 ../notification.php:771 -msgid "Message" +#: includes/fields/class-gf-field-address.php:491 +msgid "CAYMAN ISLANDS" msgstr "" -#: ../form_settings.php:1106 -msgid "Disable Auto-formatting" +#: includes/fields/class-gf-field-address.php:492 +msgid "CENTRAL AFRICAN REPUBLIC" msgstr "" -#: ../form_settings.php:1119 -msgid "Select a page" +#: includes/fields/class-gf-field-address.php:493 +msgid "CHAD" msgstr "" -#: ../form_settings.php:1127 ../form_settings.php:1153 -msgid "Redirect Query String" +#: includes/fields/class-gf-field-address.php:494 +msgid "CHILE" msgstr "" -#: ../form_settings.php:1129 ../form_settings.php:1155 -msgid "Pass Field Data Via Query String" +#: includes/fields/class-gf-field-address.php:495 +msgid "CHINA" msgstr "" -#: ../form_settings.php:1132 ../form_settings.php:1158 -msgid "Sample: phone={Phone:1}&email={Email:2}" +#: includes/fields/class-gf-field-address.php:496 +msgid "COLOMBIA" msgstr "" -#: ../form_settings.php:1142 -msgid "Redirect URL" +#: includes/fields/class-gf-field-address.php:497 +msgid "COMOROS" msgstr "" -#: ../form_settings.php:1304 -msgid "You must specify a Confirmation Name." +#: includes/fields/class-gf-field-address.php:498 +msgid "CONGO, DEMOCRATIC REPUBLIC OF THE" msgstr "" -#: ../form_settings.php:1311 -msgid "You must select a Confirmation Page." +#: includes/fields/class-gf-field-address.php:499 +msgid "CONGO, REPUBLIC OF THE" msgstr "" -#: ../form_settings.php:1317 -msgid "You must specify a Redirect URL." +#: includes/fields/class-gf-field-address.php:500 +msgid "COSTA RICA" msgstr "" -#: ../form_settings.php:1338 -#, php-format -msgid "Confirmation saved successfully. %sBack to confirmations.%s" +#: includes/fields/class-gf-field-address.php:501 +msgid "C&OCIRC;TE D'IVOIRE" msgstr "" -#: ../form_settings.php:1358 -msgid "Confirmation deleted." +#: includes/fields/class-gf-field-address.php:502 +msgid "CROATIA" msgstr "" -#: ../form_settings.php:1497 ../notification.php:1102 -msgid "Edit this item" +#: includes/fields/class-gf-field-address.php:503 +msgid "CUBA" msgstr "" -#: ../form_settings.php:1498 -msgid "Duplicate this confirmation" +#: includes/fields/class-gf-field-address.php:504 +msgid "CYPRUS" msgstr "" -#: ../form_settings.php:1499 -msgid "Delete this item" +#: includes/fields/class-gf-field-address.php:505 +msgid "CZECH REPUBLIC" msgstr "" -#: ../form_settings.php:1499 -msgid "WARNING: You are about to delete this confirmation." +#: includes/fields/class-gf-field-address.php:506 +msgid "DENMARK" msgstr "" -#: ../form_settings.php:1540 -msgid "This page does not exist." +#: includes/fields/class-gf-field-address.php:507 +msgid "DJIBOUTI" msgstr "" -#: ../forms_model.php:435 -msgid "User Notification" +#: includes/fields/class-gf-field-address.php:508 +msgid "DOMINICA" msgstr "" -#: ../forms_model.php:517 ../forms_model.php:529 -msgid "Notification not found" +#: includes/fields/class-gf-field-address.php:509 +msgid "DOMINICAN REPUBLIC" msgstr "" -#: ../forms_model.php:767 -msgid "You don't have adequate permission to create forms." +#: includes/fields/class-gf-field-address.php:510 +msgid "EAST TIMOR" msgstr "" -#: ../forms_model.php:1109 -msgid "You don't have adequate permission to delete notes." +#: includes/fields/class-gf-field-address.php:511 +msgid "ECUADOR" msgstr "" -#: ../forms_model.php:1148 -msgid "You don't have adequate permission to edit entries." +#: includes/fields/class-gf-field-address.php:512 +msgid "EGYPT" msgstr "" -#: ../gravityforms.php:962 -msgid "Update Available" +#: includes/fields/class-gf-field-address.php:513 +msgid "EL SALVADOR" msgstr "" -#: ../gravityforms.php:978 ../gravityforms.php:1243 ../gravityforms.php:2308 -#: ../includes/addon/class-gf-addon.php:2616 -#: ../includes/addon/class-gf-addon.php:2822 -#: ../includes/addon/class-gf-addon.php:2975 -#: ../includes/addon/class-gf-addon.php:3146 ../settings.php:423 -msgid "Settings" +#: includes/fields/class-gf-field-address.php:514 +msgid "EQUATORIAL GUINEA" msgstr "" -#: ../gravityforms.php:980 -msgid "Import/Export" +#: includes/fields/class-gf-field-address.php:515 +msgid "ERITREA" msgstr "" -#: ../gravityforms.php:983 -msgid "Updates" +#: includes/fields/class-gf-field-address.php:516 +msgid "ESTONIA" msgstr "" -#: ../gravityforms.php:984 ../help.php:48 -msgid "Add-Ons" +#: includes/fields/class-gf-field-address.php:517 +msgid "ETHIOPIA" msgstr "" -#: ../gravityforms.php:1048 -#, php-format -msgid "%1$s ‹ %2$s — WordPress" +#: includes/fields/class-gf-field-address.php:518 +msgid "FIJI" msgstr "" -#: ../gravityforms.php:1152 ../gravityforms.php:1167 -msgid "Add Gravity Form" +#: includes/fields/class-gf-field-address.php:519 +msgid "FINLAND" msgstr "" -#: ../gravityforms.php:1167 -msgid "Add Form" +#: includes/fields/class-gf-field-address.php:520 +msgid "FRANCE" msgstr "" -#: ../gravityforms.php:1179 -msgid "Please select a form" +#: includes/fields/class-gf-field-address.php:521 +msgid "GABON" msgstr "" -#: ../gravityforms.php:1199 -msgid "Insert A Form" +#: includes/fields/class-gf-field-address.php:522 +msgid "GAMBIA" msgstr "" -#: ../gravityforms.php:1201 -msgid "Select a form below to add it to your post or page." +#: includes/fields/class-gf-field-address.php:524 +msgid "GERMANY" msgstr "" -#: ../gravityforms.php:1206 ../widget.php:79 -msgid "Select a Form" +#: includes/fields/class-gf-field-address.php:525 +msgid "GHANA" msgstr "" -#: ../gravityforms.php:1216 -msgid "Can't find your form? Make sure it is active." +#: includes/fields/class-gf-field-address.php:526 +msgid "GREECE" msgstr "" -#: ../gravityforms.php:1219 ../widget.php:93 -msgid "Display form title" +#: includes/fields/class-gf-field-address.php:527 +msgid "GREENLAND" msgstr "" -#: ../gravityforms.php:1220 ../widget.php:94 -msgid "Display form description" +#: includes/fields/class-gf-field-address.php:528 +msgid "GRENADA" msgstr "" -#: ../gravityforms.php:1221 ../widget.php:100 -msgid "Enable AJAX" +#: includes/fields/class-gf-field-address.php:529 +msgid "GUAM" msgstr "" -#: ../gravityforms.php:1224 -msgid "Insert Form" +#: includes/fields/class-gf-field-address.php:530 +msgid "GUATEMALA" msgstr "" -#: ../gravityforms.php:1257 ../update.php:33 -msgid "There is a new version of Gravity Forms available." +#: includes/fields/class-gf-field-address.php:531 +msgid "GUINEA" msgstr "" -#: ../gravityforms.php:1257 ../includes/addon/class-gf-auto-upgrade.php:59 -#: ../includes/addon/class-gf-auto-upgrade.php:143 -#, php-format -msgid "View version %s Details" +#: includes/fields/class-gf-field-address.php:532 +msgid "GUINEA-BISSAU" msgstr "" -#: ../gravityforms.php:1259 -msgid "Please try again or contact us." +#: includes/fields/class-gf-field-address.php:534 +msgid "HAITI" msgstr "" -#: ../gravityforms.php:1330 ../gravityforms.php:1333 -msgid "View All Entries" +#: includes/fields/class-gf-field-address.php:535 +msgid "HONDURAS" msgstr "" -#: ../gravityforms.php:1332 -#, php-format -msgid "Last Entry: %s" +#: includes/fields/class-gf-field-address.php:536 +msgid "HONG KONG" msgstr "" -#: ../gravityforms.php:1344 -msgid "View All Forms" +#: includes/fields/class-gf-field-address.php:537 +msgid "HUNGARY" msgstr "" -#: ../gravityforms.php:1352 -#, php-format -msgid "You don't have any forms. Let's go %s create one %s!" +#: includes/fields/class-gf-field-address.php:538 +msgid "ICELAND" msgstr "" -#: ../gravityforms.php:1382 -#, php-format -msgid "There is an update available for Gravity Forms. %sView Details%s %s" +#: includes/fields/class-gf-field-address.php:539 +msgid "INDIA" msgstr "" -#: ../gravityforms.php:1385 -msgid "Dismiss" +#: includes/fields/class-gf-field-address.php:540 +msgid "INDONESIA" msgstr "" -#: ../gravityforms.php:1435 -msgid "Next >" +#: includes/fields/class-gf-field-address.php:541 +msgid "IRAN" msgstr "" -#: ../gravityforms.php:1436 -msgid "< Prev" +#: includes/fields/class-gf-field-address.php:542 +msgid "IRAQ" msgstr "" -#: ../gravityforms.php:1439 -msgid "Close" +#: includes/fields/class-gf-field-address.php:543 +msgid "IRELAND" msgstr "" -#: ../gravityforms.php:1440 -msgid "" -"This feature requires inline frames. You have iframes disabled or your " -"browser does not support them." +#: includes/fields/class-gf-field-address.php:544 +msgid "ISRAEL" msgstr "" -#: ../gravityforms.php:1721 -msgid "Add-On browser is currently unavailable. Please try again later." +#: includes/fields/class-gf-field-address.php:545 +msgid "ITALY" msgstr "" -#: ../gravityforms.php:1896 -msgid "There was an error while resending the notifications." +#: includes/fields/class-gf-field-address.php:546 +msgid "JAMAICA" msgstr "" -#: ../gravityforms.php:1902 -msgid "" -"No notifications have been selected. Please select a notification to be sent." +#: includes/fields/class-gf-field-address.php:547 +msgid "JAPAN" msgstr "" -#: ../gravityforms.php:1905 -msgid "The Send To email address provided is not valid." +#: includes/fields/class-gf-field-address.php:548 +msgid "JORDAN" msgstr "" -#: ../gravityforms.php:2195 -msgid "Switch Form" +#: includes/fields/class-gf-field-address.php:549 +msgid "KAZAKHSTAN" msgstr "" -#: ../gravityforms.php:2295 -msgid "Edit this form" +#: includes/fields/class-gf-field-address.php:550 +msgid "KENYA" msgstr "" -#: ../gravityforms.php:2310 -msgid "Edit settings for this form" +#: includes/fields/class-gf-field-address.php:551 +msgid "KIRIBATI" msgstr "" -#: ../gravityforms.php:2327 -msgid "View entries generated by this form" +#: includes/fields/class-gf-field-address.php:552 +msgid "NORTH KOREA" msgstr "" -#: ../help.php:17 -msgid "Gravity Forms Help" +#: includes/fields/class-gf-field-address.php:553 +msgid "SOUTH KOREA" msgstr "" -#: ../help.php:22 -msgid "" -"IMPORTANT NOTICE: We do not provide support via e-mail. " -"Please open a " -"support ticket." +#: includes/fields/class-gf-field-address.php:554 +msgid "KOSOVO" msgstr "" -#: ../help.php:24 -msgid "" -"Please review the plugin documentation and frequently asked questions (FAQ) first. " -"If you still can't find the answer open a support ticket and we will be happy to " -"answer your questions and assist you with any problems. Please note:" -" If you have not purchased a license from us, you won't have access to " -"these help resources." +#: includes/fields/class-gf-field-address.php:555 +msgid "KUWAIT" msgstr "" -#: ../help.php:29 -msgid "Gravity Forms Documentation" +#: includes/fields/class-gf-field-address.php:556 +msgid "KYRGYZSTAN" msgstr "" -#: ../help.php:38 -msgid "Documentation (please select a topic)" +#: includes/fields/class-gf-field-address.php:557 +msgid "LAOS" msgstr "" -#: ../help.php:40 -msgid "Getting Started" +#: includes/fields/class-gf-field-address.php:558 +msgid "LATVIA" msgstr "" -#: ../help.php:42 -msgid "Using Gravity Forms" +#: includes/fields/class-gf-field-address.php:559 +msgid "LEBANON" msgstr "" -#: ../help.php:44 -msgid "Design and Layout" +#: includes/fields/class-gf-field-address.php:560 +msgid "LESOTHO" msgstr "" -#: ../help.php:46 -msgid "Developer Docs" +#: includes/fields/class-gf-field-address.php:561 +msgid "LIBERIA" msgstr "" -#: ../help.php:50 -msgid "How To" +#: includes/fields/class-gf-field-address.php:562 +msgid "LIBYA" msgstr "" -#: ../help.php:55 ../help.php:82 ../help.php:109 -msgid "GO" +#: includes/fields/class-gf-field-address.php:563 +msgid "LIECHTENSTEIN" msgstr "" -#: ../help.php:64 -msgid "Gravity Forms FAQ" +#: includes/fields/class-gf-field-address.php:564 +msgid "LITHUANIA" msgstr "" -#: ../help.php:72 -msgid "FAQ (please select a topic)" +#: includes/fields/class-gf-field-address.php:565 +msgid "LUXEMBOURG" msgstr "" -#: ../help.php:73 -msgid "Installation Questions" +#: includes/fields/class-gf-field-address.php:566 +msgid "MACEDONIA" msgstr "" -#: ../help.php:74 -msgid "Formatting/Styling Questions" +#: includes/fields/class-gf-field-address.php:567 +msgid "MADAGASCAR" msgstr "" -#: ../help.php:75 -msgid "Notification Questions" +#: includes/fields/class-gf-field-address.php:568 +msgid "MALAWI" msgstr "" -#: ../help.php:76 -msgid "General Questions" +#: includes/fields/class-gf-field-address.php:569 +msgid "MALAYSIA" msgstr "" -#: ../help.php:92 -msgid "Gravity Forms Downloads" +#: includes/fields/class-gf-field-address.php:570 +msgid "MALDIVES" msgstr "" -#: ../help.php:93 -msgid "" -"Please Note: Only licensed Gravity Forms customers are " -"granted access to the downloads section." +#: includes/fields/class-gf-field-address.php:571 +msgid "MALI" msgstr "" -#: ../help.php:101 -msgid "Downloads (please select a product)" +#: includes/fields/class-gf-field-address.php:572 +msgid "MALTA" msgstr "" -#: ../help.php:102 -msgid "Gravity Forms" +#: includes/fields/class-gf-field-address.php:573 +msgid "MARSHALL ISLANDS" msgstr "" -#: ../help.php:103 -msgid "Gravity Forms Add-Ons" +#: includes/fields/class-gf-field-address.php:574 +msgid "MAURITANIA" msgstr "" -#: ../help.php:120 -msgid "Gravity Forms Tutorials & Resources" +#: includes/fields/class-gf-field-address.php:575 +msgid "MAURITIUS" msgstr "" -#: ../help.php:121 -msgid "" -"Please note: The Gravity Forms support team does not " -"provide support for third party scripts, widgets, etc." +#: includes/fields/class-gf-field-address.php:576 +msgid "MEXICO" msgstr "" -#: ../includes/addon/class-gf-addon.php:996 -#, php-format -msgid "Field type '%s' has not been implemented" +#: includes/fields/class-gf-field-address.php:577 +msgid "MICRONESIA" msgstr "" -#: ../includes/addon/class-gf-addon.php:1237 -msgid "Settings updated" +#: includes/fields/class-gf-field-address.php:578 +msgid "MOLDOVA" msgstr "" -#: ../includes/addon/class-gf-addon.php:1242 -msgid "There was an error while saving your settings" +#: includes/fields/class-gf-field-address.php:579 +msgid "MONACO" msgstr "" -#: ../includes/addon/class-gf-addon.php:1587 -#: ../includes/addon/class-gf-addon.php:1729 -msgid "Form Field" +#: includes/fields/class-gf-field-address.php:580 +msgid "MONGOLIA" msgstr "" -#: ../includes/addon/class-gf-addon.php:1627 -msgid "Field" +#: includes/fields/class-gf-field-address.php:581 +msgid "MONTENEGRO" msgstr "" -#: ../includes/addon/class-gf-addon.php:1656 -#: ../includes/addon/class-gf-addon.php:1660 -#: ../includes/addon/class-gf-addon.php:1805 -#: ../includes/addon/class-gf-addon.php:1809 -msgid "Full" +#: includes/fields/class-gf-field-address.php:582 +msgid "MOROCCO" msgstr "" -#: ../includes/addon/class-gf-addon.php:1664 -#: ../includes/addon/class-gf-addon.php:1813 -msgid "Selected" +#: includes/fields/class-gf-field-address.php:583 +msgid "MOZAMBIQUE" msgstr "" -#: ../includes/addon/class-gf-addon.php:1714 -msgid "Add Custom" +#: includes/fields/class-gf-field-address.php:584 +msgid "MYANMAR" msgstr "" -#: ../includes/addon/class-gf-addon.php:1850 -msgid "Update Settings" +#: includes/fields/class-gf-field-address.php:585 +msgid "NAMIBIA" msgstr "" -#: ../includes/addon/class-gf-addon.php:2200 ../settings.php:165 -msgid "Validation Error" +#: includes/fields/class-gf-field-address.php:586 +msgid "NAURU" msgstr "" -#: ../includes/addon/class-gf-addon.php:2741 -#: ../includes/addon/class-gf-addon.php:2747 -msgid "You don't have adequate permissions to view this page" +#: includes/fields/class-gf-field-address.php:587 +msgid "NEPAL" msgstr "" -#: ../includes/addon/class-gf-addon.php:2876 -#, php-format -msgid "%s Settings" +#: includes/fields/class-gf-field-address.php:588 +msgid "NETHERLANDS" msgstr "" -#: ../includes/addon/class-gf-addon.php:2980 ../settings.php:440 -msgid "Uninstall" +#: includes/fields/class-gf-field-address.php:589 +msgid "NEW ZEALAND" msgstr "" -#: ../includes/addon/class-gf-addon.php:3006 -#: ../includes/addon/class-gf-addon.php:3012 -msgid "Uninstall %" +#: includes/fields/class-gf-field-address.php:590 +msgid "NICARAGUA" msgstr "" -#: ../includes/addon/class-gf-addon.php:3009 ../settings.php:93 -msgid "Warning" +#: includes/fields/class-gf-field-address.php:591 +msgid "NIGER" msgstr "" -#: ../includes/addon/class-gf-addon.php:3010 -msgid "Warning! This operation deletes ALL settings and data." +#: includes/fields/class-gf-field-address.php:592 +msgid "NIGERIA" msgstr "" -#: ../includes/addon/class-gf-addon.php:3012 -#: ../includes/addon/class-gf-addon.php:3276 -msgid "" -"Warning! ALL settings will be deleted. This cannot be undone. \\'OK\\' to " -"delete, \\'Cancel\\' to stop" +#: includes/fields/class-gf-field-address.php:593 +msgid "NORTHERN MARIANA ISLANDS" msgstr "" -#: ../includes/addon/class-gf-addon.php:3273 -msgid "Uninstall Add-On" +#: includes/fields/class-gf-field-address.php:594 +msgid "NORWAY" msgstr "" -#: ../includes/addon/class-gf-addon.php:3274 -msgid "Warning! This operation deletes ALL settings." +#: includes/fields/class-gf-field-address.php:595 +msgid "OMAN" msgstr "" -#: ../includes/addon/class-gf-addon.php:3276 -msgid "Uninstall Add-On" +#: includes/fields/class-gf-field-address.php:596 +msgid "PAKISTAN" msgstr "" -#: ../includes/addon/class-gf-addon.php:3311 -msgid "You don't have adequate permission to uninstall this addon: " +#: includes/fields/class-gf-field-address.php:597 +msgid "PALAU" msgstr "" -#: ../includes/addon/class-gf-addon.php:3395 -#: ../includes/addon/class-gf-auto-upgrade.php:52 -msgid "Gravity Forms " +#: includes/fields/class-gf-field-address.php:598 +msgid "PALESTINE, STATE OF" msgstr "" -#: ../includes/addon/class-gf-auto-upgrade.php:60 -#, php-format -msgid "" -"%sRegister%s your copy of Gravity Forms to receive access to automatic " -"upgrades and support. Need a license key? %sPurchase one now%s." +#: includes/fields/class-gf-field-address.php:599 +msgid "PANAMA" msgstr "" -#: ../includes/addon/class-gf-auto-upgrade.php:163 -#, php-format -msgid "Oops!! Something went wrong.%sPlease try again or %scontact us%s." +#: includes/fields/class-gf-field-address.php:600 +msgid "PAPUA NEW GUINEA" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:399 -#: ../includes/addon/class-gf-feed-addon.php:484 -#, php-format -msgid "%s Feeds" +#: includes/fields/class-gf-field-address.php:601 +msgid "PARAGUAY" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:428 -msgid "Feed Settings" +#: includes/fields/class-gf-field-address.php:602 +msgid "PERU" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:528 -msgid "Feed updated successfully." +#: includes/fields/class-gf-field-address.php:603 +msgid "PHILIPPINES" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:533 -msgid "" -"There was an error updating this feed. Please review all errors below and " -"try again." +#: includes/fields/class-gf-field-address.php:604 +msgid "POLAND" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:621 -msgid "Edit this feed" +#: includes/fields/class-gf-field-address.php:605 +msgid "PORTUGAL" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:622 -msgid "Delete this feed" +#: includes/fields/class-gf-field-address.php:606 +msgid "PUERTO RICO" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:622 -msgid "WARNING: You are about to delete this item." +#: includes/fields/class-gf-field-address.php:607 +msgid "QATAR" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:637 -#, php-format -msgid "You don't have any feeds configured. Let's go %screate one%s!" +#: includes/fields/class-gf-field-address.php:608 +msgid "ROMANIA" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:684 -msgid "Enable Condition" +#: includes/fields/class-gf-field-address.php:609 +msgid "RUSSIA" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:710 -msgid "Process this feed if" +#: includes/fields/class-gf-field-address.php:610 +msgid "RWANDA" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:781 -msgid "Process " +#: includes/fields/class-gf-field-address.php:611 +msgid "SAINT KITTS AND NEVIS" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:938 -msgid "Checkbox" +#: includes/fields/class-gf-field-address.php:612 +msgid "SAINT LUCIA" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:951 -msgid "feed" +#: includes/fields/class-gf-field-address.php:613 +msgid "SAINT VINCENT AND THE GRENADINES" msgstr "" -#: ../includes/addon/class-gf-feed-addon.php:952 -msgid "feeds" +#: includes/fields/class-gf-field-address.php:614 +msgid "SAMOA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:400 -#, php-format -msgid "Payment failed to be captured. Reason: %s" +#: includes/fields/class-gf-field-address.php:615 +msgid "SAN MARINO" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:416 -msgid "Initial payment" +#: includes/fields/class-gf-field-address.php:616 +msgid "SAO TOME AND PRINCIPE" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:423 -#, php-format -msgid "%s has been captured successfully. Amount: %s. Transaction Id: %s" +#: includes/fields/class-gf-field-address.php:617 +msgid "SAUDI ARABIA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:429 -#, php-format -msgid "Failed to capture %s. Reason: %s." +#: includes/fields/class-gf-field-address.php:618 +msgid "SENEGAL" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:444 -#, php-format -msgid "Subscription failed to be created. Reason: %s" +#: includes/fields/class-gf-field-address.php:619 +msgid "SERBIA AND MONTENEGRO" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:610 -msgid "options: " +#: includes/fields/class-gf-field-address.php:620 +msgid "SEYCHELLES" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:731 -#, php-format -msgid "This webhook has already been processed (Event Id: %s)" +#: includes/fields/class-gf-field-address.php:621 +msgid "SIERRA LEONE" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:822 -#, php-format -msgid "Payment is pending. Amount: %s. Transaction Id: %s." +#: includes/fields/class-gf-field-address.php:622 +msgid "SINGAPORE" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:858 -#, php-format -msgid "Payment has been completed. Amount: %s. Transaction Id: %s." +#: includes/fields/class-gf-field-address.php:623 +msgid "SLOVAKIA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:883 -#, php-format -msgid "Payment has been refunded. Amount: %s. Transaction Id: %s." +#: includes/fields/class-gf-field-address.php:624 +msgid "SLOVENIA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:902 -#, php-format -msgid "Payment has failed. Amount: %s." +#: includes/fields/class-gf-field-address.php:625 +msgid "SOLOMON ISLANDS" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:917 -#, php-format -msgid "Authorization has been voided. Transaction Id: %s" +#: includes/fields/class-gf-field-address.php:626 +msgid "SOMALIA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:947 -#, php-format -msgid "Subscription has been created. Subscription Id: %s." +#: includes/fields/class-gf-field-address.php:627 +msgid "SOUTH AFRICA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:969 -#, php-format -msgid "Subscription has been paid. Amount: %s. Subscription Id: %s" +#: includes/fields/class-gf-field-address.php:628 +msgid "SPAIN" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:986 -#, php-format -msgid "Subscription payment has failed. Amount: %s. Subscription Id: %s." +#: includes/fields/class-gf-field-address.php:629 +msgid "SRI LANKA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1002 -#, php-format -msgid "Subscription has been cancelled. Subscription Id: %s." +#: includes/fields/class-gf-field-address.php:630 +msgid "SUDAN" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1021 -#, php-format -msgid "Subscription has expired. Subscriber Id: %s" +#: includes/fields/class-gf-field-address.php:631 +msgid "SUDAN, SOUTH" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1077 -#: ../includes/addon/class-gf-payment-addon.php:1145 -#: ../includes/addon/class-gf-payment-addon.php:1153 -msgid "Transaction Type" +#: includes/fields/class-gf-field-address.php:632 +msgid "SURINAME" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1085 -#: ../includes/addon/class-gf-payment-addon.php:1151 -msgid "Subscription" +#: includes/fields/class-gf-field-address.php:633 +msgid "SWAZILAND" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1088 -#: ../includes/addon/class-gf-payment-addon.php:1150 -msgid "Products and Services" +#: includes/fields/class-gf-field-address.php:634 +msgid "SWEDEN" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1091 -msgid "Donations" +#: includes/fields/class-gf-field-address.php:635 +msgid "SWITZERLAND" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1095 -msgid "Unsupported transaction type" +#: includes/fields/class-gf-field-address.php:636 +msgid "SYRIA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1102 -#: ../includes/addon/class-gf-payment-addon.php:1393 -#: ../includes/addon/class-gf-payment-addon.php:1401 -msgid "Form Total" +#: includes/fields/class-gf-field-address.php:637 +msgid "TAIWAN" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1124 -#, php-format -msgid "" -"You must add a Credit Card field to your form before creating a feed. Let's " -"go %sadd one%s!" +#: includes/fields/class-gf-field-address.php:638 +msgid "TAJIKISTAN" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1141 -msgid "Enter a feed name to uniquely identify this setup." +#: includes/fields/class-gf-field-address.php:639 +msgid "TANZANIA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1149 -#: ../includes/addon/class-gf-payment-addon.php:1153 -msgid "Select a transaction type" +#: includes/fields/class-gf-field-address.php:640 +msgid "THAILAND" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1171 -msgid "" -"Select which field determines the recurring payment amount, or select 'Form " -"Total' to use the total of all pricing fields as the recurring amount." +#: includes/fields/class-gf-field-address.php:641 +msgid "TOGO" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1175 -#: ../includes/addon/class-gf-payment-addon.php:1177 -msgid "Billing Cycle" +#: includes/fields/class-gf-field-address.php:642 +msgid "TONGA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1177 -msgid "" -"Select your billing cycle. This determines how often the recurring payment " -"should occur." +#: includes/fields/class-gf-field-address.php:643 +msgid "TRINIDAD AND TOBAGO" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1181 -#: ../includes/addon/class-gf-payment-addon.php:1184 -msgid "Recurring Times" +#: includes/fields/class-gf-field-address.php:644 +msgid "TUNISIA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1184 -msgid "" -"Select how many times the recurring payment should be made. The default is " -"to bill the customer until the subscription is canceled." +#: includes/fields/class-gf-field-address.php:645 +msgid "TURKEY" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1188 -msgid "Setup Fee" +#: includes/fields/class-gf-field-address.php:646 +msgid "TURKMENISTAN" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1193 -msgid "Trial" +#: includes/fields/class-gf-field-address.php:647 +msgid "TUVALU" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1196 -msgid "Trial Period" +#: includes/fields/class-gf-field-address.php:648 +msgid "UGANDA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1196 -msgid "" -"Enable a trial period. The users recurring payment will not begin until " -"after this trial period." +#: includes/fields/class-gf-field-address.php:649 +msgid "UKRAINE" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1215 -msgid "" -"Select which field determines the payment amount, or select 'Form Total' to " -"use the total of all pricing fields as the payment amount." +#: includes/fields/class-gf-field-address.php:650 +msgid "UNITED ARAB EMIRATES" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1221 -msgid "Other Settings" +#: includes/fields/class-gf-field-address.php:651 +msgid "UNITED KINGDOM" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1236 -#: ../includes/addon/class-gf-payment-addon.php:1239 -msgid "Billing Information" +#: includes/fields/class-gf-field-address.php:652 +msgid "UNITED STATES" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1239 -msgid "Map your Form Fields to the available listed fields." +#: includes/fields/class-gf-field-address.php:653 +msgid "URUGUAY" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1247 -msgid "Options" +#: includes/fields/class-gf-field-address.php:654 +msgid "UZBEKISTAN" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1257 -msgid "" -"When conditions are enabled, form submissions will only be sent to the " -"payment gateway when the conditions are met. When disabled, all form " -"submissions will be sent to the payment gateway." +#: includes/fields/class-gf-field-address.php:655 +msgid "VANUATU" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1309 -#: ../includes/addon/class-gf-payment-addon.php:1351 -#: ../includes/webapi/webapi.php:190 -msgid "Enabled" +#: includes/fields/class-gf-field-address.php:656 +msgid "VATICAN CITY" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1362 -msgid "Enter an amount" +#: includes/fields/class-gf-field-address.php:657 +msgid "VENEZUELA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1409 -msgid "Sample Option" +#: includes/fields/class-gf-field-address.php:658 +msgid "VIRGIN ISLANDS, BRITISH" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1420 -msgid "Address 2" +#: includes/fields/class-gf-field-address.php:659 +msgid "VIRGIN ISLANDS, U.S." msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1423 -msgid "Zip" +#: includes/fields/class-gf-field-address.php:660 +msgid "VIETNAM" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1441 -msgid "day(s)" +#: includes/fields/class-gf-field-address.php:661 +msgid "YEMEN" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1442 -msgid "week(s)" +#: includes/fields/class-gf-field-address.php:662 +msgid "ZAMBIA" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1443 -msgid "month(s)" +#: includes/fields/class-gf-field-address.php:663 +msgid "ZIMBABWE" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1444 -msgid "year(s)" +#: includes/fields/class-gf-field-address.php:672 +#: includes/fields/class-gf-field-address.php:693 +msgid "Alabama" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1453 -msgid "Select a product field" +#: includes/fields/class-gf-field-address.php:672 +#: includes/fields/class-gf-field-address.php:694 +msgid "Alaska" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1469 -msgctxt "toolbar label" -msgid "Sales" +#: includes/fields/class-gf-field-address.php:672 +#: includes/fields/class-gf-field-address.php:695 +msgid "Arizona" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1470 -msgctxt "metabox title" -msgid "Filter" +#: includes/fields/class-gf-field-address.php:672 +#: includes/fields/class-gf-field-address.php:696 +msgid "Arkansas" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1497 -msgid "Today" +#: includes/fields/class-gf-field-address.php:673 +#: includes/fields/class-gf-field-address.php:697 +msgid "California" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1498 -msgid "Yesterday" +#: includes/fields/class-gf-field-address.php:673 +#: includes/fields/class-gf-field-address.php:698 +msgid "Colorado" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1499 -msgid "Last 30 Days" +#: includes/fields/class-gf-field-address.php:673 +#: includes/fields/class-gf-field-address.php:699 +msgid "Connecticut" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1506 -#: ../includes/addon/class-gf-payment-addon.php:1513 -#: ../includes/addon/class-gf-payment-addon.php:1521 -#: ../includes/addon/class-gf-payment-addon.php:1528 -msgid "subscriptions" +#: includes/fields/class-gf-field-address.php:673 +#: includes/fields/class-gf-field-address.php:700 +msgid "Delaware" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1507 -#: ../includes/addon/class-gf-payment-addon.php:1514 -#: ../includes/addon/class-gf-payment-addon.php:1522 -#: ../includes/addon/class-gf-payment-addon.php:1529 -msgid "orders" +#: includes/fields/class-gf-field-address.php:674 +#: includes/fields/class-gf-field-address.php:701 +msgid "District of Columbia" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1537 -msgid "There aren't any transactions that match your criteria." +#: includes/fields/class-gf-field-address.php:674 +#: includes/fields/class-gf-field-address.php:702 +msgid "Florida" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1639 -#: ../includes/addon/class-gf-payment-addon.php:1640 -msgid "Revenue" +#: includes/fields/class-gf-field-address.php:675 +#: includes/fields/class-gf-field-address.php:704 +msgid "Hawaii" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1640 -msgid "Orders" +#: includes/fields/class-gf-field-address.php:675 +#: includes/fields/class-gf-field-address.php:705 +msgid "Idaho" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1640 -msgid "Subscriptions" +#: includes/fields/class-gf-field-address.php:675 +#: includes/fields/class-gf-field-address.php:706 +msgid "Illinois" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1640 -msgid "Recurring Payments" +#: includes/fields/class-gf-field-address.php:675 +#: includes/fields/class-gf-field-address.php:707 +msgid "Indiana" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1640 -msgid "Refunds" +#: includes/fields/class-gf-field-address.php:676 +#: includes/fields/class-gf-field-address.php:708 +msgid "Iowa" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1659 -#: ../includes/addon/class-gf-payment-addon.php:1660 -msgid "Week" +#: includes/fields/class-gf-field-address.php:676 +#: includes/fields/class-gf-field-address.php:709 +msgid "Kansas" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Jan" +#: includes/fields/class-gf-field-address.php:676 +#: includes/fields/class-gf-field-address.php:710 +msgid "Kentucky" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Feb" +#: includes/fields/class-gf-field-address.php:676 +#: includes/fields/class-gf-field-address.php:711 +msgid "Louisiana" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Mar" +#: includes/fields/class-gf-field-address.php:677 +#: includes/fields/class-gf-field-address.php:712 +msgid "Maine" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Apr" +#: includes/fields/class-gf-field-address.php:677 +#: includes/fields/class-gf-field-address.php:713 +msgid "Maryland" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Jun" +#: includes/fields/class-gf-field-address.php:677 +#: includes/fields/class-gf-field-address.php:714 +msgid "Massachusetts" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Jul" +#: includes/fields/class-gf-field-address.php:677 +#: includes/fields/class-gf-field-address.php:715 +msgid "Michigan" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Aug" +#: includes/fields/class-gf-field-address.php:678 +#: includes/fields/class-gf-field-address.php:716 +msgid "Minnesota" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Sep" +#: includes/fields/class-gf-field-address.php:678 +#: includes/fields/class-gf-field-address.php:717 +msgid "Mississippi" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Oct" +#: includes/fields/class-gf-field-address.php:678 +#: includes/fields/class-gf-field-address.php:718 +msgid "Missouri" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Nov" +#: includes/fields/class-gf-field-address.php:678 +#: includes/fields/class-gf-field-address.php:719 +msgid "Montana" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1759 -msgid "Dec" +#: includes/fields/class-gf-field-address.php:679 +#: includes/fields/class-gf-field-address.php:720 +msgid "Nebraska" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1858 -msgid "Daily" +#: includes/fields/class-gf-field-address.php:679 +#: includes/fields/class-gf-field-address.php:721 +msgid "Nevada" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1859 -msgid "Weekly" +#: includes/fields/class-gf-field-address.php:679 +#: includes/fields/class-gf-field-address.php:722 +msgid "New Hampshire" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1860 -msgid "Monthly" +#: includes/fields/class-gf-field-address.php:679 +#: includes/fields/class-gf-field-address.php:723 +msgid "New Jersey" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1863 -msgid "
    View
    Select how you would like the sales data to be displayed." +#: includes/fields/class-gf-field-address.php:680 +#: includes/fields/class-gf-field-address.php:724 +msgid "New Mexico" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1870 -msgctxt "regarding a payment method" -msgid "Any" +#: includes/fields/class-gf-field-address.php:680 +#: includes/fields/class-gf-field-address.php:725 +msgid "New York" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1879 -msgid "Payment Method" +#: includes/fields/class-gf-field-address.php:680 +#: includes/fields/class-gf-field-address.php:726 +msgid "North Carolina" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1933 -msgid "" -"Warning! This subscription will be canceled. This cannot be undone. 'OK' to " -"cancel subscription, 'Cancel' to stop" +#: includes/fields/class-gf-field-address.php:681 +#: includes/fields/class-gf-field-address.php:727 +msgid "North Dakota" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1935 -msgid "Canceled" +#: includes/fields/class-gf-field-address.php:681 +#: includes/fields/class-gf-field-address.php:728 +msgid "Ohio" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1936 -msgid "The subscription could not be canceled. Please try again later." +#: includes/fields/class-gf-field-address.php:681 +#: includes/fields/class-gf-field-address.php:729 +msgid "Oklahoma" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:1978 -msgid "Cancel Subscription" +#: includes/fields/class-gf-field-address.php:681 +#: includes/fields/class-gf-field-address.php:730 +msgid "Oregon" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:2098 -msgid "sale" +#: includes/fields/class-gf-field-address.php:682 +#: includes/fields/class-gf-field-address.php:731 +msgid "Pennsylvania" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:2099 -msgid "sales" +#: includes/fields/class-gf-field-address.php:682 +#: includes/fields/class-gf-field-address.php:732 +msgid "Rhode Island" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:2112 -msgid "There hasn't been any sales in the specified date range." +#: includes/fields/class-gf-field-address.php:682 +#: includes/fields/class-gf-field-address.php:733 +msgid "South Carolina" msgstr "" -#: ../includes/addon/class-gf-payment-addon.php:2156 -#, php-format -msgctxt "paging" -msgid "%1$s of %2$s" +#: includes/fields/class-gf-field-address.php:683 +#: includes/fields/class-gf-field-address.php:734 +msgid "South Dakota" msgstr "" -#: ../includes/addon/class-gf-results.php:21 -msgid "Results Filters" +#: includes/fields/class-gf-field-address.php:683 +#: includes/fields/class-gf-field-address.php:735 +msgid "Tennessee" msgstr "" -#: ../includes/addon/class-gf-results.php:81 -msgid "" -"Error retrieving results. If the problem persists, please contact support." +#: includes/fields/class-gf-field-address.php:683 +#: includes/fields/class-gf-field-address.php:736 +msgid "Texas" msgstr "" -#: ../includes/addon/class-gf-results.php:127 -#: ../includes/addon/class-gf-results.php:158 -msgid "View results generated by this form" +#: includes/fields/class-gf-field-address.php:683 +#: includes/fields/class-gf-field-address.php:737 +msgid "Utah" msgstr "" -#: ../includes/addon/class-gf-results.php:150 -#: ../includes/addon/class-gf-results.php:156 -msgid "Results" +#: includes/fields/class-gf-field-address.php:684 +#: includes/fields/class-gf-field-address.php:738 +msgid "Vermont" msgstr "" -#: ../includes/addon/class-gf-results.php:255 -#: ../includes/addon/class-gf-results.php:348 -msgid "Filters" +#: includes/fields/class-gf-field-address.php:684 +#: includes/fields/class-gf-field-address.php:739 +msgid "Virginia" msgstr "" -#: ../includes/addon/class-gf-results.php:264 -#: ../includes/addon/class-gf-results.php:347 -msgid "Date Range" +#: includes/fields/class-gf-field-address.php:684 +#: includes/fields/class-gf-field-address.php:740 +msgid "Washington" msgstr "" -#: ../includes/addon/class-gf-results.php:305 -msgid "Apply filters" +#: includes/fields/class-gf-field-address.php:684 +#: includes/fields/class-gf-field-address.php:741 +msgid "West Virginia" msgstr "" -#: ../includes/addon/class-gf-results.php:307 -msgid "Clear" +#: includes/fields/class-gf-field-address.php:685 +#: includes/fields/class-gf-field-address.php:742 +msgid "Wisconsin" msgstr "" -#: ../includes/addon/class-gf-results.php:336 -msgid "This form does not have any fields that can be used for results" +#: includes/fields/class-gf-field-address.php:685 +#: includes/fields/class-gf-field-address.php:743 +msgid "Wyoming" msgstr "" -#: ../includes/addon/class-gf-results.php:345 -#: ../includes/addon/class-gf-results.php:615 -msgid "Total Score" +#: includes/fields/class-gf-field-address.php:685 +#: includes/fields/class-gf-field-address.php:744 +msgid "Armed Forces Americas" msgstr "" -#: ../includes/addon/class-gf-results.php:345 -msgid "" -"Scores are weighted calculations. Items ranked higher are given a greater " -"score than items that are ranked lower. The total score for each item is the " -"sum of the weighted scores." +#: includes/fields/class-gf-field-address.php:686 +#: includes/fields/class-gf-field-address.php:745 +msgid "Armed Forces Europe" msgstr "" -#: ../includes/addon/class-gf-results.php:346 -#: ../includes/addon/class-gf-results.php:618 -msgid "Aggregate Rank" +#: includes/fields/class-gf-field-address.php:686 +#: includes/fields/class-gf-field-address.php:746 +msgid "Armed Forces Pacific" msgstr "" -#: ../includes/addon/class-gf-results.php:346 -msgid "" -"The aggregate rank is the overall rank for all entries based on the weighted " -"scores for each item." +#: includes/fields/class-gf-field-address.php:756 +msgid "Alberta" msgstr "" -#: ../includes/addon/class-gf-results.php:347 -msgid "" -"Date Range is optional, if no date range is specified it will be ignored." +#: includes/fields/class-gf-field-address.php:756 +msgid "British Columbia" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Manitoba" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "New Brunswick" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Newfoundland & Labrador" msgstr "" -#: ../includes/addon/class-gf-results.php:348 +#: includes/fields/class-gf-field-address.php:756 +msgid "Northwest Territories" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Nova Scotia" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Nunavut" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Ontario" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Prince Edward Island" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Quebec" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Saskatchewan" +msgstr "" + +#: includes/fields/class-gf-field-address.php:756 +msgid "Yukon" +msgstr "" + +#: includes/fields/class-gf-field-calculation.php:35 +#: includes/fields/class-gf-field-hiddenproduct.php:31 +#: includes/fields/class-gf-field-number.php:78 +#: includes/fields/class-gf-field-singleproduct.php:37 +msgid "Please enter a valid quantity" +msgstr "" + +#: includes/fields/class-gf-field-calculation.php:66 +#: includes/fields/class-gf-field-singleproduct.php:71 +msgid "Quantity:" +msgstr "" + +#: includes/fields/class-gf-field-calculation.php:98 +#: includes/fields/class-gf-field-singleproduct.php:103 +msgid "Qty: " +msgstr "" + +#: includes/fields/class-gf-field-calculation.php:98 +#: includes/fields/class-gf-field-singleproduct.php:103 +msgid "Price: " +msgstr "" + +#: includes/fields/class-gf-field-captcha.php:13 +msgid "CAPTCHA" +msgstr "" + +#: includes/fields/class-gf-field-captcha.php:42 +#: includes/fields/class-gf-field-captcha.php:79 +msgid "The CAPTCHA wasn't entered correctly. Go back and try it again." +msgstr "" + +#: includes/fields/class-gf-field-captcha.php:102 +msgid "The reCAPTCHA wasn't entered correctly. Go back and try it again." +msgstr "" + +#: includes/fields/class-gf-field-captcha.php:153 +msgid "To use the reCaptcha field you must first do the following:" +msgstr "" + +#: includes/fields/class-gf-field-captcha.php:153 +msgid "Sign up%s for a free reCAPTCHA account" +msgstr "" + +#: includes/fields/class-gf-field-captcha.php:153 +msgid "Enter your reCAPTCHA keys in the %ssettings page%s" +msgstr "" + +#: includes/fields/class-gf-field-checkbox.php:255 +#: includes/fields/class-gf-field-radio.php:145 +msgid "%d of %d items shown. Edit field to view all" +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:13 js.php:620 +msgid "Credit Card" +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:47 +msgid "Please enter your credit card information." +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:53 +msgid "Please enter your card's security code." +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:56 +msgid "Invalid credit card number." +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:59 +msgid "is not supported. Please enter one of the supported credit cards." +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:175 +#: includes/fields/class-gf-field-creditcard.php:238 +msgid "Only digits are allowed" +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:176 js.php:623 +msgid "Card Number" +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:203 js.php:625 js.php:921 +msgid "Expiration Date" +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:236 js.php:627 +msgid "Security Code" +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:258 js.php:629 js.php:925 +msgid "Cardholder Name" +msgstr "" + +#: includes/fields/class-gf-field-creditcard.php:294 +#: includes/fields/class-gf-field-date.php:456 js.php:870 js.php:871 +msgid "Year" +msgstr "" + +#: includes/fields/class-gf-field-date.php:72 +msgid "Please enter a valid date in the format (%s)." +msgstr "" + +#: includes/fields/class-gf-field-date.php:72 +msgid "Please enter a valid date." +msgstr "" + +#: includes/fields/class-gf-field-date.php:133 +#: includes/fields/class-gf-field-time.php:135 js.php:861 js.php:885 +msgid "MM" +msgstr "" + +#: includes/fields/class-gf-field-date.php:134 js.php:862 +msgid "DD" +msgstr "" + +#: includes/fields/class-gf-field-date.php:135 js.php:863 +msgid "YYYY" +msgstr "" + +#: includes/fields/class-gf-field-donation.php:45 +#: includes/fields/class-gf-field-price.php:37 +msgid "Please enter a valid amount." +msgstr "" + +#: includes/fields/class-gf-field-email.php:50 +msgid "Your emails do not match." +msgstr "" + +#: includes/fields/class-gf-field-email.php:87 js.php:899 notification.php:605 +msgid "Enter Email" +msgstr "" + +#: includes/fields/class-gf-field-email.php:89 js.php:900 +msgid "Confirm Email" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:48 +#: includes/fields/class-gf-field-fileupload.php:58 includes/upload.php:101 +msgid "File exceeds size limit. Maximum file size: %dMB" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:51 +msgid "There was an error while uploading the file. Error code: %d" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:71 includes/upload.php:106 +msgid "The uploaded file type is not allowed." +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:74 includes/upload.php:109 +msgid "The uploaded file type is not allowed. Must be one of the following: %s" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:140 +#: includes/fields/class-gf-field-fileupload.php:159 +msgid "Allowed Files" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:171 +msgid "Drop files here or" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:172 +msgid "Select files" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:211 +msgid "Download file" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:212 +msgid "Delete file" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:361 +msgid "%d files" +msgstr "" + +#: includes/fields/class-gf-field-fileupload.php:373 +#: includes/fields/class-gf-field-fileupload.php:390 +#: includes/fields/class-gf-field-post-image.php:106 +#: includes/fields/class-gf-field-post-image.php:130 +msgid "Click to view" +msgstr "" + +#: includes/fields/class-gf-field-html.php:12 +msgid "HTML" +msgstr "" + +#: includes/fields/class-gf-field-html.php:31 +msgid "HTML Content" +msgstr "" + +#: includes/fields/class-gf-field-html.php:32 msgid "" -"Narrow the results by adding filters. Note that some field types support " -"more options than others." +"This is a content placeholder. HTML content is not displayed in the form " +"admin. Preview this form to view the content." +msgstr "" + +#: includes/fields/class-gf-field-list.php:128 +msgid "Add another row" +msgstr "" + +#: includes/fields/class-gf-field-list.php:128 +msgid "Add a row" +msgstr "" + +#: includes/fields/class-gf-field-list.php:129 +msgid "Remove this row" +msgstr "" + +#: includes/fields/class-gf-field-multiselect.php:55 +msgid "Click to select..." +msgstr "" + +#: includes/fields/class-gf-field-name.php:23 +msgid "This field is required. Please enter the first and last name." +msgstr "" + +#: includes/fields/class-gf-field-name.php:105 js.php:836 +msgid "Prefix" +msgstr "" + +#: includes/fields/class-gf-field-name.php:106 +#: includes/fields/class-gf-field-name.php:227 js.php:840 +msgid "First" +msgstr "" + +#: includes/fields/class-gf-field-name.php:107 js.php:841 +msgid "Middle" +msgstr "" + +#: includes/fields/class-gf-field-name.php:108 +#: includes/fields/class-gf-field-name.php:228 js.php:844 +msgid "Last" msgstr "" -#: ../includes/addon/class-gf-results.php:364 -msgid "No results." +#: includes/fields/class-gf-field-name.php:109 js.php:845 +msgid "Suffix" msgstr "" -#: ../includes/addon/class-gf-results.php:386 -msgid "" -"There was an error while processing the entries. Please contact support." +#: includes/fields/class-gf-field-number.php:75 +msgid "Please enter a valid quantity. Quantity cannot contain decimals." msgstr "" -#: ../includes/addon/class-gf-results.php:400 -#, php-format -msgid "Entries processed: %1$d of %2$d" +#: includes/fields/class-gf-field-number.php:112 +msgid "Please enter a value between %s and %s." msgstr "" -#: ../includes/addon/class-gf-results.php:418 -msgid "No results" +#: includes/fields/class-gf-field-number.php:114 +msgid "Please enter a value greater than or equal to %s." msgstr "" -#: ../includes/addon/class-gf-results.php:470 -#: ../includes/addon/class-gf-results.php:484 -msgid "No entries for this field" +#: includes/fields/class-gf-field-number.php:116 +msgid "Please enter a value less than or equal to %s." msgstr "" -#: ../includes/addon/class-gf-results.php:491 -msgid "Choice" +#: includes/fields/class-gf-field-number.php:118 +msgid "Please enter a valid number" msgstr "" -#: ../includes/addon/class-gf-results.php:491 -#: ../includes/addon/class-gf-results.php:520 -msgid "Frequency" +#: includes/fields/class-gf-field-option.php:29 js.php:766 +msgid "Option" msgstr "" -#: ../includes/addon/class-gf-results.php:601 -msgid "Average score: " +#: includes/fields/class-gf-field-page.php:27 +msgid "end of page" msgstr "" -#: ../includes/addon/class-gf-results.php:612 -msgid "Item" +#: includes/fields/class-gf-field-page.php:27 +msgid "PAGE BREAK" msgstr "" -#: ../includes/addon/class-gf-results.php:646 -msgid "Latest values:" +#: includes/fields/class-gf-field-page.php:27 +msgid "top of new page" msgstr "" -#: ../includes/api.php:105 -#, php-format -msgid "Form with id: %s not found" +#: includes/fields/class-gf-field-password.php:14 js.php:674 +msgid "Password" msgstr "" -#: ../includes/api.php:149 ../includes/api.php:274 -msgid "Invalid form object" +#: includes/fields/class-gf-field-password.php:48 +msgid "Your passwords do not match." msgstr "" -#: ../includes/api.php:165 ../includes/webapi/webapi.php:679 -msgid "Missing form id" +#: includes/fields/class-gf-field-password.php:55 +msgid "" +"Your password does not meet the required strength.
    Hint: To make it " +"stronger, use upper and lower case letters, numbers and symbols like ! \" ? " +"$ % ^ & )." msgstr "" -#: ../includes/api.php:169 -msgid "Error updating form" +#: includes/fields/class-gf-field-password.php:106 js.php:909 +msgid "Enter Password" msgstr "" -#: ../includes/api.php:175 -msgid "Error updating title" +#: includes/fields/class-gf-field-password.php:109 js.php:910 +msgid "Confirm Password" msgstr "" -#: ../includes/api.php:247 -msgid "Invalid form objects" +#: includes/fields/class-gf-field-phone.php:64 js.php:1195 +msgid "Phone format:" msgstr "" -#: ../includes/api.php:277 -msgid "The form title is missing" +#: includes/fields/class-gf-field-post-content.php:12 +msgid "Body" msgstr "" -#: ../includes/api.php:311 -msgid "There was a problem while inserting the form" +#: includes/fields/class-gf-field-post-custom-field.php:12 +msgid "Custom Field" msgstr "" -#: ../includes/api.php:441 -#, php-format -msgid "Entry with id %s not found" +#: includes/fields/class-gf-field-post-excerpt.php:12 +msgid "Excerpt" msgstr "" -#: ../includes/api.php:514 -msgid "Missing entry id" +#: includes/fields/class-gf-field-post-image.php:13 js.php:711 +msgid "Post Image" msgstr "" -#: ../includes/api.php:519 -msgid "Entry not found" +#: includes/fields/class-gf-field-post-image.php:64 +msgid "delete" msgstr "" -#: ../includes/api.php:531 ../includes/api.php:684 -msgid "The form for this entry does not exist" +#: includes/fields/class-gf-field-post-image.php:68 js.php:679 +msgid "File" msgstr "" -#: ../includes/api.php:586 -msgid "There was a problem while updating the entry properties" +#: includes/fields/class-gf-field-post-tags.php:12 +msgid "Tags" msgstr "" -#: ../includes/api.php:606 -msgid "" -"There was a problem while updating one of the input values for the entry" +#: includes/fields/class-gf-field-quantity.php:29 js.php:737 js.php:807 +msgid "Quantity" msgstr "" -#: ../includes/api.php:616 ../includes/api.php:648 -msgid "There was a problem while updating the field values" +#: includes/fields/class-gf-field-section.php:12 +msgid "Section" msgstr "" -#: ../includes/api.php:674 -msgid "The entry object must be an array" +#: includes/fields/class-gf-field-shipping.php:26 js.php:749 +msgid "Shipping" msgstr "" -#: ../includes/api.php:680 -msgid "The form id must be specified" +#: includes/fields/class-gf-field-text.php:13 +msgid "Single Line Text" msgstr "" -#: ../includes/api.php:719 -msgid "There was a problem while inserting the entry properties" +#: includes/fields/class-gf-field-time.php:60 +msgid "Please enter a valid time." msgstr "" -#: ../includes/api.php:737 -msgid "" -"There was a problem while inserting one of the input values for the entry" +#: includes/fields/class-gf-field-time.php:115 +msgid "AM" msgstr "" -#: ../includes/api.php:745 -msgid "There was a problem while inserting the field values" +#: includes/fields/class-gf-field-time.php:116 +msgid "PM" msgstr "" -#: ../includes/api.php:776 -#, php-format -msgid "Invalid entry id: %s" +#: includes/fields/class-gf-field-time.php:134 js.php:884 +msgid "HH" msgstr "" -#: ../includes/api.php:840 -msgid "Feed not found" +#: includes/fields/class-gf-field-website.php:50 +msgid "Please enter a valid Website URL (i.e. http://www.gravityforms.com)." msgstr "" -#: ../includes/api.php:870 -#, php-format -msgid "There was an an error while deleting feed id %s" +#: includes/fields/class-gf-field.php:222 +msgid "click to duplicate this field" msgstr "" -#: ../includes/api.php:873 ../includes/api.php:894 -#, php-format -msgid "Feed id %s not found" +#: includes/fields/class-gf-field.php:225 +msgid "click to delete this field" msgstr "" -#: ../includes/api.php:891 -#, php-format -msgid "There was an an error while updating feed id %s" +#: includes/fields/class-gf-field.php:233 +msgid "Field ID" msgstr "" -#: ../includes/api.php:922 -msgid "There was an an error while inserting a feed" +#: includes/fields/class-gf-field.php:233 +msgid "click to expand and edit the options for this field" msgstr "" -#: ../includes/locking/class-gf-locking.php:196 -#, php-format +#: includes/locking/class-gf-locking.php:196 msgid "" "This page is currently locked. Click on the \"Request Control\" button to " "let %s know you'd like to take over." msgstr "" -#: ../includes/locking/class-gf-locking.php:197 +#: includes/locking/class-gf-locking.php:197 msgid "Accept" msgstr "" -#: ../includes/locking/class-gf-locking.php:199 -#, php-format +#: includes/locking/class-gf-locking.php:199 msgid "%s is currently editing" msgstr "" -#: ../includes/locking/class-gf-locking.php:200 -#, php-format +#: includes/locking/class-gf-locking.php:200 msgid "%s has taken over and is currently editing." msgstr "" -#: ../includes/locking/class-gf-locking.php:201 -#, php-format +#: includes/locking/class-gf-locking.php:201 msgid "%s has requested permission to take over control." msgstr "" -#: ../includes/locking/class-gf-locking.php:202 -#: ../includes/locking/class-gf-locking.php:275 +#: includes/locking/class-gf-locking.php:202 +#: includes/locking/class-gf-locking.php:282 msgid "You now have control" msgstr "" -#: ../includes/locking/class-gf-locking.php:203 +#: includes/locking/class-gf-locking.php:203 msgid "Pending" msgstr "" -#: ../includes/locking/class-gf-locking.php:204 +#: includes/locking/class-gf-locking.php:204 msgid "No response" msgstr "" -#: ../includes/locking/class-gf-locking.php:205 +#: includes/locking/class-gf-locking.php:205 msgid "Request again" msgstr "" -#: ../includes/locking/class-gf-locking.php:206 -msgid "Error" -msgstr "" - -#: ../includes/locking/class-gf-locking.php:207 +#: includes/locking/class-gf-locking.php:207 msgid "Your request was rejected" msgstr "" -#: ../includes/locking/class-gf-locking.php:280 -#, php-format +#: includes/locking/class-gf-locking.php:287 msgid "Your request has been sent to %s." msgstr "" -#: ../includes/locking/class-gf-locking.php:475 +#: includes/locking/class-gf-locking.php:487 msgid "Take Over" msgstr "" -#: ../includes/locking/class-gf-locking.php:476 +#: includes/locking/class-gf-locking.php:488 msgid "Request Control" msgstr "" -#: ../includes/locking/class-gf-locking.php:493 +#: includes/locking/class-gf-locking.php:505 msgid "Reject Request" msgstr "" -#: ../includes/locking/locking.php:20 -#, php-format +#: includes/locking/locking.php:20 msgid "" "This form is currently locked. Click on the \"Request Control\" button to " "let %s know you'd like to take over." msgstr "" -#: ../includes/locking/locking.php:24 -#, php-format +#: includes/locking/locking.php:24 msgid "%s has requested permission to take over control of this form." msgstr "" -#: ../includes/locking/locking.php:59 -#, php-format +#: includes/locking/locking.php:59 msgid "" "This entry is currently locked. Click on the \"Request Control\" button to " "let %s know you'd like to take over." msgstr "" -#: ../includes/locking/locking.php:62 -#, php-format +#: includes/locking/locking.php:62 msgid "%s has requested permission to take over control of this entry." msgstr "" -#: ../includes/locking/locking.php:102 -#, php-format +#: includes/locking/locking.php:103 msgid "" "These form settings are currently locked. Click on the \"Request Control\" " "button to let %s know you'd like to take over." msgstr "" -#: ../includes/locking/locking.php:105 ../includes/locking/locking.php:142 -#, php-format +#: includes/locking/locking.php:106 includes/locking/locking.php:146 msgid "%s has requested permission to take over control of these settings." msgstr "" -#: ../includes/locking/locking.php:139 -#, php-format +#: includes/locking/locking.php:143 msgid "" -"These settings are currently locked. Click on the \"Request Control\" button " -"to let %s know you'd like to take over." +"These settings are currently locked. Click on the \"Request Control\" " +"button to let %s know you'd like to take over." +msgstr "" + +#: includes/templates/edit-shortcode-form.tpl.php:5 +msgid "Insert A Form" +msgstr "" + +#: includes/templates/edit-shortcode-form.tpl.php:14 +msgid "Advanced Options" +msgstr "" + +#: includes/templates/edit-shortcode-form.tpl.php:21 +msgid "Insert Form" msgstr "" -#: ../includes/upload.php:32 +#: includes/upload.php:37 includes/upload.php:53 msgid "Failed to upload file." msgstr "" -#: ../includes/upload.php:102 +#: includes/upload.php:133 msgid "Failed to open temp directory." msgstr "" -#: ../includes/upload.php:126 ../includes/upload.php:151 +#: includes/upload.php:160 includes/upload.php:184 msgid "Failed to open input stream." msgstr "" -#: ../includes/upload.php:133 ../includes/upload.php:157 +#: includes/upload.php:167 includes/upload.php:190 msgid "Failed to open output stream." msgstr "" -#: ../includes/upload.php:137 +#: includes/upload.php:170 msgid "Failed to move uploaded file." msgstr "" -#: ../includes/upload.php:172 +#: includes/upload.php:204 msgid "Upload unsuccessful:" msgstr "" -#: ../includes/webapi/webapi.php:89 ../includes/webapi/webapi.php:150 +#: includes/webapi/webapi.php:146 msgid "Gravity Forms API Settings" msgstr "" -#: ../includes/webapi/webapi.php:167 ../includes/webapi/webapi.php:182 +#: includes/webapi/webapi.php:163 includes/webapi/webapi.php:178 msgid "" "The Gravity Forms API allows developers to interact with this install via a " "JSON REST API." msgstr "" -#: ../includes/webapi/webapi.php:171 +#: includes/webapi/webapi.php:167 msgid "Requirements check" msgstr "" -#: ../includes/webapi/webapi.php:186 +#: includes/webapi/webapi.php:182 msgid "Enable access to the API" msgstr "" -#: ../includes/webapi/webapi.php:195 +#: includes/webapi/webapi.php:191 msgid "Public API Key" msgstr "" -#: ../includes/webapi/webapi.php:203 +#: includes/webapi/webapi.php:199 msgid "Private API Key" msgstr "" -#: ../includes/webapi/webapi.php:211 +#: includes/webapi/webapi.php:207 msgid "QR Code" msgstr "" -#: ../includes/webapi/webapi.php:217 +#: includes/webapi/webapi.php:213 msgid "Impersonate account" msgstr "" -#: ../includes/webapi/webapi.php:223 +#: includes/webapi/webapi.php:219 msgid "Developer tools" msgstr "" -#: ../includes/webapi/webapi.php:240 +#: includes/webapi/webapi.php:236 msgid "Show/hide QR Code" msgstr "" -#: ../includes/webapi/webapi.php:256 +#: includes/webapi/webapi.php:252 msgid "Open developer tools" msgstr "" -#: ../includes/webapi/webapi.php:632 -#, php-format +#: includes/webapi/webapi.php:644 msgid "Feeds deleted successfully: %d" msgstr "" -#: ../includes/webapi/webapi.php:663 -#, php-format +#: includes/webapi/webapi.php:676 msgid "Feeds updated: %d" msgstr "" -#: ../includes/webapi/webapi.php:723 -#, php-format +#: includes/webapi/webapi.php:738 msgid "Forms deleted successfully: %d" msgstr "" -#: ../includes/webapi/webapi.php:758 +#: includes/webapi/webapi.php:773 msgid "Entries updated successfully" msgstr "" -#: ../includes/webapi/webapi.php:758 +#: includes/webapi/webapi.php:773 msgid "Entry updated successfully" msgstr "" -#: ../includes/webapi/webapi.php:779 ../includes/webapi/webapi.php:802 +#: includes/webapi/webapi.php:794 includes/webapi/webapi.php:817 msgid "Success" msgstr "" -#: ../includes/webapi/webapi.php:808 +#: includes/webapi/webapi.php:822 msgid "No property values were found in the request body" msgstr "" -#: ../includes/webapi/webapi.php:810 +#: includes/webapi/webapi.php:824 msgid "Property values should be sent as an array" msgstr "" -#: ../includes/webapi/webapi.php:849 +#: includes/webapi/webapi.php:864 msgid "Forms updated successfully" msgstr "" -#: ../includes/webapi/webapi.php:849 +#: includes/webapi/webapi.php:864 msgid "Form updated successfully" msgstr "" -#: ../includes/webapi/webapi.php:877 -#, php-format +#: includes/webapi/webapi.php:893 msgid "Entries deleted successfully: %d" msgstr "" -#: ../includes/webapi/webapi.php:1425 +#: includes/webapi/webapi.php:1460 msgid "Not authorized" msgstr "" -#: ../includes/webapi/webapi.php:1429 +#: includes/webapi/webapi.php:1464 msgid "Permission denied" msgstr "" -#: ../includes/webapi/webapi.php:1433 +#: includes/webapi/webapi.php:1468 msgid "Bad request" msgstr "" -#: ../includes/webapi/webapi.php:1437 +#: includes/webapi/webapi.php:1472 msgid "Not found" msgstr "" -#: ../includes/webapi/webapi.php:1441 +#: includes/webapi/webapi.php:1476 msgid "Not implemented" msgstr "" -#: ../includes/webapi/webapi.php:1445 +#: includes/webapi/webapi.php:1480 msgid "Internal Error" msgstr "" -#: ../js.php:12 +#: js.php:12 msgid "Delete this custom choice list? 'OK' to delete, 'Cancel' to abort." msgstr "" -#: ../js.php:26 +#: js.php:26 msgid "Item has been deleted." msgstr "" -#: ../js.php:33 +#: js.php:33 msgid "Please enter name." msgstr "" -#: ../js.php:37 +#: js.php:37 msgid "This custom choice name is already in use. Please enter another name." msgstr "" -#: ../js.php:56 +#: js.php:56 msgid "Item has been saved." msgstr "" -#: ../js.php:67 ../js.php:229 +#: js.php:67 js.php:379 msgid "" "To use conditional logic, please create a field that supports conditional " "logic." msgstr "" -#: ../js.php:119 +#: js.php:119 msgid "Completed" msgstr "" -#: ../js.php:152 +#: js.php:152 msgid "Select a category" msgstr "" -#: ../js.php:165 +#: js.php:165 msgid "Parameter Name:" msgstr "" -#: ../js.php:194 +#: js.php:169 +msgid "Parameter Name" +msgstr "" + +#: js.php:185 +msgid "Default Value:" +msgstr "" + +#: js.php:209 +msgid "Placeholder:" +msgstr "" + +#: js.php:239 +msgid "Sub-Label:" +msgstr "" + +#: js.php:247 +msgid "Custom Sub-Label" +msgstr "" + +#: js.php:289 +msgid "Same as previous" +msgstr "" + +#: js.php:344 msgid "" "This field is not associated with a product. Please add a Product Field to " "the form." msgstr "" -#: ../js.php:212 +#: js.php:362 msgid "Deleted Field" msgstr "" -#: ../js.php:250 +#: js.php:400 msgid "Column 1" msgstr "" -#: ../js.php:250 +#: js.php:400 msgid "Column 2" msgstr "" -#: ../js.php:250 +#: js.php:400 msgid "Column 3" msgstr "" -#: ../js.php:266 +#: js.php:415 msgid "" -"The form title you have entered is already taken. Please enter a unique form " -"title" +"The form title you have entered is already taken. Please enter a unique " +"form title" msgstr "" -#: ../js.php:272 +#: js.php:421 msgid "" "Please enter a Title for this form. When adding the form to a page or post, " "you will have the option to hide the title." msgstr "" -#: ../js.php:283 +#: js.php:432 msgid "" "Your form currently has one ore more pages without any fields in it. Blank " "pages are a result of Page Breaks that are positioned as the first or last " @@ -7445,955 +7761,999 @@ msgid "" "Breaks and try again." msgstr "" -#: ../js.php:291 +#: js.php:440 msgid "" -"Your form currently has a product field with a blank label. \\nPlease enter " -"a label for all product fields." +"Your form currently has a product field with a blank label. \\n" +"Please enter a label for all product fields." msgstr "" -#: ../js.php:300 +#: js.php:449 msgid "" -"Your form currently has an option field without a product field.\\nYou must " -"add a product field to your form." +"Your form currently has an option field without a product field.\\n" +"You must add a product field to your form." msgstr "" -#: ../js.php:343 +#: js.php:493 msgid "Ajax error while saving form" msgstr "" -#: ../js.php:352 +#: js.php:503 msgid "" -"Warning! Deleting this field will also delete all entry data associated with " -"it. \\'Cancel\\' to stop. \\'OK\\' to delete" +"Warning! Deleting this field will also delete all entry data associated " +"with it. \\'Cancel\\' to stop. \\'OK\\' to delete" +msgstr "" + +#: js.php:536 +msgid "Section Break" msgstr "" -#: ../js.php:399 +#: js.php:552 msgid "HTML Block" msgstr "" -#: ../js.php:433 ../js.php:446 ../js.php:458 ../js.php:678 +#: js.php:577 js.php:590 js.php:602 js.php:826 msgid "Untitled" msgstr "" -#: ../js.php:436 ../js.php:450 ../js.php:451 ../js.php:462 ../js.php:463 +#: js.php:580 js.php:594 js.php:595 js.php:606 js.php:607 msgid "First Choice" msgstr "" -#: ../js.php:436 ../js.php:450 ../js.php:451 ../js.php:462 ../js.php:463 +#: js.php:580 js.php:594 js.php:595 js.php:606 js.php:607 msgid "Second Choice" msgstr "" -#: ../js.php:436 ../js.php:450 ../js.php:451 ../js.php:462 ../js.php:463 +#: js.php:580 js.php:594 js.php:595 js.php:606 js.php:607 msgid "Third Choice" msgstr "" -#: ../js.php:471 +#: js.php:615 msgid "State / Province" msgstr "" -#: ../js.php:481 -msgid "Card Type" +#: js.php:624 js.php:920 +msgid "Expiration Month" +msgstr "" + +#: js.php:626 js.php:922 +msgid "Expiration Year" msgstr "" -#: ../js.php:482 -msgid "Cardholder\\'s Name" +#: js.php:628 +msgid "Card Type" msgstr "" -#: ../js.php:536 +#: js.php:684 msgid "Hidden Field" msgstr "" -#: ../js.php:540 +#: js.php:688 msgid "Post Title" msgstr "" -#: ../js.php:544 +#: js.php:692 msgid "Post Body" msgstr "" -#: ../js.php:548 +#: js.php:696 msgid "Post Excerpt" msgstr "" -#: ../js.php:553 +#: js.php:701 msgid "Post Tags" msgstr "" -#: ../js.php:560 +#: js.php:708 msgid "Post Custom Field" msgstr "" -#: ../js.php:563 -msgid "Post Image" -msgstr "" - -#: ../js.php:571 +#: js.php:719 msgid "Captcha" msgstr "" -#: ../js.php:579 +#: js.php:727 msgid "Product Name" msgstr "" -#: ../js.php:624 +#: js.php:772 msgid "First Option" msgstr "" -#: ../js.php:624 +#: js.php:772 msgid "Second Option" msgstr "" -#: ../js.php:624 +#: js.php:772 msgid "Third Option" msgstr "" -#: ../js.php:635 +#: js.php:783 msgid "Donation" msgstr "" -#: ../js.php:709 -msgid "Only one reCAPTCHA field can be added to the form." +#: js.php:886 +msgid "AM/PM" +msgstr "" + +#: js.php:932 +msgid "Mr." +msgstr "" + +#: js.php:932 +msgid "Mrs." msgstr "" -#: ../js.php:720 +#: js.php:932 +msgid "Miss" +msgstr "" + +#: js.php:932 +msgid "Ms." +msgstr "" + +#: js.php:932 +msgid "Dr." +msgstr "" + +#: js.php:932 +msgid "Prof." +msgstr "" + +#: js.php:932 +msgid "Rev." +msgstr "" + +#: js.php:957 +msgid "Only one reCAPTCHA field can be added to the form" +msgstr "" + +#: js.php:964 msgid "Only one Shipping field can be added to the form" msgstr "" -#: ../js.php:727 +#: js.php:971 msgid "Only one Post Content field can be added to the form" msgstr "" -#: ../js.php:733 +#: js.php:977 msgid "Only one Post Title field can be added to the form" msgstr "" -#: ../js.php:739 +#: js.php:983 msgid "Only one Post Excerpt field can be added to the form" msgstr "" -#: ../js.php:745 +#: js.php:989 msgid "Only one credit card field can be added to the form" msgstr "" -#: ../js.php:752 +#: js.php:996 msgid "You must add a product field to the form first" msgstr "" -#: ../js.php:779 +#: js.php:1030 msgid "Ajax error while adding field" msgstr "" -#: ../js.php:805 -msgid "Ajax error while duplicating field" -msgstr "" - -#: ../js.php:829 +#: js.php:1100 msgid "Ajax error while changing input type" msgstr "" -#: ../js.php:900 +#: js.php:1204 msgid "Select a field" msgstr "" -#: ../js.php:900 -msgid "User IP Address" -msgstr "" - -#: ../notification.php:100 -#, php-format +#: notification.php:109 msgid "Notification saved successfully. %sBack to notifications.%s" msgstr "" -#: ../notification.php:103 +#: notification.php:111 msgid "" "Notification could not be updated. Please enter all required information " "below." msgstr "" -#: ../notification.php:169 ../notification.php:656 +#: notification.php:190 notification.php:707 msgid "Send to" msgstr "" -#: ../notification.php:170 ../notification.php:657 +#: notification.php:191 notification.php:709 msgid "if" msgstr "" -#: ../notification.php:317 ../notification.php:946 +#: notification.php:337 notification.php:1023 msgid "Enter value" msgstr "" -#: ../notification.php:381 +#: notification.php:409 msgid "Save Notification" msgstr "" -#: ../notification.php:381 +#: notification.php:409 msgid "Update Notification" msgstr "" -#: ../notification.php:427 +#: notification.php:458 msgid "Ajax error while updating notification" msgstr "" -#: ../notification.php:465 +#: notification.php:498 msgid "Notification deleted." msgstr "" -#: ../notification.php:467 +#: notification.php:500 msgid "There was an issue deleting this notification." msgstr "" -#: ../notification.php:473 +#: notification.php:506 msgid "Notification duplicates." msgstr "" -#: ../notification.php:475 +#: notification.php:508 msgid "There was an issue duplicating this notification." msgstr "" -#: ../notification.php:520 +#: notification.php:554 msgid "Form is submitted" msgstr "" -#: ../notification.php:526 +#: notification.php:556 +msgid "Form is saved" +msgstr "" + +#: notification.php:557 +msgid "Save and continue email is requested" +msgstr "" + +#: notification.php:565 msgid "Event" msgstr "" -#: ../notification.php:569 +#: notification.php:610 msgid "Select a Field" msgstr "" -#: ../notification.php:574 +#: notification.php:615 msgid "Configure Routing" msgstr "" -#: ../notification.php:583 +#: notification.php:630 msgid "Send to Email" msgstr "" -#: ../notification.php:591 +#: notification.php:638 msgid "Please enter a valid email address" msgstr "" -#: ../notification.php:601 +#: notification.php:649 msgid "Send to Field" msgstr "" -#: ../notification.php:607 +#: notification.php:655 msgid "Select an email field" msgstr "" -#: ../notification.php:620 +#: notification.php:669 msgid "" "Your form does not have an email field. Add an email field to your form and " "try again." msgstr "" -#: ../notification.php:638 +#: notification.php:689 msgid "" "To use notification routing, your form must have a field supported by " "conditional logic." msgstr "" -#: ../notification.php:679 -msgid "" -"Please enter a valid email address for all highlighted routing rules above." +#: notification.php:733 +msgid "Please enter a valid email address for all highlighted routing rules above." msgstr "" -#: ../notification.php:694 ../tooltips.php:25 +#: notification.php:749 tooltips.php:25 msgid "From Name" msgstr "" -#: ../notification.php:707 +#: notification.php:763 msgid "From Email" msgstr "" -#: ../notification.php:720 ../tooltips.php:26 +#: notification.php:777 tooltips.php:26 msgid "Reply To" msgstr "" -#: ../notification.php:733 +#: notification.php:791 msgid "BCC" msgstr "" -#: ../notification.php:750 ../notification.php:1034 +#: notification.php:809 notification.php:1123 msgid "Subject" msgstr "" -#: ../notification.php:757 +#: notification.php:817 msgid "Please enter a subject for the notification email" msgstr "" -#: ../notification.php:787 +#: notification.php:849 msgid "Please enter a message for the notification email" msgstr "" -#: ../notification.php:797 +#: notification.php:860 msgid "Auto-formatting" msgstr "" -#: ../notification.php:804 +#: notification.php:867 msgid "Disable auto-formatting" msgstr "" -#: ../notification.php:819 +#: notification.php:885 msgid "Enable conditional logic" msgstr "" -#: ../notification.php:1103 +#: notification.php:1193 msgid "Duplicate this notification" msgstr "" -#: ../notification.php:1104 +#: notification.php:1194 msgid "Delete this notification" msgstr "" -#: ../notification.php:1104 +#: notification.php:1194 msgid "WARNING: You are about to delete this notification." msgstr "" -#: ../notification.php:1137 -#, php-format +#: notification.php:1229 msgid "This form doesn't have any notifications. Let's go %screate one%s." msgstr "" -#: ../preview.php:21 +#: preview.php:21 msgid "You don't have adequate permission to preview forms." msgstr "" -#: ../preview.php:29 ../preview.php:62 +#: preview.php:30 preview.php:64 msgid "Form Preview" msgstr "" -#: ../preview.php:62 ../print-entry.php:102 +#: preview.php:64 print-entry.php:107 msgid "close window" msgstr "" -#: ../preview.php:64 +#: preview.php:67 msgid "" "Note: This is a simple form preview. This form may display differently when " "added to your page based on inheritance from individual theme styles." msgstr "" -#: ../print-entry.php:21 +#: print-entry.php:21 msgid "You don't have adequate permission to view entries." msgstr "" -#: ../print-entry.php:68 +#: print-entry.php:71 msgid "Form Id and Lead Id are required parameters." msgstr "" -#: ../print-entry.php:102 +#: print-entry.php:107 msgid "Print Preview" msgstr "" -#: ../select_columns.php:24 +#: select_columns.php:24 msgid "Oops! We could not locate your form. Please try again." msgstr "" -#: ../select_columns.php:104 +#: select_columns.php:177 msgid "" "Drag & drop to order and select which columns are displayed in the entries " "table." msgstr "" -#: ../select_columns.php:107 +#: select_columns.php:180 msgid "Active Columns" msgstr "" -#: ../select_columns.php:122 +#: select_columns.php:195 msgid "Inactive Columns" msgstr "" -#: ../settings.php:51 ../settings.php:90 ../settings.php:97 +#: settings.php:59 settings.php:101 settings.php:113 msgid "Uninstall Gravity Forms" msgstr "" -#: ../settings.php:55 +#: settings.php:63 msgid "You don't have adequate permission to uninstall Gravity Forms." msgstr "" -#: ../settings.php:82 -#, php-format +#: settings.php:93 msgid "" "Gravity Forms have been successfully uninstalled. It can be re-activated " "from the %splugins page%s." msgstr "" -#: ../settings.php:94 +#: settings.php:109 msgid "This operation deletes ALL Gravity Forms data." msgstr "" -#: ../settings.php:94 +#: settings.php:109 msgid "" "If you continue, You will not be able to retrieve or restore your forms or " "entries." msgstr "" -#: ../settings.php:97 +#: settings.php:113 msgid "" "Warning! ALL Gravity Forms data, including form entries will be deleted. " "This cannot be undone. \\'OK\\' to delete, \\'Cancel\\' to stop" msgstr "" -#: ../settings.php:124 +#: settings.php:141 msgid "You don't have adequate permission to edit settings." msgstr "" -#: ../settings.php:145 +#: settings.php:165 msgid "Settings Updated" msgstr "" -#: ../settings.php:152 ../settings.php:156 +#: settings.php:173 settings.php:177 msgid "General Settings" msgstr "" -#: ../settings.php:159 +#: settings.php:181 msgid "Support License Key" msgstr "" -#: ../settings.php:165 +#: settings.php:188 msgid "" "There was an error while validating your license key. Gravity Forms will " "continue to work, but automatic upgrades will not be available. Please " "contact support to resolve this issue." msgstr "" -#: ../settings.php:167 +#: settings.php:190 msgid "Valid Key : Your license key has been successfully validated." msgstr "" -#: ../settings.php:169 +#: settings.php:192 msgid "" -"Invalid or Expired Key : Please make sure you have entered the correct value " -"and that your key is not expired." +"Invalid or Expired Key : Please make sure you have entered the correct " +"value and that your key is not expired." msgstr "" -#: ../settings.php:174 +#: settings.php:198 msgid "The license key is used for access to automatic upgrades and support." msgstr "" -#: ../settings.php:178 ../tooltips.php:135 +#: settings.php:203 tooltips.php:150 msgid "Output CSS" msgstr "" -#: ../settings.php:180 ../settings.php:188 ../settings.php:211 +#: settings.php:206 settings.php:217 settings.php:246 msgid "Yes" msgstr "" -#: ../settings.php:181 ../settings.php:189 ../settings.php:212 +#: settings.php:207 settings.php:218 settings.php:247 msgid "No" msgstr "" -#: ../settings.php:182 +#: settings.php:209 msgid "" "Set this to No if you would like to disable the plugin from outputting the " "form CSS." msgstr "" -#: ../settings.php:186 ../tooltips.php:136 +#: settings.php:214 tooltips.php:151 msgid "Output HTML5" msgstr "" -#: ../settings.php:190 +#: settings.php:220 msgid "" -"Set this to No if you would like to disable the plugin from outputting HTML5 " -"form fields." +"Set this to No if you would like to disable the plugin from outputting " +"HTML5 form fields." msgstr "" -#: ../settings.php:195 ../tooltips.php:137 +#: settings.php:226 tooltips.php:152 msgid "No-Conflict Mode" msgstr "" -#: ../settings.php:197 +#: settings.php:229 settings.php:285 msgid "On" msgstr "" -#: ../settings.php:198 +#: settings.php:230 settings.php:286 msgid "Off" msgstr "" -#: ../settings.php:199 +#: settings.php:232 msgid "" "Set this to ON to prevent extraneous scripts and styles from being printed " "on Gravity Forms admin pages, reducing conflicts with other plugins and " "themes." msgstr "" -#: ../settings.php:205 ../tooltips.php:141 +#: settings.php:239 tooltips.php:156 msgid "Akismet Integration" msgstr "" -#: ../settings.php:213 ../tooltips.php:141 +#: settings.php:249 tooltips.php:156 msgid "Protect your form entries from spam using Akismet." msgstr "" -#: ../settings.php:226 +#: settings.php:264 msgid "Select a Currency" msgstr "" -#: ../settings.php:245 +#: settings.php:282 +msgid "Background updates" +msgstr "" + +#: settings.php:288 +msgid "" +"Set this to ON to allow Gravity Forms to download and install bug fixes and " +"security updates automatically in the background. Requires a valid license " +"key." +msgstr "" + +#: settings.php:295 msgid "reCAPTCHA Settings" msgstr "" -#: ../settings.php:247 +#: settings.php:297 msgid "" "Gravity Forms integrates with reCAPTCHA, a free CAPTCHA service that helps " "to digitize books while protecting your forms from spam bots. " msgstr "" -#: ../settings.php:247 +#: settings.php:298 msgid "Read more about reCAPTCHA" msgstr "" -#: ../settings.php:253 +#: settings.php:305 msgid "reCAPTCHA Public Key" msgstr "" -#: ../settings.php:256 ../settings.php:263 +#: settings.php:309 settings.php:318 msgid "Required only if you decide to use the reCAPTCHA field." msgstr "" -#: ../settings.php:256 ../settings.php:263 -#, php-format +#: settings.php:309 settings.php:318 msgid "%sSign up%s for a free account to get the key." msgstr "" -#: ../settings.php:260 +#: settings.php:314 msgid "reCAPTCHA Private Key" msgstr "" -#: ../settings.php:272 +#: settings.php:327 msgid "Save Settings" msgstr "" -#: ../settings.php:296 +#: settings.php:351 msgid "Installation Status" msgstr "" -#: ../settings.php:300 +#: settings.php:355 msgid "PHP Version" msgstr "" -#: ../settings.php:314 +#: settings.php:368 msgid "Gravity Forms requires PHP 5 or above." msgstr "" -#: ../settings.php:321 +#: settings.php:375 msgid "MySQL Version" msgstr "" -#: ../settings.php:335 +#: settings.php:388 msgid "Gravity Forms requires MySQL 5 or above." msgstr "" -#: ../settings.php:342 +#: settings.php:395 msgid "WordPress Version" msgstr "" -#: ../settings.php:356 -#, php-format +#: settings.php:408 msgid "" "Gravity Forms requires WordPress v%s or greater. You must upgrade WordPress " "in order to use this version of Gravity Forms." msgstr "" -#: ../settings.php:363 +#: settings.php:415 msgid "Gravity Forms Version" msgstr "" -#: ../settings.php:375 -#, php-format +#: settings.php:426 msgid "" -"New version %s available. Automatic upgrade available on the %splugins page%s" +"New version %s available. Automatic upgrade available on the %splugins " +"page%s" msgstr "" -#: ../tooltips.php:21 +#: tooltips.php:21 msgid "Send To Email Address" msgstr "" -#: ../tooltips.php:21 +#: tooltips.php:21 msgid "Enter the email address you would like the notification email sent to." msgstr "" -#: ../tooltips.php:22 ../tooltips.php:43 +#: tooltips.php:22 tooltips.php:44 msgid "Disable Auto-Formatting" msgstr "" -#: ../tooltips.php:22 +#: tooltips.php:22 msgid "" "When enabled, auto-formatting will insert paragraph breaks automatically. " -"Disable auto-formatting when using HTML to create email notification content." +"Disable auto-formatting when using HTML to create email notification " +"content." msgstr "" -#: ../tooltips.php:23 +#: tooltips.php:23 msgid "Routing" msgstr "" -#: ../tooltips.php:23 +#: tooltips.php:23 msgid "" "Allows notification to be sent to different email addresses depending on " "values selected in the form." msgstr "" -#: ../tooltips.php:24 +#: tooltips.php:24 msgid "From Email Address" msgstr "" -#: ../tooltips.php:24 +#: tooltips.php:24 msgid "" "Enter the email address you would like the notification email sent from, or " "select the email from available email form fields." msgstr "" -#: ../tooltips.php:25 +#: tooltips.php:25 msgid "" "Enter the name you would like the notification email sent from, or select " "the name from available name fields." msgstr "" -#: ../tooltips.php:26 +#: tooltips.php:26 msgid "" "Enter the email address you would like to be used as the reply to address " "for the notification email." msgstr "" -#: ../tooltips.php:27 +#: tooltips.php:27 msgid "Blind Carbon Copy Addresses" msgstr "" -#: ../tooltips.php:27 +#: tooltips.php:27 msgid "" "Enter a comma separated list of email addresses you would like to receive a " "BCC of the notification email." msgstr "" -#: ../tooltips.php:28 +#: tooltips.php:28 msgid "Limit Form Activity" msgstr "" -#: ../tooltips.php:28 +#: tooltips.php:28 msgid "" "Limit the number of entries a form can generate and/or schedule a time " "period the form is active." msgstr "" -#: ../tooltips.php:29 +#: tooltips.php:29 msgid "Limit Number of Entries" msgstr "" -#: ../tooltips.php:29 +#: tooltips.php:29 msgid "" -"Enter a number in the input box below to limit the number of entries allowed " -"for this form. The form will become inactive when that number is reached." +"Enter a number in the input box below to limit the number of entries " +"allowed for this form. The form will become inactive when that number is " +"reached." msgstr "" -#: ../tooltips.php:30 +#: tooltips.php:30 msgid "Schedule Form" msgstr "" -#: ../tooltips.php:30 +#: tooltips.php:30 msgid "Schedule a time period the form is active." msgstr "" -#: ../tooltips.php:31 +#: tooltips.php:31 msgid "Enable Anti-spam honeypot" msgstr "" -#: ../tooltips.php:31 +#: tooltips.php:31 msgid "" "Enables the honeypot spam protection technique, which is an alternative to " "the reCAPTCHA field." msgstr "" -#: ../tooltips.php:32 +#: tooltips.php:32 msgid "Enable Animation" msgstr "" -#: ../tooltips.php:32 +#: tooltips.php:32 msgid "" "Check this option to enable a sliding animation when displaying/hiding " "conditional logic fields." msgstr "" -#: ../tooltips.php:33 +#: tooltips.php:33 msgid "Enter the title of your form." msgstr "" -#: ../tooltips.php:34 -msgid "" -"Enter a description for your form. This may be used for user instructions." +#: tooltips.php:34 +msgid "Enter a description for your form. This may be used for user instructions." msgstr "" -#: ../tooltips.php:35 +#: tooltips.php:35 msgid "Form Label Placement" msgstr "" -#: ../tooltips.php:35 +#: tooltips.php:35 msgid "" -"Select the label placement. Labels can be top aligned above a field, left " -"aligned to the left of a field, or right aligned to the left of a field." +"Select the default label placement. Labels can be top aligned above a " +"field, left aligned to the left of a field, or right aligned to the left of " +"a field. This setting can be overridden in the advanced settings for each " +"field." msgstr "" -#: ../tooltips.php:36 -msgid "Description Placement" +#: tooltips.php:36 +msgid "" +"Select the default description placement. Descriptions can be placed above " +"the field inputs or below the field inputs. This setting can be overridden " +"in the advanced settings for each field." msgstr "" -#: ../tooltips.php:36 +#: tooltips.php:37 msgid "" -"Select the description placement. Descriptions can be placed above the " -"field inputs or below the field inputs." +"Select the default sub-label placement. Sub-labels can be placed above the " +"field inputs or below the field inputs. This setting can be overridden in " +"the advanced settings for each field." msgstr "" -#: ../tooltips.php:37 +#: tooltips.php:38 msgid "Form Button Text" msgstr "" -#: ../tooltips.php:37 +#: tooltips.php:38 msgid "Enter the text you would like to appear on the form submit button." msgstr "" -#: ../tooltips.php:38 +#: tooltips.php:39 msgid "Form Button Image" msgstr "" -#: ../tooltips.php:38 -msgid "" -"Enter the path to an image you would like to use as the form submit button." +#: tooltips.php:39 +msgid "Enter the path to an image you would like to use as the form submit button." msgstr "" -#: ../tooltips.php:39 +#: tooltips.php:40 msgid "Form CSS Class Name" msgstr "" -#: ../tooltips.php:39 +#: tooltips.php:40 msgid "" "Enter the CSS class name you would like to use in order to override the " "default styles for this form." msgstr "" -#: ../tooltips.php:40 +#: tooltips.php:41 msgid "Enter the URL of a custom image to replace the default 'add item' icon." msgstr "" -#: ../tooltips.php:41 -msgid "" -"Enter the URL of a custom image to replace the default 'delete item' icon." +#: tooltips.php:42 +msgid "Enter the URL of a custom image to replace the default 'delete item' icon." msgstr "" -#: ../tooltips.php:42 +#: tooltips.php:43 msgid "Confirmation Message Text" msgstr "" -#: ../tooltips.php:42 +#: tooltips.php:43 msgid "" "Enter the text you would like the user to see on the confirmation page of " "this form." msgstr "" -#: ../tooltips.php:43 +#: tooltips.php:44 msgid "" "When enabled, auto-formatting will insert paragraph breaks automatically. " "Disable auto-formatting when using HTML to create the confirmation content." msgstr "" -#: ../tooltips.php:44 +#: tooltips.php:45 msgid "Redirect Form to Page" msgstr "" -#: ../tooltips.php:44 +#: tooltips.php:45 msgid "" "Select the page you would like the user to be redirected to after they have " "submitted the form." msgstr "" -#: ../tooltips.php:45 +#: tooltips.php:46 msgid "Redirect Form to URL" msgstr "" -#: ../tooltips.php:45 +#: tooltips.php:46 msgid "" "Enter the URL of the webpage you would like the user to be redirected to " "after they have submitted the form." msgstr "" -#: ../tooltips.php:46 +#: tooltips.php:47 msgid "Pass Data Via Query String" msgstr "" -#: ../tooltips.php:46 +#: tooltips.php:47 msgid "" "To pass field data to the confirmation page, build a Query String using the " -"'Insert Merge Tag' drop down. ..more info on querystrings »" +"'Insert Merge Tag' drop down. ..more " +"info on querystrings »" msgstr "" -#: ../tooltips.php:47 +#: tooltips.php:48 msgid "" "Enter the label of the form field. This is the field title the user will " "see when filling out the form." msgstr "" -#: ../tooltips.php:48 +#: tooltips.php:49 msgid "" "Enter the label for this HTML block. It will help you identify your HTML " "blocks in the form editor, but it will not be displayed on the form." msgstr "" -#: ../tooltips.php:49 +#: tooltips.php:50 msgid "Disable Default Margins" msgstr "" -#: ../tooltips.php:49 +#: tooltips.php:50 msgid "" "When enabled, margins are added to properly align the HTML content with " "other form fields." msgstr "" -#: ../tooltips.php:50 +#: tooltips.php:51 msgid "Recaptcha Theme" msgstr "" -#: ../tooltips.php:50 +#: tooltips.php:51 msgid "" -"Select the visual theme for the reCAPTCHA field the available options to " -"better match your site design." +"Select the visual theme for the reCAPTCHA field from the available options " +"to better match your site design." msgstr "" -#: ../tooltips.php:51 +#: tooltips.php:52 msgid "CAPTCHA Type" msgstr "" -#: ../tooltips.php:51 +#: tooltips.php:52 msgid "Select the type of CAPTCHA you would like to use." msgstr "" -#: ../tooltips.php:52 +#: tooltips.php:53 msgid "" -"Select the custom field name from available existing custom fields, or enter " -"a new custom field name." +"Select the custom field name from available existing custom fields, or " +"enter a new custom field name." msgstr "" -#: ../tooltips.php:53 +#: tooltips.php:54 msgid "Field type" msgstr "" -#: ../tooltips.php:53 +#: tooltips.php:54 msgid "Select the type of field from the available form fields." msgstr "" -#: ../tooltips.php:54 -msgid "" -"Enter the maximum number of characters that this field is allowed to have." +#: tooltips.php:55 +msgid "Enter the maximum number of characters that this field is allowed to have." msgstr "" -#: ../tooltips.php:55 +#: tooltips.php:56 msgid "Enter the maximum number of rows that users are allowed to add." msgstr "" -#: ../tooltips.php:56 +#: tooltips.php:57 msgid "" "Select the type of inputs you would like to use for the date field. Date " "Picker will let users select a date from a calendar. Date Field will let " "users free type the date." msgstr "" -#: ../tooltips.php:57 +#: tooltips.php:58 msgid "Select the type of address you would like to use." msgstr "" -#: ../tooltips.php:58 +#: tooltips.php:59 msgid "Default State" msgstr "" -#: ../tooltips.php:58 +#: tooltips.php:59 msgid "" -"Select the state you would like to be selected by default when the form gets " -"displayed." +"Select the state you would like to be selected by default when the form " +"gets displayed." msgstr "" -#: ../tooltips.php:59 +#: tooltips.php:60 msgid "Default Province" msgstr "" -#: ../tooltips.php:59 +#: tooltips.php:60 msgid "" "Select the province you would like to be selected by default when the form " "gets displayed." msgstr "" -#: ../tooltips.php:60 +#: tooltips.php:61 msgid "" "Select the country you would like to be selected by default when the form " "gets displayed." msgstr "" -#: ../tooltips.php:61 +#: tooltips.php:62 msgid "Hide Country" msgstr "" -#: ../tooltips.php:61 +#: tooltips.php:62 msgid "" "For addresses that only apply to one country, you can choose to not display " "the country drop down. Entries will still be recorded with the selected " "country." msgstr "" -#: ../tooltips.php:62 +#: tooltips.php:63 msgid "Hide Address Line 2" msgstr "" -#: ../tooltips.php:62 +#: tooltips.php:63 msgid "" "Check this box to prevent the extra address input (Address Line 2) from " "being displayed in the form." msgstr "" -#: ../tooltips.php:63 +#: tooltips.php:64 msgid "Hide State Field" msgstr "" -#: ../tooltips.php:63 -msgid "" -"Check this box to prevent the State field from being displayed in the form." +#: tooltips.php:64 +msgid "Check this box to prevent the State field from being displayed in the form." msgstr "" -#: ../tooltips.php:64 +#: tooltips.php:65 msgid "Hide Province Field" msgstr "" -#: ../tooltips.php:64 -msgid "" -"Check this box to prevent Province field from being displayed in the form." +#: tooltips.php:65 +msgid "Check this box to prevent Province field from being displayed in the form." msgstr "" -#: ../tooltips.php:65 +#: tooltips.php:66 msgid "Hide State/Province/Region" msgstr "" -#: ../tooltips.php:65 +#: tooltips.php:66 msgid "" "Check this box to prevent the State/Province/Region from being displayed in " "the form." msgstr "" -#: ../tooltips.php:66 +#: tooltips.php:67 msgid "Field Name Format" msgstr "" -#: ../tooltips.php:66 +#: tooltips.php:67 msgid "" "Select the format you would like to use for the Name field. There are 3 " "options, Normal which includes First and Last Name, Extended which adds " "Prefix and Suffix, or Simple which is a single input field." msgstr "" -#: ../tooltips.php:67 +#: tooltips.php:68 msgid "" "Select the format of numbers that are allowed in this field. You have the " "option to use a comma or a dot as the decimal separator." msgstr "" -#: ../tooltips.php:68 +#: tooltips.php:69 msgid "" "Check this box to prevent this field from being displayed in a non-secure " "page (i.e. not https://). It will redirect the page to the same URL, but " @@ -8401,199 +8761,301 @@ msgid "" "SSL certificate." msgstr "" -#: ../tooltips.php:69 +#: tooltips.php:70 msgid "Select the style you would like to use for the credit card icons." msgstr "" -#: ../tooltips.php:70 +#: tooltips.php:71 msgid "Field Date Format" msgstr "" -#: ../tooltips.php:70 +#: tooltips.php:71 msgid "" "Select the format you would like to use for the date input. Available " "options are MM/DD/YYYY and DD/MM/YYYY." msgstr "" -#: ../tooltips.php:71 +#: tooltips.php:72 msgid "" "Select the format you would like to use for the time field. Available " "options are 12 hour (i.e. 8:30 pm) and 24 hour (i.e. 20:30)." msgstr "" -#: ../tooltips.php:72 +#: tooltips.php:73 msgid "Allowed File Extensions" msgstr "" -#: ../tooltips.php:72 +#: tooltips.php:73 msgid "" "Enter the allowed file extensions for file uploads. This will limit the " "type of files a user may upload." msgstr "" -#: ../tooltips.php:73 -msgid "" -"Select this option to enable multiple files to be uploaded for this field." +#: tooltips.php:74 +msgid "Select this option to enable multiple files to be uploaded for this field." msgstr "" -#: ../tooltips.php:74 +#: tooltips.php:75 msgid "" "Specify the maximum number of files that can be uploaded using this field. " "Leave blank for unlimited. Note that the actual number of files permitted " "may be limited by this server's specifications and configuration." msgstr "" -#: ../tooltips.php:75 -msgid "" -"Specify the maximum file size in megabytes allowed for each of the files." +#: tooltips.php:76 +msgid "Specify the maximum file size in megabytes allowed for each of the files." msgstr "" -#: ../tooltips.php:76 +#: tooltips.php:77 msgid "Phone Number Format" msgstr "" -#: ../tooltips.php:76 +#: tooltips.php:77 msgid "" "Select the format you would like to use for the phone input. Available " "options are domestic US/CANADA style phone number and international long " "format phone number." msgstr "" -#: ../tooltips.php:77 +#: tooltips.php:78 msgid "Field Description" msgstr "" -#: ../tooltips.php:77 +#: tooltips.php:78 msgid "" "Enter the description for the form field. This will be displayed to the " "user and provide some direction on how the field should be filled out or " "selected." msgstr "" -#: ../tooltips.php:78 +#: tooltips.php:79 msgid "Required Field" msgstr "" -#: ../tooltips.php:78 +#: tooltips.php:79 msgid "" "Select this option to make the form field required. A required field will " "prevent the form from being submitted if it is not filled out or selected." msgstr "" -#: ../tooltips.php:79 +#: tooltips.php:80 msgid "" "Select this option to limit user input to unique values only. This will " "require that a value entered in a field does not currently exist in the " "entry database for that field." msgstr "" -#: ../tooltips.php:80 +#: tooltips.php:81 msgid "Number Range" msgstr "" -#: ../tooltips.php:80 +#: tooltips.php:81 msgid "" -"Enter the minimum and maximum values for this form field. This will require " -"that the value entered by the user must fall within this range." +"Enter the minimum and maximum values for this form field. This will " +"require that the value entered by the user must fall within this range." msgstr "" -#: ../tooltips.php:81 +#: tooltips.php:82 msgid "" -"Enabling caculations will allow the value of this field to be dynamically " +"Enabling calculations will allow the value of this field to be dynamically " "calculated based on a mathematical formula." msgstr "" -#: ../tooltips.php:82 +#: tooltips.php:83 msgid "" "Specify a mathematical formula. The result of this formula will be " "dynamically populated as the value for this field." msgstr "" -#: ../tooltips.php:83 +#: tooltips.php:84 msgid "Specify how many decimal places the number should be rounded to." msgstr "" -#: ../tooltips.php:84 +#: tooltips.php:85 +msgid "Admin Label" +msgstr "" + +#: tooltips.php:85 msgid "" "Enter the admin label of the form field. Entering a value in this field " "will override the Field Label when displayed in the Gravity Forms " "administration tool." msgstr "" -#: ../tooltips.php:85 +#: tooltips.php:86 +msgid "Enter values in this setting to override the Sub-Label for each field." +msgstr "" + +#: tooltips.php:87 +msgid "Label Visibility" +msgstr "" + +#: tooltips.php:87 +msgid "" +"Select the label visibility for this field. Labels can either inherit the " +"form setting or be hidden." +msgstr "" + +#: tooltips.php:88 +msgid "" +"Select the description placement. Descriptions can be placed above the " +"field inputs or below the field inputs." +msgstr "" + +#: tooltips.php:89 +msgid "" +"Select the sub-label placement. Sub-labels can be placed above the field " +"inputs or below the field inputs." +msgstr "" + +#: tooltips.php:90 +msgid "" +"Select a form field size from the available options. This will set the " +"width of the field." +msgstr "" + +#: tooltips.php:91 +msgid "" +"Select the fields you'd like to use in this Name field and customize the " +"Sub-Labels by entering new ones." +msgstr "" + +#: tooltips.php:92 +msgid "Name Prefix Choices" +msgstr "" + +#: tooltips.php:92 +msgid "" +"Add Choices to this field. You can mark a choice as selected by default by " +"using the radio buttons on the left." +msgstr "" + +#: tooltips.php:93 msgid "" -"Select a form field size from the available options. This will set the width " -"of the field." +"Select the fields you'd like to use in this Address Field and customize the " +"Sub-Labels by entering new ones." msgstr "" -#: ../tooltips.php:86 +#: tooltips.php:94 msgid "If you would like to pre-populate the value of a field, enter it here." msgstr "" -#: ../tooltips.php:87 +#: tooltips.php:95 +msgid "If you would like to pre-populate the value of a field, select this option." +msgstr "" + +#: tooltips.php:96 +msgid "" +"The Placeholder will not be submitted along with the form. Use the " +"Placeholder to give a hint at the expected value or format." +msgstr "" + +#: tooltips.php:97 +msgid "" +"Placeholders will not be submitted along with the form. Use Placeholders to " +"give a hint at the expected value or format." +msgstr "" + +#: tooltips.php:98 +msgid "Use Values Submitted in a Different Field" +msgstr "" + +#: tooltips.php:98 +msgid "" +"Activate this option to allow users to skip this field and submit the " +"values entered in the associated field. For example, this is useful for " +"shipping and billing address fields." +msgstr "" + +#: tooltips.php:99 +msgid "" +"Enter the label to be displayed next to the check box. For example, " +""same as shipping address"." +msgstr "" + +#: tooltips.php:100 +msgid "Select the field to be used as the source for the values for this field." +msgstr "" + +#: tooltips.php:101 +msgid "Activated by Default" +msgstr "" + +#: tooltips.php:101 +msgid "" +"Select this setting to display the option as activated by default when the " +"form first loads." +msgstr "" + +#: tooltips.php:102 +msgid "Validation Message" +msgstr "" + +#: tooltips.php:102 msgid "" "If you would like to override the default error validation for a field, " "enter it here. This message will be displayed if there is an error with " "this field when the user submits the form." msgstr "" -#: ../tooltips.php:88 +#: tooltips.php:103 msgid "reCaptcha Language" msgstr "" -#: ../tooltips.php:88 +#: tooltips.php:103 msgid "" -"Select the language you would like to use for the reCAPTCHA display from the " -"available options." +"Select the language you would like to use for the reCAPTCHA display from " +"the available options." msgstr "" -#: ../tooltips.php:89 +#: tooltips.php:104 msgid "" "Enter the CSS class name you would like to use in order to override the " "default styles for this field." msgstr "" -#: ../tooltips.php:90 +#: tooltips.php:105 msgid "" "Select the visibility for this field. Field visibility set to Everyone will " "be visible by the user submitting the form. Form field visibility set to " -"Admin Only will only be visible within the Gravity Forms administration tool." -"

    Setting a field to Admin Only is useful for creating fields that " -"can be used to set a status or priority level on submitted entries." +"Admin Only will only be visible within the Gravity Forms administration " +"tool.

    Setting a field to Admin Only is useful for creating " +"fields that can be used to set a status or priority level on submitted " +"entries." msgstr "" -#: ../tooltips.php:91 +#: tooltips.php:106 msgid "Field Choices" msgstr "" -#: ../tooltips.php:91 +#: tooltips.php:106 msgid "" -"Add Choices to this field. You can mark each choice as checked by default by " -"using the radio/checkbox fields on the left." +"Add Choices to this field. You can mark each choice as checked by default " +"by using the radio/checkbox fields on the left." msgstr "" -#: ../tooltips.php:92 +#: tooltips.php:107 msgid "Enable Choice Values" msgstr "" -#: ../tooltips.php:92 +#: tooltips.php:107 msgid "" "Check this option to specify a value for each choice. Choice values are not " -"displayed to the user viewing the form, but are accessible to administrators " -"when viewing the entry." +"displayed to the user viewing the form, but are accessible to " +"administrators when viewing the entry." msgstr "" -#: ../tooltips.php:93 +#: tooltips.php:108 msgid "" "Create rules to dynamically display or hide this field based on values from " -"another field" +"another field." msgstr "" -#: ../tooltips.php:94 +#: tooltips.php:109 msgid "Enable Enhanced UI" msgstr "" -#: ../tooltips.php:94 +#: tooltips.php:109 msgid "" "By selecting this option, the Chosen jQuery script will be applied to this field, " @@ -8601,448 +9063,481 @@ msgid "" "interface for Multi Select fields." msgstr "" -#: ../tooltips.php:95 +#: tooltips.php:110 msgid "\"Other\" Choice" msgstr "" -#: ../tooltips.php:95 +#: tooltips.php:110 msgid "" "Check this option to add a text input as the final choice of your radio " "button field. This allows the user to specify a value that is not a " "predefined choice." msgstr "" -#: ../tooltips.php:96 -msgid "Check this option to require a user to be logged in to view this form" +#: tooltips.php:111 +msgid "Check this option to require a user to be logged in to view this form." msgstr "" -#: ../tooltips.php:97 +#: tooltips.php:112 msgid "" "Enter a message to be displayed to users who are not logged in (shortcodes " -"and HTML are supported)" +"and HTML are supported)." msgstr "" -#: ../tooltips.php:98 +#: tooltips.php:113 msgid "Page Conditional Logic" msgstr "" -#: ../tooltips.php:98 +#: tooltips.php:113 msgid "" "Create rules to dynamically display or hide this page based on values from " -"another field" +"another field." msgstr "" -#: ../tooltips.php:99 +#: tooltips.php:114 msgid "" "Select which type of visual progress indicator you would like to display. " -"Progress Bar, Steps or None" +"Progress Bar, Steps or None." msgstr "" -#: ../tooltips.php:100 +#: tooltips.php:115 msgid "Progress Bar Style" msgstr "" -#: ../tooltips.php:100 +#: tooltips.php:115 msgid "" "Select which progress bar style you would like to use. Select custom to " -"choose your own text and background color" +"choose your own text and background color." msgstr "" -#: ../tooltips.php:101 +#: tooltips.php:116 msgid "" "Name each of the pages on your form. Page names are displayed with the " -"selected progress indicator" +"selected progress indicator." msgstr "" -#: ../tooltips.php:102 +#: tooltips.php:117 msgid "Next Button Text" msgstr "" -#: ../tooltips.php:102 -msgid "Enter the text you would like to appear on the page next button" +#: tooltips.php:117 +msgid "Enter the text you would like to appear on the page next button." msgstr "" -#: ../tooltips.php:103 +#: tooltips.php:118 msgid "Next Button Image" msgstr "" -#: ../tooltips.php:103 -msgid "" -"Enter the path to an image you would like to use as the page next button" +#: tooltips.php:118 +msgid "Enter the path to an image you would like to use as the page next button." msgstr "" -#: ../tooltips.php:104 +#: tooltips.php:119 msgid "Previous Button Text" msgstr "" -#: ../tooltips.php:104 -msgid "Enter the text you would like to appear on the page previous button" +#: tooltips.php:119 +msgid "Enter the text you would like to appear on the page previous button." msgstr "" -#: ../tooltips.php:105 +#: tooltips.php:120 msgid "Previous Button Image" msgstr "" -#: ../tooltips.php:105 +#: tooltips.php:120 msgid "" -"Enter the path to an image you would like to use as the page previous button" +"Enter the path to an image you would like to use as the page previous " +"button." msgstr "" -#: ../tooltips.php:106 +#: tooltips.php:121 msgid "Next Button Conditional Logic" msgstr "" -#: ../tooltips.php:106 +#: tooltips.php:121 msgid "" "Create rules to dynamically display or hide the page's Next Button based on " -"values from another field" +"values from another field." msgstr "" -#: ../tooltips.php:107 +#: tooltips.php:122 msgid "" "Create rules to dynamically display or hide the submit button based on " -"values from another field" +"values from another field." msgstr "" -#: ../tooltips.php:108 +#: tooltips.php:123 msgid "" -"Select which categories are displayed. You can choose to display all of them " -"or select individual ones." +"Select which categories are displayed. You can choose to display all of " +"them or select individual ones." msgstr "" -#: ../tooltips.php:109 +#: tooltips.php:124 msgid "" -"Select the post status that will be used for the post that is created by the " -"form entry." +"Select the post status that will be used for the post that is created by " +"the form entry." msgstr "" -#: ../tooltips.php:110 +#: tooltips.php:125 msgid "Post Author" msgstr "" -#: ../tooltips.php:110 +#: tooltips.php:125 msgid "" -"Select the author that will be used for the post that is created by the form " -"entry." +"Select the author that will be used for the post that is created by the " +"form entry." msgstr "" -#: ../tooltips.php:111 +#: tooltips.php:126 msgid "" -"Select the post format that will be used for the post that is created by the " -"form entry." +"Select the post format that will be used for the post that is created by " +"the form entry." msgstr "" -#: ../tooltips.php:112 +#: tooltips.php:127 msgid "Post Content Template" msgstr "" -#: ../tooltips.php:112 -msgid "" -"Check this option to format and insert merge tags into the Post Content." +#: tooltips.php:127 +msgid "Check this option to format and insert merge tags into the Post Content." msgstr "" -#: ../tooltips.php:113 +#: tooltips.php:128 msgid "Post Title Template" msgstr "" -#: ../tooltips.php:113 +#: tooltips.php:128 msgid "Check this option to format and insert merge tags into the Post Title." msgstr "" -#: ../tooltips.php:114 +#: tooltips.php:129 msgid "" "Select the category that will be used for the post that is created by the " "form entry." msgstr "" -#: ../tooltips.php:115 +#: tooltips.php:130 msgid "Use Current User as Author" msgstr "" -#: ../tooltips.php:115 +#: tooltips.php:130 msgid "" "Selecting this option will set the post author to the WordPress user that " "submitted the form." msgstr "" -#: ../tooltips.php:116 +#: tooltips.php:131 msgid "Image Meta" msgstr "" -#: ../tooltips.php:116 +#: tooltips.php:131 msgid "" -"Select one or more image metadata field to be displayed along with the image " -"upload field. They enable users to enter additional information about the " -"uploaded image." +"Select one or more image metadata field to be displayed along with the " +"image upload field. They enable users to enter additional information about " +"the uploaded image." msgstr "" -#: ../tooltips.php:117 +#: tooltips.php:132 msgid "Check this option to set this image as the post's Featured Image." msgstr "" -#: ../tooltips.php:118 +#: tooltips.php:133 msgid "Incoming Field Data" msgstr "" -#: ../tooltips.php:118 +#: tooltips.php:133 msgid "" "Check this option to enable data to be passed to the form and pre-populate " -"this field dynamically. Data can be passed via Query Strings, Shortcode and/" -"or Hooks" +"this field dynamically. Data can be passed via Query Strings, Shortcode " +"and/or Hooks." msgstr "" -#: ../tooltips.php:119 +#: tooltips.php:134 msgid "Enter the content (Text or HTML) to be displayed on the form." msgstr "" -#: ../tooltips.php:120 +#: tooltips.php:135 msgid "Base Price" msgstr "" -#: ../tooltips.php:120 +#: tooltips.php:135 msgid "Enter the base price for this product." msgstr "" -#: ../tooltips.php:121 +#: tooltips.php:136 msgid "Disable Quantity" msgstr "" -#: ../tooltips.php:121 +#: tooltips.php:136 msgid "" -"Disables the quantity field. A quantity of 1 will be assumed or you can add " -"a Quantity field to your form from the Pricing Fields." +"Disables the quantity field. A quantity of 1 will be assumed or you can " +"add a Quantity field to your form from the Pricing Fields." +msgstr "" + +#: tooltips.php:137 +msgid "Product Field" msgstr "" -#: ../tooltips.php:122 +#: tooltips.php:137 msgid "Select which Product this field is tied to." msgstr "" -#: ../tooltips.php:123 +#: tooltips.php:138 msgid "" "Input masks provide a visual guide allowing users to more easily enter data " "in a specific format such as dates and phone numbers." msgstr "" -#: ../tooltips.php:124 +#: tooltips.php:139 msgid "Standard Fields provide basic form functionality." msgstr "" -#: ../tooltips.php:125 +#: tooltips.php:140 msgid "" "Advanced Fields are for specific uses. They enable advanced formatting of " "regularly used fields such as Name, Email, Address, etc." msgstr "" -#: ../tooltips.php:126 +#: tooltips.php:141 msgid "" "Post Fields allow you to add fields to your form that create Post Drafts in " "WordPress from the submitted data." msgstr "" -#: ../tooltips.php:127 +#: tooltips.php:142 msgid "" "Pricing fields allow you to add fields to your form that calculate pricing " "for selling goods and services." msgstr "" -#: ../tooltips.php:128 +#: tooltips.php:143 msgid "Export Selected Form" msgstr "" -#: ../tooltips.php:128 +#: tooltips.php:143 msgid "" "Select the form you would like to export entry data from. You may only " "export data from one form at a time." msgstr "" -#: ../tooltips.php:129 +#: tooltips.php:144 msgid "Export Selected Forms" msgstr "" -#: ../tooltips.php:129 +#: tooltips.php:144 msgid "Select the forms you would like to export." msgstr "" -#: ../tooltips.php:130 +#: tooltips.php:145 msgid "Filter the entries by adding conditions." msgstr "" -#: ../tooltips.php:131 +#: tooltips.php:146 msgid "Export Selected Fields" msgstr "" -#: ../tooltips.php:131 +#: tooltips.php:146 msgid "Select the fields you would like to include in the export." msgstr "" -#: ../tooltips.php:132 +#: tooltips.php:147 msgid "Export Date Range" msgstr "" -#: ../tooltips.php:132 +#: tooltips.php:147 msgid "" "Select a date range. Setting a range will limit the export to entries " "submitting during that date range. If no range is set, all entries will be " "exported." msgstr "" -#: ../tooltips.php:133 +#: tooltips.php:148 msgid "" -"Click the Choose File button to upload a Gravity Forms XML file from your " -"computer" +"Click the Choose File button to upload a Gravity Forms export file from " +"your computer." msgstr "" -#: ../tooltips.php:134 +#: tooltips.php:149 msgid "Settings License Key" msgstr "" -#: ../tooltips.php:134 +#: tooltips.php:149 msgid "" "Your Gravity Forms support license key is used to verify your support " "package, enable automatic updates and receive support." msgstr "" -#: ../tooltips.php:135 +#: tooltips.php:150 msgid "" "Select yes or no to enable or disable CSS output. Setting this to no will " "disable the standard Gravity Forms CSS from being included in your theme." msgstr "" -#: ../tooltips.php:136 +#: tooltips.php:151 msgid "" "Select yes or no to enable or disable HTML5 output. Setting this to no will " "disable the standard Gravity Forms HTML5 form field output." msgstr "" -#: ../tooltips.php:137 +#: tooltips.php:152 msgid "" "Select On or Off to enable or disable no-conflict mode. Setting this to On " "will prevent extraneous scripts and styles from being printed on Gravity " "Forms admin pages, reducing conflicts with other plugins and themes." msgstr "" -#: ../tooltips.php:138 +#: tooltips.php:153 msgid "reCaptcha Public Key" msgstr "" -#: ../tooltips.php:138 +#: tooltips.php:153 msgid "" "Enter your reCAPTCHA Public Key, if you do not have a key you can register " "for one at the provided link. reCAPTCHA is a free service." msgstr "" -#: ../tooltips.php:139 +#: tooltips.php:154 msgid "reCaptcha Private Key" msgstr "" -#: ../tooltips.php:139 +#: tooltips.php:154 msgid "" "Enter your reCAPTCHA Private Key, if you do not have a key you can register " "for one at the provided link. reCAPTCHA is a free service." msgstr "" -#: ../tooltips.php:140 +#: tooltips.php:155 msgid "" "Please select the currency for your location. Currency is used for pricing " "fields and price calculations." msgstr "" -#: ../tooltips.php:142 +#: tooltips.php:157 msgid "Entries Conversion" msgstr "" -#: ../tooltips.php:142 +#: tooltips.php:157 msgid "" "Conversion is the percentage of form views that generated an entry. If a " "form was viewed twice, and one entry was generated, the conversion will be " "50%." msgstr "" -#: ../tooltips.php:143 +#: tooltips.php:158 msgid "Tab Index Start Value" msgstr "" -#: ../tooltips.php:143 ../widget.php:104 +#: tooltips.php:158 widget.php:111 msgid "" "If you have other forms on the page (i.e. Comments Form), specify a higher " -"tabindex start value so that your Gravity Form does not end up with the same " -"tabindices as your other forms. To disable the tabindex, enter 0 (zero)." +"tabindex start value so that your Gravity Form does not end up with the " +"same tabindices as your other forms. To disable the tabindex, enter 0 " +"(zero)." msgstr "" -#: ../tooltips.php:144 +#: tooltips.php:159 msgid "Override Notifications" msgstr "" -#: ../tooltips.php:144 +#: tooltips.php:159 msgid "" "Enter a comma separated list of email addresses you would like to receive " "the selected notification emails." msgstr "" -#: ../tooltips.php:145 +#: tooltips.php:160 msgid "Progress Bar Confirmation Display" msgstr "" -#: ../tooltips.php:145 +#: tooltips.php:160 msgid "" "Check this box if you would like the progress bar to display with the " "confirmation text." msgstr "" -#: ../tooltips.php:146 +#: tooltips.php:161 msgid "Progress Bar Completion Text" msgstr "" -#: ../tooltips.php:146 +#: tooltips.php:161 msgid "Enter text to display at the top of the progress bar." msgstr "" -#: ../update.php:10 +#: update.php:10 msgid "You don't have permissions to view this page" msgstr "" -#: ../update.php:22 +#: update.php:27 msgid "Gravity Forms Updates" msgstr "" -#: ../update.php:37 -#, php-format -msgid "" -"

    You can update to the latest version automatically or download the update " -"and install it manually. %sUpdate Automatically%s %sDownload Update%s" -msgstr "" - -#: ../update.php:45 -msgid "" -"Register your copy of Gravity " -"Forms to receive access to automatic updates and support. Need a license " -"key? Purchase one now." -msgstr "" - -#: ../update.php:58 +#: update.php:60 msgid "Your version of Gravity Forms is up to date." msgstr "" -#: ../widget.php:22 +#: widget.php:25 msgid "Gravity Forms Widget" msgstr "" -#: ../widget.php:23 -msgid "Form" -msgstr "" - -#: ../widget.php:72 +#: widget.php:74 msgid "Contact Us" msgstr "" -#: ../widget.php:97 +#: widget.php:102 msgid "advanced options" msgstr "" -#: ../widget.php:101 +#: widget.php:108 msgid "Disable script output" msgstr "" -#: ../widget.php:102 +#: widget.php:109 msgid "Tab Index Start" msgstr "" + +#. Plugin URI of the plugin/theme +msgid "http://www.gravityforms.com" +msgstr "" + +#. Description of the plugin/theme +msgid "Easily create web forms and manage form entries within the WordPress admin." +msgstr "" + +#. Author of the plugin/theme +msgid "rocketgenius" +msgstr "" + +#. Author URI of the plugin/theme +msgid "http://www.rocketgenius.com" +msgstr "" + +#: includes/addon/class-gf-payment-addon.php:1485 +msgctxt "toolbar label" +msgid "Sales" +msgstr "" + +#: includes/addon/class-gf-payment-addon.php:1486 +msgctxt "metabox title" +msgid "Filter" +msgstr "" + +#: includes/addon/class-gf-payment-addon.php:2188 +msgctxt "paging" +msgid "%1$s of %2$s" +msgstr "" + +#: includes/fields/class-gf-field-address.php:448 +msgctxt "Country" +msgid "Georgia" +msgstr "" + +#: includes/fields/class-gf-field-address.php:523 +msgctxt "Country" +msgid "GEORGIA" +msgstr "" + +#: includes/fields/class-gf-field-address.php:674 +#: includes/fields/class-gf-field-address.php:703 +msgctxt "US State" +msgid "Georgia" +msgstr "" \ No newline at end of file diff --git a/languages/index.php b/languages/index.php new file mode 100644 index 0000000..12c197f --- /dev/null +++ b/languages/index.php @@ -0,0 +1,2 @@ + $notification){ - if($id == $notification_id){ - return $notification; - } - } - return array(); - } - - public static function notification_page() { - $form_id = rgget('id'); - $notification_id = rgget("nid"); - if(!rgblank($notification_id)) - self::notification_edit_page($form_id, $notification_id); - else - self::notification_list_page($form_id); - } - - public static function notification_edit_page($form_id, $notification_id) { - - if(!rgempty("gform_notification_id")) - $notification_id = rgpost("gform_notification_id"); - - $form = RGFormsModel::get_form_meta($form_id); - - $form = apply_filters("gform_form_notification_page_{$form_id}", apply_filters("gform_form_notification_page", $form, $notification_id), $notification_id); - - $notification = !$notification_id ? array() : self::get_notification($form, $notification_id); - - // added second condition to account for new notifications with errors as notification ID will - // be available in $_POST but the notification has not actually been saved yet - $is_new_notification = empty($notification_id) || empty($notification); - - $is_valid = true; - $is_update = false; - if(rgpost("save")){ - - check_admin_referer('gforms_save_notification', 'gforms_save_notification'); - - //clear out notification because it could have legacy data populated - $notification = array( 'isActive' => isset( $notification['isActive'] ) ? rgar( $notification, 'isActive') : true ); - - $is_update = true; - - if($is_new_notification){ - $notification_id = uniqid(); - $notification["id"] = $notification_id; - } - else { - $notification["id"] = $notification_id; - } - - $notification["name"] = rgpost("gform_notification_name"); - $notification["event"] = rgpost("gform_notification_event"); - $notification["to"] = rgpost("gform_notification_to_type") == "field" ? rgpost("gform_notification_to_field") : rgpost("gform_notification_to_email"); - $notification["toType"] = rgpost("gform_notification_to_type"); - $notification["bcc"] = rgpost("gform_notification_bcc"); - $notification["subject"] = rgpost("gform_notification_subject"); - $notification["message"] = rgpost("gform_notification_message"); - $notification["from"] = rgpost("gform_notification_from"); - $notification["fromName"] = rgpost("gform_notification_from_name"); - $notification["replyTo"] = rgpost("gform_notification_reply_to"); - $notification["routing"] = !rgempty("gform_routing_meta") ? GFCommon::json_decode(rgpost("gform_routing_meta"), true) : null; - $notification["conditionalLogic"] = !rgempty("gform_conditional_logic_meta") ? GFCommon::json_decode(rgpost("gform_conditional_logic_meta"), true) : null; - $notification["disableAutoformat"] = rgpost("gform_notification_disable_autoformat"); - - $notification = apply_filters( 'gform_pre_notification_save', apply_filters( "gform_pre_notification_save{$form['id']}", $notification, $form ), $form ); - - //validating input... - $is_valid = self::validate_notification(); - if($is_valid){ - //input valid, updating... - //emptying notification email if it is supposed to be disabled - if($_POST["gform_notification_to_type"] == "routing") - $notification["to"] = ""; - else - $notification["routing"] = null; - - // trim values - $notification = GFFormsModel::trim_conditional_logic_values_from_element($notification, $form); - - $form["notifications"][$notification_id] = $notification; - - RGFormsModel::save_form_notifications($form_id, $form['notifications']); - } - } - - if($is_update && $is_valid){ - GFCommon::add_message( sprintf( __('Notification saved successfully. %sBack to notifications.%s', 'gravityforms'), '', '') ); - } - else if($is_update && !$is_valid){ - GFCommon::add_error_message(__('Notification could not be updated. Please enter all required information below.', 'gravityforms')); - } - - // moved page header loading here so the admin messages can be set upon saving and available for the header to print out - GFFormSettings::page_header(__('Notifications', 'gravityforms')); - - $notification_ui_settings = self::get_notification_ui_settings($notification); - - ?> - - - - - - - - - - - - - -
    - -

    - '; - echo apply_filters("gform_save_notification_button", $notification_button); - ?> -

    - - - 0)); - ?> - -

    - - - prepare_items(); - ?> - -
    - - display(); ?> - - - - - - -
    - - -
    - - '; - $subsetting_close = ' - -
    -
    - '; - - $ui_settings = array(); - $form_id = rgget('id'); - $form = RGFormsModel::get_form_meta($form_id); - $form = apply_filters("gform_admin_pre_render_" . $form_id, apply_filters("gform_admin_pre_render", $form)); - $is_valid = empty(GFCommon::$errors); - - ob_start(); ?> - - - - - - - "/> - - - - - __("Form is submitted", "gravityforms"))); - $event_style = count($notification_events) == 1 ? "style='display:none'" : ""; - ?> - > - - - - - - - - - - - - - - - - - - value="email" onclick="jQuery('.notification_to_container').hide(); jQuery('#gform_notification_to_email_container').show('slow');"/> - -    - value="field" onclick="jQuery('.notification_to_container').hide(); jQuery('#gform_notification_to_field_container').show('slow');"/> - -    - value="routing" onclick="jQuery('.notification_to_container').hide(); jQuery('#gform_notification_to_routing_container').show('slow');"/> - - - - - - > - - - - - - - - - - - - - - - - > - - - - - - -

    - - - - - - - > - - -
    - -
    -

    -
    - -
    > - " onkeyup="SetRouting();"/> - - - - - - - 1 ){ ?> - remove this email routing - -
    - - - - - -
    - - - - - - - - - - - "/> - - - - - - - - - - "/> - - - - - - - - - - " class="fieldwidth-2" /> - - - - - - - - - - " class="fieldwidth-1" /> - - - - - - > - - - - - " /> - - - - - - - - > - - - - - - - - false, "editor_class" => "merge-tag-support mt-wp_editor mt-manual_position mt-position-right" ) ); - } - else{?> - - - - - - - - - - - - /> - - - - - - - - - - - /> - -
    - - - - -
    - -
    - - - - - - " . $field_label . ""; - } - } - return $str; - } - - private static function get_field_values($i, $form, $field_id, $selected_value, $max_field_length = 16){ - if(empty($field_id)) - $field_id = self::get_first_routing_field($form); - - if(empty($field_id)) - return ""; - - $field = RGFormsModel::get_field($form, $field_id); - $is_any_selected = false; - $str = ""; - - if (!$field) - return ""; - - if ($field["type"] == "post_category" && rgar($field, "displayAllCategories") == true) - { - $str .= wp_dropdown_categories(array("class"=>"gfield_routing_select gfield_category_dropdown gfield_routing_value_dropdown", "orderby"=> "name", "id"=> "routing_value_" . $i, "selected"=>$selected_value, "hierarchical"=>true, "hide_empty"=>0, "echo"=>false)); - } - elseif (rgar($field,"choices")) { - $str .= ""; - } - else - { - //create a text field for fields that don't have choices (i.e text, textarea, number, email, etc...) - $str = ""; - } - - return $str; - } - - public static function get_post_category_values(){ - - $id = "routing_value_" . rgpost("ruleIndex"); - $selected = rgempty("selectedValue") ? 0 : rgpost("selectedValue"); - - $dropdown = wp_dropdown_categories(array("class"=>"gfield_routing_select gfield_routing_value_dropdown gfield_category_dropdown", "orderby"=> "name", "id"=> $id, "selected"=>$selected, "hierarchical"=>true, "hide_empty"=>0, "echo"=>false)); - die($dropdown); - } - - /** - * Delete a form notification by ID. - * - * @param mixed $notification_id - * @param mixed $form_id Can pass a form ID or a form object - */ - public static function delete_notification($notification_id, $form_id) { - - if(!$form_id) - return false; - - $form = !is_array($form_id) ? RGFormsModel::get_form_meta($form_id) : $form_id; - unset($form['notifications'][$notification_id]); - - // clear Form cache so next retrieval of form meta will reflect deleted notification - RGFormsModel::flush_current_forms(); - - return RGFormsModel::save_form_notifications($form['id'], $form['notifications']); - } - - public static function duplicate_notification($notification_id, $form_id) { - - if(!$form_id) - return false; - - $form = !is_array($form_id) ? RGFormsModel::get_form_meta($form_id) : $form_id; - - $new_notification = $form['notifications'][$notification_id]; - $name = rgar($new_notification, "name"); - $new_id = uniqid(); - - $count = 2; - $new_name = $name . " - Copy 1"; - while(!self::is_unique_name($new_name, $form['notifications'])){ - $new_name = $name . " - Copy $count"; - $count++; - } - $new_notification["name"] = $new_name; - $new_notification["id"] = $new_id; - $form['notifications'][$new_id] = $new_notification; - - // clear Form cache so next retrieval of form meta will return duplicated notification - RGFormsModel::flush_current_forms(); - - return RGFormsModel::save_form_notifications($form['id'], $form['notifications']); - } - - public static function is_unique_name($name, $notifications){ - - foreach ($notifications as $notification){ - if(strtolower(rgar($notification, "name")) == strtolower($name)) - return false; - } - - return true; - } - -} - - - -class GFNotificationTable extends WP_List_Table { - - public $form; - - function __construct($form) { - - $this->form = $form; - - $this->_column_headers = array( - array( - 'cb' => '', - 'name' => __('Name', 'gravityforms'), - 'subject' => __('Subject', 'gravityforms') - ), - array(), - array() - ); - - parent::__construct(); - } - - function prepare_items() { - $this->items = $this->form['notifications']; - } - - function display() { - - // ...causing issue: Notice: Indirect modification of overloaded property GFNotificationTable::$_args has no effect - //extract( $this->_args ); // gives us $plural, $singular, $ajax, $screen - - $singular = $this->_args['singular']; - - ?> - - - - - print_column_headers(); ?> - - - - - - print_column_headers( false ); ?> - - - - > - - display_rows_or_placeholder(); ?> - - -
    - - '; - echo $this->single_row_columns( $item ); - echo ''; - } - - function column_default($item, $column) { - echo rgar($item, $column); - } - - function column_cb($item) { - $is_active = isset($item["isActive"]) ? $item["isActive"] : true; - ?> - <?php $is_active ? __(" title="" onclick="ToggleActive(this, ''); " /> - $item["id"])); - $actions = apply_filters('gform_notification_actions', array( - 'edit' => '' . __('Edit', 'gravityforms') . '', - 'duplicate' => '' . __('Duplicate', 'gravityforms') . '', - 'delete' => '' . __('Delete', 'gravityforms') . '' - )); - - if(isset($item['isDefault']) && $item['isDefault']) - unset($actions['delete']); - - ?> - - -
    - - $html) { - $divider = $key == $last_key ? '' : " | "; - ?> - - - - - -
    - - 0)) . "'>", ""); - } -} - -?> \ No newline at end of file + $notification ) { + if ( $id == $notification_id ) { + return $notification; + } + } + + return array(); + } + + public static function notification_page() { + $form_id = rgget( 'id' ); + $notification_id = rgget( 'nid' ); + if ( ! rgblank( $notification_id ) ) { + self::notification_edit_page( $form_id, $notification_id ); + } else { + self::notification_list_page( $form_id ); + } + } + + public static function notification_edit_page( $form_id, $notification_id ) { + + if ( ! rgempty( 'gform_notification_id' ) ) { + $notification_id = rgpost( 'gform_notification_id' ); + } + + $form = RGFormsModel::get_form_meta( $form_id ); + + $form = apply_filters( "gform_form_notification_page_{$form_id}", apply_filters( 'gform_form_notification_page', $form, $notification_id ), $notification_id ); + + $notification = ! $notification_id ? array() : self::get_notification( $form, $notification_id ); + + // added second condition to account for new notifications with errors as notification ID will + // be available in $_POST but the notification has not actually been saved yet + $is_new_notification = empty( $notification_id ) || empty( $notification ); + + $is_valid = true; + $is_update = false; + if ( rgpost( 'save' ) ) { + + check_admin_referer( 'gforms_save_notification', 'gforms_save_notification' ); + + //clear out notification because it could have legacy data populated + $notification = array( 'isActive' => isset( $notification['isActive'] ) ? rgar( $notification, 'isActive' ) : true ); + + + $is_update = true; + + if ( $is_new_notification ) { + $notification_id = uniqid(); + $notification['id'] = $notification_id; + } else { + $notification['id'] = $notification_id; + } + + $notification['name'] = rgpost( 'gform_notification_name' ); + $notification['event'] = rgpost( 'gform_notification_event' ); + $notification['to'] = rgpost( 'gform_notification_to_type' ) == 'field' ? rgpost( 'gform_notification_to_field' ) : rgpost( 'gform_notification_to_email' ); + $notification['toType'] = rgpost( 'gform_notification_to_type' ); + $notification['bcc'] = rgpost( 'gform_notification_bcc' ); + $notification['subject'] = rgpost( 'gform_notification_subject' ); + $notification['message'] = rgpost( 'gform_notification_message' ); + $notification['from'] = rgpost( 'gform_notification_from' ); + $notification['fromName'] = rgpost( 'gform_notification_from_name' ); + $notification['replyTo'] = rgpost( 'gform_notification_reply_to' ); + $notification['routing'] = ! rgempty( 'gform_routing_meta' ) ? GFCommon::json_decode( rgpost( 'gform_routing_meta' ), true ) : null; + $notification['conditionalLogic'] = ! rgempty( 'gform_conditional_logic_meta' ) ? GFCommon::json_decode( rgpost( 'gform_conditional_logic_meta' ), true ) : null; + $notification['disableAutoformat'] = rgpost( 'gform_notification_disable_autoformat' ); + + if ( rgpost( 'gform_is_default' ) ) { + $notification['isDefault'] = true; + } + $notification = apply_filters( 'gform_pre_notification_save', apply_filters( "gform_pre_notification_save{$form['id']}", $notification, $form, $is_new_notification ), $form, $is_new_notification ); + + //validating input... + $is_valid = self::validate_notification(); + if ( $is_valid ) { + //input valid, updating... + //emptying notification email if it is supposed to be disabled + if ( $_POST['gform_notification_to_type'] == 'routing' ) { + $notification['to'] = ''; + } else { + $notification['routing'] = null; + } + + // trim values + $notification = GFFormsModel::trim_conditional_logic_values_from_element( $notification, $form ); + + $form['notifications'][ $notification_id ] = $notification; + + RGFormsModel::save_form_notifications( $form_id, $form['notifications'] ); + } + } + + if ( $is_update && $is_valid ) { + GFCommon::add_message( sprintf( __( 'Notification saved successfully. %sBack to notifications.%s', 'gravityforms' ), '', '' ) ); + } else if ( $is_update && ! $is_valid ) { + GFCommon::add_error_message( __( 'Notification could not be updated. Please enter all required information below.', 'gravityforms' ) ); + } + + // moved page header loading here so the admin messages can be set upon saving and available for the header to print out + GFFormSettings::page_header( __( 'Notifications', 'gravityforms' ) ); + + $notification_ui_settings = self::get_notification_ui_settings( $notification ); + + ?> + + + + +
    + + + '; + } + + ?> + + + + + + +
    + +

    + '; + echo apply_filters( 'gform_save_notification_button', $notification_button ); + ?> +

    +
    + + 0 ) ); + ?> + +

    + +

    + + + prepare_items(); + ?> + +
    + + display(); ?> + + + + + + +
    + + +
    + + '; + $subsetting_close = ' + +
    +
    + '; + + $ui_settings = array(); + $form_id = rgget( 'id' ); + $form = RGFormsModel::get_form_meta( $form_id ); + $form = apply_filters( 'gform_admin_pre_render_' . $form_id, apply_filters( 'gform_admin_pre_render', $form ) ); + $is_valid = empty( GFCommon::$errors ); + + ob_start(); ?> + + > + + + + + + + + + + __( 'Form is submitted', 'gravityforms' ) ); + if ( rgars( $form, 'save/enabled' ) ) { + $notification_events['form_saved'] = __( 'Form is saved', 'gravityforms' ); + $notification_events['form_save_email_requested'] = __( 'Save and continue email is requested', 'gravityforms' ); + } + $notification_events = apply_filters( 'gform_notification_events', $notification_events ); + $event_style = count( $notification_events ) == 1 || rgar( $notification, 'isDefault' ) ? "style='display:none'" : ''; + ?> + > + + + + + + + + + + + + > + + + + + + value="email" onclick="jQuery('.notification_to_container').hide(); jQuery('#gform_notification_to_email_container').show('slow');" /> + +    + value="field" onclick="jQuery('.notification_to_container').hide(); jQuery('#gform_notification_to_field_container').show('slow');" /> + +    + value="routing" onclick="jQuery('.notification_to_container').hide(); jQuery('#gform_notification_to_routing_container').show('slow');" /> + + + + '; + } + ?> + + > + + + + + + + + . + + + + + + + + > + + + + + + +
    +

    +
    + + + + + + + > + + +
    + +
    +

    +
    + +
    > + + + + + + + + + + 1 ) { ?> + remove this email routing + +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + > + + + + + + + + false, 'editor_class' => 'merge-tag-support mt-wp_editor mt-manual_position mt-position-right' ) ); + } else { + ?> + + + + + + + + + + + + /> + + + + + + > + + + + + /> + +
    + + + + +
    + +
    + + + + + + id; + } + } + + return 0; + } + + private static function get_routing_fields( $form, $selected_field_id ) { + $str = ''; + foreach ( $form['fields'] as $field ) { + $input_type = RGFormsModel::get_input_type( $field ); + $field_label = RGFormsModel::get_label( $field ); + if ( in_array( $input_type, self::$supported_fields ) ) { + $selected = $field->id == $selected_field_id ? "selected='selected'" : ''; + $str .= "'; + } + } + + return $str; + } + + private static function get_field_values( $i, $form, $field_id, $selected_value, $max_field_length = 16 ) { + if ( empty( $field_id ) ) { + $field_id = self::get_first_routing_field( $form ); + } + + if ( empty( $field_id ) ) { + return ''; + } + + $field = RGFormsModel::get_field( $form, $field_id ); + $is_any_selected = false; + $str = ''; + + if ( ! $field ) { + return ''; + } + + if ( $field->type == 'post_category' && $field->displayAllCategories == true ) { + $str .= wp_dropdown_categories( array( 'class' => 'gfield_routing_select gfield_category_dropdown gfield_routing_value_dropdown', 'orderby' => 'name', 'id' => 'routing_value_' . $i, 'selected' => $selected_value, 'hierarchical' => true, 'hide_empty' => 0, 'echo' => false ) ); + } elseif ( $field->choices ) { + $str .= "'; + } else { + //create a text field for fields that don't have choices (i.e text, textarea, number, email, etc...) + $str = ""; + } + + return $str; + } + + public static function get_post_category_values() { + + $id = 'routing_value_' . rgpost( 'ruleIndex' ); + $selected = rgempty( 'selectedValue' ) ? 0 : rgpost( 'selectedValue' ); + + $dropdown = wp_dropdown_categories( array( 'class' => 'gfield_routing_select gfield_routing_value_dropdown gfield_category_dropdown', 'orderby' => 'name', 'id' => $id, 'selected' => $selected, 'hierarchical' => true, 'hide_empty' => 0, 'echo' => false ) ); + die( $dropdown ); + } + + /** + * Delete a form notification by ID. + * + * @param mixed $notification_id + * @param mixed $form_id Can pass a form ID or a form object + * + * @return mixed + */ + public static function delete_notification( $notification_id, $form_id ) { + + if ( ! $form_id ) { + return false; + } + + $form = ! is_array( $form_id ) ? RGFormsModel::get_form_meta( $form_id ) : $form_id; + + do_action( 'gform_pre_notification_deleted', $form['notifications'][ $notification_id ], $form ); + + unset( $form['notifications'][ $notification_id ] ); + + // clear Form cache so next retrieval of form meta will reflect deleted notification + RGFormsModel::flush_current_forms(); + + return RGFormsModel::save_form_notifications( $form['id'], $form['notifications'] ); + } + + public static function duplicate_notification( $notification_id, $form_id ) { + + if ( ! $form_id ) { + return false; + } + + $form = ! is_array( $form_id ) ? RGFormsModel::get_form_meta( $form_id ) : $form_id; + + $new_notification = $form['notifications'][ $notification_id ]; + $name = rgar( $new_notification, 'name' ); + $new_id = uniqid(); + + $count = 2; + $new_name = $name . ' - Copy 1'; + while ( ! self::is_unique_name( $new_name, $form['notifications'] ) ) { + $new_name = $name . " - Copy $count"; + $count ++; + } + $new_notification['name'] = $new_name; + $new_notification['id'] = $new_id; + unset( $new_notification['isDefault'] ); + if ( $new_notification['toType'] == 'hidden' ) { + $new_notification['toType'] = 'email'; + } + + $form['notifications'][ $new_id ] = $new_notification; + + // clear Form cache so next retrieval of form meta will return duplicated notification + RGFormsModel::flush_current_forms(); + + return RGFormsModel::save_form_notifications( $form['id'], $form['notifications'] ); + } + + public static function is_unique_name( $name, $notifications ) { + + foreach ( $notifications as $notification ) { + if ( strtolower( rgar( $notification, 'name' ) ) == strtolower( $name ) ) { + return false; + } + } + + return true; + } + +} + + +class GFNotificationTable extends WP_List_Table { + + public $form; + + function __construct( $form ) { + + $this->form = $form; + + $this->_column_headers = array( + array( + 'cb' => '', + 'name' => __( 'Name', 'gravityforms' ), + 'subject' => __( 'Subject', 'gravityforms' ) + ), + array(), + array(), + ); + + parent::__construct(); + } + + function prepare_items() { + $this->items = $this->form['notifications']; + } + + function display() { + $singular = rgar( $this->_args, 'singular' ); + ?> + + + + + print_column_headers(); ?> + + + + + + print_column_headers( false ); ?> + + + + > + + display_rows_or_placeholder(); ?> + + +
    + + '; + echo $this->single_row_columns( $item ); + echo ''; + } + + function column_default( $item, $column ) { + echo rgar( $item, $column ); + } + + function column_cb( $item ) { + if ( rgar( $item, 'isDefault' ) ) { + return; + } + $is_active = isset( $item['isActive'] ) ? $item['isActive'] : true; + ?> + <?php $is_active ? __( 'Active', 'gravityforms' ) : __( 'Inactive', 'gravityforms' ); ?> + $item['id'] ) ); + $actions = apply_filters( + 'gform_notification_actions', array( + 'edit' => '' . __( 'Edit', 'gravityforms' ) . '', + 'duplicate' => '' . __( 'Duplicate', 'gravityforms' ) . '', + 'delete' => '' . __( 'Delete', 'gravityforms' ) . '' + ) + ); + + if ( isset( $item['isDefault'] ) && $item['isDefault'] ) { + unset( $actions['delete'] ); + } + + ?> + + +
    + + $html ) { + $divider = $key == $last_key ? '' : ' | '; + ?> + + + + + +
    + + 0 ) ) . "'>", '' ); + } +} \ No newline at end of file diff --git a/preview.php b/preview.php index 80122cf..c950025 100644 --- a/preview.php +++ b/preview.php @@ -2,75 +2,78 @@ //For backwards compatibility, load wordpress if it hasn't been loaded yet //Will be used if this file is being called directly -if(!class_exists("RGForms")){ - for ( $i = 0; $i < $depth = 10; $i++ ) { - $wp_root_path = str_repeat( '../', $i ); +if ( ! class_exists( 'RGForms' ) ) { + for ( $i = 0; $i < $depth = 10; $i ++ ) { + $wp_root_path = str_repeat( '../', $i ); - if ( file_exists("{$wp_root_path}wp-load.php" ) ) { - require_once("{$wp_root_path}wp-load.php"); - require_once("{$wp_root_path}wp-admin/includes/admin.php"); - break; - } - } + if ( file_exists( "{$wp_root_path}wp-load.php" ) ) { + require_once( "{$wp_root_path}wp-load.php" ); + require_once( "{$wp_root_path}wp-admin/includes/admin.php" ); + break; + } + } - //redirect to the login page if user is not authenticated - auth_redirect(); + //redirect to the login page if user is not authenticated + auth_redirect(); } -if(!GFCommon::current_user_can_any(array("gravityforms_edit_forms", "gravityforms_create_form", "gravityforms_preview_forms"))) - die(__("You don't have adequate permission to preview forms.", "gravityforms")); +if ( ! GFCommon::current_user_can_any( array( 'gravityforms_edit_forms', 'gravityforms_create_form', 'gravityforms_preview_forms' ) ) ) { + die( __( 'You don\'t have adequate permission to preview forms.', 'gravityforms' ) ); +} ?> > - - - - <?php _e("Form Preview", "gravityforms") ?> - - - - - - + + + + <?php _e( 'Form Preview', 'gravityforms' ) ?> + + + + + + - - - + + + - - /css/preview.css' type='text/css' /> + + $styles = apply_filters( 'gform_preview_styles', array(), $form ); +if ( ! empty( $styles ) ) { + wp_print_styles( $styles ); +} +?> - - -
    -
    -
    -
    -
    -
    -
    - + +
    +
    +
    +

    +
    +
    +
    +
    +
    + -
    - - + ?> +
    + + \ No newline at end of file diff --git a/print-entry.php b/print-entry.php index 36b1eb5..e6e0d3c 100644 --- a/print-entry.php +++ b/print-entry.php @@ -2,132 +2,140 @@ //For backwards compatibility, load wordpress if it hasn't been loaded yet //Will be used if this file is being called directly -if(!class_exists("RGForms")){ - for ( $i = 0; $i < $depth = 10; $i++ ) { - $wp_root_path = str_repeat( '../', $i ); - - if ( file_exists("{$wp_root_path}wp-load.php" ) ) { - require_once("{$wp_root_path}wp-load.php"); - require_once("{$wp_root_path}wp-admin/includes/admin.php"); - break; - } - } - - //redirect to the login page if user is not authenticated - auth_redirect(); +if ( ! class_exists( 'RGForms' ) ) { + for ( $i = 0; $i < $depth = 10; $i ++ ) { + $wp_root_path = str_repeat( '../', $i ); + + if ( file_exists( "{$wp_root_path}wp-load.php" ) ) { + require_once( "{$wp_root_path}wp-load.php" ); + require_once( "{$wp_root_path}wp-admin/includes/admin.php" ); + break; + } + } + + //redirect to the login page if user is not authenticated + auth_redirect(); +} + +if ( ! GFCommon::current_user_can_any( 'gravityforms_view_entries' ) ) { + die( __( "You don't have adequate permission to view entries.", 'gravityforms' ) ); } -if(!GFCommon::current_user_can_any("gravityforms_view_entries")) - die(__("You don't have adequate permission to view entries.", "gravityforms")); - -$form_id = absint(rgget("fid")); -$leads = rgget("lid"); -if(0 == $leads){ - // get all the lead ids for the current filter / search - $filter = rgget("filter"); - $search = rgget("search"); - $star = $filter == "star" ? 1 : null; - $read = $filter == "unread" ? 0 : null; - $status = in_array($filter, array("trash", "spam")) ? $filter : "active"; - $search_criteria["status"] = $status; - - if($star) - $search_criteria["field_filters"][] = array("key" => "is_starred", "value" => (bool) $star ); - if(!is_null($read)) - $search_criteria["field_filters"][] = array("key" => "is_read", "value" => (bool) $read ); - - $search_field_id = rgget("field_id"); - $search_operator = rgget("operator"); - if(isset($_GET["field_id"]) && $_GET["field_id"] !== ''){ - $key = $search_field_id; - $val = rgget("s"); - $strpos_row_key = strpos($search_field_id, "|"); - if ($strpos_row_key !== false) { //multi-row - $key_array = explode("|", $search_field_id); - $key = $key_array[0]; - $val = $key_array[1] . ":" . $val; - } - $search_criteria["field_filters"][] = array( - "key" => $key, - "operator" => rgempty("operator", $_GET) ? "is" : rgget("operator"), - "value" => $val - ); - } - $lead_ids = GFFormsModel::search_lead_ids($form_id, $search_criteria); +$form_id = absint( rgget( 'fid' ) ); +$leads = rgget( 'lid' ); +if ( 0 == $leads ) { + // get all the lead ids for the current filter / search + $filter = rgget( 'filter' ); + $search = rgget( 'search' ); + $star = $filter == 'star' ? 1 : null; + $read = $filter == 'unread' ? 0 : null; + $status = in_array( $filter, array( 'trash', 'spam' ) ) ? $filter : 'active'; + $search_criteria['status'] = $status; + + if ( $star ) { + $search_criteria['field_filters'][] = array( 'key' => 'is_starred', 'value' => (bool) $star ); + } + if ( ! is_null( $read ) ) { + $search_criteria['field_filters'][] = array( 'key' => 'is_read', 'value' => (bool) $read ); + } + + $search_field_id = rgget( 'field_id' ); + $search_operator = rgget( 'operator' ); + if ( isset( $_GET['field_id'] ) && $_GET['field_id'] !== '' ) { + $key = $search_field_id; + $val = rgget( 's' ); + $strpos_row_key = strpos( $search_field_id, '|' ); + if ( $strpos_row_key !== false ) { //multi-row + $key_array = explode( '|', $search_field_id ); + $key = $key_array[0]; + $val = $key_array[1] . ':' . $val; + } + $search_criteria['field_filters'][] = array( + 'key' => $key, + 'operator' => rgempty( 'operator', $_GET ) ? 'is' : rgget( 'operator' ), + 'value' => $val, + ); + } + $lead_ids = GFFormsModel::search_lead_ids( $form_id, $search_criteria ); } else { - $lead_ids = explode(',', $leads); + $lead_ids = explode( ',', $leads ); } -$page_break = rgget("page_break") ? 'print-page-break' : false; +$page_break = rgget( 'page_break' ) ? 'print-page-break' : false; // sort lead IDs numerically -sort($lead_ids); +sort( $lead_ids ); -if(empty($form_id) || empty($lead_ids)) - die(__("Form Id and Lead Id are required parameters.", "gravityforms")); +if ( empty( $form_id ) || empty( $lead_ids ) ) { + die( __( 'Form Id and Lead Id are required parameters.', 'gravityforms' ) ); +} -$form = RGFormsModel::get_form_meta($form_id); +$form = RGFormsModel::get_form_meta( $form_id ); ?> + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - - - - - - - - Print Preview : - <?php echo $form["title"] ?> : - <?php echo count($lead_ids) > 1 ? __("Entry # ", "gravityforms") . $lead_ids[0] : 'Bulk Print' ?> - - - + + + + + + + Print Preview : + <?php echo $form['title'] ?> : + <?php echo count( $lead_ids ) > 1 ? __( 'Entry # ', 'gravityforms' ) . $lead_ids[0] : 'Bulk Print' ?> + + + - - - -
    - + + + + +
    +
    '; + // output entry divider/page break + if ( array_search( $lead_id, $lead_ids ) < count( $lead_ids ) - 1 ) { + echo ''; + } - do_action("gform_print_entry_footer", $form, $lead); - } + do_action( 'gform_print_entry_footer', $form, $lead ); +} - ?> -
    - +?> +
    + \ No newline at end of file diff --git a/recaptchalib.php b/recaptchalib.php index 6a2ab0f..8f5935d 100644 --- a/recaptchalib.php +++ b/recaptchalib.php @@ -45,13 +45,13 @@ * @return string - encoded request */ function _recaptcha_qsencode ($data) { - $req = ""; - foreach ( $data as $key => $value ) - $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; + $req = ""; + foreach ( $data as $key => $value ) + $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; - // Cut the last '&' - $req=substr($req,0,strlen($req)-1); - return $req; + // Cut the last '&' + $req=substr($req,0,strlen($req)-1); + return $req; } @@ -66,29 +66,29 @@ function _recaptcha_qsencode ($data) { */ function _recaptcha_http_post($host, $path, $data, $port = 80) { - $req = _recaptcha_qsencode ($data); + $req = _recaptcha_qsencode ($data); - $http_request = "POST $path HTTP/1.0\r\n"; - $http_request .= "Host: $host\r\n"; - $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; - $http_request .= "Content-Length: " . strlen($req) . "\r\n"; - $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; - $http_request .= "\r\n"; - $http_request .= $req; + $http_request = "POST $path HTTP/1.0\r\n"; + $http_request .= "Host: $host\r\n"; + $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; + $http_request .= "Content-Length: " . strlen($req) . "\r\n"; + $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; + $http_request .= "\r\n"; + $http_request .= $req; - $response = ''; - if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { - die ('Could not open socket'); - } + $response = ''; + if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { + die ('Could not open socket'); + } - fwrite($fs, $http_request); + fwrite($fs, $http_request); - while ( !feof($fs) ) - $response .= fgets($fs, 1160); // One TCP-IP packet - fclose($fs); - $response = explode("\r\n\r\n", $response, 2); + while ( !feof($fs) ) + $response .= fgets($fs, 1160); // One TCP-IP packet + fclose($fs); + $response = explode("\r\n\r\n", $response, 2); - return $response; + return $response; } @@ -106,20 +106,20 @@ function _recaptcha_http_post($host, $path, $data, $port = 80) { function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false, $lang='en') { if ($pubkey == null || $pubkey == '') { - die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); + die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin"); } if ($use_ssl) { - $server = RECAPTCHA_API_SECURE_SERVER; - } else { - $server = RECAPTCHA_API_SERVER; - } + $server = RECAPTCHA_API_SECURE_SERVER; + } else { + $server = RECAPTCHA_API_SERVER; + } - $errorpart = ""; - if ($error) { - $errorpart = "&error=" . $error; - } - return ' + $errorpart = ""; + if ($error) { + $errorpart = "&error=" . $error; + } + return '