Merge branch 'maint-rel-1.6' into develop
This commit is contained in:
commit
6123e6adbc
6 changed files with 37 additions and 7 deletions
|
@ -685,6 +685,7 @@ select_existing_collaborator = Seleccione un colaborador existente para {0}
|
||||||
selected = Seleccionado
|
selected = Seleccionado
|
||||||
change_selection = cambiar la selección
|
change_selection = cambiar la selección
|
||||||
there_are_no_entries_for_selection = No hay entradas en el sistema desde el cual elegir.
|
there_are_no_entries_for_selection = No hay entradas en el sistema desde el cual elegir.
|
||||||
|
the_range_class_does_not_exist= La clase de rango de esta propiedad no existe en el sistema.
|
||||||
editing_prohibited = Esta propiedad no está configurado actualmente para prohibir la edición.
|
editing_prohibited = Esta propiedad no está configurado actualmente para prohibir la edición.
|
||||||
confirm_entry_deletion_from = ¿Está seguro de que desea eliminar la siguiente entrada del
|
confirm_entry_deletion_from = ¿Está seguro de que desea eliminar la siguiente entrada del
|
||||||
|
|
||||||
|
@ -740,6 +741,7 @@ custom_template_containing_content = Plantilla personalizada que contiene todo e
|
||||||
a_menu_page = Esta es una página de menú
|
a_menu_page = Esta es una página de menú
|
||||||
menu_item_name = Menu Nombre del artículo
|
menu_item_name = Menu Nombre del artículo
|
||||||
if_blank_page_title_used = Si se deja en blanco, se utilizará el título de la página.
|
if_blank_page_title_used = Si se deja en blanco, se utilizará el título de la página.
|
||||||
|
multiple_content_default_template_error = Con varios tipos de contenido , debe especificar una plantilla personalizada .
|
||||||
|
|
||||||
label = etiqueta
|
label = etiqueta
|
||||||
no_classes_to_select = No hay clases en el sistema desde el cual elegir.
|
no_classes_to_select = No hay clases en el sistema desde el cual elegir.
|
||||||
|
@ -862,3 +864,5 @@ view_labels_capitalized = Ver etiquetas
|
||||||
view_labels_for = Ver Etiquetas de
|
view_labels_for = Ver Etiquetas de
|
||||||
|
|
||||||
select_an_existing_document = Seleccione un documento existente
|
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.
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class DateTimeIntervalValidationVTwo implements N3ValidatorVTwo {
|
||||||
|
|
||||||
private String startFieldName;
|
private String startFieldName;
|
||||||
private String endFieldName;
|
private String endFieldName;
|
||||||
|
private String templateName;
|
||||||
|
|
||||||
private String startValueName;
|
private String startValueName;
|
||||||
private String endValueName;
|
private String endValueName;
|
||||||
|
@ -43,6 +44,16 @@ public class DateTimeIntervalValidationVTwo implements N3ValidatorVTwo {
|
||||||
endPrecisionName = endFieldName + "-precision";
|
endPrecisionName = endFieldName + "-precision";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DateTimeIntervalValidationVTwo(String startFieldName, String endFieldName, String template){
|
||||||
|
this.templateName = template;
|
||||||
|
this.startFieldName = startFieldName;
|
||||||
|
this.endFieldName = endFieldName;
|
||||||
|
startValueName = startFieldName + "-value";
|
||||||
|
endValueName = endFieldName + "-value";
|
||||||
|
startPrecisionName = startFieldName + "-precision";
|
||||||
|
endPrecisionName = endFieldName + "-precision";
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, String> validate(EditConfigurationVTwo editConfig,
|
public Map<String, String> validate(EditConfigurationVTwo editConfig,
|
||||||
MultiValueEditSubmission editSub) {
|
MultiValueEditSubmission editSub) {
|
||||||
Map<String, List<Literal>> existingLiterals = editConfig.getLiteralsInScope();
|
Map<String, List<Literal>> existingLiterals = editConfig.getLiteralsInScope();
|
||||||
|
@ -63,8 +74,13 @@ public class DateTimeIntervalValidationVTwo implements N3ValidatorVTwo {
|
||||||
// errors.put(startFieldName, "If there is an end date, there should be a start date");
|
// errors.put(startFieldName, "If there is an end date, there should be a start date");
|
||||||
// return errors;
|
// return errors;
|
||||||
// }
|
// }
|
||||||
|
// We need to ensure that the user has entered a start year or end year -- tlw72
|
||||||
|
if ( templateName != null && templateName.equals("dateTimeIntervalForm.ftl")) {
|
||||||
|
if ( literalListIsNull(formStartYear) && literalListIsNull(formEndYear) ) {
|
||||||
|
errors.put(startFieldName, "Date/time intervals must begin with a year. Please enter a start year, an end year or both.");
|
||||||
|
return errors;
|
||||||
|
}
|
||||||
|
}
|
||||||
//Assuming form start year and form end year are working in conjunction with multiple values
|
//Assuming form start year and form end year are working in conjunction with multiple values
|
||||||
int index;
|
int index;
|
||||||
if (!literalListIsNull(formStartYear) && !literalListIsNull(formEndYear)) {
|
if (!literalListIsNull(formStartYear) && !literalListIsNull(formEndYear)) {
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class DateTimeIntervalFormGenerator extends
|
||||||
conf.addField(startField);
|
conf.addField(startField);
|
||||||
conf.addField(endField);
|
conf.addField(endField);
|
||||||
//Need to add validators
|
//Need to add validators
|
||||||
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
|
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField","dateTimeIntervalForm.ftl"));
|
||||||
//Adding additional data, specifically edit mode
|
//Adding additional data, specifically edit mode
|
||||||
addFormSpecificData(conf, vreq);
|
addFormSpecificData(conf, vreq);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Property;
|
import edu.cornell.mannlib.vitro.webapp.beans.Property;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.PropertyGroup;
|
import edu.cornell.mannlib.vitro.webapp.beans.PropertyGroup;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.PropertyInstance;
|
import edu.cornell.mannlib.vitro.webapp.beans.PropertyInstance;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.DataPropertyDao;
|
import edu.cornell.mannlib.vitro.webapp.dao.DataPropertyDao;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyDao;
|
import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyDao;
|
||||||
|
@ -292,6 +293,14 @@ public class GroupedPropertyList extends BaseTemplateModel {
|
||||||
} else if (op.getRangeVClassURI() == null) {
|
} else if (op.getRangeVClassURI() == null) {
|
||||||
return (piOp.getRangeVClassURI() != null);
|
return (piOp.getRangeVClassURI() != null);
|
||||||
} else {
|
} else {
|
||||||
|
//Check and see if the range vclass exists for the possible piOp and populated op properties,
|
||||||
|
//because for populated properties, if the range class is a union,
|
||||||
|
//blank nodes will be broken and the code should instead use the existing or piOp range class uri
|
||||||
|
VClass piOpRangeClass = wadf.getVClassDao().getVClassByURI(piOp.getRangeVClassURI());
|
||||||
|
VClass opRangeClass = wadf.getVClassDao().getVClassByURI(op.getRangeVClassURI());
|
||||||
|
//if the possible range class exists but the populated one does not, then return true to allow the possible
|
||||||
|
//class to be utilized
|
||||||
|
if(piOpRangeClass != null && opRangeClass == null) return true;
|
||||||
return (wadf.getVClassDao().isSubClassOf(
|
return (wadf.getVClassDao().isSubClassOf(
|
||||||
piOp.getRangeVClassURI(), op.getRangeVClassURI()));
|
piOp.getRangeVClassURI(), op.getRangeVClassURI()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -876,3 +876,5 @@ view_labels_capitalized = View Labels
|
||||||
view_labels_for = View Labels for
|
view_labels_for = View Labels for
|
||||||
|
|
||||||
select_an_existing_document = Select an existing document
|
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.
|
|
@ -58,7 +58,7 @@
|
||||||
<#if htmlForElements?keys?seq_contains("endField")>
|
<#if htmlForElements?keys?seq_contains("endField")>
|
||||||
${i18n().end_capitalized} ${htmlForElements["endField"]}
|
${i18n().end_capitalized} ${htmlForElements["endField"]}
|
||||||
</#if>
|
</#if>
|
||||||
|
<span class="requiredHint"> *${i18n().datetime_year_required}</span>
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
<input type="hidden" name="editKey" value="${editKey}" />
|
<input type="hidden" name="editKey" value="${editKey}" />
|
||||||
<input type="submit" id="submit" value="${submitButtonText}" role="button" />
|
<input type="submit" id="submit" value="${submitButtonText}" role="button" />
|
||||||
|
@ -69,8 +69,7 @@
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />',
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />')}
|
||||||
'<link rel="stylesheet" href="${urls.base}/edit/forms/css/personHasEducationalTraining.css" />')}
|
|
||||||
|
|
||||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/utils.js"></script>',
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/utils.js"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/customFormUtils.js"></script>')}
|
'<script type="text/javascript" src="${urls.base}/js/customFormUtils.js"></script>')}
|
Loading…
Add table
Reference in a new issue