mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-11 23:53:52 -05:00
add fieldsets to template/folder form and update docstrings
also remove erroneous pytest.ini cfg and reset button
This commit is contained in:
@@ -1148,6 +1148,21 @@ def required_for_ops(*operations):
|
|||||||
|
|
||||||
|
|
||||||
class TemplateAndFoldersSelectionForm(Form):
|
class TemplateAndFoldersSelectionForm(Form):
|
||||||
|
"""
|
||||||
|
This form also expects the form data to include an operation, based on which submit button is clicked.
|
||||||
|
If enter is pressed, unknown will be sent by a hidden submit button at the top of the form.
|
||||||
|
The value of this operation affects which fields are required, expected to be empty, or optional.
|
||||||
|
|
||||||
|
* unknown
|
||||||
|
currently not implemented, but in the future will try and work out if there are any obvious commands that can be
|
||||||
|
assumed based on which fields are empty vs populated.
|
||||||
|
* move_to_existing_folder
|
||||||
|
must have data for templates_and_folders checkboxes, and move_to radios
|
||||||
|
* move_to_new_folder
|
||||||
|
must have data for move_to_new_folder_name, cannot have data for move_to_existing_folder_name
|
||||||
|
* add_new_folder
|
||||||
|
must have data for move_to_existing_folder_name, cannot have data for move_to_new_folder_name
|
||||||
|
"""
|
||||||
|
|
||||||
ALL_TEMPLATES_FOLDER = {
|
ALL_TEMPLATES_FOLDER = {
|
||||||
'name': 'All templates',
|
'name': 'All templates',
|
||||||
|
|||||||
@@ -8,12 +8,17 @@
|
|||||||
{{ page_footer('Move', button_name='operation', button_value='move_to_existing_folder') }}
|
{{ page_footer('Move', button_name='operation', button_value='move_to_existing_folder') }}
|
||||||
</div>
|
</div>
|
||||||
<div id="move_to_new_folder_form">
|
<div id="move_to_new_folder_form">
|
||||||
{{ textbox(templates_and_folders_form.move_to_new_folder_name) }}
|
<fieldset>
|
||||||
{{ page_footer('Move to a new folder', button_name='operation', button_value='move_to_new_folder') }}
|
<legend class="visuallyhidden">Move to a new folder</legend>
|
||||||
|
{{ textbox(templates_and_folders_form.move_to_new_folder_name) }}
|
||||||
|
{{ page_footer('Move to a new folder', button_name='operation', button_value='move_to_new_folder') }}
|
||||||
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div id="add_new_folder_form">
|
<div id="add_new_folder_form">
|
||||||
{{ textbox(templates_and_folders_form.add_new_folder_name) }}
|
<fieldset>
|
||||||
{{ page_footer('New folder', button_name='operation', button_value='add_new_folder') }}
|
<legend class="visuallyhidden">Add a new folder</legend>
|
||||||
|
{{ textbox(templates_and_folders_form.add_new_folder_name) }}
|
||||||
|
{{ page_footer('New folder', button_name='operation', button_value='add_new_folder') }}
|
||||||
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<button type="reset">reset</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
[pytest]
|
[pytest]
|
||||||
|
xfail_strict=true
|
||||||
testpaths = tests
|
testpaths = tests
|
||||||
log_level = 999
|
log_level = 999
|
||||||
env =
|
env =
|
||||||
@@ -10,6 +11,3 @@ env =
|
|||||||
ZENDESK_API_KEY=test
|
ZENDESK_API_KEY=test
|
||||||
STATSD_PREFIX=stats-prefix
|
STATSD_PREFIX=stats-prefix
|
||||||
REDIS_ENABLED=0
|
REDIS_ENABLED=0
|
||||||
# :thinking_face:
|
|
||||||
filterwarnings =
|
|
||||||
ignore::pytest.RemovedInPytest4Warning
|
|
||||||
|
|||||||
Reference in New Issue
Block a user