From 3776f86ebdfb6169a35c525ce6b8363eb0cabbe1 Mon Sep 17 00:00:00 2001 From: Simon Green Date: Thu, 27 Feb 2014 08:33:45 +1000 Subject: Bug 466178 - Add an INTEGER custom field type r=glob, a=justdave --- template/en/default/bug/field.html.tmpl | 4 +++- template/en/default/global/field-descs.none.tmpl | 1 + template/en/default/global/user-error.html.tmpl | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'template/en/default') diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index 0ef19c1c4..f8612eebb 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -35,11 +35,13 @@ [% Hook.process('start_field_column') %] [% IF editable %] [% SWITCH field.type %] - [% CASE constants.FIELD_TYPE_FREETEXT %] + [% CASE [ constants.FIELD_TYPE_FREETEXT + constants.FIELD_TYPE_INTEGER ] %] [% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %] [% size = (field.type == constants.FIELD_TYPE_DATE) ? 10 : 20 %] diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl index 34c4dc9ed..2afabd0c6 100644 --- a/template/en/default/global/field-descs.none.tmpl +++ b/template/en/default/global/field-descs.none.tmpl @@ -41,6 +41,7 @@ [% field_types = { ${constants.FIELD_TYPE_UNKNOWN} => "Unknown Type", ${constants.FIELD_TYPE_FREETEXT} => "Free Text", + ${constants.FIELD_TYPE_INTEGER} => "Integer", ${constants.FIELD_TYPE_SINGLE_SELECT} => "Drop Down", ${constants.FIELD_TYPE_MULTI_SELECT} => "Multiple-Selection Box", ${constants.FIELD_TYPE_TEXTAREA} => "Large Text Box", diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index d7648320c..11d4f8ad1 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -1366,6 +1366,12 @@ Either no products have been defined to enter [% terms.bugs %] against or you have not been given access to any. + [% ELSIF error == "number_not_integer" %] + [% title = "Integer Value Required" %] + The value '[% num FILTER html %]' in the + [% field_descs.$field FILTER html %] field + is not an integer value (i.e. a whole number). + [% ELSIF error == "number_not_numeric" %] [% title = "Numeric Value Required" %] The value '[% num FILTER html %]' in the -- cgit v1.2.3-24-g4f1b