2016-06-07 10:49:38 +02:00
< div class = "modal fade" id = "createPolicyModal" tabindex = "-1" role = "dialog" >
< div class = "modal-dialog" >
2016-06-13 12:12:46 +02:00
< form name = "form" class = "form-horizontal css-form" ng-submit = "form.$valid" novalidate >
2016-06-07 10:49:38 +02:00
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" > < span aria-hidden = "true" > × < / span > < / button >
2016-06-13 12:12:46 +02:00
< h4 class = "modal-title" > < span class = "glyphicon glyphicon-plus" > < / span > //vm.modalTitle//< / h4 >
2016-06-07 10:49:38 +02:00
< / div >
< div class = "modal-body" >
< div class = "create-policy" >
< div class = "col-md-12" >
< h4 > General< / h4 >
< hr class = "hr-line" / >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< label for = "name" class = "col-md-3 control-label" > Name:< / label >
< div class = "col-md-9" >
2016-06-11 15:16:01 +02:00
< input type = "text" class = "form-control form-control-custom" id = "name" ng-model = "replication.policy.name" name = "uName" required >
2016-06-07 10:49:38 +02:00
< div ng-messages = "form.$submitted && form.uName.$error" >
< span ng-message = "required" > Name is required.< / span >
< / div >
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< label for = "description" class = "col-md-3 control-label" > Description:< / label >
< div class = "col-md-9" >
2016-06-11 15:16:01 +02:00
< textarea class = "form-control form-control-custom" id = "description" ng-model = "replication.policy.description" name = "uDescription" required > < / textarea >
2016-06-07 10:49:38 +02:00
< div ng-messages = "form.$submitted && form.uDescription.$error" >
< span ng-message = "required" > Description is required.< / span >
< / div >
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< label for = "enable" class = "col-md-3 control-label" > Enable:< / label >
< div class = "col-md-9" >
2016-06-11 15:16:01 +02:00
< input type = "checkbox" class = "form-control" style = "margin-top: 10px; height: auto;" ng-model = "replication.policy.enabled" >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< div class = "col-md-12" >
< h4 class = "h4-custom" > Destination Setting< / h4 >
< hr class = "hr-line" / >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< label for = "destinationName" class = "col-md-3 control-label" > Name:< / label >
< div class = "col-md-7" >
2016-06-13 12:12:46 +02:00
< select class = "form-control form-control-custom" id = "destinationName" ng-model = "replication.destination.selection" ng-options = "d as d.name for d in vm.destinations track by d.id" ng-click = "vm.selectDestination(replication.destination.selection)" > < / select >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< label for = "endpoint" class = "col-md-3 control-label" > Endpoint:< / label >
< div class = "col-md-9" >
2016-06-13 12:12:46 +02:00
< input type = "text" class = "form-control form-control-custom" id = "endpoint" ng-model = "replication.destination.endpoint" name = "uEndpoint" required >
2016-06-07 10:49:38 +02:00
< div ng-messages = "form.$submitted && form.uEndpoint.$error" >
< span ng-message = "required" > Endpoint is required.< / span >
< / div >
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< label for = "username" class = "col-md-3 control-label" > Username:< / label >
< div class = "col-md-9" >
2016-06-13 12:12:46 +02:00
< input type = "text" class = "form-control" id = "username" ng-model = "replication.destination.username" name = "uUsername" required >
2016-06-07 10:49:38 +02:00
< div ng-messages = "form.$submitted && form.uUsername.$error" >
< span ng-message = "required" > Username is required.< / span >
< / div >
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< label for = "password" class = "col-md-3 control-label" > Password:< / label >
< div class = "col-md-9" >
2016-06-13 12:12:46 +02:00
< input type = "password" class = "form-control" id = "password" ng-model = "replication.destination.password" name = "uPassword" required >
2016-06-07 10:49:38 +02:00
< div ng-messages = "form.$submitted && form.uPassword.$error" >
< span ng-message = "required" > Password is required.< / span >
< / div >
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< div class = "col-md-3" > < / div >
< div class = "col-md-9" >
2016-06-13 12:12:46 +02:00
< button type = "button" class = "btn btn-default" ng-click = "vm.pingDestination()" > Test Connection< / button >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< / div >
< / div >
< div class = "modal-footer" >
2016-06-11 15:16:01 +02:00
< button type = "submit" class = "btn btn-primary" id = "btnOk" ng-click = "form.$valid && vm.save(replication)" > // 'ok' | tr //< / button >
2016-06-07 10:49:38 +02:00
< button type = "button" class = "btn btn-default" data-dismiss = "modal" > // 'close' | tr //< / button >
< / div >
< / form >
< / div > <!-- /.modal - content -->
< / div > <!-- /.modal - dialog -->
< / div > <!-- /.modal -->