<nav role="navigation" class="navbar navbar-default navbar-top navbar-fixed-top" >
    <div class="navbar-header">
        <a href="{{ URL::to('/') }}/home/1" class="navbar-brand" >
            <div class="brand-logo">GUNTREF</div>
        </a>
    </div>
    <div class="nav-wrapper">
        <div class="flex align_center">
          <a href="javascript:void(0);" class="nav-toggle-custom" data-toggle="aside">
              <em class="fa fa-align-left"></em>
          </a>
          {{--@if(!$user->isApplicant())--}}
          <div class="menu-search">

                  <form class="form-inline my-2 my-lg-0" id="form_principal"  action="{{ URL::to('/') }}/search" method="POST" >
                      <input class="form-control mr-sm-2" type="text" value="<?php echo !empty($searched)?$searched:'';?>" placeholder="Buscar" aria-label="Search" name="string">
                      <input name="_token" type="hidden" value="{{ csrf_token() }}"/>
                      <button class="btn btn-outline-success my-2 my-sm-0 button_form_principal" type="button">Buscar</button>

                      <input type="hidden" id="line_prod_filter" name="line_prod_filter" value="">
                      <input type="hidden" id="select_status_filter" name="select_status_filter" value="">
                      <input type="hidden" id="select_unit_filter" name="select_unit_filter" value="">
                      <input type="hidden" id="user_auth_filter" name="user_auth_filter" value="">
                      <input type="hidden" id="user_comment_filter" name="user_comment_filter" value="">
                      <input type="hidden" id="fecha_cre_filter" name="fecha_cre_filter" value="">
                      <input type="hidden" id="fecha_end_filter" name="fecha_end_filter" value="">

                  </form>

          </div>
          {{--@endif--}}
        </div>

        <div class="flex align_center">
          <a class="btn-noti" href="{{ URL::to('/') }}/notifications"><span class="tit-not">Notificaciones </span><i class="fa fa-bell-o"></i> <span class="badge">{{$noti}}</span></a>
          <ul class="nav navbar-nav navbar-right">


              <li class="dropdown">
                  <a href="#" data-toggle="dropdown" data-play="bounceIn" class="dropdown-toggle dropdown-user">
                    <em class="fa fa-user"></em> <p class="user-desk">&nbsp;{{ $user->name}}</p>
                  </a>

                  <ul class="dropdown-menu">
                      <li><p class="user-mobile">&nbsp;{{ $user->name}}</p></li>
                      <li><a href="{{ URL::to('/') }}/panelDeUsuario">Panel de usuario</a>

                      <li><a href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">Salir</a>

                      <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">{{ csrf_field() }}</form></li>
                  </ul>
              </li>
          </ul>
        </div>
    </div>
</nav>
<script>

$("document").ready(function(){

  $(".button_form_principal").on("click",function(){

    $("#line_prod_filter").val($("#line_prod").val()); // ""
    $("#select_status_filter").val($("#select_status").val());
    $("#select_unit_filter").val($("#select_unit").val())
    $("#user_auth_filter").val($("#user_auth").val());
    $("#user_comment_filter").val($("#user_comment").val());
    $("#fecha_cre_filter").val($("#fecha_cre").val());
    $("#fecha_end_filter").val($("#fecha_end").val());

    $("#form_principal").submit();

  });


})

</script>  