Commit a38a1f9c authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Force confirmation of untrusted image selection

ensure that user notes the untrusted image risks before he continues to
flavor selection.
parent a353b2cd
......@@ -6032,13 +6032,35 @@ table.list-machines .wave {
height: 250px;
}
.create-vm .image-warning p {
width: 80%;
float: left;
}
.create-vm .image-warning .untrusted-image-confirm:hover {
background-color: #7D674E;
}
.create-vm .image-warning .untrusted-image-confirm {
display: inline-block;
padding: 5px;
background-color: #5C4D39;
color: #FFF;
width: 10%;
float: right;
margin-top: 4px;
margin-right: 2px;
cursor: pointer;
text-align: center;
}
.create-vm .image-warning {
display: none;
background-color: #987249;
color: #fff;
padding: 10px 15px;
font-size: 0.9em;
border-bottom: 1px solid #AAA;
border-top: 1px solid #AAA;
}
.create-vm .create-step-cont .rename input.rename-field {
......
......@@ -212,6 +212,11 @@
} else {
}
})
$(".image-warning .confirm").bind('click', function(){
$(".image-warning").hide();
$(".create-controls").show();
})
},
update_images: function(images) {
......@@ -318,8 +323,10 @@
display_warning_for_image: function(image) {
if (image && !image.is_system_image() && !image.owned_by(synnefo.user)) {
$(".create-vm .image-warning").show();
$(".create-controls").hide();
} else {
$(".create-vm .image-warning").hide();
$(".create-controls").show();
}
},
......
......@@ -78,13 +78,6 @@
</div>
</div>
</div>
<div class="image-warning">
<p>
{% blocktrans %}You have selected a user-provided Image, which is not
officially endorsed by ~okeanos. Please make sure it is from a
trustworthy source.{% endblocktrans %}
</p>
</div>
<div class="steps-container clearfix">
<div class="step-1 select-image wide create-step-cont clearfix">
<div class="clearfix step-header">
......@@ -324,6 +317,14 @@
</div>
</div>
<div class="image-warning clearfix">
<p>
{% blocktrans %}You have selected a user-provided Image, which is not
officially endorsed by ~okeanos. Please make sure it is from a
trustworthy source.{% endblocktrans %}
</p>
<span class="untrusted-image-confirm confirm">confirm</span>
</div>
<div class="create-controls clearfix">
<div class="form-action cancel">{% trans "cancel" %}</div>
<div class="form-action next">{% trans "next" %}</div>
......
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 to comment