Commit Graph

84 Commits

Author SHA1 Message Date
Chris Wells fcc6a79924 Alpha sort core form classes 2024-04-15 06:38:22 -07:00
Chris Wells 041a03df0d Re-add diaper change amount and color fields 2024-04-15 06:38:22 -07:00
billybonks f2190ce387 feat: Apply advanced fields to all forms 2024-02-27 20:11:41 -08:00
billybonks 5ec806ef86 feat: use pill radio and include advanced fields on feeding form 2024-02-27 20:11:41 -08:00
billybonks 232cde19ee feat: use field set on some forms
Create choices template to have all multi choice experience be the same
as radio select choices.

Moved notes and tags into advanced template in order to reduce the
amount of fields in a form for users. Given that these two fields are
usually a catch all for anything that is not in the core data model. it
is not garunteed that users will use them.

If a user does decide to use the fields we will store that selection in
localstorage so that they dont have to open it every time.

I put the javascript into the page section, as i seem to have had issues
with javascript blocks overriding each other.
2024-02-27 20:11:41 -08:00
billybonks 60b113f197 feat: create fieldset implementation
In order to have more control and flexiability on how elements are
rendered create field set implementation.

every field set gets rendered in order, and uses the template specified.

This should probably be built into the metaclass of the form but i have
no idea how to do that.
2024-02-27 20:11:41 -08:00
billybonks 3edd645f53 feat: Add PillRadioSelect widget
In order to promote less clicks on the mobile experience, this wideget
will splat out the drop down options similar to child select
2024-02-27 20:11:41 -08:00
billybonksl 3c54636790 feat: create a trimmed form just for bottle feeding.
While Feeding for is great, i think there is room to create optimised
forms for breast feeding and bottle feeding.

This is the first one a trimmed down form for bottle feeding
specifically
2024-01-28 06:03:41 -08:00
Christopher C. Wells e65b1749e0 Catch invalid object ID in form initial setup
Fixes #735
2024-01-27 09:32:51 -08:00
Christopher C. Wells 39c1e98d8c Add birth time support to Child model 2023-10-21 14:02:07 -07:00
Christopher C. Wells b54499d6f2 Add image field to note 2023-10-20 17:06:59 -07:00
Christopher C. Wells e4832ccff8 Use lazy translation in form definition
Fixes #715
2023-10-09 06:40:51 -07:00
John Merlie 1391819548 modify pumping form to add start/end/duration 2023-07-09 08:48:54 -07:00
Christopher Charbonneau Wells 31a0aa4741
513: Make nap user toggleable (#641)
* Add `nap` field, remove `napping` field.

* Default `nap` property to NULL

* Update existing tests

* Format the code!!

* Allow `Sleep.nap` to be blank

* Migrate settings from `NAP_START_MIN` AND `NAP_START_MAX`

* Remove `active` class from boolean fields

* Correct test method name and user config

* Add forms test

* Use settings for Sleep nap model tests
2023-05-07 15:10:50 -07:00
Christopher C. Wells 694bb3f811 Use django-dbsettings package for site settings 2023-04-15 13:59:44 -07:00
Christopher C. Wells 7b7f17fde6 Remove "inactive" timer concept -- delete on complete
Closes #109
2023-03-25 13:23:05 -07:00
Christopher C. Wells a2e203a3f8 Use date only input for dates without time 2023-03-25 13:16:56 -07:00
Christopher C. Wells 353533a6ef Remove custom frontend datetime handlers 2023-03-25 13:15:20 -07:00
Christopher C. Wells 34fe811a54 Upgrade to Bootstrap 5 (#479)
* Update Tempus Dominus to v6 (WIP)

* Re-add calendar input prepend container

* Normalize setting of default date values

* Migrate to Bootstrap 5 (WIP)

* Remove deprecated card columns implementation from dashboard

* Update BS5 data props

* Use Masonry layout for dashboard cards (for now)

This doesn't seem particularly ideal so may need a more involved refactor

* Update styles for Bootstrap 5 deprecations

* Remove resolutions crap

* Refactor deprecated BS4 classes

* Update list table styles

* Refactor deprecated jumbotron class usages

* Update close button structure

* Add `v2` branch to standard CI workflows
2023-03-25 12:57:12 -07:00
Brian O'Connor 945e30adb9 Add tags to Pumping model 2023-01-29 14:09:35 -08:00
Jean-Louis Jouannic 94c557d3b8 🚨 fixes wrong code styling 2022-07-07 14:28:40 -07:00
Jean-Louis Jouannic ac664cb511 applies new child selection widget to all forms
filters out blank option for timer form as it does not really
make sense to allow user to select no child
2022-07-07 14:28:40 -07:00
Jean-Louis Jouannic 424f9947af ⚗️ changes the way to select child in feeding (for now)
- uses input radio instead of select,
- displays child thumbnail.
2022-07-07 14:28:40 -07:00
Christopher C. Wells 379f9b1e86 Move tag widget customizations to form classes
This allows the custom tag widget to function normally in Baby Buddy's
frontend without breaking behaviors in the Django admin forms. The previous
setup would prevent the standard tag editor behavior from working in the
Django admin and give incorrect help text.
2022-04-16 14:59:28 -07:00
bugbountyguy 4ceb6095d3 Rename breastpump to pumping 2022-04-04 20:39:39 -07:00
bugbountyguy 5c45b037f0 Finish up adding the brestpump measurement 2022-04-04 20:39:39 -07:00
Paul Konstantin Gerke ce21f39ec7 Add tags to most things except: Timers and Children 2022-03-08 08:35:27 -08:00
Paul Konstantin Gerke b431c27835 Add color widget to the admin-UI 2022-03-08 12:55:50 +01:00
Paul Konstantin Gerke 3ac21ed67b Linting 2022-02-27 20:00:12 +01:00
Paul Konstantin Gerke 56ebbd3181 Fix storing of tags 2022-02-15 15:46:07 +01:00
Paul Konstantin Gerke bf49cc92ad Initial (bugged) work on tag editor 2022-02-15 10:13:35 +01:00
Christopher C. Wells cd946280cb Format code with black 2022-02-09 16:00:30 -08:00
Yulian Kuncheff 0af4521005 Linting and faker changes 2021-12-31 09:19:53 -05:00
Yulian Kuncheff 9b604627a1 Add Height, Head Circumference, and BMI, corresponding reports, and move to separate menu with Weight and Temperature. 2021-12-31 09:19:53 -05:00
Christopher C. Wells 0a74061a7a Remove readonly state from datetime picker fields (#284) 2021-09-03 20:38:15 -07:00
Christopher C. Wells a2da7e32f9 Disable autocomplete on datetime form fields (#224)
The actual issue here is that the readonly property is no longer working. This
should be fixed in a separate commit.
2021-06-19 15:20:03 -07:00
jcgoette 0001281d66 default last feed method if not left/right breast 2021-06-19 14:17:34 -07:00
Christopher C. Wells 3f0694dc9d Make datetime editable for Note model
Closes #151
2020-08-12 19:47:58 -07:00
Peter Hardy 4581722e0b Actually check for FBM as well (#127). 2020-03-26 22:28:27 +11:00
Peter Hardy 4978208d7f Prepopulate method for formula types (#127). 2020-03-26 22:15:08 +11:00
Christopher C. Wells 11164f0cd0 Set notes textarea to 5 rows 2020-02-16 15:09:57 -08:00
Christopher C. Wells 48a0093700 Add general notes to most models 2020-02-16 15:09:57 -08:00
Christopher C. Wells 60cd90ca80 Use `last()` instead of `latest()`
With `latest()`, an exception is thrown if there is one child in the database and no feeding entries.
2020-02-08 14:02:47 -08:00
Christopher C. Wells 3eb0e336c6 Refactor core forms on a base class to handle initial values 2020-01-31 09:09:01 -08:00
Christopher C. Wells 4e01365e85 Set Child from an argument instead of the timer 2020-01-31 09:09:01 -08:00
Christopher C. Wells 5e9946ecd6 Respect child if set when setting feeding defaults 2020-01-31 09:09:01 -08:00
Christopher C. Wells b31d9194d9 Include child when setting defaults from timer 2020-01-31 09:09:01 -08:00
Christopher C. Wells c80ec252bc Add optional Child to Timer model 2020-01-31 09:09:01 -08:00
Christopher C. Wells 475b7abf78 Apply custom style to `.datetimepicker-input` 2020-01-31 08:47:03 -08:00
Christopher C. Wells b8e2416cd1 Set all datetime fields to `readonly` 2020-01-31 08:47:03 -08:00