Merge pull request #6433 from rtpHarry/fix-5708

[Fixes #5708] Display mandatory checkbox as required
This commit is contained in:
Sébastien Ros
2016-02-19 15:50:52 -08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -45,9 +45,9 @@ namespace Orchard.DynamicForms.Drivers {
_IsRequired: shape.Checkbox(
Id: "IsMandatory",
Name: "IsMandatory",
Title: "Mandatory",
Title: "Required",
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(
Id: "CustomValidationMessage",
Name: "CustomValidationMessage",

View File

@@ -18,7 +18,7 @@ namespace Orchard.DynamicForms.ValidationRules {
private LocalizedString GetValidationMessage(ValidationContext context) {
return String.IsNullOrWhiteSpace(ErrorMessage)
? T("{0} is a mandatory field.", context.FieldName)
? T("{0} is a required field.", context.FieldName)
: T(ErrorMessage);
}
}