Files
grecia/app/assets/javascripts/admin/poll/shifts/form.js
Javi Martín ee34ead4ee Move poll shifts form partial to a component
Thanks to it, we can move a few helper methods to the component.
2024-11-12 15:17:16 +01:00

21 lines
636 B
JavaScript

(function() {
"use strict";
App.AdminPollShiftsForm = {
initialize: function() {
$("select[class='js-poll-shifts']").on({
change: function() {
switch ($(this).val()) {
case "vote_collection":
$("select[class='js-shift-vote-collection-dates']").show();
$("select[class='js-shift-recount-scrutiny-dates']").hide();
break;
case "recount_scrutiny":
$("select[class='js-shift-recount-scrutiny-dates']").show();
$("select[class='js-shift-vote-collection-dates']").hide();
}
}
});
}
};
}).call(this);