[Rt-commit] rt branch, 4.0/web-create-disabled-cf-fix, created. rt-4.0.1rc1-4-ga7a3df5

? sunnavy sunnavy at bestpractical.com
Wed May 25 04:58:33 EDT 2011


The branch, 4.0/web-create-disabled-cf-fix has been created
        at  a7a3df54f0c2a83e61098f69434ed75d17ddddae (commit)

- Log -----------------------------------------------------------------
commit 7037e2e46d23dd3dd9c10abaf74fe77261131c53
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed May 25 16:42:35 2011 +0800

    clean: we don't seem make use of $Disabled at all

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index e77a5ec..2ef19ee 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -152,7 +152,7 @@
 
 </form>
 <%INIT>
-my ($title, @results, $Disabled);
+my ($title, @results);
 
 my $CustomFieldObj = RT::CustomField->new( $session{'CurrentUser'} );
 
@@ -186,7 +186,7 @@ else {
 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;
+    $ARGS{'Disabled'} = $Enabled? 0 : 1;
 
     my @attribs = qw(Disabled Pattern Name TypeComposite LookupType Description LinkValueTo IncludeContentForValue);
     push @results, UpdateRecordObject(

commit a7a3df54f0c2a83e61098f69434ed75d17ddddae
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed May 25 16:44:50 2011 +0800

    respect Enable field even on create

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 2ef19ee..4558bc6 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -173,6 +173,7 @@ else {
             LinkValueTo   => $LinkValueTo,
             IncludeContentForValue => $IncludeContentForValue,
             BasedOn       => $BasedOn,
+            Disabled      => !$Enabled,
         );
         $m->comp( "/Elements/Error", Why => loc( "Could not create CustomField", $msg ) ) unless $val;
         push @results, $msg;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list