blob: ccbd66ccd213516b7e6f5eba0853080adaf7d595 [file] [log] [blame]
Matteo Scandolo91fe03d2016-03-24 15:29:52 -07001<div class="row">
2 <div class="col-xs-6">
Matteo Scandolo15d692c2015-10-28 12:00:07 +01003 <h1>{$ vm.cp.humanReadableName $}</h1>
4 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -07005 <div class="col-xs-6 text-right">
Matteo Scandolo15d692c2015-10-28 12:00:07 +01006 <cp-actions id="vm.cp.id"></cp-actions>
7 </div>
8</div>
9<hr>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070010<div class="row">
11 <div ng-show="vm.cp.id" class="col-xs-2">
Matteo Scandolobbcc01b2015-11-04 16:30:43 +010012 <div ng-include="'templates/cp_side_nav.html'"></div>
Matteo Scandolo15d692c2015-10-28 12:00:07 +010013 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070014 <div ng-class="{'col-xs-10': vm.cp.id, 'col-xs-12': !vm.cp.id}">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010015 <!-- TODO hide form on not found -->
16 <form ng-submit="vm.saveContentProvider(vm.cp)">
17 <fieldset>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070018 <div class="row">
19 <div class="col-xs-6">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010020 <label>Name:</label>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070021 <input class="form-control" type="text" ng-model="vm.cp.humanReadableName" required/>
Matteo Scandolo15d692c2015-10-28 12:00:07 +010022 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070023 <div class="col-xs-6">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010024 <label class="checkbox">
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070025 <input class="form-control" type="checkbox" ng-model="vm.cp.enabled" /> Enabled
Matteo Scandolo15d692c2015-10-28 12:00:07 +010026 </label>
27 </div>
28 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070029 <div class="row">
30 <div class="col-xs-12">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010031 <label>Description</label>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070032 <textarea class="form-control" ng-model="vm.cp.description"></textarea>
Matteo Scandolo15d692c2015-10-28 12:00:07 +010033 </div>
34 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070035 <div class="row">
36 <div class="col-xs-12">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010037 <label>Service provider</label>
Matteo Scandolo91fe03d2016-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 Scandolo15d692c2015-10-28 12:00:07 +010039 </div>
40 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070041 <div class="row">
42 <div class="col-xs-12">
Matteo Scandolo15d692c2015-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 Scandolo91fe03d2016-03-24 15:29:52 -070051 <div class="alert alert-danger" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-error': vm.result.status === 0}">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010052 {$ vm.result.msg $}
53 </div>
54 </div>
55</div>