
<form name="accountAppForm" ng-submit="create(app)">
<div class="modal-header">
    <h3 class="modal-title">Create</h3>
</div>

<div class="modal-body">
    <div uib-alert ng-class="'alert-danger'" close="closeResponse()" ng-if="response.success === false">
        {{ response.message }}
    </div>
    <div class="form-group">
        <label for="name">Name:</label>
        <input type="text" id="name" ng-model="app.name" required class="form-control">
    </div>
    <div class="form-group">
        <label for="url">Url:</label>
        <input type="url" id="url" ng-model="app.url" required class="form-control">
    </div>
    <div class="checkbox" ng-repeat="scope in scopes">
      <label><input type="checkbox" ng-model="app.scopes[$index]" ng-true-value="'{{ scope.name }}'" ng-false-value="''"> {{ scope.name }} <span ng-if="scope.description">- {{ scope.description }}</span></label>
    </div>
</div>

<div class="modal-footer">
    <button type="submit" class="btn btn-primary">Create</button>
    <button type="button" ng-click="close()" class="btn btn-default">Cancel</button>
</div>
</form>
