Conversation
Generally looks really good. Data is validated, if all is good then user is transferred to the donation website. Donation data is stored in the database. (Tested on my local instances but there is also test running on test.wikimedia.de, so I assume we can say that it works).
|
static banner upgrade form
At the moment, the GPG public key is not configurable, this must be changed before deployment!
Moved getting the amount from the form to its own function. Use the function to validate in the Banner class => not ideal, needs to be moved/refactored later.
Instead of adding and removing CSS classes we now trigger custom jQuery events. This makes the handling of venets more flexible.
The sensitive banner now uses thze validation events.
Since the Banner class is sensitive banner specific it makes more sense to put markup-specific code in the Banner.Form class.
Otherwise the value "Kein Titel" would be sent which is not a valid value.
Error (and success) markup is now removed before validating values. Special code for validating the amount.
The validation only succeeds if the data that is sent to the server matches the selected payment type and address type, so we must send the correct data on the client side.
When payment type or address type changes, the fields that are no longer needed are cleared.
The code was already setting the payment type, no need to check the button status.
Simulate the button on the original donation form which encodes the form action and the payment type.
getFormData returned jQuery object instead of value.
Form now sends data to regular donation page on validation success.
Move them a bit to the left so they don't break
cb1c448
to
c3f62ab
Compare
Thanks for all the comments. I will close this PR now and create a new one against master as soon as I have addressed the other points (SEPA mandate validation and BIC generation) |
Add validation code that connects the sensitive banner to the server for validation and data submission.