-
Notifications
You must be signed in to change notification settings - Fork 0
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
🐛 Remove partial to enable editing #77
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prior to this commit, when I'd create a Collection via the UI, I had a different control element for dates. The value was an `ActiveTriple::Relation`, which is a tell tale sign of things going wrong. Further, the name of the HTML `input` was `collection[date_created]` when it should've been `collection[date_created][]`. <details><summary>Before removing partial</summary> ``` <div class="form-group optional nil_class_date_created"> <label class="string optional" for="collection_date_created">Date Created</label> <br> <p class="help-block">The date on which the work was created.</p> <ul class="listing" aria-live="polite" style="padding: 0;"> <li class="field-wrapper input-group input-append"> <input value="#<ActiveTriples::Relation:0x0000ffff760e7240>" class="form-control" input_html="{:class=>"form-control", :multiple=>false}" type="date" name="collection[date_created]" id="collection_date_created"> </li> </ul> </div> ``` </details> <details><summary>After removing partial</summary> ``` <div class="form-group multi_value optional collection_date_created managed"><label class="control-label multi_value optional" for="collection_date_created">Date Created</label><p class="help-block">The date on which the collection was created.</p> <ul class="listing" aria-live="polite"> <li class="field-wrapper input-group input-append"> <input class="string multi_value optional form-control collection_date_created form-control multi-text-field" name="collection[date_created][]" value="07/04/1776" id="collection_date_created" aria-labelledby="collection_date_created_label" type="text"> <span class="input-group-btn field-controls"><button type="button" class="btn btn-link remove"><span class="glyphicon glyphicon-remove"></span><span class="controls-remove-text">Remove</span> <span class="sr-only"> previous <span class="controls-field-name-text"></span></span></button></span></li> <li class="field-wrapper input-group input-append"> <input class="string multi_value optional form-control collection_date_created form-control multi-text-field" name="collection[date_created][]" value="" aria-labelledby="collection_date_created_label" type="text"> <span class="input-group-btn field-controls"><button type="button" class="btn btn-link remove"><span class="glyphicon glyphicon-remove"></span><span class="controls-remove-text">Remove</span> <span class="sr-only"> previous <span class="controls-field-name-text"></span></span></button></span></li> </ul><button type="button" class="btn btn-link add"><span class="glyphicon glyphicon-plus"></span><span class="controls-add-text">Add another</span></button> </div> ``` </details> Related to: - https://github.com/scientist-softserv/adventist-dl/issues/620
laritakr
approved these changes
Oct 10, 2023
1 task
laritakr
added a commit
that referenced
this pull request
Oct 12, 2023
Ref: - https://github.com/scientist-softserv/adventist-dl/issues/632 Related to: - #77 Property date_created was defined inconsistently, which broke creation and editing of Image and GenericWork types. This pull request adds a partial with a date picker for date_created and removes `multiple: false` from the definition for GenericWork and Image work types. Additionally, several unused view partials are being removed, as they were in the wrong path location and would never be hit.
jeremyf
pushed a commit
that referenced
this pull request
Oct 12, 2023
Ref: - https://github.com/scientist-softserv/adventist-dl/issues/632 Related to: - #77 Property date_created was defined inconsistently, which broke creation and editing of Image and GenericWork types. This pull request adds a partial with a date picker for date_created and removes `multiple: false` from the definition for GenericWork and Image work types. Additionally, several unused view partials are being removed, as they were in the wrong path location and would never be hit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this commit, when I'd create a Collection via the UI, I had a
different control element for dates. The value was an
ActiveTriple::Relation
, which is a tell tale sign of things goingwrong. Further, the name of the HTML
input
wascollection[date_created]
when it should've beencollection[date_created][]
.Before removing partial
```The date on which the work was created.
After removing partial
```The date on which the collection was created.
Related to: