Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefill "Add Tag" form #9775

Conversation

jimchamp
Copy link
Collaborator

Addresses #9685

Passes Tag name, type, and optional sub_type (for subject type) from the subject page to the Tag creation template.

The name and type parameters are now required by the /tag/add GET handler.

Tag creation form is now prefilled with the name and type. ReCaptcha has been removed from the "Add Tag" page, as this view is restricted to librarians.

Technical

Testing

While logged in as a super-librarian (this is important and checked on subject page --- will be fixed later):

  1. Navigate to a subject page that does not have a linked subject.
  2. Click the "Edit" button.
  3. Ensure that the "Add Tag" page is displayed, and that the form's name input the subject type option are prefilled/selected.

Screenshot

Stakeholders

Removes unused parameters `name` and `tag` from the Tag creation
template. Also removes the `recaptcha` parameter and template call, as
Tag creation is restricted to librarians.
The `/tag/add` handler now requires a Tag `name` and `type`.  These
values, and the subject type, are now included in the URL of the subject
page "Edit" link when Tags can be created.
@jimchamp jimchamp mentioned this pull request Aug 20, 2024
12 tasks
@mekarpeles mekarpeles merged commit b13950f into internetarchive:master Aug 26, 2024
4 checks passed
@jimchamp jimchamp deleted the 9685/feature/pre-populate-tag-creation-form branch August 27, 2024 18:55
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