htdocs/assets/templates/reports/report.html

Summary

Maintainability
Test Coverage
<div class="col-xs-12">
  <form id="report-form" method="post">
    <div class="panel panel-default">

      <div class="panel-heading">
        <input class="form-control input-lg" type="text" name="name" placeholder="Name" value="{{ name }}" />
      </div>

      <div class="panel-body">
        <div class="row">
          <div class="col-xs-12 form-group">
            <label for="description">Description</label>
            <textarea class="form-control" name="description">{{ description }}</textarea>
          </div>

          <div class="col-md-4 col-sm-6 col-xs-12 form-group">
            <label for="frequency">Frequency <span class="glyphicon glyphicon-question-sign" data-toggle="tooltip" title="The number of days between each run."></span></label>
            <div class="input-group">
              <input class="form-control" type="number" name="frequency" value="{{ frequency }}" />
              <span class="input-group-addon">Days</span>
            </div>
          </div>
          <div class="col-md-4 col-sm-6 col-xs-12 form-group">
            <label for="start_date">Start Date <span class="glyphicon glyphicon-question-sign" data-toggle="tooltip" title="The date from which to calculate the next execution of this Report."></span></label>
            <div class="input-group time-select">
              <span class="input-group-addon datepickerbutton">
                <span class="glyphicon glyphicon-calendar"></span>
              </span>
              <input class="form-control" name="start_date" value="{{ date start_date }}"/>
            </div>
          </div>
          <div class="col-md-4 col-sm-6 col-xs-12 form-group">
            <label for="range">Time Range <span class="glyphicon glyphicon-question-sign" data-toggle="tooltip" title="The number of days back to search."></span></label>
            <div class="input-group">
              <input class="form-control" type="number" name="range" value="{{ range }}" />
              <span class="input-group-addon">Days</span>
            </div>
          </div>

          <div class="col-md-4 col-sm-6 col-xs-12 form-group">
            <label for="type">Type</label>
            <select class="form-control" id="type-select" name="type">
              {{#each types}}
              <option value="{{ @key }}" {{#ifeq @key ../type}}selected{{/ifeq}}>{{ this }}</option>
              {{/each}}
            </select>
          </div>
          <div class="col-md-4 col-sm-6 col-xs-12 form-group">
            <label for="assignee">Assignee <span class="glyphicon glyphicon-question-sign" data-toggle="tooltip" title="The notification targets when this Reports generates results."></span></label>
            <input type="hidden" class="form-control" name="assignee" value="{{#if assignee}}{{ assignee_type }},{{ assignee }}{{/if}}">
          </div>

          {{#if new_report}}
          <div class="col-xs-12">
            <div class="alert alert-info">Save this report to start adding searches.</div>
          </div>
          {{else}}
          <div class="clearfix"></div>
          <div class="target-list">
          </div>
          {{/if}}

          <div class="col-xs-12 form-group">
            <label for="enabled">Status</label><br />
            <div class="btn-group" data-toggle="buttons">
              <label class="btn btn-default {{#if enabled}}active{{/if}}">
                <input type="checkbox" name="enabled" value="on" {{#if enabled}}checked{{/if}} />
                <span class="glyphicon glyphicon-off"></span> Enable
              </label>
            </div>
          </div>
        </div>
      </div>

      <div class="panel-footer clearfix">
        <div class="pull-right">
          {{#if new_report}}
          <button id="create-button" type="submit" class="btn btn-success">
            <span class="glyphicon glyphicon-floppy-disk"></span> Create
          </button>
          {{else}}
          <button id="generate-pdf-button" type="submit" class="btn btn-primary">
            <span class="glyphicon glyphicon-play"></span> <span class="hidden-xs">Generate</span> PDF
          </button>
          <button id="generate-csv-button" type="submit" class="btn btn-primary">
            <span class="glyphicon glyphicon-play"></span> <span class="hidden-xs">Generate</span> CSV
          </button>
          <button id="update-button" type="submit" class="btn btn-success">
            <span class="glyphicon glyphicon-floppy-disk"></span> Update
          </button>
          <button id="delete-button" type="button" class="btn btn-danger">
            <span class="glyphicon glyphicon-trash"></span> Delete
          </button>
          {{/if}}
        </div>
      </div>

    </div>
  </form>
</div>