<div class="modal-header">
    <button type="button" class="close closebtn" data-ng-click="vm.close()" aria-hidden="true">&times;</button>
    <h1 class="modal-title">{{vm.module}}&nbsp;{{'configurations' | translate}}</h1>
</div>
<div class="modal-body">
    <div class="container-fluid">
        <form name="form" role="form" ng-submit="vm.add()">
            <div class="input-group">
                <input class="form-control" aria-labelledby="urlLabel" ng-model="vm.newUrl" required required-error-message="{{'Specify filter' | translate}}" placeholder="{{'https://...' | translate}}" />
                <span class="input-group-btn">
                    <button type="submit" class="btn btn-primary" ng-disabled="vm.saving">{{'Add' | translate}}</button>
                </span>
            </div>
        </form>
        <br />
        <ul class="list-group">
            <li style="list-style:none;padding-left:0;margin-bottom:5px;" ng-repeat="configuration in vm.configurations">
                <div class="input-group" title="{{configuration.Name}}">
                    <!--<span class="form-control">{{configuration.Name}}</span>-->
                    <input type="text" class="form-control" ng-disabled="!configuration.IsEditing" ng-model="configuration.Name" />
                    <span class="input-group-btn">
                        <button ng-click="vm.delete(configuration.Name)" class="btn btn-warning" ng-disabled="vm.saving">{{'Delete' | translate}}</button>
                        <button ng-click="configuration.IsEditing = true;" ng-hide="configuration.IsEditing" ng-disabled="vm.saving" class="btn btn-default">{{'Edit' | translate}}</button>
                        <button ng-click="vm.save(configuration)" ng-show="configuration.IsEditing" ng-disabled="vm.saving" class="btn btn-primary">{{'Save' | translate}}</button>
                    </span>
                </div>
            </li>
        </ul>
    </div>
</div>
<div class="modal-footer">
    <button class="btn btn-default" ng-click="vm.close();">{{'Close' | translate}}</button>
</div>