diff --git a/webapp/languages/es_GO/i18n/all_es_GO.properties b/webapp/languages/es_GO/i18n/all_es_GO.properties index 5544aafb0..6e9016109 100644 --- a/webapp/languages/es_GO/i18n/all_es_GO.properties +++ b/webapp/languages/es_GO/i18n/all_es_GO.properties @@ -862,3 +862,5 @@ view_labels_capitalized = Ver etiquetas view_labels_for = Ver Etiquetas de select_an_existing_document = Seleccione un documento existente + +datetime_year_required = Intervalos de fecha / hora deben empezar por un año. Ingrese una Fecha de inicio, un fin de año o los dos. \ No newline at end of file diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/DateTimeIntervalValidationVTwo.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/DateTimeIntervalValidationVTwo.java index aa3ca0ed6..65f5f420e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/DateTimeIntervalValidationVTwo.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/DateTimeIntervalValidationVTwo.java @@ -63,8 +63,11 @@ public class DateTimeIntervalValidationVTwo implements N3ValidatorVTwo { // errors.put(startFieldName, "If there is an end date, there should be a start date"); // return errors; // } - - + // We need to ensure that the user has entered a start year or end year -- tlw72 + if ( literalListIsNull(formStartYear) && literalListIsNull(formStartYear) ) { + errors.put(startFieldName, "Date/time intervals must begin with a year. Please enter a start year or an end year."); + return errors; + } //Assuming form start year and form end year are working in conjunction with multiple values int index; if (!literalListIsNull(formStartYear) && !literalListIsNull(formEndYear)) { diff --git a/webapp/web/i18n/all.properties b/webapp/web/i18n/all.properties index 818c27c4a..0fce78764 100644 --- a/webapp/web/i18n/all.properties +++ b/webapp/web/i18n/all.properties @@ -875,4 +875,6 @@ selection_in_process = Your selection is being processed. view_labels_capitalized = View Labels view_labels_for = View Labels for -select_an_existing_document = Select an existing document \ No newline at end of file +select_an_existing_document = Select an existing document + +datetime_year_required = Date/time intervals must begin with a year. Enter either a Start Year, an End Year or both. \ No newline at end of file diff --git a/webapp/web/templates/freemarker/edit/forms/dateTimeIntervalForm.ftl b/webapp/web/templates/freemarker/edit/forms/dateTimeIntervalForm.ftl index c7139c5c6..f61c42b61 100644 --- a/webapp/web/templates/freemarker/edit/forms/dateTimeIntervalForm.ftl +++ b/webapp/web/templates/freemarker/edit/forms/dateTimeIntervalForm.ftl @@ -58,7 +58,7 @@ <#if htmlForElements?keys?seq_contains("endField")> ${i18n().end_capitalized}  ${htmlForElements["endField"]} - + *${i18n().datetime_year_required}

@@ -69,8 +69,7 @@

-${stylesheets.add('', - '')} +${stylesheets.add('')} ${scripts.add('', '')} \ No newline at end of file