updating header and fixing some minor input bugs
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Jun 2005 19:46:12 +0000 (19:46 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Jun 2005 19:46:12 +0000 (19:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@901 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/cgi-bin/circ-rules.cgi
Open-ILS/src/cgi-bin/copy_statuses.cgi
Open-ILS/src/cgi-bin/lib-setup.cgi
Open-ILS/src/cgi-bin/org_unit_types.cgi
Open-ILS/src/cgi-bin/perms-setup.cgi
Open-ILS/src/cgi-bin/superuser-setup.cgi
Open-ILS/src/cgi-bin/user-profiles.cgi
Open-ILS/src/cgi-bin/usr_group-setup.cgi

index 92e24a6..4e9738f 100755 (executable)
@@ -9,7 +9,10 @@ use OpenILS::Application::Storage::Driver::Pg;
 
 use CGI qw/:standard start_*/;
 
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
 OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
 
 my $cgi = new CGI;
@@ -49,6 +52,8 @@ Content-type: text/html
        </style>
 <body style='padding: 25px;'>
 
+<a href="$config{index}">Home</a>
+
 <h1>Configure Circulation Rules</h1>
 <hr/>
 
index 8c147a1..bd5e926 100755 (executable)
@@ -8,8 +8,10 @@ use OpenILS::Application::Storage::CDBI;
 use OpenILS::Application::Storage::Driver::Pg;
 
 use CGI qw/:standard start_*/;
+our %config;
+do '../setup.pl';
 
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
 OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
 
 my $cgi = new CGI;
@@ -52,6 +54,8 @@ Content-type: text/html
        </style>
 <body style='padding: 25px;'>
 
+<a href="$config{index}">Home</a>
+
 <h1>Copy Status Setup</h1>
 <hr/>
 
index 5ba4b45..91c128d 100755 (executable)
@@ -8,8 +8,10 @@ use OpenILS::Application::Storage::CDBI;
 use OpenILS::Application::Storage::Driver::Pg;
 
 use CGI qw/:standard start_*/;
+our %config;
+do '../setup.pl';
 
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
 OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
 
 my $cgi = new CGI;
@@ -27,6 +29,7 @@ if (my $action = $cgi->param('action')) {
                for my $id ( ($cgi->param('id')) ) {
                        my $u = actor::org_unit->retrieve($id);
                        for my $col ( keys %org_cols ) {
+                               next if ($cgi->param($col."_$id") =~ /Select One/o);
                                $u->$col( $cgi->param($col."_$id") );
                        }
                        $u->update;
@@ -77,6 +80,8 @@ Content-type: text/html
 
 <body style='padding: 25px;'>
 
+<a href="$config{index}">Home</a>
+
 <h1>Library Hierarchy Setup</h1>
 <hr/>
 HEADER
index 8491b16..72ae4c8 100755 (executable)
@@ -9,7 +9,10 @@ use OpenILS::Application::Storage::Driver::Pg;
 
 use CGI qw/:standard start_*/;
 
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
 OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
 
 my $cgi = new CGI;
@@ -52,6 +55,8 @@ Content-type: text/html
        </style>
 <body style='padding: 25px;'>
 
+<a href="$config{index}">Home</a>
+
 <h1>Organizational Unit Type Setup</h1>
 <hr/>
 
@@ -61,9 +66,9 @@ HEADER
 # setup part
 #-------------------------------------------------------------------------------
 
-my %ou_cols = ( qw/id SysID name Name depth Depth parent ParentType can_have_vols CanHaveVolumes can_have_users CanHaveUsers/ );
+my %ou_cols = ( qw/id SysID name Name opac_label OpacLabel depth Depth parent ParentType can_have_vols CanHaveVolumes can_have_users CanHaveUsers/ );
 
-my @col_display_order = ( qw/id name depth parent can_have_vols can_have_users/ );
+my @col_display_order = ( qw/id name opac_label depth parent can_have_vols can_have_users/ );
 
 #-------------------------------------------------------------------------------
 # Logic part
@@ -78,6 +83,7 @@ if (my $action = $cgi->param('action')) {
                for my $id ( ($cgi->param('id')) ) {
                        my $u = actor::org_unit_type->retrieve($id);
                        for my $col (@col_display_order) {
+                               next if ($cgi->param($col."_$id") =~ /Select One/o);
                                $u->$col( $cgi->param($col."_$id") );
                        }
                        $u->update;
@@ -108,6 +114,7 @@ if (my $action = $cgi->param('action')) {
                print Tr(
                        td( $row->id() ),
                        td("<input type='text' name='name_$row' value='". $row->name() ."'>"),
+                       td("<input type='text' name='opac_label_$row' value='". $row->opac_label() ."'>"),
                        td("<input type='text' size=3 name='depth_$row' value='". $row->depth() ."'>"),
                        td("<select name='parent_$row'><option>-- Select One --</option>".do{
                                my $out = '';
@@ -129,6 +136,7 @@ if (my $action = $cgi->param('action')) {
        print "<tr class='new_row_class'>",
                td(),
                td("<input type='text' name='name'>"),
+               td("<input type='text' name='opac_label'>"),
                td("<input type='text' size=3 name='depth'>"),
                td("<select name='parent'><option>-- Select One --</option>".do{
                        my $out = '';
index 28eb360..0e58d69 100755 (executable)
@@ -9,7 +9,10 @@ use OpenILS::Application::Storage::Driver::Pg;
 
 use CGI qw/:standard start_*/;
 
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
 OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
 
 my $cgi = new CGI;
@@ -52,6 +55,8 @@ Content-type: text/html
        </style>
 <body style='padding: 25px;'>
 
+<a href="$config{index}">Home</a>
+
 <h1>Permission List Setup</h1>
 <hr/>
 
index 9f4b65c..2ba6631 100755 (executable)
@@ -9,7 +9,10 @@ use OpenILS::Application::Storage::Driver::Pg;
 
 use CGI qw/:standard start_*/;
 
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
 OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
 
 my $cgi = new CGI;
@@ -52,6 +55,8 @@ Content-type: text/html
        </style>
 <body style='padding: 25px;'>
 
+<a href="$config{index}">Home</a>
+
 <h1>Superuser Setup</h1>
 <hr/>
 
index 1ce9a1a..301ec62 100755 (executable)
@@ -9,7 +9,10 @@ use OpenILS::Application::Storage::Driver::Pg;
 
 use CGI qw/:standard start_*/;
 
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
 OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
 
 my $cgi = new CGI;
@@ -52,6 +55,8 @@ Content-type: text/html
        </style>
 <body style='padding: 25px;'>
 
+<a href="$config{index}">Home</a>
+
 <h1>User Profile Setup</h1>
 <hr/>
 
index 970d44e..6ec3759 100755 (executable)
@@ -9,7 +9,10 @@ use OpenILS::Application::Storage::Driver::Pg;
 
 use CGI qw/:standard start_*/;
 
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
 OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
 
 my $cgi = new CGI;
@@ -27,6 +30,7 @@ if (my $action = $cgi->param('action')) {
                for my $id ( ($cgi->param('id')) ) {
                        my $u = permission::grp_tree->retrieve($id);
                        for my $col ( keys %org_cols ) {
+                               next if ($cgi->param($col."_$id") =~ /Select One/o);
                                $u->$col( $cgi->param($col."_$id") );
                        }
                        $u->update;
@@ -95,6 +99,8 @@ Content-type: text/html
 
 <body style='padding: 25px;'>
 
+<a href="$config{index}">Home</a>
+
 <h1>User Group Hierarchy Setup</h1>
 <hr/>
 HEADER