Forms
hypha.apply.funds.forms
¶
ApplicationSubmissionModelForm
¶
Bases: ModelForm
Application Submission model's save method performs several operations which are not required in forms which update fields like status, partners etc. It also has a side effect of creating a new file uploads every time with long filenames (#1572).
save
¶
Save this form's self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance. https://github.com/django/django/blob/5d9cf79baf07fc4aed7ad1b06990532a65378155/django/forms/models.py#L444
Source code in hypha/apply/funds/forms.py
ProgressSubmissionForm
¶
Bases: ApplicationSubmissionModelForm
Source code in hypha/apply/funds/forms.py
Meta
¶
save
¶
Save this form's self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance. https://github.com/django/django/blob/5d9cf79baf07fc4aed7ad1b06990532a65378155/django/forms/models.py#L444
Source code in hypha/apply/funds/forms.py
BatchProgressSubmissionForm
¶
Bases: Form
Source code in hypha/apply/funds/forms.py
UpdateSubmissionLeadForm
¶
Bases: ApplicationSubmissionModelForm
Source code in hypha/apply/funds/forms.py
Meta
¶
save
¶
Save this form's self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance. https://github.com/django/django/blob/5d9cf79baf07fc4aed7ad1b06990532a65378155/django/forms/models.py#L444
Source code in hypha/apply/funds/forms.py
BatchUpdateSubmissionLeadForm
¶
BatchDeleteSubmissionForm
¶
BatchArchiveSubmissionForm
¶
UpdateReviewersForm
¶
Bases: ApplicationSubmissionModelForm
Source code in hypha/apply/funds/forms.py
reviewer_reviewers
class-attribute
instance-attribute
¶
reviewer_reviewers = ModelMultipleChoiceField(queryset=only('pk', 'full_name'), label=gettext_lazy('External Reviewers'), required=False)
Meta
¶
prepare_field
¶
clean
¶
Source code in hypha/apply/funds/forms.py
save
¶
- Update role reviewers
- Update non-role reviewers 2a. Remove those not on form 2b. Add in any new non-role reviewers selected
Source code in hypha/apply/funds/forms.py
BatchUpdateReviewersForm
¶
Bases: Form
Source code in hypha/apply/funds/forms.py
submissions
class-attribute
instance-attribute
¶
external_reviewers
class-attribute
instance-attribute
¶
external_reviewers = ModelMultipleChoiceField(queryset=only('pk', 'full_name'), widget=Select2MultiCheckboxesWidget(attrs={'data-placeholder': 'Select...'}), label=gettext_lazy('External Reviewers'), required=False)
clean_submissions
¶
clean
¶
Source code in hypha/apply/funds/forms.py
submissions_cant_have_external_reviewers
¶
UpdatePartnersForm
¶
Bases: ApplicationSubmissionModelForm
Source code in hypha/apply/funds/forms.py
GroupedModelChoiceIterator
¶
GroupedModelMultipleChoiceField
¶
Bases: ModelMultipleChoiceField
Source code in hypha/apply/funds/forms.py
iterator
instance-attribute
¶
iterator = partial(GroupedModelChoiceIterator, groupby=choices_groupby)
UpdateMetaTermsForm
¶
Bases: ApplicationSubmissionModelForm
Source code in hypha/apply/funds/forms.py
meta_terms
class-attribute
instance-attribute
¶
meta_terms = GroupedModelMultipleChoiceField(queryset=None, widget=MetaTermSelect2Widget(attrs={'data-placeholder': 'Select...'}), label=gettext_lazy('Meta terms'), choices_groupby='get_parent', required=False, help_text=gettext_lazy('Meta terms are hierarchical in nature.'))
Meta
¶
save
¶
Save this form's self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance. https://github.com/django/django/blob/5d9cf79baf07fc4aed7ad1b06990532a65378155/django/forms/models.py#L444