Skip to content
Snippets Groups Projects
Commit 62486ad9 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

update all the admin resource templates to use updates css classes for...

update all the admin resource templates to use updates css classes for Form-input and Grid stuff where appropriate.
parent 78a9ab8f
Branches
Tags
No related merge requests found
......@@ -53,10 +53,6 @@ DatabasesControllers.controller('DatabaseEdit', ['$scope', '$routeParams', '$loc
// details is handled manually
};
$scope.foo = function() {
console.log($scope.form);
};
// takes in our API form database details and parses them into a map of usable form field values
var parseDetails = function(engine, details) {
var map = {};
......
<div class="wrapper">
<!-- breadcrumb -->
<section class="Breadcrumbs">
<a class="Breadcrumb Breadcrumb--path" cv-org-href="/admin/databases/">Databases</a>
<cv-chevron-right-icon class="Breadcrumb-divider" width="12px" height="12px"></cv-chevron-right-icon>
......@@ -8,8 +7,8 @@
</section>
<section class="Grid Grid--gutters">
<!-- form -->
<div class="Grid-cell">
<!-- form -->
<form class="bg-white rounded bordered shadowed" name="form" novalidate>
<div class="FormError" ng-show="form.$error.message">{{form.$error.message}}</div>
......@@ -53,14 +52,9 @@
</div>
</div>
<!-- SAVE BUTTON -->
<button class="Button" ng-class="{'Button--primary': form.$valid}" ng-click="save(database)" ng-disabled="!form.$valid">
Save
</button>
<!-- TODO: remove this fella -->
<button class="Button" ng-click="foo()">
Status
</button>
</form>
</div>
<!-- actions -->
......
......@@ -6,20 +6,21 @@
<h2 class="Breadcrumb Breadcrumb--page" ng-if="report.id">{{report.name}}</h2>
</section>
<section>
<div class="p4 bordered">
<section class="Grid Grid--gutters">
<!-- form -->
<div class="Grid-cell p4 bordered rounded shadowed">
<form name="form" novalidate>
<div ng-class="{'FormFieldError': form.name.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.name.$error.message == undefined}">
<mb-form-label form="form" display-name="Name" field-name="name"></mb-form-label>
<input class="input full" name="name" ng-model="report.name" required />
<input class="Form-input full" name="name" ng-model="report.name" required />
</div>
<div ng-class="{'FormFieldError': form.description.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.description.$error.message == undefined}">
<mb-form-label form="form" display-name="Description" field-name="description"></mb-form-label>
<input class="input full" name="description" ng-model="report.description" />
<input class="Form-input full" name="description" ng-model="report.description" />
</div>
<div ng-class="{'FormFieldError': form.mode.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.mode.$error.message == undefined}">
<mb-form-label form="form" display-name="Mode" field-name="mode"></mb-form-label>
<div class="Button-group">
<button class="Button" ng-class="{ 'Button--active' : report.mode === 1 }" ng-click="report.mode = 1" ng-disabled>Active</button>
......@@ -27,12 +28,12 @@
</div>
</div>
<div ng-class="{'FormFieldError': form.public_perms.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.public_perms.$error.message == undefined}">
<mb-form-label form="form" display-name="Permissions" field-name="public_perms"></mb-form-label>
<select class="Select" name="public_perms" ng-model="report.public_perms" ng-options="perm.id as perm.name for perm in form_input.permissions" required ></select>
</div>
<div ng-class="{'FormFieldError': form.recipients.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.recipients.$error.message == undefined}">
<mb-form-label form="form" display-name="Recipients" field-name="recipients"></mb-form-label>
<ul class="Checkbox-group">
<li ng-repeat="user in form_input.users">
......@@ -41,12 +42,12 @@
</li>
</div>
<div ng-class="{'FormFieldError': form.email_addresses.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.email_addresses.$error.message == undefined}">
<mb-form-label form="form" display-name="Email aliases" field-name="email_addresses"></mb-form-label>
<textarea class="input full" name="email_addresses" ng-model="report.email_addresses" placeholder="Enter emails (separated by commas) of other recipients, who may need this email"></textarea>
<textarea class="Form-input full" name="email_addresses" ng-model="report.email_addresses" placeholder="Enter emails (separated by commas) of other recipients, who may need this email"></textarea>
</div>
<div ng-class="{'FormFieldError': form.dataset_query.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.dataset_query.$error.message == undefined}">
<mb-form-label form="form" display-name="Email contents" field-name="dataset_query"></mb-form-label>
<select class="Select" ng-model="report.dataset_query.database" ng-options="db.id as db.name for db in form_input.databases" ng-change="refreshTableList(report.dataset_query.database)">
<option value="">Select a database</option>
......@@ -56,7 +57,7 @@
</select>
</div>
<div ng-class="{'FormFieldError': form.schedule.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.schedule.$error.message == undefined}">
<mb-form-label form="form" display-name="Schedule" field-name="schedule"></mb-form-label>
<div class="Button-group">
<button class="Button" ng-class="{ 'Button--active' : report.schedule.days_of_week[day.id] }" ng-model="report.schedule.days_of_week[day.id]" ng-repeat="day in form_input.days_of_week" btn-checkbox>{{day.name}}</button>
......@@ -79,5 +80,15 @@
</div>
</form>
</div>
<!-- actions -->
<div class="Grid-cell" ng-if="report.id">
<div class="Actions">
<h3>Actions</h3>
<div class="Actions-group">
<button class="Button" ng-click="executeReport(report.id)">Send now</button>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
......@@ -4,7 +4,6 @@
</section>
<section class="Grid Grid--1of2">
<!-- form -->
<div class="Grid-cell p4 bordered rounded shadowed">
<form name="form" novalidate>
<div class="FormError" ng-show="form.$error.message">{{form.$error.message}}</div>
......@@ -29,7 +28,6 @@
<input class="Form-input full" name="logo_url" ng-model="currentOrg.logo_url" placeholder="Link to an image of your logo"/>
</div>
<!-- SAVE BUTTON -->
<button class="Button" ng-class="{'Button--primary': form.$valid}" ng-click="save(currentOrg)" ng-disabled="!form.$valid">
Save
</button>
......
......@@ -23,7 +23,7 @@
<span ng-show="!perm.admin">Grant</span>
admin
</button>
<button class="Button Button--Danger" ng-click="delete(perm.user.id)" delete-confirm>Remove</button>
<button class="Button Button--danger" ng-click="delete(perm.user.id)" delete-confirm>Remove</button>
</td>
</tr>
</tbody>
......
......@@ -5,24 +5,24 @@
<h2 class="Breadcrumb Breadcrumb--page">Add person</h2>
</section>
<section>
<div class="p4 bordered">
<section class="Grid Grid--1of2">
<div class="Grid-cell p4 bordered rounded shadowed">
<form name="form" novalidate>
<div class="FormError" ng-show="form.$error.message">{{form.$error.message}}</div>
<div ng-class="{'FormFieldError': form.first_name.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.first_name.$error.message == undefined}">
<mb-form-label form="form" display-name="First name" field-name="first_name"></mb-form-label>
<input class="input full" name="first_name" ng-model="newUser.first_name" required />
<input class="Form-input full" name="first_name" placeholder="John" ng-model="newUser.first_name" required />
</div>
<div ng-class="{'FormFieldError': form.last_name.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.last_name.$error.message == undefined}">
<mb-form-label form="form" display-name="Last name" field-name="last_name"></mb-form-label>
<input class="input full" name="last_name" ng-model="newUser.last_name" required />
<input class="Form-input full" name="last_name" placeholder="Doe" ng-model="newUser.last_name" required />
</div>
<div ng-class="{'FormFieldError': form.email.$error.message == undefined}">
<div class="Form-field" ng-class="{'FormFieldError': form.email.$error.message == undefined}">
<mb-form-label form="form" display-name="Email" field-name="email"></mb-form-label>
<input class="input full" name="email" ng-model="newUser.email" required />
<input class="Form-input full" name="email" placeholder="johndoe@mycompany.com" ng-model="newUser.email" required />
</div>
<div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment