From 50f6376c073bf34aed07d806f66a81e873fc4d45 Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Wed, 3 Sep 2008 13:18:00 +0200 Subject: [PATCH] New item -> notification New item has a 'subscribe' checkbox, if checked, it adds a notification for that item. --- PciIds/Html/Changes.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PciIds/Html/Changes.pm b/PciIds/Html/Changes.pm index f5fbea1..7978fa8 100644 --- a/PciIds/Html/Changes.pm +++ b/PciIds/Html/Changes.pm @@ -21,6 +21,7 @@ sub genNewItemForm( $$$$$$ ) { [ 'input', 'Name:', 'text', 'name', 'maxlength="200"' ], [ 'input', 'Note:', 'text', 'note', 'maxlength="1024"' ], [ 'textarea', 'Discussion:', undef, 'discussion', 'rows="5" cols="50"' ], + [ 'input', 'Subscribe:', 'checkbox', 'subscribe', 'value="subscribe" checked="checked"' ], [ 'input', '', 'submit', 'submit', 'value="Submit"' ] ], $values ); print ''; print ' @@ -80,6 +81,7 @@ sub newItemSubmit( $$$$ ) { return genNewItemForm( $req, $args, $auth, $tables, $result, $data ); } notify( $tables, $data->{'address'}->parent()->get(), $comName, 2, 0 );#Notify the parent (parent gets new items) + $tables->submitNotification( $auth->{'authid'}, $data->{'address'}->get(), { 'recursive' => 0, 'notification' => 1, 'way' => 0 } ); tulog( $auth->{'authid'}, "Item created ".$data->{'address'}->get()." ".logEscape( $data->{'name'} )." ".logEscape( $data->{'note'} )." ".logEscape( $data->{'discussion'} )." $comName" ); return HTTPRedirect( $req, '/read/'.$data->{'address'}->get().'?action=list' ); } else { -- 2.39.2