2016-06-28 17:42:05 +02:00
< div class = "modal fade" data-backdrop = "static" id = "createPolicyModal" tabindex = "-1" role = "dialog" >
2016-06-07 10:49:38 +02:00
< div class = "modal-dialog" >
2016-06-14 12:47:32 +02:00
< form name = "form" class = "form-horizontal css-form" novalidate >
2016-07-02 18:22:45 +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 >
< h4 class = "modal-title" > < span class = "glyphicon glyphicon-plus" > < / span > //vm.modalTitle//< / h4 >
< / div >
< div class = "modal-body" >
< div class = "create-policy" >
< div class = "col-md-12" ng-show = "vm.toggleErrorMessage" >
< div class = "pull-right clearfix" style = "padding: 5px 10px;" > < a href = "javascript:void(0);" ng-click = "vm.closeError()" > < span class = "glyphicon glyphicon-remove" > < / span > < / a > < / div >
< div class = "bg-danger dialog-message" >
2016-07-06 19:12:20 +02:00
< ul class = "list-unstyled" style = "color: red; margin: 0;" ng-repeat = "msg in vm.errorMessages track by $index" >
2016-07-02 18:22:45 +02:00
< li > // msg //< / li >
< / ul >
< / div >
< / div >
2016-06-07 10:49:38 +02:00
< div class = "col-md-12" >
2016-06-20 13:15:45 +02:00
< h4 > // 'general_setting' | tr //< / h4 >
2016-06-07 10:49:38 +02:00
< hr class = "hr-line" / >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
2016-06-20 13:15:45 +02:00
< label for = "name" class = "col-md-3 control-label" > // 'name' | tr //:< / label >
2016-06-07 10:49:38 +02:00
< div class = "col-md-9" >
2016-06-28 01:58:38 +02:00
< input type = "text" class = "form-control form-control-custom" id = "name" ng-model = "replication.policy.name" name = "uName" required maxlength = "20" ng-disabled = "!vm.targetEditable" >
2016-06-07 10:49:38 +02:00
< div ng-messages = "form.$submitted && form.uName.$error" >
2016-06-20 13:15:45 +02:00
< span ng-message = "required" > // 'name_is_required' | tr //< / span >
< span ng-message = "maxlength" > // 'name_is_too_long' | tr //< / span >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
2016-06-20 13:15:45 +02:00
< label for = "description" class = "col-md-3 control-label" > // 'description' | tr //:< / label >
2016-06-07 10:49:38 +02:00
< div class = "col-md-9" >
2016-06-28 01:58:38 +02:00
< textarea class = "form-control form-control-custom" id = "description" ng-model = "replication.policy.description" name = "uDescription" ng-disabled = "!vm.targetEditable" > < / textarea >
2016-06-07 10:49:38 +02:00
< div ng-messages = "form.$submitted && form.uDescription.$error" >
2016-06-20 13:15:45 +02:00
< span ng-message = "maxlength" > // 'description_is_too_long' | tr //< / span >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
2016-06-20 13:15:45 +02:00
< label for = "enable" class = "col-md-3 control-label" > // 'enable' | tr //:< / label >
2016-06-07 10:49:38 +02:00
< div class = "col-md-9" >
2016-06-28 01:58:38 +02:00
< input type = "checkbox" class = "form-control" style = "margin-top: 10px; height: auto;" ng-model = "replication.policy.enabled" ng-disabled = "!vm.targetEditable" >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< div class = "col-md-12" >
2016-06-24 12:44:54 +02:00
< div class = "row" >
< div class = "col-md-8" style = "padding-left: 0;" >
< h4 class = "h4-custom" > // 'destination_setting' | tr //< / h4 >
< / div >
< / div >
2016-06-30 09:57:00 +02:00
< hr class = "hr-line" / >
2016-06-07 10:49:38 +02:00
< / div >
< div class = "form-group col-md-12 form-group-custom" >
2016-06-20 13:15:45 +02:00
< label for = "destinationName" class = "col-md-3 control-label" > // 'name' | tr //:< / label >
2016-06-28 01:58:38 +02:00
< div class = "col-md-7" >
< input type = "text" ng-if = "vm.checkedAddTarget" class = "form-control form-control-custom" style = "width: 50% !important;" ng-model = "replication.destination.name" >
< select ng-if = "!vm.checkedAddTarget" class = "form-control form-control-custom" ng-model = "replication.destination.selection" ng-options = "d as d.name for d in vm.destinations track by d.id" ng-change = "vm.selectDestination(replication.destination.selection)" style = "width: 50% !important;" ng-disabled = "!vm.targetEditable" > < / select >
2016-07-03 07:36:44 +02:00
< div class = "display-inline-block" ng-show = "vm.targetEditable" > < input type = "checkbox" ng-model = "vm.checkedAddTarget" ng-checked = "vm.checkedAddTarget" > // 'add_new_destination' | tr //< / div >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
2016-06-20 13:15:45 +02:00
< label for = "endpoint" class = "col-md-3 control-label" > // 'endpoint' | tr //:< / label >
2016-06-07 10:49:38 +02:00
< div class = "col-md-9" >
2016-07-06 14:22:45 +02:00
< input type = "text" class = "form-control form-control-custom" id = "endpoint" ng-model = "replication.destination.endpoint" name = "uEndpoint" ng-value = "vm.endpoint" placeholder = "http://ip_address" required ng-disabled = "!vm.targetEditable || !vm.checkedAddTarget" >
2016-06-07 10:49:38 +02:00
< div ng-messages = "form.$submitted && form.uEndpoint.$error" >
2016-06-20 13:15:45 +02:00
< span ng-message = "required" > // 'endpoint_is_required' | tr //< / span >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
2016-06-20 13:15:45 +02:00
< label for = "username" class = "col-md-3 control-label" > // 'username' | tr //:< / label >
2016-06-07 10:49:38 +02:00
< div class = "col-md-9" >
2016-06-28 17:42:05 +02:00
< input type = "text" class = "form-control" id = "username" ng-model = "replication.destination.username" name = "uUsername" ng-value = "vm.username" ng-disabled = "!vm.targetEditable || !vm.checkedAddTarget" >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
2016-06-20 13:15:45 +02:00
< label for = "password" class = "col-md-3 control-label" > // 'password' | tr //:< / label >
2016-06-07 10:49:38 +02:00
< div class = "col-md-9" >
2016-06-28 17:42:05 +02:00
< input type = "password" class = "form-control" id = "password" ng-model = "replication.destination.password" name = "uPassword" ng-value = "vm.password" ng-disabled = "!vm.targetEditable || !vm.checkedAddTarget" >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< div class = "col-md-3" > < / div >
< div class = "col-md-9" >
2016-07-03 06:10:42 +02:00
< button type = "button" class = "btn btn-default" ng-disabled = "vm.notAvailable || !vm.pingAvailable" ng-click = "vm.pingDestination()" loading-progress hide-target = "false" toggle-in-progress = "vm.pingTIP" > // 'test_connection' | tr //< / button >
2016-06-28 17:42:05 +02:00
< / div >
< / div >
< div class = "form-group col-md-12 form-group-custom" >
< div class = "col-md-3" > < / div >
< div class = "col-md-9" >
< span > // vm.pingMessage //< / span >
2016-06-07 10:49:38 +02:00
< / div >
< / div >
2016-07-02 18:22:45 +02:00
< / div >
< / div >
< div class = "modal-footer" >
2016-07-03 06:10:42 +02:00
< button ng-show = "vm.targetEditable" type = "submit" class = "btn btn-primary" ng-click = "form.$valid && vm.save(replication)" loading-progress hide-target = "false" toggle-in-progress = "vm.saveTIP" > // 'ok' | tr //< / button >
2016-07-02 18:22:45 +02:00
< button type = "button" class = "btn btn-default" data-dismiss = "modal" > // 'close' | tr //< / button >
2016-06-07 10:49:38 +02:00
< / div >
2016-07-02 18:22:45 +02:00
< / form >
2016-06-07 10:49:38 +02:00
< / div > <!-- /.modal - content -->
< / div > <!-- /.modal - dialog -->
2016-06-23 09:14:10 +02:00
< / div > <!-- /.modal -->