@@ -22,12 +22,25 @@ public class RequirementFormValidator extends BaseValidator
|
|||||||
public void validate(ValidationContext ctx)
|
public void validate(ValidationContext ctx)
|
||||||
{
|
{
|
||||||
Property propertyCentre = ctx.getProperties("centre")[0];
|
Property propertyCentre = ctx.getProperties("centre")[0];
|
||||||
|
|
||||||
|
if (propertyCentre != null) {
|
||||||
Workgroup workgroup = (Workgroup) propertyCentre.getValue();
|
Workgroup workgroup = (Workgroup) propertyCentre.getValue();
|
||||||
|
|
||||||
if (workgroup == null)
|
if (workgroup == null) {
|
||||||
{
|
|
||||||
this.errorMsg(ctx, StringUtils.localize("RequirementCenterIsEmpty"), "idReqCenter");
|
this.errorMsg(ctx, StringUtils.localize("RequirementCenterIsEmpty"), "idReqCenter");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Property propertyDescription = ctx.getProperties("description")[0];
|
||||||
|
|
||||||
|
if (propertyDescription != null) {
|
||||||
|
String description = (String) propertyDescription.getValue();
|
||||||
|
|
||||||
|
if (StringUtils.isNullOrTrimmedEmpty(description)) {
|
||||||
|
this.errorMsg(ctx, StringUtils.localize("ErrMaterialOrServiceDescription"), "idDescription");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -419,3 +419,6 @@ ErrFillTripBillResultTimes = Zadejte časy odjezdu a příjezdu.
|
|||||||
ErrApproveMustBeSigned = Schválení musí být digitálně podepsané.
|
ErrApproveMustBeSigned = Schválení musí být digitálně podepsané.
|
||||||
DigitalSignature = Elektronický podpis
|
DigitalSignature = Elektronický podpis
|
||||||
ContextMenu = Volby v kontextovém menu
|
ContextMenu = Volby v kontextovém menu
|
||||||
|
|
||||||
|
ErrMaterialOrServiceDescription=Zadejte popis požadavku.
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
<cell sclass="row-title">${labels.RequirementsFormDescription} :</cell>
|
<cell sclass="row-title">${labels.RequirementsFormDescription} :</cell>
|
||||||
<cell>
|
<cell>
|
||||||
<textbox
|
<textbox
|
||||||
id="description"
|
id="idDescription"
|
||||||
width="400px"
|
width="400px"
|
||||||
rows="5"
|
rows="5"
|
||||||
maxlength="@load(vm.lengthDescription)"
|
maxlength="@load(vm.lengthDescription)"
|
||||||
|
|||||||
Reference in New Issue
Block a user