blob: 1ae2299ba18f11ae0327328ce46d231e06b2fc33 [file] [log] [blame]
Matteo Scandolo66351432016-03-24 15:29:52 -07001<div class="row">
2 <div class="col-xs-6">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +01003 <h1>{$ vm.cp.humanReadableName $}</h1>
4 </div>
Matteo Scandolo66351432016-03-24 15:29:52 -07005 <div class="col-xs-6 text-right">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +01006 <cp-actions id="vm.cp.id"></cp-actions>
7 </div>
8</div>
9<hr>
Matteo Scandolo66351432016-03-24 15:29:52 -070010<div class="row">
11 <div ng-show="vm.cp.id" class="col-xs-2">
Matteo Scandolo82697c02015-11-04 16:30:43 +010012 <div ng-include="'templates/cp_side_nav.html'"></div>
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010013 </div>
Matteo Scandolo66351432016-03-24 15:29:52 -070014 <div ng-class="{'col-xs-10': vm.cp.id, 'col-xs-12': !vm.cp.id}">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010015 <!-- TODO hide form on not found -->
16 <form ng-submit="vm.saveContentProvider(vm.cp)">
17 <fieldset>
Matteo Scandolo66351432016-03-24 15:29:52 -070018 <div class="row">
19 <div class="col-xs-6">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010020 <label>Name:</label>
Matteo Scandolo66351432016-03-24 15:29:52 -070021 <input class="form-control" type="text" ng-model="vm.cp.humanReadableName" required/>
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010022 </div>
Matteo Scandolo66351432016-03-24 15:29:52 -070023 <div class="col-xs-6">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010024 <label class="checkbox">
Matteo Scandolo66351432016-03-24 15:29:52 -070025 <input class="form-control" type="checkbox" ng-model="vm.cp.enabled" /> Enabled
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010026 </label>
27 </div>
28 </div>
Matteo Scandolo66351432016-03-24 15:29:52 -070029 <div class="row">
30 <div class="col-xs-12">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010031 <label>Description</label>
Matteo Scandolo66351432016-03-24 15:29:52 -070032 <textarea class="form-control" ng-model="vm.cp.description"></textarea>
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010033 </div>
34 </div>
Matteo Scandolo66351432016-03-24 15:29:52 -070035 <div class="row">
36 <div class="col-xs-12">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010037 <label>Service provider</label>
Matteo Scandolo66351432016-03-24 15:29:52 -070038 <select class="form-control" required ng-model="vm.cp.serviceProvider" ng-options="sp.id as sp.humanReadableName for sp in vm.sp"></select>
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010039 </div>
40 </div>
Matteo Scandolo66351432016-03-24 15:29:52 -070041 <div class="row">
42 <div class="col-xs-12">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010043 <button class="btn btn-success">
44 <span ng-show="vm.cp.id">Save</span>
45 <span ng-show="!vm.cp.id">Create</span>
46 </button>
47 </div>
48 </div>
49 </fieldset>
50 </form>
Matteo Scandoloc443c2d2016-03-24 16:12:18 -070051 <div class="alert" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-danger': vm.result.status === 0}">
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010052 {$ vm.result.msg $}
53 </div>
54 </div>
55</div>