[Rt-commit] rt branch, 4.4/style-custom-field-name, created. rt-4.4.2-18-gc95bf5a
Maureen Mirville
maureen at bestpractical.com
Mon Jul 31 15:22:59 EDT 2017
The branch, 4.4/style-custom-field-name has been created
at c95bf5a7a6707ae3516639ca73552b39e21ca2f1 (commit)
- Log -----------------------------------------------------------------
commit c95bf5a7a6707ae3516639ca73552b39e21ca2f1
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date: Mon Jul 31 14:43:31 2017 -0400
Target style at custom field name
Custom fields may be styled using custom field name as class selector.
diff --git a/share/html/Elements/ShowCustomFields b/share/html/Elements/ShowCustomFields
index 2f7d2ae..2408386 100644
--- a/share/html/Elements/ShowCustomFields
+++ b/share/html/Elements/ShowCustomFields
@@ -54,9 +54,13 @@
% my $Values = $Object->CustomFieldValues( $CustomField->Id );
% my $count = $Values->Count;
% next if $HideEmpty and not $count;
+% my $CustomFieldName = $CustomField->Name;
+%# The following line ensures invalid characters are removed (supports world languages).
+% $CustomFieldName =~ s/\P{ID_Continue}+/-/g;
% my @classes = (
% 'custom-field',
% 'custom-field-'.$CustomField->id,
+% 'custom-field-'.$CustomFieldName
% );
% push @classes, 'unset-field' if not $count;
% $m->callback( CallbackName => 'ModifyFieldClasses', CustomField => $CustomField,
-----------------------------------------------------------------------
More information about the rt-commit
mailing list