Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(form): ensure custom amount is never less than minimum amount #2819

Closed
2 tasks done
raftaar1191 opened this issue Feb 16, 2018 · 3 comments
Closed
2 tasks done
Assignees

Comments

@raftaar1191
Copy link
Contributor

raftaar1191 commented Feb 16, 2018

Issue Overview

It will be good fix if we set the Custom Amount value to the Minimum Amount at the time when user click on it Custom Amount ( button/Dropdown/radio ) and if user left it blank then it should be again default set to the minimum amount

*Notes: It's working when we put Amount greater then ZERO but less then Donations minimum amount but not when the amount is set to ZERO

Expected Behavior

User should set the the value to zero, If the Minimum amount is 1

Current Behavior

User can set the the value to zero, If the Minimum amount is 1

Steps to Reproduce (for bugs)

See the Video

Video link

Video Link: https://screencast-o-matic.com/watch/cFnD6eos4S

image

image

Todos

  • Tests
  • Documentation

WordPress Environment

``` ### WordPress Environment ###

Home URL: http://give20.local
Site URL: http://give20.local
WP Version: 4.9.4
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
Permalink Structure: /%postname%/
Show on Front: posts
Table Prefix Length: wp_
Table Prefix Length: 3
Table Prefix Status: Acceptable
Admin AJAX: Accessible
Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, refunded, failed, revoked, cancelled, abandoned, processing, preapproval

Server Environment

Hosting Provider: DBH: localhost, SRV: give20.local
TLS Connection: Connection uses TLS 1.2
TLS Connection: Probably Okay
Server Info: nginx/1.10.1
PHP Version: 7.0.3
PHP Post Max Size: 1,000 MB
PHP Time Limit: 900
PHP Max Input Vars: 3000
PHP Max Upload Size: 1,000 MB
cURL Version: ❌ 7.38.0, OpenSSL/1.0.1t - We recommend a minimum cURL version of 7.40.
SUHOSIN Installed: –
MySQL Version: 5.6.34
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Give Configuration

Give Version: 2.0.4
Give Cache: Enabled
Database Updates: All DB Updates Completed.
Give Cache: Enabled
Give Cache: ✔New Donation✔Donation Receipt✔New Offline Donation✔Offline Donation Instructions✔New User Registration✔User Registration Information✔Email access
Upgraded From: 2.0.3
Test Mode: Enabled
Currency Code: USD
Currency Position: Before
Decimal Separator: .
Thousands Separator: ,
Success Page: http://give20.local/donation-confirmation/
Failure Page: http://give20.local/donation-failed/
Donation History Page: http://give20.local/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Test Donation, Offline Donation
Default Payment Gateway: Test Donation
PayPal IPN Verification: Enabled
PayPal IPN Notifications: N/A
Donor Email Access: Enabled

Session Configuration

Give Use Sessions: Enabled
Session: Disabled

Active Give Add-ons

Other Active Plugins

Duplicate Post: by Enrico Battocchi – 3.2.1

Inactive Plugins

Braintree For WooCommerce Free: by Payment Plugins, support@paymentplugins.com – 2.6.20
Braintree WooCommerce Addon: by Syed Nazrul Hassan – 1.0.0
Charitable: by WP Charitable – 1.5.9
Give - 2Checkout Gateway: by WordImpress – 1.0.2
Give - Authorize.net Gateway: by WordImpress – 1.3.3
Give - AWeber: by WordImpress – 1.0.2
Give - Braintree Gateway: by WordImpress – 1.1.1
Give - CCAvenue Gateway: by WordImpress – 1.0
Give - ConvertKit: by WordImpress – 1.0.1
Give - CSV Toolbox: by WordImpress – 1.0
Give - Development Plugin: by Raftaar1191 – 1.0.0
Give - Display Donors: by WordImpress, LLC – 1.0
Give - Dwolla Gateway: by WordImpress – 1.1.2
Give - Email Reports: by WordImpress – 1.0
Give - Fee Recovery: by WordImpress – 1.3.8
Give - Form Countdown: by WordImpress – 1.0
Give - Form Field Manager: by WordImpress – 1.2.6
Give - Gift Aid: by WordImpress – 1.1
Give - Google Analytics Donation Tracking: by WordImpress – 1.1.1
Give - MailChimp: by WordImpress – 1.3.7
Give - Manual Donations: by WordImpress – 1.2.2
Give - Paymill Gateway: by WordImpress – 1.1
Give - PDF Receipts: by WordImpress – 2.2.4
Give - Recurring Donations: by WordImpress – 1.5.5
Give - Stripe Gateway: by WordImpress – 1.5.2
Give - Tributes: by WordImpress – 1.3.6
Loco Translate: by Tim Whitlock – 2.0.17
Polylang: by Frédéric Demarle – 2.3
WooCommerce: by Automattic – 3.3.1
WooCommerce PayPal Powered by Braintree Gateway: by WooCommerce – 2.1.1
WP Hide & Security Enhancer: by Nsp Code – 1.4.7.6
WPS Hide Login: by Remy Perona for WPServeur – 1.2.1

Theme

Name: Twenty Sixteen
Version: 1.4
Author URL: https://wordpress.org/
Child Theme: No – If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme

</details>
@ravinderk ravinderk added this to the 2.0.5 milestone Feb 20, 2018
@kevinwhoffman kevinwhoffman changed the title feat(donation): Set Custom amount Minimum Amount if empty. feat(form): ensure custom amount is never less than minimum amount Feb 21, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
raftaar1191 added a commit to raftaar1191/Give that referenced this issue Feb 22, 2018
ravinderk added a commit that referenced this issue Feb 23, 2018
fix(donation): Fix minimum amount check in donation form #2819
DevinWalker added a commit that referenced this issue Feb 28, 2018
* release/2.1: (38 commits)
  fix(dashboard-widget): incorrect stat for this year #2847
  fix(cache): typo in text domain
  fix(cache): typo in function name
  fix(compat): resolve caching conflict with W3TC
  fix(form): #2838
  fix(compat): Change hook that load give text domain #2784
  style(code): improve formatting
  fix(form): sanitize default minimum amount
  fix(donation): Change Minimum Amount to 1.0 if empty  #2819
  fix(phpcs): Fix phpcs error #2819
  refactor(donation): Remove unwanted condition check #2819
  fix(donation): Fix amount format #2819
  fix(donation): Fix minimum donation amount check #2819
  refactor(import-settings): use core functions and sanitize $_POST
  feat(export): Make checkbox fields for export checked by default
  feat(export): Add feature to selectively export fields
  fix(media-uploads): upload file to correct folder
  fix(cache): prevent possible cache  conflict on multisite
  fix(db): use get_offset fn instead of repeatable logic
  style(db):improve code formatting
  ...
DevinWalker added a commit that referenced this issue Feb 28, 2018
* release/2.1: (39 commits)
  fix(dashboard-widget): incorrect stat for this year #2847
  fix(cache): typo in text domain
  fix(cache): typo in function name
  feat(admin-plugin): Add Give menu in plugin menu section #2278
  fix(compat): resolve caching conflict with W3TC
  fix(form): #2838
  fix(compat): Change hook that load give text domain #2784
  style(code): improve formatting
  fix(form): sanitize default minimum amount
  fix(donation): Change Minimum Amount to 1.0 if empty  #2819
  fix(phpcs): Fix phpcs error #2819
  refactor(donation): Remove unwanted condition check #2819
  fix(donation): Fix amount format #2819
  fix(donation): Fix minimum donation amount check #2819
  refactor(import-settings): use core functions and sanitize $_POST
  feat(export): Make checkbox fields for export checked by default
  feat(export): Add feature to selectively export fields
  fix(media-uploads): upload file to correct folder
  fix(cache): prevent possible cache  conflict on multisite
  fix(db): use get_offset fn instead of repeatable logic
  ...
@DevinWalker
Copy link
Member

I found a JS bug with this due to the value changing from custom to an amount - reopening:

2018-02-27_19-23-10

@DevinWalker DevinWalker reopened this Feb 28, 2018
@ravinderk ravinderk modified the milestones: 2.0.5, 2.0.6 Feb 28, 2018
@ravinderk
Copy link
Collaborator

@raftaar1191
I found issue with Recurring addon.

Steps to reproduce:

  1. Create a form with custom amount active.
  2. set minimum custom amount to 10.00
  3. Try to switch to custom amount

image

@DevinWalker
Copy link
Member

I'm going to close this issue because right now the functionality works pretty well and we should shift focus on revamping the entire form experience rather than nit picking minor UI issues in the current one.

@DevinWalker DevinWalker removed this from the 2.0.6 milestone Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants