Add collection of user metadata: name and company
This commit is contained in:
parent
909be766c9
commit
0f2eb61f4a
14 changed files with 178 additions and 33 deletions
|
@ -1,6 +1,6 @@
|
|||
<div class="cor-loader-inline" ng-if="user.anonymous || state == 'updating'"></div>
|
||||
<!-- TODO: Support additional kinds of prompts here -->
|
||||
|
||||
<!-- Confirm username -->
|
||||
<div class="update-user" ng-show="hasPrompt(user, 'confirm_username') && state != 'updating'">
|
||||
<h2>Confirm Username</h2>
|
||||
<p>
|
||||
|
@ -8,7 +8,7 @@
|
|||
Docker CLI guidelines for use as a namespace in <span class="registry-title"></span>.
|
||||
</p>
|
||||
<p>Please confirm the selected username or enter a different username below:</p>
|
||||
<form name="usernameForm" ng-submit="updateUsername(username)">
|
||||
<form name="usernameForm" ng-submit="updateUser({'username': username})">
|
||||
<div class="namespace-input" binding="username" is-back-incompat="isBackIncompat"
|
||||
namespace-title="Username" style="margin-bottom: 20px;"
|
||||
has-external-error="state == 'existing'"></div>
|
||||
|
@ -33,4 +33,38 @@
|
|||
<i class="fa fa-exclamation-triangle"></i> Note: Usernames with dots or dashes are incompatible with Docker verion 1.8 or older
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Enter metadata -->
|
||||
<div class="update-user" ng-show="!hasPrompt(user, 'confirm_username') && (hasPrompt(user, 'enter_name') || hasPrompt(user, 'enter_company')) && state != 'updating'">
|
||||
<h2>Tell us a bit more about yourself</h2>
|
||||
<div>This information will be displayed in your user profile.</div>
|
||||
|
||||
<form name="metadataForm" ng-submit="updateUser(metadata)" style="margin-top: 20px;">
|
||||
<div class="form-group nested">
|
||||
<label for="name">Name</label>
|
||||
<div class="field-row">
|
||||
<span class="field-container">
|
||||
<input type="text" class="form-control" placeholder="Name" ng-model="metadata.name"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group nested">
|
||||
<label for="firstName">Company</label>
|
||||
<div class="field-row">
|
||||
<span class="field-container">
|
||||
<input type="text" class="form-control" placeholder="Company name" ng-model="metadata.company"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 20px">
|
||||
<input type="submit" class="btn btn-primary" value="Save Details"
|
||||
ng-disabled="!metadata.name && !metadata.company">
|
||||
<button class="btn btn-default"
|
||||
ng-click="updateUser({'company': '', 'name': ''})">
|
||||
No thanks</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
Reference in a new issue