This branch allows for the adding for extra attachments to a proposal and its studies.
An additional change to this branch is that we now allow changing the kind ("Type") of an attachment in the attachment update views.
Earlier I thought it would make sense to always enforce the kind if it was set by a slot. Now, when implementing extra files this felt like an overreach which would require deleting and re-adding of files by the user if they ever wanted to change the type.
Changing the type of a required attachment will simply move it from the required to an extra slot, as the attachment no longer fulfills the requirements for the required slot. Only if you are adding a new attachment to a required slot will the kind be enforced by the view.
I recommend taking a look at the changes to Stepper.attachment_slots(), which is now a property that matches slots on the fly. Slots generated by checkers now live in Stepper._attachment_slots, but that change should be of no consequence as long as the Stepper.add_slot() method is used.
This branch allows for the adding for extra attachments to a proposal and its studies.
An additional change to this branch is that we now allow changing the kind ("Type") of an attachment in the attachment update views.
Earlier I thought it would make sense to always enforce the kind if it was set by a slot. Now, when implementing extra files this felt like an overreach which would require deleting and re-adding of files by the user if they ever wanted to change the type.
Changing the type of a required attachment will simply move it from the required to an extra slot, as the attachment no longer fulfills the requirements for the required slot. Only if you are adding a new attachment to a required slot will the kind be enforced by the view.
I recommend taking a look at the changes to
Stepper.attachment_slots()
, which is now a property that matches slots on the fly. Slots generated by checkers now live inStepper._attachment_slots
, but that change should be of no consequence as long as theStepper.add_slot()
method is used.