1 | <div id="accountDetails" data-ng-class="animateAccountDetails" class="container-fluid"> |
---|
2 | <div class="row-fluid"> |
---|
3 | <div class="span12 hero-unit"> |
---|
4 | <h3>Account details</h3> |
---|
5 | <div class="container-fluid"> |
---|
6 | <dl class="dl-horizontal"> |
---|
7 | <dt>Shibboleth ID:</dt> |
---|
8 | <dd> |
---|
9 | <p data-ng-bind="principal"/> |
---|
10 | </dd> |
---|
11 | <dt>Diplay name:</dt> |
---|
12 | <dd> |
---|
13 | <p data-ng-if="!edditingDisplayName"> |
---|
14 | <span data-ng-bind="displayName"></span> |
---|
15 | <span> |
---|
16 | <button data-ng-click="editDisplayName()" class="btn btn-info btn-mini" data-ng-if="displayName != 'guest'"><i class="icon-edit"></i> Edit</button> |
---|
17 | </span> |
---|
18 | </p> |
---|
19 | <form data-ng-if="edditingDisplayName" name="editDisplayNameForm" class="form-inline" novalidate="novalidate"> |
---|
20 | <input name="editDisplayNameInput" type="text" required="required" data-ng-model="editDisplayNameText"/> |
---|
21 | <button data-ng-click="updateDisplayName(editDisplayNameText)" class="btn btn-success btn-mini" data-ng-disabled="editDisplayNameForm.$invalid || waitingForServerEditDisplayName"><i class="icon-check"></i> Save</button> |
---|
22 | <button data-ng-click="terminateEditDisplayName()" class="btn btn-danger btn-mini"><i class="icon-remove"></i> Cancel</button> |
---|
23 | <img src="images/spinner-small.gif" alt="Loading..." data-ng-if="waitingForServerEditDisplayName"/> |
---|
24 | <span class="control-group error" data-ng-if="editDisplayNameForm.editDisplayNameInput.$dirty && editDisplayNameForm.editDisplayNameInput.$invalid"> |
---|
25 | <small class="help-block" data-ng-if="editDisplayNameForm.editDisplayNameInput.$error.required"> |
---|
26 | Your display name cannot be empty. |
---|
27 | </small> |
---|
28 | </span> |
---|
29 | <span class="control-group error" data-ng-if="editDisplayNameAjaxError"> |
---|
30 | <small class="help-block"> |
---|
31 | <div>The server responded with an error. Please try again!</div> |
---|
32 | <div>If the problem persists contact us at:</div> |
---|
33 | <div><a href="mailto:tla@mpi.nl">isocat@mpi.nl</a></div> |
---|
34 | </small> |
---|
35 | </span> |
---|
36 | </form> |
---|
37 | </dd> |
---|
38 | <span data-ng-if="displayName != 'guest'"> |
---|
39 | <dt>email:</dt> |
---|
40 | <dd data-ng-repeat="emailInstance in email" data-ng-controller="EmailInstanceCtrl"> |
---|
41 | <p data-ng-if="!edditingEmail"> |
---|
42 | <span data-ng-bind="emailInstance"></span> |
---|
43 | <span> |
---|
44 | <button data-ng-click="editEmail(emailInstance)" class="btn btn-info btn-mini"><i class="icon-edit"></i> Edit</button> |
---|
45 | <button data-ng-click="removeEmail($index)" class="btn btn-danger btn-mini" data-ng-if="email.length > 1"><i class="icon-remove"></i> Remove</button> |
---|
46 | <img src="images/spinner-small.gif" alt="Loading..." data-ng-if="waitingForServerEditEmail"/> |
---|
47 | </span> |
---|
48 | </p> |
---|
49 | <span class="control-group error" data-ng-if="removeEmailAjaxError"> |
---|
50 | <small class="help-block"> |
---|
51 | <div>The server responded with an error. Please try again!</div> |
---|
52 | <div>If the problem persists contact us at:</div> |
---|
53 | <div><a href="mailto:tla@mpi.nl">isocat@mpi.nl</a></div> |
---|
54 | </small> |
---|
55 | </span> |
---|
56 | <form data-ng-if="edditingEmail" name="editEmailForm" class="form-inline" novalidate="novalidate"> |
---|
57 | <input name="editEmailInput" type="email" required="required" data-ng-model="$parent.editEmailText"/> |
---|
58 | <button data-ng-click="updateEmail($index)" class="btn btn-success btn-mini" data-ng-disabled="editEmailForm.$invalid || waitingForServerEditEmail"><i class="icon-check"></i> Save</button> |
---|
59 | <button data-ng-click="cancelEditEmail(emailInstance)" class="btn btn-danger btn-mini"><i class="icon-remove"></i> Cancel</button> |
---|
60 | <img src="images/spinner-small.gif" alt="Loading..." data-ng-if="waitingForServerEditEmail"/> |
---|
61 | <span class="control-group error" data-ng-show="editEmailForm.editEmailInput.$dirty && editEmailForm.editEmailInput.$invalid"> |
---|
62 | <small class="help-block" data-ng-if="editEmailForm.editEmailInput.$error.required"> |
---|
63 | The email cannot be empty. |
---|
64 | </small> |
---|
65 | </span> |
---|
66 | <span class="control-group error" data-ng-if="editEmailForm.editEmailInput.$dirty && editEmailForm.editEmailInput.$invalid"> |
---|
67 | <small class="help-block" data-ng-if="editEmailForm.editEmailInput.$error.email"> |
---|
68 | Please provide a vaid email address. |
---|
69 | </small> |
---|
70 | </span> |
---|
71 | <span class="control-group error" data-ng-if="editEmailAjaxError"> |
---|
72 | <small class="help-block"> |
---|
73 | <div>The server responded with an error. Please try again!</div> |
---|
74 | <div>If the problem persists contact us at:</div> |
---|
75 | <div><a href="mailto:tla@mpi.nl">isocat@mpi.nl</a></div> |
---|
76 | </small> |
---|
77 | </span> |
---|
78 | </form> |
---|
79 | </dd> |
---|
80 | <dd data-ng-if="addingEmail"> |
---|
81 | <form name="newEmailForm" class="form-inline" novalidate="novalidate"> |
---|
82 | <input name="newEmailInput" type="email" required="required" data-ng-model="newEmailInputText"/> |
---|
83 | <button data-ng-click="addEmail(newEmailInputText)" class="btn btn-success btn-mini" data-ng-disabled="newEmailForm.$invalid || waitingForServer"><i class="icon-check"></i> Save</button> |
---|
84 | <button data-ng-click="terminateAddEmail()" class="btn btn-danger btn-mini"><i class="icon-remove"></i> Cancel</button> |
---|
85 | <img src="images/spinner-small.gif" alt="Loading..." data-ng-if="waitingForServer"/> |
---|
86 | <span class="control-group error" data-ng-if="newEmailForm.newEmailInput.$dirty && newEmailForm.newEmailInput.$invalid"> |
---|
87 | <small class="help-block" data-ng-if="newEmailForm.newEmailInput.$error.required"> |
---|
88 | The email cannot be empty. |
---|
89 | </small> |
---|
90 | </span> |
---|
91 | <span class="control-group error" data-ng-if="newEmailForm.newEmailInput.$dirty && newEmailForm.newEmailInput.$invalid"> |
---|
92 | <small class="help-block" data-ng-if="newEmailForm.newEmailInput.$error.email"> |
---|
93 | Please provide a vaid email address. |
---|
94 | </small> |
---|
95 | </span> |
---|
96 | <span class="control-group error" data-ng-if="ajaxError"> |
---|
97 | <small class="help-block"> |
---|
98 | <div>The server responded with an error. Please try again!</div> |
---|
99 | <div>If the problem persists contact us at:</div> |
---|
100 | <div><a href="mailto:tla@mpi.nl">isocat@mpi.nl</a></div> |
---|
101 | </small> |
---|
102 | </span> |
---|
103 | </form> |
---|
104 | </dd> |
---|
105 | <dd data-ng-if="!addingEmail"><button data-ng-click="addNewEmail()" class="btn btn-mini"><i class="icon-plus"></i> Add new email</button></dd> |
---|
106 | </span> |
---|
107 | </dl> |
---|
108 | </div> |
---|
109 | </div> |
---|
110 | </div> |
---|
111 | </div> |
---|