Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

HYLIBRA-324: adjusting datasets edit views and javascript to enforce …

…proper required fields
  • Loading branch information...
commit 49b51ed37725f64f765eab2b903b7e72371e071e 1 parent 5875183
@joegilbert joegilbert authored
View
6 app/views/catalog/_edit_partials/_abstract.html.erb
@@ -2,7 +2,11 @@
<fieldset id="abstract_fieldset">
<legend>Abstract
<img src="/images/help.png" class="more-help" alt="help icon" title="Provide the abstract of the work, or if none exists, a short summary."/>
- <span class="optional">Optional</span>
+ <% if is_dataset?(@document) -%>
+ <span class="required">required</span>
+ <% else -%>
+ <span class="optional">Optional</span>
+ <% end -%>
</legend>
<%= fedora_text_area(@document_fedora, "descMetadata", [:abstract], :label => "Abstract", :multiple => false) %>
</fieldset>
View
2  app/views/catalog/_edit_partials/_dataset.html.erb
@@ -17,7 +17,6 @@
<div id="pdDataCreated">
<fieldset id="data_created_fieldset">
<legend>Date Data Created
- <img src="/images/help.png" class="more-help" alt="help icon" title=""/>
<span class="required">required</span>
</legend>
<div id="data_created">
@@ -53,6 +52,7 @@
<fieldset id="libra_location_fieldset">
<legend>Associated Open Access Work or Electronic Thesis/Dissertation
<img src="/images/help.png" class="more-help" alt="help icon" title="Link to another Libra publication."/>
+ <span class="required">required</span>
</legend>
<div id="sponsoring_grant">
<%= fedora_text_field(@document_fedora,"descMetadata", [:libra_location], :multiple => true) %>
View
10 public/javascripts/jquery.hydraProgressBox.js
@@ -82,6 +82,16 @@
} else {
return false;
}
+ } else if ( $("#content_type").val() == "hydrangea_dataset") {
+ var data_created = ($("#origin_info_date_created").val().length > 0);
+ var abstract = ($("#abstract").val().length > 0);
+ var associated_work = ($("#libra_location_0").val().length > 0);
+ if (data_created && abstract && associated_work) {
+ return true;
+ } else {
+ return false;
+ }
+
} else {
return true;
}
Please sign in to comment.
Something went wrong with that request. Please try again.