blob: 6b1e78fe2c68165f50cee16960fe779a07d8d485 [file] [log] [blame]
<!--
Copyright 2017-present Open Networking Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="row">
<div class="col-xs-6">
<h1>{$ vm.cp.humanReadableName $}</h1>
</div>
<div class="col-xs-6 text-right">
<cp-actions id="vm.cp.id"></cp-actions>
</div>
</div>
<hr>
<div class="row">
<div ng-show="vm.cp.id" class="col-xs-2">
<div ng-include="'templates/cp_side_nav.html'"></div>
</div>
<div ng-class="{'col-xs-10': vm.cp.id, 'col-xs-12': !vm.cp.id}">
<!-- TODO hide form on not found -->
<form ng-submit="vm.saveContentProvider(vm.cp)">
<fieldset>
<div class="row">
<div class="col-xs-6">
<label>Name:</label>
<input class="form-control" type="text" ng-model="vm.cp.humanReadableName" required/>
</div>
<div class="col-xs-6">
<label class="checkbox">
<input class="form-control" type="checkbox" ng-model="vm.cp.enabled" /> Enabled
</label>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<label>Description</label>
<textarea class="form-control" ng-model="vm.cp.description"></textarea>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<label>Service provider</label>
<select class="form-control" required ng-model="vm.cp.serviceProvider" ng-options="sp.id as sp.humanReadableName for sp in vm.sp"></select>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<button class="btn btn-success">
<span ng-show="vm.cp.id">Save</span>
<span ng-show="!vm.cp.id">Create</span>
</button>
</div>
</div>
</fieldset>
</form>
<div class="alert" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-danger': vm.result.status === 0}">
{$ vm.result.msg $}
</div>
</div>
</div>