Commit 53edd6ca by tarokkk

webui: Fixed template add buttons

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