adding description column
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jul 2005 15:56:53 +0000 (15:56 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jul 2005 15:56:53 +0000 (15:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1480 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/cgi-bin/perms-setup.cgi
Open-ILS/src/cgi-bin/usr_group-setup.cgi

index 0993a71..eb66fe6 100755 (executable)
@@ -66,9 +66,9 @@ HEADER
 # setup part
 #-------------------------------------------------------------------------------
 
-my %profile_cols = ( qw/id SysID code Name/ );
+my %profile_cols = ( qw/id SysID code Name description Description/ );
 
-my @col_display_order = ( qw/id cod3/ );
+my @col_display_order = ( qw/id code description/ );
 
 #-------------------------------------------------------------------------------
 # Logic part
@@ -83,10 +83,15 @@ if (my $action = $cgi->param('action')) {
                for my $id ( ($cgi->param('id')) ) {
                        my $u = permission::perm_list->retrieve($id);
                        $u->code( $cgi->param("code_$id") );
+                       $u->description( $cgi->param("description_$id") );
                        $u->update;
                }
        } elsif ( $action eq 'Add New' ) {
-               permission::perm_list->create( { code => $cgi->param("code") } );
+               permission::perm_list->create(
+                       { code          => $cgi->param("code"),
+                         description   => $cgi->param("description")
+                       }
+               );
        }
 }
 
@@ -111,6 +116,7 @@ if (my $action = $cgi->param('action')) {
                print Tr(
                        td( $row->id() ),
                        td("<input type='text' name='code_$row' value='". $row->code() ."'>"),
+                       td("<input type='text' name='description_$row' value='". $row->description() ."'>"),
                        td("<input type='checkbox' value='$row' name='id'>"),
                );
        }
@@ -118,6 +124,7 @@ if (my $action = $cgi->param('action')) {
        print "<tr class='new_row_class'>",
                td(),
                td("<input type='text' name='code'>"),
+               td("<input type='text' name='description'>"),
                td(),
                "</tr>";
        print   "</table>";
index 58be72e..cb2fded 100755 (executable)
@@ -21,9 +21,9 @@ my $cgi = new CGI;
 # setup part
 #-------------------------------------------------------------------------------
 
-my %org_cols = ( qw/id GroupID name Name parent ParentGroup/ );
+my %org_cols = ( qw/id GroupID name Name parent ParentGroup description Description/ );
 
-my @col_display_order = ( qw/id name parent/ );
+my @col_display_order = ( qw/id name parent description/ );
 
 if (my $action = $cgi->param('action')) {
        if ( $action eq 'Update' ) {
@@ -188,6 +188,10 @@ if (my $action = $cgi->param('action')) {
                                                $out;
                                        }."</select><input type='hidden' value='$node' name='id'>"),
                        );
+                       print Tr(
+                               th($org_cols{description}),
+                               td("<input type='text' name='description_$node' value=\"". $node->description() ."\">"),
+                       );
 
                        print Tr( "<td colspan='2'><input type='submit' name='action' value='Update'/></td>" );
 
@@ -260,6 +264,10 @@ if (my $action = $cgi->param('action')) {
                                th($org_cols{name}),
                                td("<input type='text' name='name'>"),
                        );
+                       print Tr(
+                               th($org_cols{description}),
+                               td("<input type='text' name='description'>"),
+                       );
                        print Tr( "<td colspan='2'><input type='hidden' value='$node' name='parent'>",
                                  "<input type='submit' name='action' value='Add New'/></td>" );
                        print   "</table></form><hr/>";