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() {
|
ProposalGenerator.prototype.resetProposal = function() {
|
||||||
$('#name').val('');
|
$('.createProposal input').each(function() {
|
||||||
$('#url').val('');
|
$(this).val('');
|
||||||
$('#start_epoch').val('');
|
});
|
||||||
$('#end_epoch').val('');
|
|
||||||
$('#payment_address').val('');
|
|
||||||
$('#payment_amount').val('');
|
|
||||||
setFormEditable(true);
|
setFormEditable(true);
|
||||||
}
|
};
|
||||||
|
|
||||||
function setFormEditable(edit) {
|
function setFormEditable(edit) {
|
||||||
$('#name').attr("disabled", edit);
|
$('.createProposal input').each(function() {
|
||||||
$('#url').attr("disabled", edit);
|
$(this).attr("disabled", edit);
|
||||||
$('#start_epoch').attr("disabled", edit);
|
});
|
||||||
$('#end_epoch').attr("disabled", edit);
|
|
||||||
$('#payment_address').attr("disabled", edit);
|
|
||||||
$('#payment_amount').attr("disabled", edit);
|
|
||||||
|
|
||||||
if (edit === true) {
|
if (edit === true) {
|
||||||
$('#btnPrepare').addClass('hidden');
|
$('#btnPrepare').addClass('hidden');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue