Commit 5aee89e2 by Őry Máté

Merge branch 'issue-259' into 'master'

Issue #259
parents 4097a8a3 53da6b24
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
{% csrf_token %} {% csrf_token %}
{{ vm_create_form.template }} {{ vm_create_form.template }}
{{ vm_create_form.customized }}
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
...@@ -23,6 +22,8 @@ ...@@ -23,6 +22,8 @@
</div> </div>
</div> </div>
{% if perms.vm.set_resources %}
{{ vm_create_form.customized }}
<div class="row"> <div class="row">
<div class="col-sm-10"> <div class="col-sm-10">
<div class="form-group"> <div class="form-group">
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
</div><!-- .no-js-hidden --> </div><!-- .no-js-hidden -->
</div><!-- .col-sm-8 --> </div><!-- .col-sm-8 -->
</div><!-- .row --> </div><!-- .row -->
{% endif %}
</form> </form>
<script> <script>
......
...@@ -1912,8 +1912,10 @@ class VmCreate(LoginRequiredMixin, TemplateView): ...@@ -1912,8 +1912,10 @@ class VmCreate(LoginRequiredMixin, TemplateView):
if not template.has_level(request.user, 'user'): if not template.has_level(request.user, 'user'):
raise PermissionDenied() raise PermissionDenied()
instances = [Instance.create_from_template( args = {"template": template, "owner": user}
template=template, owner=user)] if "name" in request.POST:
args["name"] = request.POST.get("name")
instances = [Instance.create_from_template(**args)]
return self.__deploy(request, instances) return self.__deploy(request, instances)
def __create_customized(self, request, *args, **kwargs): def __create_customized(self, request, *args, **kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment