From a22401a72e7addce908ea92988200134ff7f9560 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 29 Nov 2012 20:45:21 +0100 Subject: Bug 802613: Merge common code of admin/custom_fields/create.html.tmpl and admin/custom_fields/edit.html.tmpl into a single template r=dkl a=LpSolit --- .../default/admin/custom_fields/create.html.tmpl | 130 +------------- .../admin/custom_fields/edit-common.html.tmpl | 193 +++++++++++++++++++++ .../en/default/admin/custom_fields/edit.html.tmpl | 141 +-------------- 3 files changed, 199 insertions(+), 265 deletions(-) create mode 100644 template/en/default/admin/custom_fields/edit-common.html.tmpl (limited to 'template/en') diff --git a/template/en/default/admin/custom_fields/create.html.tmpl b/template/en/default/admin/custom_fields/create.html.tmpl index fb7f06f86..185cfffb5 100644 --- a/template/en/default/admin/custom_fields/create.html.tmpl +++ b/template/en/default/admin/custom_fields/create.html.tmpl @@ -10,8 +10,6 @@ # none #%] -[% PROCESS "global/field-descs.none.tmpl" %] - [% javascript = BLOCK %] [% INCLUDE "admin/custom_fields/cf-js.js.tmpl" %] [% END %] @@ -26,7 +24,7 @@ [%# set initial editability of fields such as Reverse Relationship Description %]

@@ -47,129 +45,11 @@ YAHOO.util.Event.onDOMReady(function() {onChangeType(document.getElementById('ty

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + [% PROCESS "admin/custom_fields/edit-common.html.tmpl" %] - - -
- - - - - -
- -
- -
- -
Long Description: - [% INCLUDE global/textarea.html.tmpl - name = 'long_desc' - id = 'long_desc' - minrows = 3 - maxrows = 5 - cols = 46 - defaultcontent = defaultcontent - %] - - - - - - -
- - - -
- Use this label for the list of [% terms.bugs %] that link to - [%+ terms.abug %] with this - [%+ field_types.${constants.FIELD_TYPE_BUG_ID} FILTER html %] - field. For example, if the description is "Is a duplicate of", - the reverse description would be "Duplicates of this [% terms.bug %]". - Leave blank to disable the list for this field. -
- - - -
-

- - - -

+ + +

diff --git a/template/en/default/admin/custom_fields/edit-common.html.tmpl b/template/en/default/admin/custom_fields/edit-common.html.tmpl new file mode 100644 index 000000000..adf8d3ec4 --- /dev/null +++ b/template/en/default/admin/custom_fields/edit-common.html.tmpl @@ -0,0 +1,193 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # field: Bugzila::Field; the current field being edited + #%] + +[% PROCESS "global/field-descs.none.tmpl" %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [% IF !field || field.is_select || field.type == constants.FIELD_TYPE_BUG_ID %] + + [% IF field.is_select %] + + + [% ELSE %] + + + [% END %] + + [% IF !field || field.is_select %] + + + [% ELSE %] + + + [% END %] + + [% END %] +
+ [% IF field %] + [% field.name FILTER html %] + [% ELSE %] + + [% END %] + + + + +
+ + + + + +
+ [% IF field %] + [% field_types.${field.type} FILTER html %] + [% ELSE %] + + [% END %] + + +
+ + + +
Long Description: + [% INCLUDE global/textarea.html.tmpl + name = 'long_desc' + id = 'long_desc' + minrows = 3 + maxrows = 5 + cols = 46 + defaultcontent = field.long_desc + %] + + + + +
+ +
+ +
  + Edit legal values for this field. + + + + +
+ Use this label for the list of [% terms.bugs %] that link to [% terms.abug %] + with this [% field_types.${constants.FIELD_TYPE_BUG_ID} FILTER html %] field. + For example, if the description is "Is a duplicate of", the reverse description + would be "Duplicates of this [% terms.bug %]". Leave blank to disable the list + for this field. +
+ + + +
diff --git a/template/en/default/admin/custom_fields/edit.html.tmpl b/template/en/default/admin/custom_fields/edit.html.tmpl index a1d739365..7cc09e6ec 100644 --- a/template/en/default/admin/custom_fields/edit.html.tmpl +++ b/template/en/default/admin/custom_fields/edit.html.tmpl @@ -10,8 +10,6 @@ # field: Bugzila::Field; the current field being edited #%] -[% PROCESS "global/field-descs.none.tmpl" %] - [% title = BLOCK %] Edit the Custom Field '[% field.name FILTER html %]' ([% field.description FILTER html %]) [% END %] @@ -34,145 +32,8 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [% IF field.type == constants.FIELD_TYPE_BUG_ID %] - - - - - - [% END %] - [% IF field.is_select %] - - - - - + [% PROCESS "admin/custom_fields/edit-common.html.tmpl" field = field %] - - - [% END %] -
Name:[% field.name FILTER html %] - -
- -
Type:[% field_types.${field.type} FILTER html %]
- -
Long Description: - [% INCLUDE global/textarea.html.tmpl - name = 'long_desc' - id = 'long_desc' - minrows = 3 - maxrows = 5 - cols = 46 - defaultcontent = field.long_desc - %] - - - - - - -
- - - -
- Use this label for the list of [% terms.bugs %] that link to - [%+ terms.abug %] with this - [%+ field_types.${constants.FIELD_TYPE_BUG_ID} FILTER html %] field. - For example, if the description is "Is a duplicate of", - the reverse description would be "Duplicates of this [% terms.bug %]". - Leave blank to disable the list for this field. -
 
  - Edit - legal values for this field. - - - - -
-
-- cgit v1.2.3-24-g4f1b