Updated to ui

This commit is contained in:
Stian Thorgersen 2013-07-25 09:19:17 +01:00
parent 522ed2a798
commit 3cbcc8c324
14 changed files with 92 additions and 120 deletions

View file

@ -1,24 +0,0 @@
[ {
"callbackUrl" : "http://localhost:8080/test",
"key" : "7301af66-c481-4f54-a280-16529e11a153",
"name" : "Foo application",
"owner" : "root",
"javaScriptOrigin" : null,
"providers" : [ {
"id" : 7,
"key" : "google-key",
"providerId" : "google",
"secret" : "google-secret"
} ],
"secret" : "77f78140-e0ee-4912-a504-32c51180e918",
"realm" : "5ee722cc-7bdb-49fe-b76c-8b246e699065"
}, {
"callbackUrl" : "http://localhost:8080/bar",
"key" : "f3ab7d43-7737-4507-a7a8-2e261f77298d",
"name" : "Bar application",
"owner" : "root",
"javaScriptOrigin" : null,
"providers" : [],
"secret" : "7d833773-d1e9-41f3-8749-8698f4c5ed03",
"realm" : "7d01c3cd-f483-414b-a02f-c260815224cc"
} ]

View file

@ -1,15 +1,15 @@
<div id="wrapper" class="container"> <div id="wrapper" class="container">
<div class="row"> <div class="row">
<aside class="span3" ng-include src="'partials/application-menu.html'"></aside> <aside class="span3" data-ng-include data-src="'partials/application-menu.html'"></aside>
<div id="actions-bg"></div> <div id="actions-bg"></div>
<div id="container-right" class="span9"> <div id="container-right" class="span9">
<h1> <h1>
<span class="gray" ng-show="create">New Application</span> <span class="gray" ng-hide="create">{{application.name}}</span> <span class="gray" data-ng-show="create">New Application</span> <span class="gray" data-ng-hide="create">{{application.name}}</span>
configuration configuration
</h1> </h1>
<div ng-show="applicationForm.showErrors && applicationForm.$error.required" class="alert alert-error">Please fill in all required fields</div> <div data-ng-show="applicationForm.showErrors && applicationForm.$error.required" class="alert alert-error">Please fill in all required fields</div>
<p class="subtitle subtitle-right"><span class="required">*</span> Required fields</p> <p class="subtitle subtitle-right"><span class="required">*</span> Required fields</p>
<form class="form-horizontal" name="applicationForm" novalidate> <form class="form-horizontal" name="applicationForm" novalidate>
@ -19,46 +19,46 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="name">Name <span class="required">*</span></label> <label class="control-label" for="name">Name <span class="required">*</span></label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="name" name="name" ng-model="application.name" autofocus required> <input type="text" class="input-xlarge" id="name" name="name" data-ng-model="application.name" autofocus required>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="callbackUrl">Callback URL <span class="required">*</span></label> <label class="control-label" for="callbackUrl">Callback URL <span class="required">*</span></label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xxlarge" id="callbackUrl" name="callbackUrl" ng-model="application.callbackUrl" <input type="text" class="input-xxlarge" id="callbackUrl" name="callbackUrl" data-ng-model="application.callbackUrl"
required> required>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="javaScriptOrigin">JavaScript Origin </label> <label class="control-label" for="javaScriptOrigin">JavaScript Origin </label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xxlarge" id="javaScriptOrigin" ng-model="application.javaScriptOrigin"> <input type="text" class="input-xxlarge" id="javaScriptOrigin" data-ng-model="application.javaScriptOrigin">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="key">Key </label> <label class="control-label" for="key">Key </label>
<div class="controls"> <div class="controls">
<input class="input-xxlarge" type="text" id="key" ng-model="application.key" ng-readonly="!(auth.root && create)"> <input class="input-xxlarge" type="text" id="key" data-ng-model="application.key" data-ng-readonly="!(auth.root && create)">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="secret">Secret </label> <label class="control-label" for="secret">Secret </label>
<div class="controls"> <div class="controls">
<input class="input-xxlarge" type="text" id="secret" ng-model="application.secret" ng-readonly="!(auth.root && create)"> <input class="input-xxlarge" type="text" id="secret" data-ng-model="application.secret" data-ng-readonly="!(auth.root && create)">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="realm">Realm <span class="required">*</span></label> <label class="control-label" for="realm">Realm <span class="required">*</span></label>
<div class="controls"> <div class="controls">
<select ng-model="application.realm" id="realm" name="realm" required> <select data-ng-model="application.realm" id="realm" name="realm" data-ng-required>
<option ng-repeat="r in realms" value="{{r.key}}" ng-selected="r.key == application.realm">{{r.name}}</option> <option data-ng-repeat="r in realms" value="{{r.key}}" data-ng-selected="r.key == application.realm">{{r.name}}</option>
</select> </select>
</div> </div>
</div> </div>
<div class="control-group" ng-show="auth.root"> <div class="control-group" data-ng-show="auth.root">
<label class="control-label" for="owner">Owner </label> <label class="control-label" for="owner">Owner </label>
<div class="controls"> <div class="controls">
<input class="input-xxlarge" type="text" id="owner" ng-model="application.owner"> <input class="input-xxlarge" type="text" id="owner" data-ng-model="application.owner">
</div> </div>
</div> </div>
</div> </div>
@ -67,13 +67,13 @@
<legend>Identity Providers</legend> <legend>Identity Providers</legend>
<div> <div>
<div class="input-append"> <div class="input-append">
<select ng-model="newProviderId"> <select data-ng-model="newProviderId">
<option ng-repeat="p in availableProviders" value="{{p.id}}">{{p.name}}</option> <option data-ng-repeat="p in availableProviders" value="{{p.id}}">{{p.name}}</option>
</select> </select>
<button class="btn" ng-click="addProvider()" ng-disabled="!newProviderId">Add Provider</button> <button class="btn" data-ng-click="addProvider()" data-ng-disabled="!newProviderId">Add Provider</button>
</div> </div>
<table class="table table-striped table-bordered margin-top" ng-show="application.providers.length > 0"> <table class="table table-striped table-bordered margin-top" data-ng-show="application.providers.length > 0">
<thead> <thead>
<tr> <tr>
<th>Provider</th> <th>Provider</th>
@ -82,31 +82,31 @@
<th>&nbsp;</th> <th>&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="provider in application.providers"> <tr data-ng-repeat="provider in application.providers">
<td><input type="text" placeholder="Key" value="{{getProviderDescription(provider.providerId).name}}" readonly></td> <td><input type="text" placeholder="Key" value="{{getProviderDescription(provider.providerId).name}}" readonly></td>
<td> <td>
<input type="text" placeholder="Key" ng-model="provider.key" required> <input type="text" placeholder="Key" data-ng-model="provider.key" required>
</td> </td>
<td> <td>
<input type="text" placeholder="Secret" ng-model="provider.secret" required> <input type="text" placeholder="Secret" data-ng-model="provider.secret" required>
</td> </td>
<td><i class="icon-question-sign" ng-click="openHelp($index)"></i></td> <td><i class="icon-question-sign" data-ng-click="openHelp($index)"></i></td>
<td><i class="icon-trash" ng-click="removeProvider($index)"></i></td> <td><i class="icon-trash" data-ng-click="removeProvider($index)"></i></td>
</tr> </tr>
</table> </table>
</div> </div>
</fieldset> </fieldset>
<div class="form-actions" ng-show="create"> <div class="form-actions" data-ng-show="create">
<button type="submit" ng-click="save()" class="btn btn-primary" ng-show="changed">Save</button> <button type="submit" data-ng-click="save()" class="btn btn-primary" data-ng-show="changed">Save</button>
<button type="submit" ng-click="cancel()" class="btn" ng-click="cancel()" ng-show="changed">Cancel</button> <button type="submit" data-ng-click="cancel()" class="btn" data-ng-click="cancel()" data-ng-show="changed">Cancel</button>
</div> </div>
<div class="form-actions" ng-show="!create"> <div class="form-actions" data-ng-show="!create">
<button type="submit" ng-click="save()" class="btn btn-primary" ng-show="changed">Save changes</button> <button type="submit" data-ng-click="save()" class="btn btn-primary" data-ng-show="changed">Save changes</button>
<button type="submit" ng-click="reset()" class="btn" ng-show="changed">Clear changes</button> <button type="submit" data-ng-click="reset()" class="btn" data-ng-show="changed">Clear changes</button>
<a href="#/applications" ng-hide="changed">View applications &#187;</a> <a href="#/applications" data-ng-hide="changed">View applications &#187;</a>
<button type="submit" ng-click="remove()" class="btn btn-danger" ng-hide="changed">Delete</button> <button type="submit" data-ng-click="remove()" class="btn btn-danger" data-ng-hide="changed">Delete</button>
</div> </div>
</form> </form>
</div> </div>
@ -115,14 +115,14 @@
</div> </div>
</div> </div>
<div modal="providerHelpModal" close="closeHelp()" options="opts"> <div data-modal="providerHelpModal" data-close="closeHelp()" data-options="opts">
<div class="modal-header"> <div class="modal-header">
<h3>Configure {{providerHelp.description.name}}</h3> <h3>Configure {{providerHelp.description.name}}</h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div ng-include src="providerHelp && 'partials/provider/' + providerHelp.description.id + '-help.html'"></div> <div data-ng-include data-src="providerHelp && 'partials/provider/' + providerHelp.description.id + '-help.html'"></div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn" ng-click="closeHelp()">Close</button> <button class="btn" data-ng-click="closeHelp()">Close</button>
</div> </div>
</div> </div>

View file

@ -1,6 +1,6 @@
<div id="wrapper" class="container"> <div id="wrapper" class="container">
<div class="row"> <div class="row">
<aside class="span3" ng-include src="'partials/application-menu.html'"></aside> <aside class="span3" data-ng-include data-src="'partials/application-menu.html'"></aside>
<div id="actions-bg"></div> <div id="actions-bg"></div>
<div id="container-right" class="span9"> <div id="container-right" class="span9">
@ -16,7 +16,7 @@
<th>Application</th> <th>Application</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="application in applications"> <tr data-ng-repeat="application in applications">
<td><a href="#/applications/{{application.key}}">{{application.name}}</a></td> <td><a href="#/applications/{{application.key}}">{{application.name}}</a></td>
</tr> </tr>
</table> </table>

View file

@ -5,8 +5,9 @@
<span class="toggle">Applications</span> <span class="toggle">Applications</span>
</div> </div>
<ul> <ul>
<li ng-repeat="application in applications" ng-class="path[1] == application.key && 'active'"><a <li data-ng-repeat="application in applications" data-ng-class="path[1] == application.key && 'active'">
href="#/applications/{{application.key}}">{{application.name}}</a></li> <a href="#/applications/{{application.key}}">{{application.name}}</a>
</li>
</ul> </ul>
</li> </li>
</ul> </ul>

View file

@ -1,5 +1,4 @@
<div id="wrapper" class="container"> <div id="wrapper" class="container">
<div class="row"> <div class="row">
</div> </div>
</div> </div>

View file

@ -4,19 +4,19 @@
<div class="nav-collapse"> <div class="nav-collapse">
<nav id="global-nav"> <nav id="global-nav">
<ul class="nav"> <ul class="nav">
<li class="divider-vertical-left" ng-class="path[0] == '' && 'active'"><a href="#">Home</a></li> <li class="divider-vertical-left" data-ng-class="path[0] == '' && 'active'"><a href="#">Home</a></li>
<li class="divider-vertical-left" ng-class="path[0] == 'applications' && 'active'" ng-show="auth.loggedIn"><a href="#/applications">Applications</a></li> <li class="divider-vertical-left" data-ng-class="path[0] == 'applications' && 'active'" data-ng-show="auth.loggedIn"><a href="#/applications">Applications</a></li>
<li class="divider-vertical-left" ng-class="path[0] == 'realms' && 'active'" ng-show="auth.loggedIn"><a href="#/realms">Realms</a></li> <li class="divider-vertical-left" data-ng-class="path[0] == 'realms' && 'active'" data-ng-show="auth.loggedIn"><a href="#/realms">Realms</a></li>
</ul> </ul>
<ul class="nav pull-right" ng-hide="auth.loggedIn"> <ul class="nav pull-right" data-ng-hide="auth.loggedIn">
<li><a href="/ejs-identity/api/login/system">Login</a></li> <li><a href="/ejs-identity/api/login/system">Login</a></li>
<li><a href="/ejs-identity/api/register/system">Register</a></li> <li><a href="/ejs-identity/api/register/system">Register</a></li>
</ul> </ul>
<ul class="nav pull-right" ng-show="auth.loggedIn"> <ul class="nav pull-right" data-ng-show="auth.loggedIn">
<li class="dropdown"><a data-toggle="dropdown" class="dropdown-toggle" href="#"><i <li class="dropdown"><a data-toggle="dropdown" class="dropdown-toggle" href="#"><i
class="icon-user icon-gray"></i> {{auth.user.displayName}} <i class="caret"></i></a> class="icon-user icon-gray"></i> {{auth.user.displayName}} <i class="caret"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="" ng-click="auth.logout()">Sign Out</a></li> <li><a href="" data-ng-click="auth.logout()">Sign Out</a></li>
</ul></li> </ul></li>
</ul> </ul>
</nav> </nav>

View file

@ -1,2 +0,0 @@
<p>This provider is only intended for testing purposes and doesn't require any configuration. Simply use any value for key and
secret.</p>

View file

@ -6,7 +6,7 @@
<p>Use any name that you'd like, click <i>Create Project</i>, select <i>API Access</i> and click on <i>Create an OAuth 2.0 client ID</i>.</p> <p>Use any name that you'd like, click <i>Create Project</i>, select <i>API Access</i> and click on <i>Create an OAuth 2.0 client ID</i>.</p>
<p>Use any product name you'd like and leave the other fields empty, then click <i>Next</i>. On the next page select <i>Web application</i> <p>Use any product name you'd like and leave the other fields empty, then click <i>Next</i>. On the next page select <i>Web application</i>
as the application type. Click <i>more options next></i> to <i>Your site or hostname</i>. Fill in the form with the following values:</p> as the application type. Click <i>more options</i> next to <i>Your site or hostname</i>. Fill in the form with the following values:</p>
<ul> <ul>
<li><b>Authorized Redirect URIs:</b> {{callbackUrl}}</li> <li><b>Authorized Redirect URIs:</b> {{callbackUrl}}</li>
@ -18,14 +18,13 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="providerHelp.key">Client ID </label> <label class="control-label" for="providerHelp.key">Client ID </label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="providerHelp.key" ng-model="application.providers[providerHelp.index].key"> <input type="text" class="input-xlarge" id="providerHelp.key" data-ng-model="application.providers[providerHelp.index].key">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="providerHelp.secret">Client secret </label> <label class="control-label" for="providerHelp.secret">Client secret </label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="providerHelp.secret" <input type="text" class="input-xlarge" id="providerHelp.secret" data-ng-model="application.providers[providerHelp.index].secret">
ng-model="application.providers[providerHelp.index].secret">
</div> </div>
</div> </div>
</form> </form>

View file

@ -19,14 +19,13 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="providerHelp.key">Consumer key </label> <label class="control-label" for="providerHelp.key">Consumer key </label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="providerHelp.key" ng-model="application.providers[providerHelp.index].key"> <input type="text" class="input-xlarge" id="providerHelp.key" data-ng-model="application.providers[providerHelp.index].key">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="providerHelp.secret">Consumer secret </label> <label class="control-label" for="providerHelp.secret">Consumer secret </label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="providerHelp.secret" <input type="text" class="input-xlarge" id="providerHelp.secret" data-ng-model="application.providers[providerHelp.index].secret">
ng-model="application.providers[providerHelp.index].secret">
</div> </div>
</div> </div>
</form> </form>

View file

@ -1,15 +1,15 @@
<div id="wrapper" class="container"> <div id="wrapper" class="container">
<div class="row"> <div class="row">
<aside class="span3" ng-include src="'partials/realm-menu.html'"></aside> <aside class="span3" data-ng-include data-src="'partials/realm-menu.html'"></aside>
<div id="actions-bg"></div> <div id="actions-bg"></div>
<div id="container-right" class="span9"> <div id="container-right" class="span9">
<h1> <h1>
<span class="gray" ng-show="create">New Realm</span> <span class="gray" data-ng-show="create">New Realm</span>
<span class="gray" ng-hide="create">{{realm.name}}</span> configuration <span class="gray" data-ng-hide="create">{{realm.name}}</span> configuration
</h1> </h1>
<div ng-show="realmForm.showErrors && realmForm.$error.required" class="alert alert-error">Please fill in all required fields</div> <div data-ng-show="realmForm.showErrors && realmForm.$error.required" class="alert alert-error">Please fill in all required fields</div>
<p class="subtitle subtitle-right"><span class="required">*</span> Required fields</p> <p class="subtitle subtitle-right"><span class="required">*</span> Required fields</p>
<form class="form-horizontal" name="realmForm" novalidate> <form class="form-horizontal" name="realmForm" novalidate>
@ -18,33 +18,33 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="name">Name <span class="required">*</span></label> <label class="control-label" for="name">Name <span class="required">*</span></label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="name" name="name" ng-model="realm.name" autofocus required> <input type="text" class="input-xlarge" id="name" name="name" data-ng-model="realm.name" autofocus required>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="key">Key </label> <label class="control-label" for="key">Key </label>
<div class="controls"> <div class="controls">
<input class="input-xxlarge" type="text" id="key" name="key" ng-model="realm.key" ng-readonly="!(auth.root && create)"> <input class="input-xxlarge" type="text" id="key" name="key" data-ng-model="realm.key" data-ng-readonly="!(auth.root && create)">
</div> </div>
</div> </div>
<div class="control-group" ng-show="auth.root"> <div class="control-group" data-ng-show="auth.root">
<label class="control-label" for="owner">Owner </label> <label class="control-label" for="owner">Owner </label>
<div class="controls"> <div class="controls">
<input class="input-xxlarge" type="text" id="owner" ng-model="realm.owner"> <input class="input-xxlarge" type="text" id="owner" data-ng-model="realm.owner">
</div> </div>
</div> </div>
</fieldset> </fieldset>
<div class="form-actions" ng-show="create"> <div class="form-actions" data-ng-show="create">
<button type="submit" ng-click="save()" class="btn btn-primary" ng-show="changed">Save</button> <button type="submit" data-ng-click="save()" class="btn btn-primary" data-ng-show="changed">Save</button>
<button type="submit" ng-click="cancel()" class="btn" ng-click="cancel()" ng-show="changed">Cancel</button> <button type="submit" data-ng-click="cancel()" class="btn" data-ng-click="cancel()" data-ng-show="changed">Cancel</button>
</div> </div>
<div class="form-actions" ng-show="!create"> <div class="form-actions" data-ng-show="!create">
<button type="submit" ng-click="save()" class="btn btn-primary" ng-show="changed">Save changes</button> <button type="submit" data-ng-click="save()" class="btn btn-primary" data-ng-show="changed">Save changes</button>
<button type="submit" ng-click="reset()" class="btn" ng-show="changed">Clear changes</button> <button type="submit" data-ng-click="reset()" class="btn" data-ng-show="changed">Clear changes</button>
<a href="#/realms" ng-hide="changed">View realms &#187;</a> <a href="#/realms" data-ng-hide="changed">View realms &#187;</a>
<button type="submit" ng-click="remove()" class="btn btn-danger" ng-hide="changed">Delete</button> <button type="submit" data-ng-click="remove()" class="btn btn-danger" data-ng-hide="changed">Delete</button>
</div> </div>
</form> </form>

View file

@ -1,6 +1,6 @@
<div id="wrapper" class="container"> <div id="wrapper" class="container">
<div class="row"> <div class="row">
<aside class="span3" ng-include src="'partials/realm-menu.html'"></aside> <aside class="span3" data-ng-include data-src="'partials/realm-menu.html'"></aside>
<div id="actions-bg"></div> <div id="actions-bg"></div>
<div id="container-right" class="span9"> <div id="container-right" class="span9">
@ -16,7 +16,7 @@
<th>Realm</th> <th>Realm</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="r in realms"> <tr data-ng-repeat="r in realms">
<td><a href="#/realms/{{r.key}}">{{r.name}}</a></td> <td><a href="#/realms/{{r.key}}">{{r.name}}</a></td>
</tr> </tr>
</table> </table>

View file

@ -5,11 +5,11 @@
<span class="toggle">Realms</span> <span class="toggle">Realms</span>
</div> </div>
<ul> <ul>
<li ng-repeat="r in realms" ng-class="realm.key == r.key && 'active'"> <li data-ng-repeat="r in realms" data-ng-class="realm.key == r.key && 'active'">
<a href=#/realms/{{r.key}}>{{r.name}}</a> <a href=#/realms/{{r.key}}>{{r.name}}</a>
<ul class="sub-items" ng-show="realm.key == r.key"> <ul class="sub-items" data-ng-show="realm.key == r.key">
<li ng-class="!path[2] && 'active'"><a href="#/realms/{{r.key}}">Configuration</a></li> <li data-ng-class="!path[2] && 'active'"><a href="#/realms/{{r.key}}">Configuration</a></li>
<li ng-class="path[2] == 'users' && 'active'"><a href="#/realms/{{r.key}}/users">Users</a></li> <li data-ng-class="path[2] == 'users' && 'active'"><a href="#/realms/{{r.key}}/users">Users</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

View file

@ -1,15 +1,15 @@
<div id="wrapper" class="container"> <div id="wrapper" class="container">
<div class="row"> <div class="row">
<aside class="span3" ng-include src="'partials/realm-menu.html'"></aside> <aside class="span3" data-ng-include data-src="'partials/realm-menu.html'"></aside>
<div id="actions-bg"></div> <div id="actions-bg"></div>
<div id="container-right" class="span9"> <div id="container-right" class="span9">
<h1> <h1>
<span class="gray" ng-show="create">New User</span> <span class="gray" data-ng-show="create">New User</span>
<span class="gray" ng-hide="create">{{user.userId}}</span> <span class="gray" data-ng-hide="create">{{user.userId}}</span>
</h1> </h1>
<div ng-show="userForm.showErrors && userForm.$error.required" class="alert alert-error">Please fill in all required fields</div> <div data-ng-show="userForm.showErrors && userForm.$error.required" class="alert alert-error">Please fill in all required fields</div>
<p class="subtitle subtitle-right"><span class="required">*</span> Required fields</p> <p class="subtitle subtitle-right"><span class="required">*</span> Required fields</p>
<form class="form-horizontal" name="userForm" novalidate> <form class="form-horizontal" name="userForm" novalidate>
@ -18,41 +18,41 @@
<div class="control-group"> <div class="control-group">
<label class="control-label" for="name">Username <span class="required">*</span></label> <label class="control-label" for="name">Username <span class="required">*</span></label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="name" name="name" ng-model="user.userId" autofocus required ng-readonly="!create"> <input type="text" class="input-xlarge" id="name" name="name" data-ng-model="user.userId" autofocus required data-ng-readonly="!create">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="email">Email </label> <label class="control-label" for="email">Email </label>
<div class="controls"> <div class="controls">
<input type="email" class="input-xlarge" id="email" name="email" ng-model="user.email"> <input type="email" class="input-xlarge" id="email" name="email" data-ng-model="user.email">
<span class="help-inline error" ng-show="userForm.showErrors && userForm.email.$invalid">Invalid email</span> <span class="help-inline error" data-ng-show="userForm.showErrors && userForm.email.$invalid">Invalid email</span>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="firstName">Firstname </label> <label class="control-label" for="firstName">Firstname </label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="firstName" ng-model="user.firstName"> <input type="text" class="input-xlarge" id="firstName" data-ng-model="user.firstName">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="lastName">Lastname </label> <label class="control-label" for="lastName">Lastname </label>
<div class="controls"> <div class="controls">
<input type="text" class="input-xlarge" id="lastName" ng-model="user.lastName"> <input type="text" class="input-xlarge" id="lastName" data-ng-model="user.lastName">
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="password">Password <span class="required">*</span></label> <label class="control-label" for="password">Password <span class="required">*</span></label>
<div class="controls"> <div class="controls">
<input type="password" class="input-xlarge" id="password" name="password" ng-model="user.password" ng-required="create"> <input type="password" class="input-xlarge" id="password" name="password" data-ng-model="user.password" data-ng-required="create">
</div> </div>
</div> </div>
</fieldset> </fieldset>
<fieldset ng-show="user.attributes.length > 0"> <fieldset data-ng-show="user.attributes.length > 0">
<legend>Attributes</legend> <legend>Attributes</legend>
<table class="table table-striped table-bordered margin-top"> <table class="table table-striped table-bordered margin-top">
@ -62,23 +62,23 @@
<th>Value</th> <th>Value</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="attribute in user.attributes"> <tr data-ng-repeat="attribute in user.attributes">
<td><input type="text" placeholder="Name" value="{{attribute.name}}" readonly></td> <td><input type="text" placeholder="Name" value="{{attribute.name}}" readonly></td>
<td><input type="text" placeholder="Value" value="{{attribute.value}}" readonly></td> <td><input type="text" placeholder="Value" value="{{attribute.value}}" readonly></td>
</tr> </tr>
</table> </table>
</fieldset> </fieldset>
<div class="form-actions" ng-show="create"> <div class="form-actions" data-ng-show="create">
<button type="submit" ng-click="save()" class="btn btn-primary" ng-show="changed">Save</button> <button type="submit" data-ng-click="save()" class="btn btn-primary" data-ng-show="changed">Save</button>
<button type="submit" ng-click="cancel()" class="btn" ng-click="cancel()" ng-show="changed">Cancel</button> <button type="submit" data-ng-click="cancel()" class="btn" data-ng-click="cancel()" data-ng-show="changed">Cancel</button>
</div> </div>
<div class="form-actions" ng-show="!create"> <div class="form-actions" data-ng-show="!create">
<button type="submit" ng-click="save()" class="btn btn-primary" ng-show="changed">Save changes</button> <button type="submit" data-ng-click="save()" class="btn btn-primary" data-ng-show="changed">Save changes</button>
<button type="submit" ng-click="reset()" class="btn" ng-show="changed">Clear changes</button> <button type="submit" data-ng-click="reset()" class="btn" data-ng-show="changed">Clear changes</button>
<a href="#/realms/{{realm.name}}/users" ng-hide="changed">View users &#187;</a> <a href="#/realms/{{realm.name}}/users" data-ng-hide="changed">View users &#187;</a>
<button type="submit" ng-click="remove()" class="btn btn-danger" ng-hide="changed">Delete</button> <button type="submit" data-ng-click="remove()" class="btn btn-danger" data-ng-hide="changed">Delete</button>
</div> </div>
</form> </form>

View file

@ -1,6 +1,6 @@
<div id="wrapper" class="container"> <div id="wrapper" class="container">
<div class="row"> <div class="row">
<aside class="span3" ng-include src="'partials/realm-menu.html'"></aside> <aside class="span3" data-ng-include data-src="'partials/realm-menu.html'"></aside>
<div id="actions-bg"></div> <div id="actions-bg"></div>
<div id="container-right" class="span9"> <div id="container-right" class="span9">
@ -19,7 +19,7 @@
<th>Email</th> <th>Email</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="user in users"> <tr data-ng-repeat="user in users">
<td><a href="#/realms/{{realm.key}}/users/{{user.userId}}">{{user.userId}}</a></td> <td><a href="#/realms/{{realm.key}}/users/{{user.userId}}">{{user.userId}}</a></td>
<td>{{user.firstName}}</td> <td>{{user.firstName}}</td>
<td>{{user.lastName}}</td> <td>{{user.lastName}}</td>