test
This commit is contained in:
parent
c7401eae9f
commit
3b5d1e033a
3 changed files with 9 additions and 5 deletions
|
@ -13,11 +13,15 @@ mainApp.controller('editImageCtrl', ['$scope', 'Image', 'Loading', 'Identity', '
|
|||
$scope.data = {};
|
||||
$scope.data.visibility = "public";
|
||||
$scope.data.protected = false;
|
||||
|
||||
|
||||
$scope.applyEdition = function (image) {
|
||||
image.visibility = $scope.data.visibility;
|
||||
image.protected = $scope.data.protected;
|
||||
Image.updateImage(image, function(){});
|
||||
|
||||
};
|
||||
|
||||
$scope.getToken=function(){
|
||||
return Identity.getToken();
|
||||
}
|
||||
}]);
|
||||
|
|
|
@ -70,7 +70,7 @@ mainApp.factory('Image', ['$http', 'Identity', function ($http, Identity) {
|
|||
result.then(function (response) {
|
||||
callback();
|
||||
}, function (response) {
|
||||
alert(response)
|
||||
alert(response);
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
</form>
|
||||
<form action="../server/index.php" method="post">
|
||||
<input type="hidden" name="task" value="image" />
|
||||
<input type="hidden" name="token" value="{{ token}}" />
|
||||
<input type="hidden" name="token" value="{{ getToken() }}" />
|
||||
<input type="hidden" name="action" value="uploadImage" />
|
||||
<input type="hidden" name="id" value="60ed9403-419e-4ea8-933f-dd1750d97360" />
|
||||
<input type="hidden" name="file_name" value="bob.iso" />
|
||||
<input type="hidden" name="id" value="{{ image.id }}" />
|
||||
<input type="hidden" name="file_name" value="cirros-0.3.4-x86_64-disk.img" />
|
||||
<fieldset class="form-group">
|
||||
<label class="control-label col-sm-2">Upload</label>
|
||||
<input name="file" type="file" />
|
||||
|
|
Loading…
Add table
Reference in a new issue