use data-board value for form submission for board so that quick posting / replies works from ukko, ukko2, ukko3 and other overboad extensions / themes

This commit is contained in:
Benjamin Southall 2017-05-04 13:58:38 +09:00
parent 83989bba88
commit 7764bb50aa

View File

@ -40,9 +40,10 @@ $(document).ready(function(){
'</div>' + '</div>' +
'</form>'); '</form>');
if($('form[name="post"]:first').size()){ if($('form[name="post"]:first').size()){
var board=$(this).parent().parent().parent().attr("data-board");
post_form post_form
.attr('action', $('form[name="post"]:first').attr('action')) .attr('action', $('form[name="post"]:first').attr('action'))
.append($('input[name=board]:first').clone()); .append('<input type="hidden" value="'+board+'" name="board" />');
}else{ }else{
var board=$(this).parent().parent().parent().attr("data-board"); var board=$(this).parent().parent().parent().attr("data-board");
if(board){ if(board){