mirror of
https://github.com/seigler/govobject-proposal
synced 2025-07-27 06:46:10 +00:00
refactor setFormEditable
This commit is contained in:
parent
6f6301da48
commit
9f2deea047
1 changed files with 7 additions and 13 deletions
20
index.html
20
index.html
|
@ -177,22 +177,16 @@
|
|||
};
|
||||
|
||||
ProposalGenerator.prototype.resetProposal = function() {
|
||||
$('#name').val('');
|
||||
$('#url').val('');
|
||||
$('#start_epoch').val('');
|
||||
$('#end_epoch').val('');
|
||||
$('#payment_address').val('');
|
||||
$('#payment_amount').val('');
|
||||
$('.createProposal input').each(function() {
|
||||
$(this).val('');
|
||||
});
|
||||
setFormEditable(true);
|
||||
}
|
||||
};
|
||||
|
||||
function setFormEditable(edit) {
|
||||
$('#name').attr("disabled", edit);
|
||||
$('#url').attr("disabled", edit);
|
||||
$('#start_epoch').attr("disabled", edit);
|
||||
$('#end_epoch').attr("disabled", edit);
|
||||
$('#payment_address').attr("disabled", edit);
|
||||
$('#payment_amount').attr("disabled", edit);
|
||||
$('.createProposal input').each(function() {
|
||||
$(this).attr("disabled", edit);
|
||||
});
|
||||
|
||||
if (edit === true) {
|
||||
$('#btnPrepare').addClass('hidden');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue