Matteo Scandolo | d2044a4 | 2017-08-07 16:08:28 -0700 | [diff] [blame^] | 1 | |
| 2 | <!-- |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 19 | <div class="row"> |
| 20 | <div class="col-xs-6"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 21 | <h1>{$ vm.cp.humanReadableName $}</h1> |
| 22 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 23 | <div class="col-xs-6 text-right"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 24 | <cp-actions id="vm.cp.id"></cp-actions> |
| 25 | </div> |
| 26 | </div> |
| 27 | <hr> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 28 | <div class="row"> |
| 29 | <div ng-show="vm.cp.id" class="col-xs-2"> |
Matteo Scandolo | bbcc01b | 2015-11-04 16:30:43 +0100 | [diff] [blame] | 30 | <div ng-include="'templates/cp_side_nav.html'"></div> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 31 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 32 | <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] | 33 | <!-- TODO hide form on not found --> |
| 34 | <form ng-submit="vm.saveContentProvider(vm.cp)"> |
| 35 | <fieldset> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 36 | <div class="row"> |
| 37 | <div class="col-xs-6"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 38 | <label>Name:</label> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 39 | <input class="form-control" type="text" ng-model="vm.cp.humanReadableName" required/> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 40 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 41 | <div class="col-xs-6"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 42 | <label class="checkbox"> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 43 | <input class="form-control" type="checkbox" ng-model="vm.cp.enabled" /> Enabled |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 44 | </label> |
| 45 | </div> |
| 46 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 47 | <div class="row"> |
| 48 | <div class="col-xs-12"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 49 | <label>Description</label> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 50 | <textarea class="form-control" ng-model="vm.cp.description"></textarea> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 51 | </div> |
| 52 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 53 | <div class="row"> |
| 54 | <div class="col-xs-12"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 55 | <label>Service provider</label> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 56 | <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] | 57 | </div> |
| 58 | </div> |
Matteo Scandolo | 91fe03d | 2016-03-24 15:29:52 -0700 | [diff] [blame] | 59 | <div class="row"> |
| 60 | <div class="col-xs-12"> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 61 | <button class="btn btn-success"> |
| 62 | <span ng-show="vm.cp.id">Save</span> |
| 63 | <span ng-show="!vm.cp.id">Create</span> |
| 64 | </button> |
| 65 | </div> |
| 66 | </div> |
| 67 | </fieldset> |
| 68 | </form> |
Matteo Scandolo | 775d324 | 2016-03-24 16:12:18 -0700 | [diff] [blame] | 69 | <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] | 70 | {$ vm.result.msg $} |
| 71 | </div> |
| 72 | </div> |
| 73 | </div> |