Revert "don't create add url if neither of 'select from existing' nor 'provide selection' options set (#385)" (#389)
This reverts commit 6c9e21544a
.
This commit is contained in:
parent
329b8e4100
commit
f19d0a08c2
1 changed files with 1 additions and 9 deletions
|
@ -113,7 +113,7 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
|||
}
|
||||
}
|
||||
|
||||
protected void setAddUrl(ObjectProperty property) {
|
||||
protected void setAddUrl(Property property) {
|
||||
// Is the add link suppressed for this property?
|
||||
if (property.isAddLinkSuppressed()) {
|
||||
return;
|
||||
|
@ -126,10 +126,6 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
|||
return;
|
||||
}
|
||||
|
||||
if (isNotAllowedToCreateOrSelect(property)) {
|
||||
return;
|
||||
}
|
||||
|
||||
String rangeUri = (property instanceof ObjectProperty)
|
||||
? ((ObjectProperty) property).getRangeVClassURI()
|
||||
: "data";
|
||||
|
@ -156,10 +152,6 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isNotAllowedToCreateOrSelect(ObjectProperty property) {
|
||||
return !property.getSelectFromExisting() && !property.getOfferCreateNewOption();
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull this into a protected method so we can stub it out in the unit tests.
|
||||
* Other options:
|
||||
|
|
Loading…
Add table
Reference in a new issue