htdocs/assets/templates/lists/list.html

Summary

Maintainability
Test Coverage
<div class="col-xs-12">
  <form id="list-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-md-4 col-xs-12 form-group">
            <label for="type">Type</label>
            <select class="form-control" name="type">
              {{#each types}}
              <option value="{{ @key }}" {{#ifeq @key ../type}}selected{{/ifeq}}>{{ this }}</option>
              {{/each}}
            </select>
          </div>

          <div class="col-xs-12 form-group">
            <label for="url">URL</label>
            <input class="form-control" type="url" name="url" value="{{ url }}" />
          </div>
        </div>
      </div>

      <div class="panel-footer clearfix">
        <div class="pull-right">
          {{#if new_list}}
          <button id="create-button" type="submit" class="btn btn-success">
            <span class="glyphicon glyphicon-floppy-disk"></span> Create
          </button>
          {{else}}
          <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>