Save button will be disabled until page is loaded, prevents issues with user presses save before the page is fully loaded (and AJAX is used to save).

pull/4/head
markus101 14 years ago
parent ff44d05a72
commit 9a7eb8d552

@ -224,13 +224,13 @@ input[type="text"]:hover
background: #C0D6FF; background: #C0D6FF;
} }
.button #save_button
{ {
border: 1px solid #006; border: 1px solid #006;
background: #ccf; background: #ccf;
} }
.button:hover #save_button:hover
{ {
border: 1px solid #f00; border: 1px solid #f00;
background: #eef; background: #eef;

@ -10,6 +10,7 @@
resetForm: false resetForm: false
}; };
$('#form').ajaxForm(options); $('#form').ajaxForm(options);
$('#save_button').attr('disabled', '');
}); });
function showRequest(formData, jqForm, options) { function showRequest(formData, jqForm, options) {
@ -131,7 +132,7 @@
</div> </div>
</fieldset> </fieldset>
<input type="submit" value="Save" class="submitButton"/> <input type="submit" id="save_button" value="Save" disabled="disabled" />
<% } %> <% } %>
</fieldset> </fieldset>

@ -10,6 +10,7 @@
resetForm: false resetForm: false
}; };
$('#form').ajaxForm(options); $('#form').ajaxForm(options);
$('#save_button').attr('disabled', '');
}); });
function showRequest(formData, jqForm, options) { function showRequest(formData, jqForm, options) {
@ -38,7 +39,7 @@
</div> </div>
<p> <p>
<input type="submit" value="Save" /> <input type="submit" id="save_button" value="Save" disabled="disabled" />
</p> </p>
</fieldset> </fieldset>
<% } Html.EndForm();%> <% } Html.EndForm();%>

@ -11,6 +11,7 @@
resetForm: false resetForm: false
}; };
$('#form').ajaxForm(options); $('#form').ajaxForm(options);
$('#save_button').attr('disabled', '');
}); });
function saveOrder(jqForm, options) { function saveOrder(jqForm, options) {
@ -131,7 +132,7 @@
<%= Html.ValidationMessageFor(m => m.NzbsrusHash)%> <%= Html.ValidationMessageFor(m => m.NzbsrusHash)%>
</div> </div>
<br /> <br />
<input type="submit" value="Save" /> <input type="submit" id="save_button" value="Save" disabled="disabled" />
</fieldset> </fieldset>
<% } %> <% } %>

@ -12,6 +12,7 @@
resetForm: false resetForm: false
}; };
$('#form').ajaxForm(options); $('#form').ajaxForm(options);
$('#save_button').attr('disabled', '');
}); });
function showRequest(formData, jqForm, options) { function showRequest(formData, jqForm, options) {
@ -61,7 +62,7 @@
</div> </div>
<div style="margin-top: 10px; padding-left: 5px;"> <div style="margin-top: 10px; padding-left: 5px;">
<input type="submit" class="button" value="Save" /> <input type="submit" id="save_button" value="Save" disabled="disabled" />
</div> </div>
</div> </div>

Loading…
Cancel
Save