<script type="text/ng-template" id="errorTmpl">
    <div class="modal-header">
        <h3 class="modal-title" ng-bind="title"></h3>
    </div>
    <div class="modal-body">
        <div ng-bind="text"></div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-danger" ng-click="cancel()">Close</button>
    </div>
</script>

<script type="text/ng-template" id="confirmTmpl">
    <div class="modal-header">
        <h3 class="modal-title" ng-bind="title"></h3>
    </div>
    <div class="modal-body">
        <div ng-bind="text"></div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-success" ng-click="ok()">Yes</button>
        <button class="btn btn-danger" ng-click="cancel()">No</button>
    </div>
</script>

<script type="text/ng-template" id="alertTmpl">
    <div class="modal-header">
        <h3 class="modal-title" ng-bind="title"></h3>
    </div>
    <div class="modal-body">
        <div ng-bind="text"></div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-success" ng-click="ok()">Ok</button>
    </div>
</script>

<script type="text/ng-template" id="editTmpl">
    <div class="modal-header">
        <h3 class="modal-title" ng-bind="title"></h3>
    </div>
    <div class="modal-body">
        <form name="form">
            <div class="form-group">
                <label for="editValue" ng-bind="text"></label>
                <input class="form-control" id="editValue" ng-model="value"/>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" ng-click="ok()">Apply</button>
        <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
    </div>
</script>

<script type="text/ng-template" id="loginTmpl">
    <div class="modal-header">
        <h3 class="modal-title">Authorization required</h3>
    </div>
    <div class="modal-body">
        <form name="form">
            <div class="form-group">
                <label for="login">Login</label>
                <input class="form-control" id="login" ng-model="loginData.login" ng-enter="doLogin()"/>
            </div>
            <div class="form-group">
                <label for="password">Password</label>
                <input class="form-control" type="password" id="password" ng-model="loginData.password" ng-enter="doLogin()"/>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" ng-click="doLogin()">Login</button>
    </div>
</script>

<script type="text/ng-template" id="createUserTmpl">
    <div class="modal-header">
        <h3 class="modal-title">Create user</h3>
    </div>
    <div class="modal-body">
        <form name="form">
            <div class="form-group">
                <label for="login">Login</label>
                <input class="form-control" id="login" name="login" ng-model="login"/>
            </div>
            <div class="form-group">
                <label for="email">Email</label>
                <input class="form-control" id="email" name="email" ng-model="email"/>
            </div>
            <div class="form-group">
                <label for="passwordFirst">Password</label>
                <input class="form-control" type="password" id="passwordFirst" name="passwordFirst" ng-model="passwordFirst"/>
            </div>
            <div class="form-group">
                <label for="passwordSecond">Password confirmation</label>
                <input class="form-control" type="password" id="passwordSecond" name="passwordSecond" ng-model="passwordSecond"/>
            </div>
            <div>
                <label for="isAdmin">
                    <input type="checkbox" id="isAdmin" name="isAdmin" ng-model="isAdmin"/>
                    Admin privileges
                </label>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" ng-click="create()">Create</button>
        <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
    </div>
</script>
