UTF-8 form input vs. xmlhttp, #71347
[freeside.git] / httemplate / elements / header-popup.html
1 <%doc>
2
3 Example:
4
5   <& /elements/header-popup.html,
6        {
7          'title'   => 'Title',
8          'menubar' => \@menubar,
9          'etc'     => '', #included in <BODY> tag, for things like onLoad=
10          'head'    => '', #included before closing </HEAD> tag
11          'nobr'    => 0,  #1 for no <BR><BR> after the title
12        }
13   &>
14
15   #old-style
16   include( '/elements/header.html', 'Title', $menubar, $etc, $head);
17
18 </%doc>
19 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
20 <HTML>
21   <HEAD>
22     <TITLE>
23       <% encode_entities($title) || $title_noescape |n %>
24     </TITLE>
25     <!-- per RT, to prevent IE compatibility mode -->
26     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
27     <!-- The X-UA-Compatible <meta> tag above must be very early in <head> -->
28     <META HTTP-Equiv="Cache-Control" Content="no-cache">
29     <META HTTP-Equiv="Pragma" Content="no-cache">
30     <META HTTP-Equiv="Expires" Content="0"> 
31 %   unless ( $no_jquery ) {
32       <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
33 %   }
34     <% $head |n %>
35   </HEAD>
36   <BODY <% $etc |n %>>
37     <link href="<%$fsurl%>elements/freeside.css" type="text/css" rel="stylesheet">
38 % if ( $title || $title_noescape ) {
39     <FONT SIZE=6>
40       <CENTER><% encode_entities($title) || $title_noescape |n %></CENTER>
41     </FONT>
42 % }
43 % unless ( $nobr ) {
44     <BR><!--<BR>-->
45 % }
46 <%init>
47
48 my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
49 my( $nobr, $no_jquery ) = ( 0, 0 );
50 if ( ref($_[0]) ) {
51   my $opt = shift;
52   $title          = $opt->{title};
53   $title_noescape = $opt->{title_noescape};
54   $menubar        = $opt->{menubar};
55   $etc            = $opt->{etc};
56   $head           = $opt->{head};
57   $nobr           = $opt->{nobr};
58   #$nocss          = $opt->{nocss};
59   $no_jquery      = $opt->{no_jquery};
60 } else {
61   ($title, $menubar) = ( shift, shift );
62   $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
63   $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
64 }
65 $etc .= ' BGCOLOR="#f8f8f8"' unless $etc =~ /BGCOLOR/i;
66
67 my $conf = new FS::Conf;
68
69 </%init>