qw( body_bgcolor box_bgcolor menu_bgcolor ) ),
( map { $_ => join("\n", $conf->config("selfservice-$_", $agentnum ) ) }
qw( head body_header body_footer ) ),
+ ( map { $_ => join("\n", $conf->config("signup_server-$_", $agentnum ) ) }
+ qw( terms_of_service ) ),
};
$cache->set("signup_info_cache_agent$agentnum", $signup_info_cache_agent);
},
{
+ 'key' => 'signup_server-terms_of_service',
+ 'section' => 'self-service',
+ 'description' => 'Terms of Service for the signup server. May contain HTML.',
+ 'type' => 'textarea',
+ 'per_agent' => 1,
+ },
+
+ {
'key' => 'selfservice_server-base_url',
'section' => 'self-service',
'description' => 'Base URL for the self-service web interface - necessary for some widgets to find their way, including retrieval of non-US state information and phone number provisioning.',
<%= $head %>
</HEAD>
<BODY BGCOLOR="<%= $body_bgcolor || '#e8e8e8' %>" onUnload="myclose()">
-
+<%= if ( $terms_of_service =~ /\S/ ) { # enable overlib
+ $OUT .= qq!<SCRIPT type="text/javascript" src="$_.js"></SCRIPT>\n!
+ foreach (qw(overlibmws overlibmws_iframe overlibmws_draggable
+ overlibmws_crossframe iframecontentmws ));
+}
+%>
<script type="text/javascript">
var mywindow = -1;
function myopen(filename,windowname,properties) {
$OUT = ''
}
%>
-
-<BR><INPUT TYPE="submit" NAME="signup" VALUE="Signup">
-<script language="JavaScript">
+<%=
+ if ( $terms_of_service =~ /\S/ ) {
+ my $title = 'Terms of Service'; #config?
+ my $onclick = qq[overlib( terms_content, CAPTION, "$title", STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, CLOSETEXT, "Close" );];
+ # Container for $terms_of_service to avoid nasty escaping.
+ $OUT .= qq[
+<BR>
+<DIV id="div_terms" style="display:none">$terms_of_service</DIV>
+<SCRIPT type="text/javascript">
+function agree_to_terms (val) {
+ document.getElementById("signup").disabled = !val;
+}
+function show_terms () {
+ overlib( document.getElementById('div_terms').innerHTML,
+ CAPTION, '$title', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE,
+ CLOSECLICK, CLOSETEXT, 'Close' );
+}
+</SCRIPT>
+<INPUT TYPE="checkbox" onchange="agree_to_terms(this.checked)">
+I agree to the <a href="javascript:void(0);" onclick="show_terms();">Terms of Service</a>.
+];
+ }
+%>
+<BR><INPUT TYPE="submit" ID="signup" NAME="signup" VALUE="Signup">
+<script language="javascript">
+<%= length($terms_of_service) ? 'agree_to_terms(false)' : '' %>
function fixup_form() {