<%@ LANGUAGE = JavaScript %>
<% /*
     $Revision$
     $Id$

     File:        kpngroep_search.asp

     Description:   Toont zoekvelden voor lijst van kostenplaats groepen
     Parameters:
     Context:       Vanuit menu
     Note:
*/ %>

<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/iface.inc" -->
<!-- #include file="../Shared/selector.inc" -->

<%
FCLTHeader.Requires({ plugins:["jQuery"] });

var prs_key
var authparams = user.checkAutorisation("WEB_FINMSU", true);%>
<html>
  <head>
<%  FCLTHeader.Generate(); %>
  </head>
  <body id="searchbody">
    <div id="search">
      <form name="u2" target="workFrame" action="kpngroep_search_list.asp" method="get">
<%      BLOCK_START("searchtable", L("lcl_filterblok"));%>
        <tr>
          <td class="label"><label for="descr"><%=L("lcl_prs_kostenpl_group")%>:</label></td>
          <td><input type="text" class="fldsrch" name="descr"></td>
        </tr>
<%      sql = "SELECT DISTINCT p.prs_perslid_key, "
            +                  S("prs_pers_string")
            + "           FROM prs_kostenplaatsgrp kpg, "
            + "                prs_perslid p "
            + "          WHERE kpg.prs_perslid_key = p.prs_perslid_key "
            + (!(authparams && authparams.ALGreadlevel)
              ? "          AND kpg.prs_perslid_key = " + user_key
              : "")
            + "       ORDER BY " + S("prs_pers_string")

        FCLTselector("budgeth", sql,
                     { label: L("lcl_prs_budgethouder"),
                       emptyOption: "",
                       whenEmpty: L("lcl_search_generic"),
                       selectjustone: !(authparams && authparams.ALGreadlevel)
                     }); %>
<%      BLOCK_END();
        var buttons =  [ {title: L("lcl_search"), action: "document.forms.u2.submit();", id: "bSearch" }];
        CreateButtons(buttons, { entersubmit: true });
%>
      </form>
    </div>
    <div id="result">
      <iframe width="100%" height="100%"
              src="../Shared/empty.asp"
              name="workFrame" id="workFrame"
              onload="FcltMgr.iframeLoaded(this)"
              frameborder="0" scrolling="no">
      </iframe>
    </div>
  </body>
</html>
