-
Notifications
You must be signed in to change notification settings - Fork 581
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update benefits validation rules (#2120)
* Add flag to control if package allows a la carte benefits * Applications for standalone benefits cannot have packages * Don't validate a la carte application with a disabled a la carte package * Don't display Potential a la carte option if package disabled it * Disable standalone inputs if package was selected * Fix breaking tests which have standalone benefits with packages and a la carte ones * Disable a la carte benefits if package disables it * Force a la carte and standalone cards positions to the start of the div * Disable a la carte benefits when form is empty * Add title to inputs to provide more information about the disabled inputs * ensure state for sold-out a la carte benefits is rendered in UI * un-select any a la carte when selecting a package that doesn't allow them * add notes to a la carte and standalone instructions to clarify why options are enabled/disabled * Initial load of benefits state on the page load. * Display clear form button at the bottom of the form * Add JS code to clear form and reset application form to its initial state Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
- Loading branch information
Showing
8 changed files
with
188 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
sponsors/migrations/0091_sponsorshippackage_allow_a_la_carte.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.24 on 2022-08-13 10:51 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sponsors', '0090_auto_20220812_1314'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='sponsorshippackage', | ||
name='allow_a_la_carte', | ||
field=models.BooleanField(default=True, help_text='If disabled, a la carte benefits will be disabled in application form'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters