Skip to content
Snippets Groups Projects
Commit c095fc9e authored by Kyle Doherty's avatar Kyle Doherty
Browse files

setup user form styling

parent eb024b99
Branches
Tags
No related merge requests found
......@@ -14,56 +14,77 @@
border: 4px solid #9CC177;
}
</style>
<section class="Setup--section" ng-class="{ 'Setup--active' : activeStep == 'user', 'Setup--completed' : completedSteps.user }">
<h3>1. User</h3>
<form name="setupForm" ng-submit="createOrgAndUser()" novalidate ng-if="activeStep == 'user'">
<input class="Connection-input block full" name="organization" type="text" placeholder="Organization name" ng-model="userOrgName" autofocus required>
<label class="Connection-label" for="organization">Organization name</label>
<div class="Grid Grid--1of2">
<div class="Grid-cell">
<input class="Connection-input" type="text" name="firstName" placeholder="First name" ng-model="newUser.firstName" required>
<label class="Connection-label" for="firstName" ng-class="{'Connection--error' : setupForm.firstName.$invalid && !setupForm.firstName.$pristine}">First name</label>
</div>
<div class="wrapper">
<section class="Setup--section" ng-class="{ 'Setup--active' : activeStep == 'user', 'Setup--completed' : completedSteps.user }">
<h3>1. User</h3>
<form class="Form-new" name="form" ng-submit="createOrgAndUser()" novalidate ng-if="activeStep == 'user'" novalidate>
<div class="Form-field" mb-form-field="first_name">
<mb-form-label display-name="First name" field-name="first_name"></mb-form-label>
<input class="Form-input Form-offset full" name="first_name" placeholder="John" ng-model="newUser.first_name" required autofocus />
<span class="Form-charm"></span>
</div>
<div class="Grid-cell">
<input class="Connection-input" type="text" name="lastName" placeholder="Last name." ng-model="newUser.lastName" required>
<label class="Connection-label" for="lastName">Last name</label>
</div>
</div>
<div class="Form-field" mb-form-field="last_name">
<mb-form-label display-name="Last name" field-name="last_name"></mb-form-label>
<input class="Form-input Form-offset full" name="last_name" placeholder="Doe" ng-model="newUser.last_name" required />
<span class="Form-charm"></span>
</div>
<div class="Form-field" mb-form-field="email">
<mb-form-label display-name="Email" field-name="email"></mb-form-label>
<input class="Form-input Form-offset full" name="email" placeholder="johndoe@mycompany.com" ng-model="newUser.email" required />
<span class="Form-charm"></span>
</div>
<input class="Connection-input block full" name="email" type="email" placeholder="email@company.com" ng-model="newUser.email" required>
<label class="Connection-label" for="lastName" ng-class="{'Connection--error' : setupForm.email.$invalid && !setupForm.email.$pristine}">Email:</label>
<div class="Form-field" mb-form-field="password">
<mb-form-label display-name="Create a password - Must be 8 characters long and include one upper case letter, one a number and one special character" field-name="password"></mb-form-label>
<input class="Form-input Form-offset full" name="password" type="password" placeholder="Create a new password" ng-model="newUser.password" required>
<span class="Form-charm"></span>
</div>
<input class="Connection-input block full" name="password" type="password" placeholder="Create a new password" ng-model="newUser.password" required>
<label class="Connection-label">Create a password - Must be 8 characters long and include one upper case letter, one a number and one special character</label>
<div class="Form-field" mb-form-field="repeated_password">
<mb-form-label display-name="Verify your new password" field-name="password"></mb-form-label>
<input class="Form-input Form-offset full" type="password" placeholder="Type it again so we can verify it" ng-model="newUser.repeated_password" required>
<span class="Form-charm"></span>
</div>
<input class="Connection-input block full" type="password" placeholder="Type it again so we can verify it" ng-model="newUser.repeated_password" required>
<label class="Connection-label">Verify your new password</label>
<div class="Form-field" mb-form-field="organization">
<mb-form-label display-name="Organization name" field-name="password"></mb-form-label>
<input class="Form-input Form-offset full" name="organization" type="text" placeholder="Organization name" ng-model="userOrgName" autofocus required>
<span class="Form-charm"></span>
</div>
<button class="Button Button--primary" type="submit">Next</button>
</form>
<div class="bg-error text-white p2 rounded" ng-show="error">
{{error}}
</div>
</section>
<section class="Setup--section" ng-class="{ 'Setup--active' : activeStep == 'database', 'Setup--completed' : completedSteps.database }">
<h3>2. Database</h3>
<div ng-controller="DatabaseEdit" ng-if="activeStep == 'database'">
<form class="Form-new bordered rounded shadowed" name="form" novalidate>
<!-- Form -->
<div ng-include="'/app/admin/databases/partials/database_edit_forms.html'"></div>
<div class="Form-actions">
<button class="Button" ng-class="{'Button--primary': form.$valid}" ng-click="save(newUser)" ng-disabled="!form.$valid">
Create
</button>
</div>
</form>
<div class="bg-error text-white p2 rounded" ng-show="error">
{{error}}
</div>
</section>
<section class="Setup--section" ng-class="{ 'Setup--active' : activeStep == 'database', 'Setup--completed' : completedSteps.database }">
<h3>2. Database</h3>
<div ng-controller="DatabaseEdit" ng-if="activeStep == 'database'">
<form class="Form-new bordered rounded shadowed" name="form" novalidate>
<!-- Form -->
<div ng-include="'/app/admin/databases/partials/database_edit_forms.html'"></div>
<!-- Bottom Actions -->
<div class="Form-actions">
<button class="Button" ng-class="{'Button--primary': form.$valid}" ng-click="save(database, details, false)" ng-disabled="!form.$valid">
Save
</button>
<mb-form-message></mb-form-message>
</div>
</form>
</div>
</section>
<!-- Bottom Actions -->
<div class="Form-actions">
<button class="Button" ng-class="{'Button--primary': form.$valid}" ng-click="save(database, details, false)" ng-disabled="!form.$valid">
Save
</button>
<mb-form-message></mb-form-message>
</div>
</form>
</div>
</section>
<section class="Setup--section" ng-class="{ 'Setup--active' : activeStep == 'finish' }" >
<h3>3. Finish</h3>
</section>
<section class="Setup--section" ng-class="{ 'Setup--active' : activeStep == 'finish' }" >
<h3>3. Finish</h3>
</section>
</div>
......@@ -4,7 +4,7 @@ var SetupControllers = angular.module('corvus.setup.controllers', ['corvus.metab
SetupControllers.controller('SetupInfo', ['$scope', '$routeParams', '$location', '$timeout', 'ipCookie', 'Organization', 'AppState', 'Setup', 'Metabase', 'CorvusCore',
function($scope, $routeParams, $location, $timeout, ipCookie, Organization, AppState, Setup, Metabase, CorvusCore) {
$scope.activeStep = "database";
$scope.activeStep = "user";
$scope.completedSteps = {
user: false,
database: false
......@@ -19,6 +19,7 @@ SetupControllers.controller('SetupInfo', ['$scope', '$routeParams', '$location',
$scope.createOrgAndUser = function() {
console.log("$scope.newUser.email", $scope.newUser.email)
// start off by creating the first user of the system
// NOTE: this should both create the user AND log us in and return a session id
Setup.create_user({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment