[freeside-commits] freeside/rt/share/html/Admin/CustomFields Modify.html, 1.1.1.1, 1.2
Mark Wells
mark at wavetail.420.am
Wed Sep 1 16:39:25 PDT 2010
Update of /home/cvs/cvsroot/freeside/rt/share/html/Admin/CustomFields
In directory wavetail.420.am:/tmp/cvs-serv9525/share/html/Admin/CustomFields
Modified Files:
Modify.html
Log Message:
RT mandatory custom fields, RT#9260
Index: Modify.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Admin/CustomFields/Modify.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -w -d -r1.1.1.1 -r1.2
--- Modify.html 31 Dec 2009 13:16:23 -0000 1.1.1.1
+++ Modify.html 1 Sep 2010 23:39:23 -0000 1.2
@@ -119,6 +119,11 @@
% }
<tr><td class="label"> </td><td>
+<input type="checkbox" class="checkbox" name="Required" value="1" <% $RequiredChecked |n%> />
+<&|/l&>Required for ticket resolution</&>
+</td></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 |n%> />
<&|/l&>Enabled (Unchecking this box disables this custom field)</&>
@@ -171,11 +176,12 @@
}
if ( $ARGS{'Update'} && $id ne 'new' ) {
-
#we're asking about enabled on the web page but really care about disabled.
$ARGS{'Disabled'} = $Disabled = $Enabled? 0 : 1;
- my @attribs = qw(Disabled Pattern Name TypeComposite LookupType Description LinkValueTo IncludeContentForValue);
+ $ARGS{'Required'} ||= 0;
+
+ my @attribs = qw(Disabled Required Pattern Name TypeComposite LookupType Description LinkValueTo IncludeContentForValue);
push @results, UpdateRecordObject(
AttributesRef => \@attribs,
Object => $CustomFieldObj,
@@ -222,6 +228,9 @@
my $EnabledChecked = qq[checked="checked"];
$EnabledChecked = '' if $CustomFieldObj->Disabled;
+my $RequiredChecked = '';
+$RequiredChecked = qq[checked="checked"] if $CustomFieldObj->Required;
+
my @CFvalidations = (
'(?#Mandatory).',
'(?#Digits)^[\d.]+$',
More information about the freeside-commits
mailing list