blob: 6b1e78fe2c68165f50cee16960fe779a07d8d485 [file] [log] [blame]
Matteo Scandolod2044a42017-08-07 16:08:28 -07001
2<!--
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17
18
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070019<div class="row">
20 <div class="col-xs-6">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010021 <h1>{$ vm.cp.humanReadableName $}</h1>
22 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070023 <div class="col-xs-6 text-right">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010024 <cp-actions id="vm.cp.id"></cp-actions>
25 </div>
26</div>
27<hr>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070028<div class="row">
29 <div ng-show="vm.cp.id" class="col-xs-2">
Matteo Scandolobbcc01b2015-11-04 16:30:43 +010030 <div ng-include="'templates/cp_side_nav.html'"></div>
Matteo Scandolo15d692c2015-10-28 12:00:07 +010031 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070032 <div ng-class="{'col-xs-10': vm.cp.id, 'col-xs-12': !vm.cp.id}">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010033 <!-- TODO hide form on not found -->
34 <form ng-submit="vm.saveContentProvider(vm.cp)">
35 <fieldset>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070036 <div class="row">
37 <div class="col-xs-6">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010038 <label>Name:</label>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070039 <input class="form-control" type="text" ng-model="vm.cp.humanReadableName" required/>
Matteo Scandolo15d692c2015-10-28 12:00:07 +010040 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070041 <div class="col-xs-6">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010042 <label class="checkbox">
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070043 <input class="form-control" type="checkbox" ng-model="vm.cp.enabled" /> Enabled
Matteo Scandolo15d692c2015-10-28 12:00:07 +010044 </label>
45 </div>
46 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070047 <div class="row">
48 <div class="col-xs-12">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010049 <label>Description</label>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070050 <textarea class="form-control" ng-model="vm.cp.description"></textarea>
Matteo Scandolo15d692c2015-10-28 12:00:07 +010051 </div>
52 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070053 <div class="row">
54 <div class="col-xs-12">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010055 <label>Service provider</label>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070056 <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 +010057 </div>
58 </div>
Matteo Scandolo91fe03d2016-03-24 15:29:52 -070059 <div class="row">
60 <div class="col-xs-12">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010061 <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 Scandolo775d3242016-03-24 16:12:18 -070069 <div class="alert" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-danger': vm.result.status === 0}">
Matteo Scandolo15d692c2015-10-28 12:00:07 +010070 {$ vm.result.msg $}
71 </div>
72 </div>
73</div>