Skip to content

Fix NIA page form fields not disabled in readonly mode#302

Merged
davidfstr merged 2 commits intomainfrom
copilot/fix-nia-editable-field-issue
Mar 22, 2026
Merged

Fix NIA page form fields not disabled in readonly mode#302
davidfstr merged 2 commits intomainfrom
copilot/fix-nia-editable-field-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 22, 2026

On the "Not in Archive" page, 5 form input fields remained editable even when the project was opened in read-only mode — only the radio buttons and download button were correctly disabled.

Changes

  • special_pages.py: Add {'disabled ' if readonly else ''} to the 5 fields missing it in not_in_archive_html():

    • cr-root-url-name (Create Root URL: Name)
    • cr-group-url-pattern (Create Group: URL Pattern)
    • cr-group-source (Create Group: Source)
    • cr-group-name (Create Group: Name)
    • cr-download-group-immediately-checkbox (Create Group: Download Immediately)
  • test_server.py: Add test_given_readonly_project_then_all_form_input_fields_disabled to assert each field carries the disabled attribute in readonly mode.

  • RELEASE_NOTES.md: Document the fix under the main branch section.

Original prompt

Help me fix the issue in this screenshot: An editable field on the Not in Archive (NIA) page when the project is readonly.

The user has attached the following file paths as relevant context:

  • .github/instructions/end_to_end_tests.instructions.md
  • .github/copilot-instructions.md

Created from VS Code.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix editable field issue on NIA page for read-only projects Fix NIA page form fields not disabled in readonly mode Mar 22, 2026
Copilot AI requested a review from davidfstr March 22, 2026 20:36
@davidfstr davidfstr marked this pull request as ready for review March 22, 2026 21:16
@davidfstr davidfstr merged commit fdffd6f into main Mar 22, 2026
6 checks passed
@davidfstr davidfstr deleted the copilot/fix-nia-editable-field-issue branch March 22, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants