Commit ad0e2281 authored by Roberto P. Rubio's avatar Roberto P. Rubio
Browse files

VM_Copy: Owner is set to current user by default, volatile is set to true if base is volatile

parent 3500fff8
......@@ -212,6 +212,7 @@
var data = JSON.parse(;
$scope.$apply(function () {
$scope.showmachine = data;
$scope.copy_is_volatile = $scope.showmachine.is_volatile;
if (!subscribed_extra) {
subscribed_extra = true;
......@@ -739,6 +740,7 @@
for (var i = 0; i <; i++) {
if ([i].id == $scope.showmachine.id_owner) {
$scope.copy_owner =[i].id;
$scope.new_owner =[i];
......@@ -39,28 +39,24 @@
<label class="control-label" for="copy_is_volatile"><%=l 'Volatile' %></label>
<div class="row">
<div class="row" ng-show="showmachine.is_pool">
<div class="col-md-12 mt-12">
<input type="checkbox" name="copy_is_pool" ng-model="copy_is_pool" ng-disabled="showmachine.is_pool != 1">
<input type="checkbox" name="copy_is_pool" ng-model="copy_is_pool">
<label class="control-label" for="copy_is_pool"><%=l 'Pool' %></label>
% if ($USER->is_admin){
<div class="form-group row">
<div class="col-md-2 mt-2">
<label class="control-label" for="copy_owner"><%=l 'Owner' %></label>{{copy_owner_id}}
<label class="control-label" for="copy_owner"><%=l 'Owner' %></label>
<div class="col-md-4">
<select class="form-control" ng-model="copy_owner" name="copy_owner">
<option ng-repeat="user in list_users" value="{{}}">{{}}</option>
<option ng-repeat="user in list_users" ng-value="" ng-selected=" == copy_owner">{{}}</option>
% }
<div ng-show="copy_request" class="alert alert-warning">
Copy {{}} {{copy_request.status}}.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment