<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        {{#if id}}
            <h3>Edit - {{implementationName}}</h3>
        {{else}}
            <h3>Add - {{implementationName}}</h3>
        {{/if}}
    </div>
    <div class="modal-body notification-modal x-modal">
        <div class="form-horizontal">
            <div class="form-group">
                <label class="col-sm-3 control-label">Name</label>

                <div class="col-sm-5">
                    <input type="text" name="name" class="form-control"/>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">On Grab</label>

                <div class="col-sm-5">
                    <div class="input-group">
                        <label class="checkbox toggle well">
                            <input type="checkbox" name="onGrab" {{#unless supportsOnGrab}}disabled="disabled"{{/unless}}/>
                            <p>
                                <span>Yes</span>
                                <span>No</span>
                            </p>

                            <div class="btn btn-primary slide-button"/>
                        </label>

                        <span class="help-inline-checkbox">
                            <i class="icon-sonarr-form-info" title="Be notified when episodes are available for download and has been sent to a download client"/>
                        </span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">On Download</label>

                <div class="col-sm-5">
                    <div class="input-group">
                        <label class="checkbox toggle well">
                            <input type="checkbox" name="onDownload" class="x-on-download" {{#unless supportsOnDownload}}disabled="disabled"{{/unless}}/>
                            <p>
                                <span>Yes</span>
                                <span>No</span>
                            </p>

                            <div class="btn btn-primary slide-button"/>
                        </label>

                        <span class="help-inline-checkbox">
                            <i class="icon-sonarr-form-info" title="Be notified when episodes are successfully downloaded"/>
                        </span>
                    </div>
                </div>
            </div>

            <div class="form-group x-on-upgrade">
                <label class="col-sm-3 control-label">On Upgrade</label>

                <div class="col-sm-5">
                    <div class="input-group">
                        <label class="checkbox toggle well">
                            <input type="checkbox" name="onUpgrade" {{#unless supportsOnUpgrade}}disabled="disabled"{{/unless}}/>
                            <p>
                                <span>Yes</span>
                                <span>No</span>
                            </p>

                            <div class="btn btn-primary slide-button"/>
                        </label>

                        <span class="help-inline-checkbox">
                            <i class="icon-sonarr-form-info" title="Be notified when episodes are upgraded to a better quality"/>
                        </span>
                    </div>
                </div>
            </div>

            <div class="form-group x-on-upgrade">
                <label class="col-sm-3 control-label">On Rename</label>

                <div class="col-sm-5">
                    <div class="input-group">
                        <label class="checkbox toggle well">
                            <input type="checkbox" name="onRename" {{#unless supportsOnRename}}disabled="disabled"{{/unless}}/>
                            <p>
                                <span>Yes</span>
                                <span>No</span>
                            </p>

                            <div class="btn btn-primary slide-button"/>
                        </label>

                        <span class="help-inline-checkbox">
                            <i class="icon-sonarr-form-info" title="Be notified when episodes are renamed"/>
                        </span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">Filter Series Tags</label>

                <div class="col-sm-5">
                    <input type="text" class="form-control x-tags">
                </div>

                <div class="col-sm-1 help-inline">
                    <i class="icon-sonarr-form-info" title="Only send notifications for series with matching tags"/>
                </div>
            </div>

            <hr>

            {{formBuilder}}
        </div>
    </div>
    <div class="modal-footer">
        {{#if id}}
            <button class="btn btn-danger pull-left x-delete">Delete</button>
        {{else}}
            <button class="btn pull-left x-back">Back</button>
        {{/if}}

        <span class="indicator x-indicator"><i class="icon-sonarr-spinner fa-spin"></i></span>
        <button class="btn x-test">test <i class="x-test-icon icon-sonarr-test"/></button>
        <button class="btn" data-dismiss="modal">Cancel</button>

        <div class="btn-group">
            <button class="btn btn-primary x-save">Save</button>
            <button class="btn btn-icon-only btn-primary dropdown-toggle" data-toggle="dropdown">
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                <li class="save-and-add x-save-and-add">
                    save and add
                </li>
            </ul>
        </div>
    </div>
</div>
