[Rt-commit] rt branch, 4.0/article-callbacks, created. rt-4.0.2-45-g4453899

Kevin Falcone falcone at bestpractical.com
Tue Sep 6 18:50:25 EDT 2011


The branch, 4.0/article-callbacks has been created
        at  4453899db9239f6a9f6661a136885d8a3dddedae (commit)

- Log -----------------------------------------------------------------
commit 4453899db9239f6a9f6661a136885d8a3dddedae
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Sep 6 17:02:08 2011 -0400

    Add two new callbacks
    
    One to allow you to add new Attributes to the Class form before
    submitting and one to allow you to have that field processed during
    normal Class Updating.

diff --git a/share/html/Admin/Articles/Classes/Modify.html b/share/html/Admin/Articles/Classes/Modify.html
index ac22fd9..4bbbeb1 100644
--- a/share/html/Admin/Articles/Classes/Modify.html
+++ b/share/html/Admin/Articles/Classes/Modify.html
@@ -90,6 +90,8 @@
 % }
 </ul>
 
+%$m->callback( CallbackName => 'BeforeSubmit', CustomFields => $cfs, ClassObj => $ClassObj );
+
 <& /Elements/Submit &>
 </form>
 
@@ -117,6 +119,7 @@ if ($Create) {
 if ($ClassObj->Id()) {
     $ARGS{HotList} ||= 0 if $Submitted;
     my @attribs= qw(Description Name HotList);
+    $m->callback( CallbackName => 'AttributeList', Attributes => \@attribs );
     push @results, UpdateRecordObject( AttributesRef => \@attribs,
                                        Object => $ClassObj,
                                        ARGSRef => \%ARGS);

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


More information about the Rt-commit mailing list