hackfix streamer nested form

pull/3969/head
Thibault Duplessis 2018-01-06 17:01:25 -05:00
parent f50660cd3b
commit 0bccd0a2a4
1 changed files with 9 additions and 0 deletions

View File

@ -3,4 +3,13 @@ $(function() {
$('.picture_wrap').html(lichess.spinnerHtml);
$(this).parents('form').submit();
});
// hackfix nested forms
var $form = $('form.material');
var $status = $form.find('div.status');
if ($status.find('button').length) {
$form.siblings().not('.top').appendTo($('form.material'));
}
$form.before($status.html(
$('<form method="post" action="/streamer/approval/request">').html($status.html())
));
});