Fix update announcement setting bug.
This commit is contained in:
parent
2241862475
commit
f531708a5f
|
@ -110,18 +110,20 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
var approverList = $(".hidden-approver-list");
|
$(document).ready(function(){
|
||||||
$(".approver-check input").on("click",function(){
|
var approverList = $(".hidden-approver-list");
|
||||||
var el = $(this);
|
$(".approver-check input").on("click",function(){
|
||||||
if(el.is(":checked")){
|
var el = $(this);
|
||||||
var t = $("<input type='hidden'>");
|
if(el.is(":checked")){
|
||||||
t.val(el.val());
|
var t = $("<input type='hidden'>");
|
||||||
t.attr("name", "announcement_setting[approvers][]");
|
t.val(el.val());
|
||||||
t.attr("id", "check_" + el.val());
|
t.attr("name", "announcement_setting[approvers][]");
|
||||||
approverList.append(t);
|
t.attr("id", "check_" + el.val());
|
||||||
}else{
|
approverList.append(t);
|
||||||
approverList.find("#check_" + el.val()).remove();
|
}else{
|
||||||
}
|
approverList.find("#check_" + el.val()).remove();
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<div id="notification"><%= t("announcement.click_on_submit") %></div>
|
<div id="notification"><%= t("announcement.click_on_submit") %></div>
|
||||||
|
|
Loading…
Reference in New Issue