menu link, RT#81809
[freeside.git] / httemplate / elements / header-full.html
index 6d90d50..08e20c8 100644 (file)
@@ -46,11 +46,18 @@ Example:
 %   unless ( $no_jquery ) {
       <link rel="stylesheet" href="<% $fsurl %>elements/jquery-ui.min.css">
       <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
+      <SCRIPT SRC="<% $fsurl %>elements/jquery-migrate-3.0.1.min.js"></SCRIPT>
       <SCRIPT SRC="<% $fsurl %>elements/jquery-ui.min.js"></SCRIPT>
+      <SCRIPT SRC="<% $fsurl %>elements/jquery.validate.min.js"></SCRIPT>
 %     if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
       <SCRIPT SRC="<% $fsurl %>elements/printtofit.js"></SCRIPT>
 %     }
 %   }
+%   if ( $include_selectize ) {
+      <script src="<% $fsurl %>elements/selectize/selectize.min.js"></script>
+      <link href="<% $fsurl %>elements/selectize/selectize.css" type="text/css" rel="stylesheet">
+      <link href="<% $fsurl %>elements/selectize/selectize-freeside.css" type="text/css" rel="stylesheet">
+% }
     <% include('init_overlib.html') |n %>
     <% include('rs_init_object.html') |n %>
     <script type="text/javascript" src="<% $fsurl %>elements/topreload.js"></script>
@@ -73,7 +80,15 @@ Example:
         <td align="right" BGCOLOR="#ffffff">
           <& notify-tickets.html &>
         </td>
-        <td align=right valign=top BGCOLOR="#ffffff"><FONT SIZE="-1"><% mt('Logged in as') |h %><b><% $FS::CurrentUser::CurrentUser->username |h %>&nbsp;</b> <FONT SIZE="-2"><a href="<%$fsurl%>loginout/logout.html"><% mt('logout' |h %></a></FONT><br></FONT><FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html" STYLE="color: #000000"><% mt('Preferences') |h %></a>
+        <td align=right valign=top BGCOLOR="#ffffff">
+          <FONT SIZE="-1"><% mt('Logged in as') |h %>
+            <b><% $FS::CurrentUser::CurrentUser->username |h %>&nbsp;</b>
+            <FONT SIZE="-2"><a href="<%$fsurl%>loginout/logout.html">
+              <% mt('logout') |h %>
+            </a></FONT>
+          <br>
+          </FONT>
+          <FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html" STYLE="color: #000000"><% mt('Preferences') |h %></a>
 %         if ( $conf->config("ticket_system")
 %              && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) {
             | <a href="<%$fsurl%>rt/Prefs/Other.html" STYLE="color: #000000"><% mt('Ticketing preferences') |h %></a>
@@ -185,6 +200,20 @@ Example:
             <% $title_noescape || encode_entities($title) %>
           </H1>
 
+% my %cookies = CGI::Cookie->fetch($r);
+% if ( $cookies{freeside_status} ) {
+    <BR>
+%   foreach my $status_msg ( $cookies{freeside_status}->value ) {
+      <TABLE CLASS="fsinnerbox" STYLE="background-color:#eeffee"><TR>
+        <TD><IMG SRC="<% $fsurl %>images/tick.png"> <% $status_msg |h %></TD>
+      </TR></TABLE>
+%   }
+    <script src="<% $fsurl %>elements/js.cookie.js"></script>
+    <SCRIPT TYPE="text/javascript">
+      Cookies.remove('freeside_status', { path: '/' });
+    </SCRIPT>
+% }
+
 % unless ( $nobr ) {
           <BR>
 % }
@@ -197,6 +226,7 @@ my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
 my( $nobr, $nocss, $no_jquery ) = ( 0, 0, 0 );
 
 my $mobile;
+my $include_selectize;
 
 if ( ref($_[0]) ) {
   my $opt = shift;
@@ -209,6 +239,7 @@ if ( ref($_[0]) ) {
   $nocss      = $opt->{nocss};
   $mobile     = $opt->{mobile};
   $no_jquery  = $opt->{no_jquery};
+  $include_selectize = $opt->{include_selectize} ? 1 : 0;
 } else {
   ($title, $menubar) = ( shift, shift );
   $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.