Commit 53edd6ca by tarokkk

webui: Fixed template add buttons

parent 3a59e5f6
......@@ -181,7 +181,7 @@ input {
}
}
input[type=submit], input[type=button]{
input[type=submit], input[type=button], input[type=reset]{
border: 1px solid #777;
cursor: pointer;
box-shadow: 0 0 5px rgba(0,0,0,0.2);
......
......@@ -5,7 +5,7 @@
<ul class="wm-list">
{% for t in mytemplates %}
<li class="wm" id="t{{t.id }}">
<div class="summary">
<div class="summary {% if t.state == 'NEW' or t.state == 'SAVING'%}unfinished{% endif %}">
<div class="name">{{t.name}}</div>
<div class="status">{{t.state}}</div>
<div class="actions">
......
......@@ -26,7 +26,7 @@
</ul>
</div>
<nav>
<a href="#" class="prev">{% trans "&laquo; Cancel" %}</a>
<input type="reset" class="prev" value="{% trans "Cancel" %}" />
<input type="submit" class="next" value="{% trans "Next &raquo;" %}" />
<div class="clear"></div>
</nav>
......
......@@ -47,8 +47,9 @@
</li>
</ul>
<nav>
<a href="#" class="prev">{% trans "&laquo; Cancel" %}</a>
<input type="submit" value="{% trans "Launch" %}" />
<!-- <a href="#" class="prev">{% trans "&laquo; Cancel" %}</a> -->
<input type="reset" class="prev" value="{% trans "Cancel" %}" />
<input type="submit" class="next" value="{% trans "Launch master instance" %}" />
<div class="clear"></div>
</nav>
<script type="text/javascript">
......@@ -61,6 +62,7 @@
$("p.size-summary").hide();
$("#new-template-size-summary-" + v).show();
});
$('#new-template-step-2 nav .next').attr("disabled", "disabled");
$("#new-template-name").change(function(e){
var s = $(this).val();
$.ajax({
......@@ -72,9 +74,11 @@
}
if (data == "True") {
$('#new-template-name').removeClass("error");
$('#new-template-step-2 nav .next').removeAttr("disabled");
}
else {
$('#new-template-name').addClass("error");
$('#new-template-step-2 nav .next').attr("disabled", "disabled");
}
}
});
......
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