diff options
author | ivan <ivan> | 2008-03-02 04:06:06 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-02 04:06:06 +0000 |
commit | 5e05724a635a22776f1b973f5d7e77989da4e048 (patch) | |
tree | 8c9155a06d82fd0fac65300ce8ca8f51e73d6afc /rt/html/Admin/CustomFields | |
parent | 807bc6bf91e6208fd40bcdf99ce4c0149c2598d2 (diff) | |
parent | 9c68254528b6f2c7d8c1921b452fa56064783782 (diff) |
This commit was generated by cvs2svn to compensate for changes in r6252,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/html/Admin/CustomFields')
-rw-r--r-- | rt/html/Admin/CustomFields/GroupRights.html | 44 | ||||
-rw-r--r-- | rt/html/Admin/CustomFields/Modify.html | 82 | ||||
-rw-r--r-- | rt/html/Admin/CustomFields/Objects.html | 14 | ||||
-rw-r--r-- | rt/html/Admin/CustomFields/UserRights.html | 28 | ||||
-rw-r--r-- | rt/html/Admin/CustomFields/index.html | 35 |
5 files changed, 67 insertions, 136 deletions
diff --git a/rt/html/Admin/CustomFields/GroupRights.html b/rt/html/Admin/CustomFields/GroupRights.html index a416327c5..380fee479 100644 --- a/rt/html/Admin/CustomFields/GroupRights.html +++ b/rt/html/Admin/CustomFields/GroupRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -53,46 +51,46 @@ &> <& /Elements/ListActions, actions => \@results &> - <form method="post" action="GroupRights.html"> - <input type="hidden" class="hidden" name="id" value="<% $CustomFieldObj->id %>" /> + <FORM METHOD=POST ACTION="GroupRights.html"> + <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>"> <h1><&|/l&>System groups</&></h1> -<table> +<TABLE> % $Groups = RT::Groups->new($session{'CurrentUser'}); % $Groups->LimitToSystemInternalGroups(); % while (my $Group = $Groups->Next()) { - <tr align="right"> - <td valign="top"> + <TR ALIGN=RIGHT> + <TD VALIGN=TOP> <% loc($Group->Type) %> - </td> - <td> + </TD> + <TD> <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, Object => $CustomFieldObj &> - </td> - </tr> + </TD> + </TR> % } -</table> +</TABLE> <h1><&|/l&>User defined groups</&></h1> -<table> +<TABLE> % $Groups = RT::Groups->new($session{'CurrentUser'}); % $Groups->LimitToUserDefinedGroups(); % while (my $Group = $Groups->Next()) { - <tr align="right"> - <td valign="top"> + <TR ALIGN=RIGHT> + <TD VALIGN=TOP> <% $Group->Name %> - </td> - <td> + </TD> + <TD> <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, Object => $CustomFieldObj &> - </td> - </tr> + </TD> + </TR> % } -</table> +</TABLE> <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> - </form> + </FORM> <%INIT> diff --git a/rt/html/Admin/CustomFields/Modify.html b/rt/html/Admin/CustomFields/Modify.html index 0202f0ad6..4c3c92114 100644 --- a/rt/html/Admin/CustomFields/Modify.html +++ b/rt/html/Admin/CustomFields/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -53,15 +51,15 @@ <& /Elements/ListActions, actions => \@results &> -<form method="post" action="Modify.html" name="ModifyCustomField"> -<input type="hidden" class="hidden" name="id" value="<%$id %>" /> +<FORM METHOD="POST" ACTION="Modify.html" NAME="ModifyCustomField"> +<INPUT TYPE=HIDDEN NAME="id" VALUE="<%$id %>"> <table> <tr> <td class="label"><&|/l&>Name</&></td> -<td><input name="Name" value="<%$CustomFieldObj->Name%>" size="20" /></td></tr> +<td><input name="Name" VALUE="<%$CustomFieldObj->Name%>" SIZE=20></td></tr> <tr> <td class="label"><&|/l&>Description</&></td> -<td><input name="Description" value="<%$CustomFieldObj->Description%>" size="80" /></td> +<td><input name="Description" VALUE="<%$CustomFieldObj->Description%>" SIZE=80></td> </tr> <tr> @@ -79,64 +77,23 @@ </td> </tr> <tr> -<td class="label"><&|/l&>Validation</&></td> -<td> -<& /Widgets/ComboBox, - Name => 'Pattern', - Default => $CustomFieldObj->Pattern, - Size => 20, - Values => [ - '(?#Mandatory).', - '(?#Digits)^[\d.]+$', - '(?#Year)^[12]\d{3}$', - ], -&> -</td></tr> -</tr> -<tr> <td class="label"> </td> <td> -<input type="hidden" class="hidden" name="SetEnabled" value="1" /> -<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this custom field)</&> -</td> -</tr> -<tr> -<td class="label"><&|/l&>Link values to</&></td> -</td> -<td><input size="60" name="LinkValueTo" value="<%$CustomFieldObj->LinkValueTo%>" /> -<div class="hints"> -<&|/l&>RT can make this custom field's values into hyperlinks to another service.</&> -<&|/l&>Fill in this field with a URL.</&> -<&|/l&>RT will replace <tt>__id__</tt> and <tt>__CustomField__</tt> with the record id and custom field value, respectively</&> -</div> +<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1"> +<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this custom field)</&> </td> </tr> -<tr> -<td class="label"><&|/l&>Include page</&></td> -</td> -<td><input size="60" name="IncludeContentForValue" value="<%$CustomFieldObj->IncludeContentForValue%>" /> -<div class="hints"> -<&|/l&>RT can include content from another web service when showing this custom field.</&> -<&|/l&>Fill in this field with a URL.</&> -<&|/l&>RT will replace <tt>__id__</tt> and <tt>__CustomField__</tt> with the record id and custom field value, respectively</&> -<i><&|/l&>Some browsers may only load content from the same domain as your RT server.</&></i> -</div> -</td> -</tr> - - - </table> -<br /> -% if ($CustomFieldObj->Id && $CustomFieldObj->IsSelectionType) { -<h2><&|/l&>Values</&></h2> +<BR> +% if ($CustomFieldObj->Id && $CustomFieldObj->Type =~ /^Select/i) { +<H2><&|/l&>Values</&></H2> <div> <& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &> <& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &> </div> % } <&/Elements/Submit&> -</form> +</FORM> @@ -158,8 +115,7 @@ else { my ( $val, $msg ) = $CustomFieldObj->Create(Name => $Name, TypeComposite => $TypeComposite, LookupType => $LookupType, - Description => $Description, - Pattern => $Pattern,); + Description => $Description,); $m->comp("/Elements/Error", Why => loc( "Could not create CustomField", $msg ) ) unless ($val); push @results, $msg; $title = loc( 'Created CustomField [_1]', $CustomFieldObj->Name() ); @@ -168,7 +124,7 @@ else { $CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc('No CustomField') ); $title = loc( 'Editing CustomField [_1]', $CustomFieldObj->Name() ); - my @attribs = qw( Pattern Name TypeComposite LookupType Description LinkValueTo IncludeContentForValue); + my @attribs = qw( Name TypeComposite LookupType Description); my @aresults = UpdateRecordObject( AttributesRef => \@attribs, Object => $CustomFieldObj, ARGSRef => \%ARGS ); @@ -211,7 +167,7 @@ foreach my $key (keys %ARGS) { # Update any existing values my $values = $CustomFieldObj->ValuesObj; while (my $value = $values->Next) { - foreach my $attr qw(Name Description SortOrder Category) { + foreach my $attr qw(Name Description SortOrder) { my $param = $paramtag.$value->Id."-".$attr; if ( $ARGS{$param} && ($value->$attr() ne $ARGS{$param})) { @@ -228,10 +184,9 @@ while (my $value = $values->Next) { # Add any new values if ($ARGS{$paramtag."new-Name"}) { - my ($id, $msg) = $CustomFieldObj->AddValue ( - map { $_ => $ARGS{$paramtag."new-$_"} } - qw( Name Description SortOrder Category ) - ); + my ($id, $msg) = $CustomFieldObj->AddValue ( Name => $ARGS{$paramtag."new-Name"}, + Description => $ARGS{$paramtag."new-Description"}, + SortOrder => $ARGS{$paramtag."new-SortOrder"}); push (@results, $msg); } @@ -251,7 +206,6 @@ $LookupType => undef $MaxValues => undef $SortOrder => undef $Description => undef -$Pattern => undef $Name => undef $SetEnabled => undef $Enabled => undef diff --git a/rt/html/Admin/CustomFields/Objects.html b/rt/html/Admin/CustomFields/Objects.html index d829a0da3..8f9e3657b 100644 --- a/rt/html/Admin/CustomFields/Objects.html +++ b/rt/html/Admin/CustomFields/Objects.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -54,9 +52,9 @@ <& /Elements/ListActions, actions => \@results &> -<form action="Objects.html" method="post"> -<input type="hidden" class="hidden" name="id" value="<% $id %>" /> -<input type="hidden" class="hidden" name="UpdateObjs" value="1" /> +<FORM ACTION="Objects.html" METHOD=POST> +<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $id %>"> +<INPUT TYPE=HIDDEN NAME="UpdateObjs" VALUE="1"> <h2><&|/l&>Selected objects</&></h2> <& /Admin/Elements/PickObjects, Objects => \@AssignedObjs, id => $id, Checked => 1 &> @@ -64,7 +62,7 @@ <& /Admin/Elements/PickObjects, Objects => \@UnassignedObjs, id => $id &> <& /Elements/Submit, CheckAll => 1, ClearAll => 1 &> -</form> +</FORM> <%INIT> my $CF = RT::CustomField->new($session{'CurrentUser'}); diff --git a/rt/html/Admin/CustomFields/UserRights.html b/rt/html/Admin/CustomFields/UserRights.html index a7145977c..e2df3a058 100644 --- a/rt/html/Admin/CustomFields/UserRights.html +++ b/rt/html/Admin/CustomFields/UserRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -51,31 +49,31 @@ current_tab => "Admin/CustomFields/UserRights.html?id=".$id, Title => $title, &> <& /Elements/ListActions, actions => \@results &> - <form method="post" action="UserRights.html"> - <input type="hidden" class="hidden" name="id" value="<% $CustomFieldObj->id %>" /> + <FORM METHOD=POST ACTION="UserRights.html"> + <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>"> -<table> +<TABLE> % while (my $Member = $Users->Next()) { % my $UserObj = $Member->MemberObj->Object(); % my $group = RT::Group->new($session{'CurrentUser'}); % $group->LoadACLEquivalenceGroup($Member->MemberObj); - <tr align="right"> - <td valign="top"> + <TR ALIGN=RIGHT> + <TD VALIGN=TOP> <% $UserObj->Name %> - </td> - <td> + </TD> + <TD> <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId, Object => $CustomFieldObj &> - </td> - </tr> + </TD> + </TR> % } - </table> + </TABLE> <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &> - </form> + </FORM> <%INIT> diff --git a/rt/html/Admin/CustomFields/index.html b/rt/html/Admin/CustomFields/index.html index aa7f12b29..9854fb0ec 100644 --- a/rt/html/Admin/CustomFields/index.html +++ b/rt/html/Admin/CustomFields/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# <jesse@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -50,44 +48,29 @@ current_tab => 'Admin/CustomFields/', Title => loc('Select a Custom Field') &> -% my @types; % my $prev_lookup = ''; % while (my $CustomFieldObj = $CustomFields->Next) { % $CustomFieldObj->CurrentUserHasRight('AdminCustomField') or next; % my $lookup = $CustomFieldObj->FriendlyLookupType; % if ($lookup ne $prev_lookup) { % if ($prev_lookup) { -</ul> +</UL> % } -<h2><% loc("Custom Fields for [_1]", $lookup) %></h2> -<ul> +<H2><% loc("Custom Fields for [_1]", $lookup) %></H2> +<UL> % $prev_lookup = $lookup; -% push @types, [$lookup, $CustomFieldObj->LookupType]; % } % -<li> -<a href="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a> -</li> +<LI> +<A HREF="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a> +</LI> % } % if ($prev_lookup) { -</ul> +</UL> % } -<form action="<%$RT::WebPath%>/Admin/CustomFields/index.html" method="get"> -<&|/l&>Only show custom fields for:</&> -<select name="type"> -% for (@types) { -<option value="<% $_->[1] %>"><% $_->[0] %></option> -% } -</select> <input type="submit" value="<%loc('Go')%>" /> -</form> - -<%args> -$type => undef -</%args> <%INIT> my $CustomFields = RT::CustomFields->new($session{'CurrentUser'}); $CustomFields->UnLimit(); -$CustomFields->LimitToLookupType($type) if defined $type; $CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } ); </%INIT> |