<!-- BEGIN {$smarty.template} -->
<script type="text/javascript">
{literal}
    $(document).ready(function() {

        var dates = $('#prj_startdatefrom, #prj_startdateto').datepicker({
            changeMonth: true,
            changeYear: true,
            numberOfMonths: 2,
            dateFormat: 'yy-mm-dd',
            showOn: 'both',
            buttonImage: '../img/phpaga/cal.png',
            buttonImageOnly: true,
            onSelect: function(selectedDate) {
                var option = this.id == "prj_startdatefrom" ? "minDate" : "maxDate";
                var instance = $(this).data("datepicker");
                var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
                dates.not(this).datepicker("option", option, date);
            }

        });

    });
{/literal}
</script>
<form action="{$FORM_ACTION}" method="get" name="form">
  <input type="hidden" name="order" value="{$ORDER}">

  <fieldset class="search">
    <legend>{t}Search projects{/t}</legend>

    <div class="floatcontainer">
      <div class="flleft">

        <label for="cpn_id">{t}Customer{/t}:</label>
        <select id="cpn_id" name="cpn_id">
          {html_options options=$select_cpn selected=$project.cpn_id}
        </select>
        <br>

        <label for="cpn_id_issuebill">{t}Billing company{/t}:</label>
        <select id="cpn_id_issuebill" name="cpn_id_issuebill">
          {html_options options=$select_cpn selected=$project.cpn_id_issuebill}
        </select>
        <br>

        <label for="prj_id">{t}Project{/t}:</label>
        <select id="prj_id" name="prj_id">
          {html_options options=$select_project selected=$project.prj_id}
        </select>
        <br>

        <label for="prjcat_id">{t}Category{/t}:</label>
        <select id="prjcat_id" name="prjcat_id">
          {html_options options=$select_prjcat selected=$project.prjcat_id}
        </select>
        <br>

        <label for="prj_desc">{t}Description{/t}:</label>
        <input type="text" class="tinput" id="prj_desc" name="prj_desc" value="{$project.prj_desc|wash}" size="30" maxlength="100">

      </div>
      <div class="flleft">

        <label for="prj_status">{t}Project status{/t}:</label>
        <select id="prj_status" name="prj_status">
          {html_options options=$select_prjstat selected=$project.prj_status}
        </select>
        <br>

        <label for="prj_billabletype">{t}Billable{/t}:</label>
        <select id="prj_billabletype" name="prj_billabletype">
          {html_options options=$select_billable selected=$project.prj_billabletype}
        </select>
        <br>

        <label for="pe_id">{t}Person{/t}:</label>
        <select id="pe_id" name="pe_id">
          {html_options options=$select_person selected=$project.pe_id}
        </select>
        <span class="comment">Created By, Project Manager, OR Project Member</span>
        <br>

        <label for="prj_startdatefrom">{t}Start Between{/t}:</label>
        <input type="text" class="tinput" name="prj_startdatefrom" id="prj_startdatefrom" value="{$project.prj_startdatefrom|wash}" size="10" maxlength="10">
        <br>

        <label for="prj_startdateto">{t}And{/t}:</label>
        <input type="text" class="tinput" name="prj_startdateto" id="prj_startdateto" value="{$project.prj_startdateto|wash}" size="10" maxlength="10">

      </div>
    </div>
    <div class="spacer"></div>

    <input type="submit" name="submit" value="{t}Search{/t}">
  </fieldset>
</form>

<!-- END {$smarty.template} -->
