mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Change move folder form to not have default radio btn and to show hint
Updated the move folder form to add a hint for the radio button for the current folder saying 'current folder'. This hint does not get shown if you are viewing all folders (so you are not inside a folder). Also stopped a default radio button from being selected on the form.
This commit is contained in:
@@ -1287,6 +1287,7 @@ class TemplateAndFoldersSelectionForm(Form):
|
||||
])
|
||||
move_to = NestedRadioField(
|
||||
'Choose a folder',
|
||||
default='',
|
||||
validators=[
|
||||
Optional(),
|
||||
required_for_ops('move-to-new-folder', 'move-to-existing-folder')
|
||||
|
||||
@@ -122,6 +122,7 @@ def choose_template(service_id, template_type='all', template_folder_id=None):
|
||||
len(user_api_client.get_service_ids_for_user(current_user)) > 1
|
||||
),
|
||||
)
|
||||
option_hints = {template_folder_id: 'current folder'}
|
||||
|
||||
if request.method == 'POST' and templates_and_folders_form.validate_on_submit():
|
||||
if not can_manage_folders():
|
||||
@@ -149,7 +150,8 @@ def choose_template(service_id, template_type='all', template_folder_id=None):
|
||||
template_type=template_type,
|
||||
search_form=SearchTemplatesForm(),
|
||||
templates_and_folders_form=templates_and_folders_form,
|
||||
move_to_children=templates_and_folders_form.move_to.children()
|
||||
move_to_children=templates_and_folders_form.move_to.children(),
|
||||
option_hints=option_hints
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user