<div class="panel panel-info panel-border top">
  <div class="panel-heading">
    <span class="panel-title">Raporty</span>
  </div>
  <div class="panel-heading p5" style="height: auto;">
    <div class="row mb10 pl5">
      <div class="col col-xs-12">
        <?= \Html::button(
                    array(
                      'class' => 'btn btn-sm btn-success',
                      'text'  => 'Generuj raport',
                      'js'    => '$( "#formularz" ).submit(); return false;',
                      'icon'  => 'fa-check-circle mr5'
                    )
                );?>
      </div>
    </div>
  </div>
  <div class="panel-body">    
    <form method="POST" action="/?p=ranker_reports" id="formularz" class="form-horizontal">
      <input type="hidden" name="rw" value="create-report" />
      <div class="row">
        <div class="col col-md-6">
          <?= \Html::select(
                      array(
                        'name'    => 'report-form',
                        'values'  => [
                          '1' => 'Tylko pozycje',
                          '2' => 'Pozycje i koszty'
                        ],
                        'label'   => 'Rodzaj raportu'
                      )
                  );?>
          <div class="form-group">
            <label class="col-lg-4 control-label">Przedział czasowy:</label>
            <div class="col-lg-8">
              od <input type="text" name="date-from" class="form-control date" value="<?= date( 'Y-m' );?>-01" style="width: 170px; text-align: right; display: inline-block;" />
              do <input type="text" name="date-to" class="form-control date" value="<?= date( 'Y-m' );?>-<?= date( 't' );?>" style="width: 170px; text-align: right; display: inline-block;" />
            </div>
          </div>
          <div class="form-group">
            <label class="col-lg-4 control-label">Strony:</label>
            <div class="col-lg-8">
              <div class="row">
                <? if ( is_array( $this -> _sites ) ): foreach ( $this -> _sites as $site ):?>
                  <div class="col-xs-6">
                    <div class="checkbox-custom fill checkbox-primary mt10">
                      <input id="site_<?= $site['id'];?>" type="checkbox" value="<?= $site['id'];?>" name="sites[]" <? if ( in_array( $site['id'], $this -> client['sites'] ) ):?>checked="checked"<? endif;?> />
                      <label for="site_<?= $site['id'];?>"><?= $site['name'];?></label>
                    </div>
                  </div>
                <? endforeach; endif;?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>