* feat: support iab and iesg statements. Import iab statements. (#5895) * feat: infrastructure for statements doctype * chore: basic test framework * feat: basic statement document view * feat: show replaced statements * chore: black * fix: state help for statements * fix: cleanout non-relevant email expansions * feat: import iab statements, provide group statements tab * fix: guard against running import twice * feat: build redirect csv for iab statements * fix: set document state on import * feat: show published date on main doc view * feat: handle pdf statements * feat: create new and update statements * chore: copyright block updates * chore: remove flakes * chore: black * feat: add edit/new buttons for the secretariat * fix: address PR #5895 review comments * fix: pin pydantic until inflect catches up (#5901) (#5902) * chore: re-un-pin pydantic
30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
$(document)
|
|
.ready(function () {
|
|
var form = $("form.upload-content");
|
|
// review submission selection
|
|
form.find("[name=statement_submission]")
|
|
.on("click change", function () {
|
|
var val = form.find("[name=statement_submission]:checked")
|
|
.val();
|
|
|
|
var shouldBeVisible = {
|
|
enter: ['[name="statement_content"]'],
|
|
upload: ['[name="statement_file"]'],
|
|
};
|
|
|
|
for (var v in shouldBeVisible) {
|
|
for (var i in shouldBeVisible[v]) {
|
|
var selector = shouldBeVisible[v][i];
|
|
var row = form.find(selector);
|
|
if (!row.is(".row"))
|
|
row = row.closest(".row");
|
|
if ($.inArray(selector, shouldBeVisible[val]) != -1)
|
|
row.show();
|
|
else
|
|
row.hide();
|
|
}
|
|
}
|
|
})
|
|
.trigger("change");
|
|
});
|