[open-ils-commits] r9114 - trunk/Open-ILS/src/perlmods/OpenILS/WWW
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Mar 23 23:59:00 EDT 2008
Author: miker
Date: 2008-03-23 23:24:02 -0400 (Sun, 23 Mar 2008)
New Revision: 9114
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/Proxy.pm
Log:
move the default proxy html into a heredoc
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/Proxy.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/Proxy.pm 2008-03-24 02:38:06 UTC (rev 9113)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/Proxy.pm 2008-03-24 03:24:02 UTC (rev 9114)
@@ -17,6 +17,35 @@
my $bootstrap;
my $ssl_off;
+my $default_template = <<HTML
+<html>
+ <head>
+ <title>TITLE</title>
+ </head>
+ <body>
+ <br/><br/><br/>
+ <center>
+ <form method='POST'>
+ <table style='border-collapse: collapse; border: 1px solid black;'>
+ <tr>
+ <th colspan='2' align='center'><u>DESCRIPTION</u></th>
+ </tr>
+ <tr>
+ <th align="right">Username or barcode:</th>
+ <td><input type="text" name="user"/></td>
+ </tr>
+ <tr>
+ <th align="right">Password:</th>
+ <td><input type="password" name="passwd"/></td>
+ </tr>
+ </table>
+ <input type="submit" value="Log in"/>
+ </form>
+ </center>
+ </body>
+</html>
+HTML
+
sub import {
my $self = shift;
$bootstrap = shift;
@@ -61,7 +90,7 @@
print $cgi->header(-type=>'text/html', -expires=>'-1d');
if (!$proxyhtml) {
- $proxyhtml = join '', <DATA>;
+ $proxyhtml = $default_template;
$proxyhtml =~ s/TITLE/$title/gso;
$proxyhtml =~ s/DESCRIPTION/$desc/gso;
} else {
@@ -149,35 +178,5 @@
return $response->{payload}->{authtoken};
}
-
-
1;
-__DATA__
-<html>
- <head>
- <title>TITLE</title>
- </head>
- <body>
- <br/><br/><br/>
- <center>
- <form method='POST'>
- <table style='border-collapse: collapse; border: 1px solid black;'>
- <tr>
- <th colspan='2' align='center'><u>DESCRIPTION</u></th>
- </tr>
- <tr>
- <th align="right">Username or barcode:</th>
- <td><input type="text" name="user"/></td>
- </tr>
- <tr>
- <th align="right">Password:</th>
- <td><input type="password" name="passwd"/></td>
- </tr>
- </table>
- <input type="submit" value="Log in"/>
- </form>
- </center>
- </body>
-</html>
-
More information about the open-ils-commits
mailing list