Pii blocks
hypha.apply.funds.pii_blocks
¶
Application form field blocks that can be marked as personal information.
Only the answers of an application form are ever redacted, see
AccessFormData.render_answer(), so the "Personal information" checkbox is
offered on these blocks alone. Review, determination and project forms keep
using the plain field blocks.
The blocks are thin subclasses that add nothing but the checkbox, so they
deconstruct into migrations exactly like the blocks they extend and answer to
the same isinstance() checks.
PIICharFieldBlock
¶
Bases: PIIFieldMixin, CharFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
format
class-attribute
instance-attribute
¶
format = ChoiceBlock(choices=CHARFIELD_FORMATS, required=False, label=_('Format'))
default_value
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIMultiInputCharFieldBlock
¶
Bases: PIIFieldMixin, MultiInputCharFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
format
class-attribute
instance-attribute
¶
format = ChoiceBlock(choices=CHARFIELD_FORMATS, required=False, label=_('Format'))
default_value
class-attribute
instance-attribute
¶
number_of_inputs
class-attribute
instance-attribute
¶
add_button_text
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIITextFieldBlock
¶
Bases: PIIFieldMixin, TextFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
default_value
class-attribute
instance-attribute
¶
word_limit
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIRichTextFieldBlock
¶
Bases: PIIFieldMixin, RichTextFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
default_value
class-attribute
instance-attribute
¶
word_limit
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIMarkdownTextFieldBlock
¶
Bases: PIIFieldMixin, MarkdownTextFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
default_value
class-attribute
instance-attribute
¶
word_limit
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIINumberFieldBlock
¶
Bases: PIIFieldMixin, NumberFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
default_value
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIICheckboxFieldBlock
¶
Bases: PIIFieldMixin, CheckboxFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIRadioButtonsFieldBlock
¶
Bases: PIIFieldMixin, RadioButtonsFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIDropdownFieldBlock
¶
Bases: PIIFieldMixin, DropdownFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIICheckboxesFieldBlock
¶
Bases: PIIFieldMixin, CheckboxesFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
checkboxes
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIDateFieldBlock
¶
Bases: PIIFieldMixin, DateFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIITimeFieldBlock
¶
Bases: PIIFieldMixin, TimeFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIDateTimeFieldBlock
¶
Bases: PIIFieldMixin, DateTimeFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIImageFieldBlock
¶
Bases: PIIFieldMixin, ImageFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIFileFieldBlock
¶
Bases: PIIFieldMixin, FileFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIIMultiFileFieldBlock
¶
Bases: PIIFieldMixin, MultiFileFieldBlock
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
get_display_value
¶
The value to display the question with.
Blocks that derive parts of the question, such as a label taken from a linked object, apply those defaults here so that every way of rendering the field gets them.
Source code in hypha/apply/stream_forms/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
PIICategoryQuestionBlock
¶
Bases: PIIFieldMixin, CategoryQuestionBlock
field_label
class-attribute
instance-attribute
¶
field_label = CharBlock(label=_('Label'), required=False, help_text=_('Leave blank to use the default Category label'))
help_text
class-attribute
instance-attribute
¶
help_text = RichTextBlock(label=_('Help text'), required=False, help_text=_('Leave blank to use the default Category help text'))
required
class-attribute
instance-attribute
¶
category
class-attribute
instance-attribute
¶
category = ModelChooserBlock(required=True, choices=get_categories_as_choices)
multi
class-attribute
instance-attribute
¶
is_pii
class-attribute
instance-attribute
¶
is_pii = BooleanBlock(label=_('Personal information'), required=False, default=False, help_text=_('Tick this if the answer will contain personally identifiable information, such as a name, address, phone number or date of birth. Only the applicant, their co-applicants and staff will be able to see the answer. Reviewers and other users will see that the question was asked, but not the answer.'))
Meta
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/categories/blocks.py
get_field
¶
get_display_value
¶
Source code in hypha/apply/categories/blocks.py
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
Source code in hypha/apply/categories/blocks.py
render
¶
get_searchable_content
¶
no_response
¶
model_class
¶
get_instance
¶
use_defaults_from_category
¶
Source code in hypha/apply/categories/blocks.py
widget_for_choices
¶
Source code in hypha/apply/categories/blocks.py
unmarked_block_class
¶
The block class a PII-markable block adds the checkbox to.
Lets code that switches on the exact block class keep working for the application form, where the blocks are the subclasses above.