[Rt-commit] rt branch, 4.4/group-admin-customfield-grouping, created. rt-4.4.1-334-gb281a9d
Dave Goehrig
dave at bestpractical.com
Thu May 4 13:21:45 EDT 2017
The branch, 4.4/group-admin-customfield-grouping has been created
at b281a9d0411884f45faf1c391b4f210af03238d1 (commit)
- Log -----------------------------------------------------------------
commit b281a9d0411884f45faf1c391b4f210af03238d1
Author: Dave Goehrig <dave at bestpractical.com>
Date: Thu May 4 13:16:45 2017 -0400
Add Custom Grouping to Admin Group
In order to add the EditCustomFieldCustomGrouping support,
I need to add a default array for the RT::Group. Trying to
do it in the same fashion as RT::Asset failed due to
require dependencies, so the editing of RT::CustomField
as necessary.
On the Admin/Groups/Modify page I have mirror the layout
of Admin/Users/Modify with the top level table and nested
components. The layout is single column as the custom field
groupings widget is included as is in a single row.
I confirmed it worked with both variants of the RT_SiteConfig
Set($CustomFieldGroupings, setting with a number of
custom fields and groups.
diff --git a/lib/RT/CustomField.pm b/lib/RT/CustomField.pm
index ae81702..c74c707 100644
--- a/lib/RT/CustomField.pm
+++ b/lib/RT/CustomField.pm
@@ -220,6 +220,7 @@ __PACKAGE__->RegisterLookupType( 'RT::Group' => "Groups", );
__PACKAGE__->RegisterBuiltInGroupings(
'RT::Ticket' => [ qw(Basics Dates Links People) ],
'RT::User' => [ 'Identity', 'Access control', 'Location', 'Phones' ],
+ 'RT::Group' => [ 'Basics' ],
);
__PACKAGE__->AddRight( General => SeeCustomField => 'View custom fields'); # loc
diff --git a/share/html/Admin/Groups/Modify.html b/share/html/Admin/Groups/Modify.html
index d9c4966..7d22991 100644
--- a/share/html/Admin/Groups/Modify.html
+++ b/share/html/Admin/Groups/Modify.html
@@ -60,32 +60,36 @@
<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
% }
<table>
-<tr><td align="right">
-<&|/l&>Name</&>:
-</td>
-<td><input name="Name" value="<%$Group->Name||$Name||''%>" /></td>
-</tr>
<tr>
-<td align="right">
-<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<%$Group->Description||$Description||''%>" size="60" /></td>
+ <td valign="top" class="boxcontainer">
+ <&| /Widgets/TitleBox, title => loc('Basics'), class => 'group-info-basics' &>
+ <table>
+ <tr><td align="right">
+ <&|/l&>Name</&>:
+ </td>
+ <td><input name="Name" value="<%$Group->Name||$Name||''%>" /></td>
+ </tr>
+ <tr>
+ <td align="right">
+ <&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<%$Group->Description||$Description||''%>" size="60" /></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input type="hidden" class="hidden" name="SetEnabled" value="1" />
+ <input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked%> />
+ <label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this group)</&></label><br />
+ </td>
+ </tr>
+% $m->callback( %ARGS, GroupObj => $Group, results => \@results );
+ </table>
+ </&>
+ </td>
</tr>
-% my $CFs = $Group->CustomFields;
-% while (my $CF = $CFs->Next) {
-<tr valign="top"><td align="right">
-<% $CF->Name %>:
-</td><td>
-<& /Elements/EditCustomField, CustomField => $CF,
- Object => $Group, &>
-</td></tr>
-% }
<tr>
-<td colspan="2">
-<input type="hidden" class="hidden" name="SetEnabled" value="1" />
-<input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked%> />
-<label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this group)</&></label><br />
-</td>
+ <td>
+ <& /Elements/EditCustomFieldCustomGroupings , Object => $Group, &>
+ </td>
</tr>
-% $m->callback( %ARGS, GroupObj => $Group, results => \@results );
</table>
% if ( $Create ) {
<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list