Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 1 | <div class="row"> |
| 2 | <div class="col-xs-6"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 3 | <h1>{$ vm.cp.humanReadableName $}</h1> |
| 4 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 5 | <div class="col-xs-6 text-right"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 6 | <cp-actions id="vm.cp.id"></cp-actions> |
| 7 | </div> |
| 8 | </div> |
| 9 | <hr> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 10 | <div class="row"> |
| 11 | <div ng-show="vm.cp.id" class="col-xs-2"> |
Matteo Scandolo | bbcc01b | 2015-11-04 16:30:43 +0100 | [diff] [blame] | 12 | <div ng-include="'templates/cp_side_nav.html'"></div> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 13 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 14 | <div ng-class="{'col-xs-10': vm.cp.id, 'col-xs-12': !vm.cp.id}"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 15 | <!-- TODO hide form on not found --> |
| 16 | <form ng-submit="vm.saveContentProvider(vm.cp)"> |
| 17 | <fieldset> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 18 | <div class="row"> |
| 19 | <div class="col-xs-6"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 20 | <label>Name:</label> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 21 | <input class="form-control" type="text" ng-model="vm.cp.humanReadableName" required/> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 22 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 23 | <div class="col-xs-6"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 24 | <label class="checkbox"> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 25 | <input class="form-control" type="checkbox" ng-model="vm.cp.enabled" /> Enabled |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 26 | </label> |
| 27 | </div> |
| 28 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 29 | <div class="row"> |
| 30 | <div class="col-xs-12"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 31 | <label>Description</label> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 32 | <textarea class="form-control" ng-model="vm.cp.description"></textarea> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 33 | </div> |
| 34 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 35 | <div class="row"> |
| 36 | <div class="col-xs-12"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 37 | <label>Service provider</label> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 38 | <select class="form-control" required ng-model="vm.cp.serviceProvider" ng-options="sp.id as sp.humanReadableName for sp in vm.sp"></select> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 39 | </div> |
| 40 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 41 | <div class="row"> |
| 42 | <div class="col-xs-12"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 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> |
Matteo Scandolo | 775d324 | 2016-03-24 16:12:18 -0700 | [diff] [blame^] | 51 | <div class="alert" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-danger': vm.result.status === 0}"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 52 | {$ vm.result.msg $} |
| 53 | </div> |
| 54 | </div> |
| 55 | </div> |