opensourcepos
opensourcepos copied to clipboard
Create Giftcard issue
Background information
IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.
Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:
- [x] Reporting an issue of an unmodified OSPOS installation
- [x] Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
- [x] Read README, WHATS_NEW, INSTALL.md and UPGRADE
- [x] Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
- [x] Read the wiki
- [x] Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
- [x] Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable
Installation information
- OSPOS version is: latest but I can reproduce with 3.3.4 using https://demo.opensourcepos.org/
- OSPOS git commit hash is:
- PHP version is: 7.x
- MySQL or MariaDB version is: 10.x
- OS and version is:
- WebServer is:
- Selected language is:
- (If applicable) Docker installation:
- (If applicable) Installation package for the LAMP/LEMP stack is:
Issue / Bug / Question / New Feature
- Go to GIftcards
- Create new Giftcard
- Select a Customer
- Set 1000.00 as value and leave the cursor in the text box (important!)
- Click with the mouse Submit
- The dialog box will not close and Submit is grayed out but no new Giftcard is created
- To exit from the dialog box click on the X on the top right
If you unselect the value text box or set something smaller than 1000 the Submit will succeed.
It took a while to understand why sometimes works and sometime no and that's the sequence to reproduce the issue.
Might be related to the form validation that is not triggered? There is this greying out we did for the double submit issue. It might be related to that. The form might not be marked as valid as the field didn't blur yet.
Or it could also be related to locale parsing on the backend. There is a format validator for the amount field that checks whether it can parse the amount. Maybe it does not consider the dot correct for some reason? Can you check the POST details in this case?
I believe the issue is that the cursor doesn't leave the text box before the submit. Therefore it's not validated. It's a tricky combination.
@daN4cat I can't imagine the form validation not being triggered once you submit the form? Are you sure it's due to the blur() event not being fired? We did add this double submit prevention some time ago so it could also be related to that. Perhaps if you have the time maybe revert that change and retest? Do you want to have a fix for this included in 3.3.6?
It's a minor because there is a workaround, which is to make sure the cursor leaves the text box before clicking submit. We can move a fix to the next version so that we can release 3.3.6.
Release is done now.