<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="text-transform" content="none">
<link rel="icon" type="image/png" sizes="32x32" href="/media/logo.png">
    <!-- Bootstrap CSS 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    
	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
-->
 <link href="/media/css/material/css/materialdesignicons.min.css" rel="stylesheet" />
 <link href="/media/css/simplebar.css" rel="stylesheet" />

 <style>
 * {
    text-transform: none !important;
}

 </style>

  <link id="main-css-href" rel="stylesheet" href="/media/css/style.css" />
    <title>{% block title %} {% endblock %} </title>
</head>
 {% if user.is_authenticated %}
				
<body class="navbar-fixed sidebar-fixed" id="body">
   

    
    <!--<div id="toaster">Welcome to Epanel</div>-->
    

    <!-- ====================================
    ——— WRAPPER
    ===================================== -->
    <div class="wrapper">
      
      
        <!-- ====================================
          ——— LEFT SIDEBAR WITH OUT FOOTER
        ===================================== -->
        <aside class="left-sidebar sidebar-dark" id="left-sidebar">
            
          <div id="sidebar" class="sidebar sidebar-with-footer">
              
            <!-- Aplication Brand -->
            <div class="app-brand">
              <a href="/whm">
                <img src="/media/logo.png" alt="OLS Panel">
                <span class="brand-name"><font color="#ef6d19">OLS Panel</font></span>
              </a>
            </div>
            
            <!-- begin sidebar scrollbar -->
            <div class="sidebar-left" data-simplebar style="height: 100%;">
              <!-- sidebar menu -->
              <ul class="nav sidebar-inner" id="sidebar-menu">
                 <div id="custom-search" class="top-search-bar px-3 mb-2">
    <div class="input-group">
         <input type="text" name="fakeusernameremembered" style="display:none" />
  <input type="password" name="fakepasswordremembered" style="display:none" />

        <input class="form-control shadow-sm" autocomplete="off" id="menuSearchInput" type="text" placeholder="Search..." style="padding-left: 1.2rem;border-radius: 10px;">
    </div>
</div>
                  <li 
                   class="active"
                   >
                    <a class="sidenav-item-link" href="/whm">
                     <img src="/media/icon/dashboard.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Dashboard</span>
                    </a>
                  
 

                  <li class="section-title">
                    Tools
                  </li>
                  <li>
  <a class="sidenav-item-link" href="{% url 'update_check' %}">
    <img src="/media/logo.png" width="24px" height="24px" style="margin-right: 5px;" />
    <span class="nav-text">Panel Version</span>
  </a>
</li>
                  <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#user"
                      aria-expanded="false" aria-controls="user">
                     <img src="/media/icon/user.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Users</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="user"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'user_list_all' %}">
                               <img src="/media/icon/users.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">List users</span>
                                
                              </a>
                            </li>
                            <li >
                              <a class="sidenav-item-link" href="{% url 'add_user_all' %}">
                                <img src="/media/icon/person_add.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Add User</span>
                                
                              </a>
                            </li>
                            <li >
                              <a class="sidenav-item-link" href="{% url 'package_list' %}">
                                <img src="/media/icon/package.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Package</span>
                                
                              </a>
                            </li>
                           
                      </div>
                    </ul>
                  </li>
                  
                  <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#database"
                      aria-expanded="false" aria-controls="database">
                     <img src="/media/icon/database.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Database</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="database"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'phpmyadmins' %}" target="_blank">
                               <img src="/media/icon/user.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">PhpMyAdmin</span>
                                
                              </a>
                            </li>
                          
                            
                           
                      </div>
                    </ul>
                  </li>
                  
                  <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#domain"
                      aria-expanded="false" aria-controls="domain">
                     <img src="/media/icon/domain.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Domains</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="domain"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'domain_list_all' %}">
                                <img src="/media/icon/domain.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Domains</span>
                                
                              </a>
                            </li>
                            <li >
                              <a class="sidenav-item-link" href="{% url 'dns_all' %}">
                               <img src="/media/icon/dns.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">DNS</span>
                                
                              </a>
                            </li>
                      </div>
                    </ul>
                  </li>

                  <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#file"
                      aria-expanded="false" aria-controls="file">
                      <img src="/media/icon/folder.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Files</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="file"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'backup_whm' %}">
                               <img src="/media/icon/backup.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Backup</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'backup_restore' %}">
                               <img src="/media/icon/backup.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Backup Restore</span>
                                
                              </a>
                            </li>
                            
                           
                            
                          
                          
                      </div>
                    </ul>
                  </li>
                
                  <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#security"
                      aria-expanded="false" aria-controls="security">
                      <img src="/media/icon/ssl.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Security</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="security"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'domain_list_ssl_all' %}">
                                <img src="/media/icon/ssl.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">SSL</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'configserver' %}">
                                 <img src="/media/icon/fire.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">CSF (Firewall)</span>
                                
                              </a>
                            </li>
                             <li >
                              <a class="sidenav-item-link" href="{% url 'ufw' %}">
                                 <img src="/media/icon/fire.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">UFW (Firewall)</span>
                                
                              </a>
                            </li>
                            <li >
                              <a class="sidenav-item-link" href="{% url 'firewall_port' %}">
                                 <img src="/media/icon/port.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Port (Firewall)</span>
                                
                              </a>
                            </li>
                            
                            
                            
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'mode_sec' %}">
                                 <img src="/media/icon/modes.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Modsecurity</span>
                                
                              </a>
                            </li>
							
							
							<li >
                              <a class="sidenav-item-link" href="{% url 'panel_port' %}">
                                 <img src="/media/icon/admin_panel.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Panel Port</span>
                                
                              </a>
                            </li>
							
							
							<li >
                              <a class="sidenav-item-link" href="{% url 'ssh_port' %}">
                                 <img src="/media/icon/ssh.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">SSH Port</span>
                                
                              </a>
                            </li>
							
							<li >
                              <a class="sidenav-item-link" href="{% url 'panel_ssl' %}">
                                 <img src="/media/icon/ssl.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Panel SSL</span>
                                
                              </a>
                            </li>
							<li >
                              <a class="sidenav-item-link" href="{% url 'imunifyfav_whm' %}">
                                 <img src="/media/icon/imunifyfav.png" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Imunifyav</span>
                                
                              </a>
                            </li>
							<li >
                              <a class="sidenav-item-link" href="{% url 'whm_password_change' %}">
                                 <img src="/media/icon/password.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">password</span>
                                
                              </a>
                            </li>
                      </div>
                    </ul>
                  </li>
                  
                  
				  
				  <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#server"
                      aria-expanded="false" aria-controls="server">
                      <img src="/media/icon/pc.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Server</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="server"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'services' %}">
                               <img src="/media/icon/pc.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Sevices</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'process_manager' %}">
                               <img src="/media/icon/memory.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Process Manager</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'time_zone' %}">
                               <img src="/media/icon/timezone.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Time Zone</span>
                                
                              </a>
                            </li>
							
							 <li >
                              <a class="sidenav-item-link" href="{% url 'reboot_server' %}">
                               <img src="/media/icon/reboot.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Restart</span>
                                
                              </a>
                            </li>
                            
                          <li >
                              <a class="sidenav-item-link" href="{% url 'change_hostname' %}">
                               <img src="/media/icon/domain.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Hostname</span>
                                
                              </a>
                            </li>
                           <li >
                              <a class="sidenav-item-link" href="{% url 'system_status_view' %}">
                               <img src="/media/icon/memory.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">System</span>
                                
                              </a>
                            </li>
                      </div>
                    </ul>
                  </li>
				  
				   <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#email"
                      aria-expanded="false" aria-controls="email">
                      <img src="/media/icon/mail.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Email</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="email"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'email_queue' %}">
                               <img src="/media/icon/mail.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Email Queue</span>
                                
                              </a>
                            </li>
                            
                          
                            
                          
                          
                      </div>
                    </ul>
                  </li>
                  
                
   <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#php"
                      aria-expanded="false" aria-controls="php">
                      <img src="/media/icon/php.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">PHP</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="php"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'multi_php_ini' %}">
                                <img src="/media/icon/php.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">MultiPHP INI</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'multi_php_manager_all' %}">
                                 <img src="/media/icon/php.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">MultiPHP Manager</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'php_ext' %}">
                                 <img src="/media/icon/php.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">PHP Extenstion</span>
                                
                              </a>
                            </li>
							
							 <li >
                              <a class="sidenav-item-link" href="{% url 'php_versions' %}">
                                 <img src="/media/icon/version.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">PHP Version</span>
                                
                              </a>
                            </li>
                            
                           
                      </div>
                    </ul>
                  </li>
                  
				  
				  
				    <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#node"
                      aria-expanded="false" aria-controls="node">
                      <img src="/media/icon/node.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Node JS</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="node"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'node_versions' %}">
                                <img src="/media/icon/version.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Node JS Versions</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'node_module_manage' %}">
                                 <img src="/media/icon/node.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Node JS Modules</span>
                                
                              </a>
                            </li>
                            
                          
                           
                      </div>
                    </ul>
                  </li>
                  
				  
				  
				  
				    <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#advance"
                      aria-expanded="false" aria-controls="advance">
                      <img src="/media/icon/settings.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Advance</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="advance"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                           
                             <li >
                              <a class="sidenav-item-link" href="{% url 'olsapp_whm' %}">
                                 <img src="/media/icon/software.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">OlsApp</span>
                                
                              </a>
                            </li>
                            <li>
                              <a class="sidenav-item-link" href="{% url 'composer_whm' %}">
                                 <img src="/media/icon/composer.png" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Composer</span>
                                
                              </a>
                            </li>
                      </div>
                    </ul>
                  </li>
                  
				  
				  
				


				
  <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#configuration"
                      aria-expanded="false" aria-controls="configuration">
                      <img src="/media/icon/conf.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Configuration</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="configuration"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
					  
					    <li>
                              <a class="sidenav-item-link" href="{% url 'settings' %}">
                                <img src="/media/icon/settings.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Settings</span>
                                
                              </a>
                            </li>
                            <li>
                              <a class="sidenav-item-link" href="{% url 'litespeed_conf' %}">
                                <img src="/media/icon/tune.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">LiteSpeed Tuning</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'php_tune' %}">
                                 <img src="/media/icon/php.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">PHP Limit</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'php_error_whm' %}">
                                 <img src="/media/icon/error.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">PHP Error</span>
                                
                              </a>
                            </li>
                           
                      </div>
                    </ul>
                  </li>                 
                  
 <li  class="has-sub" >
                    <a class="sidenav-item-link" href="javascript:void(0)" data-toggle="collapse" data-target="#account"
                      aria-expanded="false" aria-controls="account">
                      <img src="/media/icon/user.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="nav-text">Account</span> <b class="caret"></b>
                    </a>
                    <ul  class="collapse"  id="account"
                      data-parent="#sidebar-menu">
                      <div class="sub-menu">
                            <li >
                              <a class="sidenav-item-link" href="{% url 'whm-profile' %}">
                                <img src="/media/icon/user.svg" width="24px" height="24px" style="margin-right: 5px;" /> <span class="nav-text">Profile</span>
                                
                              </a>
                            </li>
                            
                            <li >
                              <a class="sidenav-item-link" href="{% url 'whm_logout' %}">
                                 <img src="/media/icon/logout.svg" width="24px" height="24px" style="margin-right: 5px;" /><span class="nav-text">Logout</span>
                                
                              </a>
                            </li>
                            
                           
                            
                           
                      </div>
                    </ul>
                  </li>                  
                  
                  
                  
                 
              </ul>
            </div>

          </div>
        </aside>
        
              <!-- ====================================
      ——— PAGE WRAPPER
      ===================================== -->
      <div class="page-wrapper">
        
          <!-- Header -->
          <header class="main-header" id="header">
            <nav class="navbar navbar-expand-lg navbar-light" id="navbar">
              <!-- Sidebar toggle button -->
              <button id="sidebar-toggler" class="sidebar-toggle">
                <span class="sr-only">Toggle navigation</span>
              </button>

               <span id="self_title" class="page-title">dashboard</span>

              <div class="navbar-right ">


                <ul class="nav navbar-nav">
                 
                  <!-- User Account -->
                  <li class="dropdown user-menu">
                    <button class="dropdown-toggle nav-link" data-toggle="dropdown">
                       <img src="/media/icon/user.svg" width="24px" height="24px" style="margin-right: 5px;" />
                      <span class="d-none d-lg-inline-block">{{ user.username }}</span>
                    </button>
                    <ul class="dropdown-menu dropdown-menu-right">
                      <li>
                        <a class="dropdown-link-item" href="{% url 'whm-profile' %}">
                           <img src="/media/icon/user.svg" width="24px" height="24px" style="margin-right: 5px;" />
                          <span class="nav-text">Profile</span>
                        </a>
                      </li>
                     
                      <li class="dropdown-footer">
                        <a class="dropdown-link-item" href="{% url 'whm_logout' %}">  <img src="/media/icon/logout.svg" width="24px" height="24px" style="margin-right: 5px;" /> Log Out </a>
                      </li>
                    </ul>
                  </li>
                </ul>
              </div>
            </nav>


          </header>
		  
<div class="content-wrapper">
    <div class="content">   		  
		  
                  {% endif %}
				  
				  
<style>
.loading {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 30px; /* Smaller width */
    height: 30px; /* Smaller height */
    animation: spin 1s linear infinite; /* Spinning animation */
    display: inline-block; /* Ensures it stays inline with text */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#responseDisplay {
    margin-top: 20px; /* Space between button and response */
}
</style>
     <script src="/media/js/jquery.min.js"></script>
                    <script src="/media/js/bootstrap.bundle.min.js"></script>
                    
                 
                 <script>
				
        (function() {
            // Define a condition to check if the user is on the main page
            const isMainPage = window.location.pathname === '/'; // Adjust as needed

            // Create a new <script> element
            const script = document.createElement("script");

            // Set the script source depending on the page, without a timestamp
            script.src = isMainPage 
                ? '/media/js/mono.js' 
                : '/media/js/monoall.js';
const isMobile = window.innerWidth <= 768;
            
           document.head.appendChild(script);
        })();
		
		
		
		document.getElementById("menuSearchInput").addEventListener("keyup", function () {
    const filter = this.value.toLowerCase();
    const menuItems = document.querySelectorAll("#sidebar-menu > li");

    menuItems.forEach(function (item) {
        const link = item.querySelector("a.sidenav-item-link");
        const subMenu = item.querySelector(".sub-menu");

        let matchFound = false;

        // Reset visibility
        item.style.display = "";

        if (subMenu) {
            const subLinks = subMenu.querySelectorAll("a.sidenav-item-link");
            let subMatch = false;

            subLinks.forEach(function (subLink) {
                const subText = subLink.textContent.toLowerCase();
                const subLi = subLink.closest("li");
                if (subText.includes(filter)) {
                    subLi.style.display = "block";
                    subMatch = true;
                    matchFound = true;
                } else {
                    subLi.style.display = "none";
                }
            });

            // Expand submenu if matched
            const collapseEl = item.querySelector(".collapse");
            if (subMatch && collapseEl) {
                collapseEl.classList.add("show");
                collapseEl.classList.remove("collapse");
            } else if (collapseEl) {
                collapseEl.classList.remove("show");
                collapseEl.classList.add("collapse");
            }
        }

        // Check main item match
        if (link && link.textContent.toLowerCase().includes(filter)) {
            matchFound = true;
        }

        // Final visibility
        item.style.display = matchFound || filter === "" ? "block" : "none";
    });
});

document.addEventListener('DOMContentLoaded', function() {
    const titleText = document.title || 'Dashboard';  // fallback text if no title
    const span = document.getElementById('self_title');
    if (span) {
        span.textContent = titleText;
    }
});
    </script>
                    
                    
                   		  
				  
 {% if messages %}
    {% for message in messages %}
        <div class="alert alert-{% if message.tags == 'error' %}danger{% else %}{{ message.tags }}{% endif %} alert-dismissible fade show" role="alert">
            {{ message }}
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">×</span>
            </button>
        </div>
    {% endfor %}
{% endif %}





{% if user_form.errors %}
    <div class="alert alert-success alert-dismissible fade show" role="alert">
   
            {% for key, value in user_form.errors.items %}
                <strong>{{ value }}</strong>
            {% endfor %}
         <div id="message"></div>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                  <span aria-hidden="true">×</span>
                </button>
    </div>
{% endif %}



        {% block content %}{% endblock %}				  


