confirmation added to form if no tags selected

This commit is contained in:
Harry Bomrah 2016-09-06 17:47:52 +08:00
parent edb7f2915c
commit e4766f3ac3
1 changed files with 11 additions and 1 deletions

View File

@ -328,7 +328,17 @@
</div>
</div>
</span>
<% if !@module_app.tags.empty? %>
<script type="text/javascript">
$("form.previewable").on("submit", function(){
if(!$("input[name='bulletin[tags][]']").is(":checked")){
if(!confirm("You have selected no tag, do you wish to continue?")){
return false;
}
}
})
</script>
<% end %>
<% content_for :page_specific_javascript do %>
<script>
function Appendzero(obj)