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

Georgetown conditionally required fields #1980

Closed
wants to merge 5 commits into from

Commits on Aug 25, 2023

  1. first failed attempt.

    Im not sure why this is not working, but I wanted to still be ablt to keep track of it in case I need it in the future.
    alishaevn committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    a01d4e9 View commit details
    Browse the repository at this point in the history
  2. require either rights statement or rights notes be filled out on a ge…

    …neric work form
    
    we do this by removing the intial requirement on the rights statement input. otherwise, [validateMetatdata](https://github.com/samvera/hyrax/blob/main/app/assets/javascripts/hyrax/save_work/save_work_control.es6\#L148-L155) remained false.
    
    instead, on page load we verify if either field has data. if so, we carry on. if neither does, both are marked as required. from there, if one of the two fields is changed then it is marked as required while the other is removed as required.
    
    if neither field has data and the form attempts to be saved (the save button will NOT be disabled), a popup will show up on the rights statement asking for it to be filled out.
    
    TODO: make this unspecific to the generic work form.
    alishaevn committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    2eec24b View commit details
    Browse the repository at this point in the history
  3. do not need this file

    alishaevn committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    2a2a21e View commit details
    Browse the repository at this point in the history
  4. this file IS needed

    alishaevn committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    9864e37 View commit details
    Browse the repository at this point in the history
  5. rubocop and code comments

    alishaevn committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    5527918 View commit details
    Browse the repository at this point in the history