blob: 89d8daf1877af16dd5092c86cc31649317cbc6a9 [file] [log] [blame]
Matteo Scandolof5cbbb12015-10-28 12:00:07 +01001<div class="row-fluid">
2 <div class="span6">
3 <h1>{$ vm.cp.humanReadableName $}</h1>
4 </div>
5 <div class="span6 text-right">
6 <cp-actions id="vm.cp.id"></cp-actions>
7 </div>
8</div>
9<hr>
10<div class="row-fluid">
11 <div ng-show="vm.cp.id" class="span2">
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>
14 <div ng-class="{span10: vm.cp.id, span12: !vm.cp.id}">
15 <!-- TODO hide form on not found -->
16 <form ng-submit="vm.saveContentProvider(vm.cp)">
17 <fieldset>
18 <div class="row-fluid">
19 <div class="span6">
20 <label>Name:</label>
21 <input type="text" ng-model="vm.cp.humanReadableName" required/>
22 </div>
23 <div class="span6">
24 <label class="checkbox">
25 <input type="checkbox" ng-model="vm.cp.enabled" /> Enabled
26 </label>
27 </div>
28 </div>
29 <div class="row-fluid">
30 <div class="span12">
31 <label>Description</label>
32 <textarea style="width: 100%" ng-model="vm.cp.description"></textarea>
33 </div>
34 </div>
35 <div class="row-fluid">
36 <div class="span12">
37 <label>Service provider</label>
38 <select required ng-model="vm.cp.serviceProvider" ng-options="sp.id as sp.humanReadableName for sp in vm.sp"></select>
39 </div>
40 </div>
41 <div class="row-fluid">
42 <div class="span12">
43 <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>
51 <div class="alert" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-error': vm.result.status === 0}">
52 {$ vm.result.msg $}
53 </div>
54 </div>
55</div>