<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    {{#if id}}
        <h3>Edit</h3>
    {{else}}
        <h3>Add</h3>
    {{/if}}
</div>
<div class="modal-body">
    <div class="form-horizontal">
        <div class="control-group">
            <label class="control-label">Name</label>
            <div class="controls">
                <input type="text" name="name">
                <span class="help-inline">
                    <i class="icon-question-sign" title="The name for this quality profile"/>
                </span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">Cutoff</label>
            <div class="controls">
                <select class="x-cutoff" name="cutoff.id" validation-name="cutoff">
                    {{#each allowed}}
                    <option value="{{id}}">{{name}}</option>
                    {{/each}}
                </select>
                <span class="help-inline">
                    <i class="icon-question-sign" title="Once this quality is reached NzbDrone will no longer download episodes"/>
                </span>
            </div>
        </div>
    </div>
    <div>
        <div class="offset1 span3">
            <h3>Available</h3>
            <select multiple="multiple" class="x-available-list">
                {{#each available}}
                <option value="{{id}}">{{name}}</option>
                {{/each}}
            </select>
        </div>
        <div class="span3">
            <div class="control-group">
                <div class="controls">
                    <h3>Allowed</h3>
                    <select multiple="multiple" class="x-allowed-list" validation-name="allowed">
                        {{#each allowed}}
                        <option value="{{id}}">{{name}}</option>
                        {{/each}}
                    </select>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal-footer">
    {{#if id}}
        <button class="btn btn-danger pull-left x-delete">delete</button>
    {{/if}}
    <button class="btn" data-dismiss="modal">cancel</button>
    <button class="btn btn-primary x-save">save</button>
</div>
