mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-27 12:29:04 +08:00
fixes #5708 - change ui layer to display Mandatory checkbox as required
This commit is contained in:
@@ -45,9 +45,9 @@ namespace Orchard.DynamicForms.Drivers {
|
|||||||
_IsRequired: shape.Checkbox(
|
_IsRequired: shape.Checkbox(
|
||||||
Id: "IsMandatory",
|
Id: "IsMandatory",
|
||||||
Name: "IsMandatory",
|
Name: "IsMandatory",
|
||||||
Title: "Mandatory",
|
Title: "Required",
|
||||||
Value: "true",
|
Value: "true",
|
||||||
Description: T("Tick this checkbox to make this check box element mandatory.")),
|
Description: T("Tick this checkbox to make this check box element required.")),
|
||||||
_CustomValidationMessage: shape.Textbox(
|
_CustomValidationMessage: shape.Textbox(
|
||||||
Id: "CustomValidationMessage",
|
Id: "CustomValidationMessage",
|
||||||
Name: "CustomValidationMessage",
|
Name: "CustomValidationMessage",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Orchard.DynamicForms.ValidationRules {
|
|||||||
|
|
||||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||||
return String.IsNullOrWhiteSpace(ErrorMessage)
|
return String.IsNullOrWhiteSpace(ErrorMessage)
|
||||||
? T("{0} is a mandatory field.", context.FieldName)
|
? T("{0} is a required field.", context.FieldName)
|
||||||
: T(ErrorMessage);
|
: T(ErrorMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user