summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2002-04-07 00:00:41 +0000
committerivan <ivan>2002-04-07 00:00:41 +0000
commitfca110eff969104793774ed717985e91c53f5318 (patch)
tree310d308115a9c1a8e1126d047f1f5d7820f4797e /httemplate
parent99a8652052e5b036e7db08c32603c0feadc60e85 (diff)
- config option for signup server payment types
- credit card type pulldown on signup server (closes: Bug#383)
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/config/config-process.cgi2
-rw-r--r--httemplate/config/config-view.cgi6
-rw-r--r--httemplate/config/config.cgi6
-rw-r--r--httemplate/docs/signup.html1
4 files changed, 9 insertions, 6 deletions
diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi
index 38d9af0db..259713260 100644
--- a/httemplate/config/config-process.cgi
+++ b/httemplate/config/config-process.cgi
@@ -34,7 +34,7 @@
}
} elsif ( $type eq 'editlist' || $type eq 'selectmultiple' ) {
if ( scalar(@{[ $cgi->param($i->key. $n) ]}) ) {
- $conf->set($i->key, join("\n", $cgi->param($i->key. $n) ));
+ $conf->set($i->key, join("\n", @{[ $cgi->param($i->key. $n) ]} ));
} else {
$conf->delete($i->key);
}
diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi
index d40c4dc10..f0ae2b2fd 100644
--- a/httemplate/config/config-view.cgi
+++ b/httemplate/config/config-view.cgi
@@ -37,7 +37,9 @@
my $n = 0; %>
<% if ( $type eq '' ) { %>
<tr><td><font color="#ff0000">no type</font></td></tr>
- <% } elsif ( $type eq 'textarea' || $type eq 'editlist' ) { %>
+ <% } elsif ( $type eq 'textarea'
+ || $type eq 'editlist'
+ || $type eq 'selectmultiple' ) { %>
<tr><td bgcolor="#ffffff">
<pre>
<%= encode_entities(join("\n", $conf->config($i->key) ) ) %>
@@ -46,7 +48,7 @@
<% } elsif ( $type eq 'checkbox' ) { %>
<tr><td bgcolor="#<%= $conf->exists($i->key) ? '00ff00">YES' : 'ff0000">NO' %></td></tr>
<% } elsif ( $type eq 'text' || $type eq 'select' ) { %>
- <tr><td bgcolor="#ffffff"><%= $conf->exists($i->key) ? $conf->config($i->key) : '' %></td></tr>
+ <tr><td bgcolor="#ffffff"><%= $conf->exists($i->key) ? $conf->config($i->key) : '' %></td></tr>
<% } else { %>
<tr><td>
<font color="#ff0000">unknown type <%= $type %></font>
diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi
index 4f19ee961..2817e5f84 100644
--- a/httemplate/config/config.cgi
+++ b/httemplate/config/config.cgi
@@ -62,12 +62,12 @@ function SafeOnsubmit() {
<input name="<%= $i->key. $n %>" type="checkbox" value="1"<%= $conf->exists($i->key) ? ' CHECKED' : '' %>>
<% } elsif ( $type eq 'text' ) { %>
<input name="<%= $i->key. $n %>" type="<%= $type %>" value="<%= $conf->exists($i->key) ? $conf->config($i->key) : '' %>">
- <% } elsif ( $type eq 'select' ) { %>
- <select name="<%= $i->key. $n %>">
+ <% } elsif ( $type eq 'select' || $type eq 'selectmultiple' ) { %>
+ <select name="<%= $i->key. $n %>" <%= $type eq 'selectmultiple' ? 'MULTIPLE' : '' %>>
<% my %saw;
foreach my $value ( "", @{$i->select_enum} ) {
local($^W)=0; next if $saw{$value}++; %>
- <option value="<%= $value %>"<%= $value eq $conf->config($i->key) ? ' SELECTED' : '' %>><%= $value %>
+ <option value="<%= $value %>"<%= $value eq $conf->config($i->key) || ( $type eq 'selectmultiple' && grep { $_ eq $value } $conf->config($i->key) ) ? ' SELECTED' : '' %>><%= $value %>
<% } %>
<% if ( $conf->exists($i->key) && $conf->config($i->key) && ! grep { $conf->config($i->key) eq $_ } @{$i->select_enum}) { %>
<option value=<%= $conf->config($i->key) %> SELECTED><%= conf->config($i->key) %>
diff --git a/httemplate/docs/signup.html b/httemplate/docs/signup.html
index e7472158a..117cf2947 100644
--- a/httemplate/docs/signup.html
+++ b/httemplate/docs/signup.html
@@ -11,6 +11,7 @@ webserver. On this machine, install:
<li><a href="http://www.perl.com/CPAN/doc/relinfo/INSTALL.html">Perl</a> (at least 5.004_05 for the 5.004 series or 5.005_03 for the 5.005 series. Don't enable experimental features like threads or the PerlIO abstraction layer.)
<li><a href="http://search.cpan.org/search?dist=Text-Template">Text::Template</a>
<li><a href="http://search.cpan.org/search?dist=Storable">Storable</a>
+ <li><a href="http://search.cpan.org/search?dist=Business-CreditCard">Business-CreditCard</a>
<li><a href="http://www.sisd.com/useragent">HTTP::Headers::UserAgent</a> (version 2.0 or higher; not yet indexed correctly on CPAN)
<li><a href="man/FS/SignupClient.html">FS::SignupClient</a> (copy the fs_signup/FS-SignupClient directory to the external machine, then: perl Makefile.PL; make; make install)