From bb0dd22164ebb49f849e2d4f36bc5e5c12dfe718 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 22 Aug 2008 04:16:33 +0000 Subject: [PATCH] ENHANCEMENT RequiredFields->php() uses quotes around title of field, falling back to the name of the field if title isn't available git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61420 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/RequiredFields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/RequiredFields.php b/forms/RequiredFields.php index d01384424..e4500e8fa 100755 --- a/forms/RequiredFields.php +++ b/forms/RequiredFields.php @@ -102,7 +102,7 @@ JS; $fieldName, sprintf( _t('Form.FIELDISREQUIRED'), - strip_tags($formField->Title()) + strip_tags('"' . ($formField->Title() ? $formField->Title() : $fieldName) . '"') ), "required" );