Commit graph

35 commits

Author SHA1 Message Date
Jennifer Richards 08e953995a
feat: better reject null characters in forms (#7472)
* feat: subclass ModelMultipleChoiceField to reject nuls

* refactor: Use custom ModelMultipleChoiceField

* fix: handle value=None
2024-05-28 10:34:55 -05:00
Robert Sparks b9baa6270e
chore: remove a stray space that crashes black (#5185) 2023-02-23 08:50:24 -06:00
Jennifer Richards 2993322958
fix: Listify initial field value when SearchableField.max_entries == 1 (#4951)
* fix: Listify initial field value when SearchableField.max_entries == 1

* fix: Don't convert initial=None to initial=[None] in has_changed()
2023-01-06 16:06:00 -06:00
Lars Eggert 79bf320acc
fix: Only show ADs when assigning ADs for groups (#4440)
* fix: Only show ADs when assigning ADs for groups

Fixes #4302

* Fix test failure
2022-09-13 09:54:12 -05:00
Jennifer Richards 608b8e16a4
feat: only offer IAB/IESG members for bofreq responsible leadership (#4276)
* refactor: avoid using select2 data-* attrs on html elements

Using "data-ajax--url" shadows explicit configuration in our
select2.js wrapper. Use "data-select2-ajax-url" to avoid this.

Also add ability to omit the ajax setup entirely by returning
None from ajax_url().

* chore: hook up a flag to disable ajax for SearchablePersonsField

* refactor: send select2 prefetch data as array and allow config of min input length

* feat: only offer IAB/IESG members for bofreq responsible leadership

* test: area directors/IAB members should be options for bofreq responsible leaders

* test: update tests to match changes to SearchableField

* fix: clean up SearchablePersonsField breakage when searching by email address

* chore: finish incomplete comment
2022-07-26 11:23:00 -05:00
Lars Eggert fa17ddd705
refactor: tweak the horrible code in SearchableField (#3957)
* Fix: Tweak the horrible code in SearchableField so another corner case works

Fixes #3940. Hopefully doesn't break anything.

* fix: remove incorrect remaining loop.

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-05-19 12:38:10 -05:00
Lars Eggert 335a39d4fc More fixes.
- Legacy-Id: 19884
2022-01-28 13:00:47 +00:00
Lars Eggert cf629a42ad And more fixes.
- Legacy-Id: 19877
2022-01-25 10:14:25 +00:00
Lars Eggert a5cbf5307e More fixes
- Legacy-Id: 19835
2022-01-12 11:54:00 +00:00
Lars Eggert 5132661b06 More test fixes
- Legacy-Id: 19803
2022-01-05 11:25:25 +00:00
Lars Eggert c68446ae93 More select2 and test fixes.
- Legacy-Id: 19781
2021-12-14 18:19:12 +00:00
Lars Eggert e9fd78128c Interim commit
- Legacy-Id: 19765
2021-12-09 18:26:53 +00:00
Lars Eggert f974fd3c04 Fix more things
- Legacy-Id: 19762
2021-12-09 06:41:00 +00:00
Lars Eggert 448c6dbe9e And more bs5 stuff
- Legacy-Id: 19717
2021-12-01 13:52:50 +00:00
Lars Eggert 9e038d3e98 Bring back some additional js dependencies.
- Legacy-Id: 19707
2021-11-24 14:32:35 +00:00
Jennifer Richards bcd37edfcd Merged from session_purpose_dev
Create dev branch for session purpose work (from revision [19414])
Snapshot of dev work to add session purpose annotation (from revision [19415])
Allow non-WG-like groups to request additional sessions/durations and bypass approval (from revision [19424])
Add 'closed' session purpose, assign purposes for nomcom groups, and update schedule editor to enforce timeslot type and allow blurring sessions by purpose (from revision [19427])
Add management command to set up timeslots/sessions for testing/demoing 'purpose' field (from revision [19430])
Update session purposes and group type -> purpose map to match notes page, change 'session' purpose to 'regular' (from revision [19433])
Redirect edit_schedule urls to edit_meeting_schedule view (from revision [19434])
Allow hiding/blurring sessions and timeslots based on TimeSlotType in the schedule editor (from revision [19438])
Disable session purpose/timeslot type hiding on schedule editor when only 0 or 1 options (from revision [19439])
Improvements to the timeslot and schedule editors (move new toggles to modals, handle overflowing session names, fix timeslot editor scrolling, add buttons to quickly create single timeslot, accept trailing slash on edit URL) (from revision [19449])
Update purpose/types after discussions, add on_agenda Session field, prevent session requests for groups with no allowed purpose, handle addition fields in session request, fix editing session requests, add session edit form/access from schedule editor, eliminate TimeSlotTypeName "private" field, add server-side timeslot type filtering to schedule editor (from revision [19549])
Eliminate the officehours timeslot type, update/renumber migrations, mark offagenda/reserved TimeSlotTypeNames as not used, add a 'none' SessionPurposeName and disallow null, update agenda filter keywords/filter helpers, fix broken tests and general debugging (from revision [19550])
Tear out old meeting schedule editor and related code (from revision [19551])
Fix merge errors in preceding commits (from revision [19556])
 - Legacy-Id: 19570
Note: SVN reference [19415] has been migrated to Git commit 1054f90873

Note: SVN reference [19424] has been migrated to Git commit 5318081608

Note: SVN reference [19427] has been migrated to Git commit 173e438aee

Note: SVN reference [19430] has been migrated to Git commit 7a2530a0a6

Note: SVN reference [19433] has been migrated to Git commit 3be50d6e39

Note: SVN reference [19434] has been migrated to Git commit 3e3d681e5f

Note: SVN reference [19438] has been migrated to Git commit b6ac3d4b1d

Note: SVN reference [19439] has been migrated to Git commit 446ac7a47e

Note: SVN reference [19449] has been migrated to Git commit 5cbe402036

Note: SVN reference [19549] has been migrated to Git commit 3dfce7b850

Note: SVN reference [19550] has been migrated to Git commit 7b35c09c40

Note: SVN reference [19551] has been migrated to Git commit d7f20342b6

Note: SVN reference [19556] has been migrated to Git commit 2b1864f5a0
2021-11-09 01:35:25 +00:00
Jennifer Richards 1054f90873 Snapshot of dev work to add session purpose annotation
- Legacy-Id: 19415
2021-10-12 17:08:58 +00:00
Mark J. Donnelly 604d6edef0 Add a new Django field, IETFJSONField
This field is needed because the plain JSONField does not permit empty arrays - [] - or empty objects - {} - when the field is marked as required.  Those values explicitly evaluate to a null value, and are rejected.

Instead, the IETFJSONField accepts two new arguments to control this:
- empty_values: An array of values that should evaluate to null/empty, and be rejected.
- accepted_empty_values: An array of values that should *not* evaluate to null/empty, and be accepted.

This allows the programmer to specify either a positive or negative statement of what values to accept.

Fixes issue #3331.  Commit ready for merge.
 - Legacy-Id: 19401
2021-10-07 19:30:51 +00:00
Jennifer Richards 2060173f3a Improve proceedings display with new title block, configurable host logos, and additional PDF or URL materials. Fixes #3147. Commit ready for merge.
- Legacy-Id: 19306
2021-08-30 17:02:49 +00:00
Robert Sparks 6d7a0b6d0f Merged in [18939] from jennifer@painless-security.com:
Consolidate repeated searchable field code into SearchableField class. Fix single-valued searchable fields. Make javascript test config reusable. Use Django Form.media for JS/CSS inclusion. Fixes #3196, #3204.
 - Legacy-Id: 18948
Note: SVN reference [18939] has been migrated to Git commit 17d37723f7
2021-04-12 22:07:03 +00:00
Jennifer Richards 17d37723f7 Consolidate repeated searchable field code into SearchableField class. Fix single-valued searchable fields. Make javascript test config reusable. Use Django Form.media for JS/CSS inclusion. Fixes #3196, #3204. Commit ready for merge.
- Legacy-Id: 18939
2021-04-09 15:18:11 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz ab173cb2eb Removed further six usage: six.string_types, six.integer_types, six.moves.urllib instances.
- Legacy-Id: 17390
2020-03-05 20:46:58 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz f481f5c3e6 Replaced use of six with the equivalent pure python3 constructs.
- Legacy-Id: 16428
2019-07-08 10:43:47 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 8e9858379b Fixed some pyflakes and form initialization issues with the upgrade to DurationField.
- Legacy-Id: 12599
2016-12-21 17:03:39 +00:00
Henrik Levkowetz 67b2fc1107 Extended the form fields used for duration to accept additional formats, including formats the secretariat are currently using, in order to avoid trouble with the TimedeltaField --> DurationField transition.
- Legacy-Id: 12598
2016-12-21 15:26:32 +00:00
Ole Laursen 8d5cd02922 Summary: Add a placeholder for datepicker fields
- Legacy-Id: 8916
2015-01-26 12:53:43 +00:00
Ole Laursen 1d51a43be4 Summary: Fix the yyyymmdd to strftime format converter to use a single
pass through the format so that it actually works correctly
 - Legacy-Id: 8732
2014-12-12 11:24:15 +00:00
Ole Laursen c7342d2f30 Summary: Add specialized DateField for triggering Bootstrap datepicker
- Legacy-Id: 8712
2014-11-25 16:43:50 +00:00
Ole Laursen f7ac066059 Integrate Secretariat tools MultiEmailField with the one in
utils/fields.py, also fix a couple of issues in NomCom tool (spelling
bugs and avoid overwriting base_fields on forms with dynamic data)
 - Legacy-Id: 8276
2014-08-17 14:39:23 +00:00
Ole Laursen f6fa699992 Fix MultiEmailField to use validate_email for validation
- Legacy-Id: 6835
2013-12-07 12:54:24 +00:00
Emilio Jiménez 65afd10d4a Refactor mange group views:
* Create a new models NomComGroup with public_key field. Default type is nomcom
 * News urls and views to separate members and chair forms
 * Add rolodex url when person not found.
 * Views access is only for secretariat and chair roles
See #904
 - Legacy-Id: 5069
2012-11-22 10:46:39 +00:00
Emilio Jiménez 230f6cfae7 view only accessible by the secretariat that allows to assign the email of the members and the chair of the NomCom
See #904
 - Legacy-Id: 5066
2012-11-20 00:40:57 +00:00