misc: update csrf token when adding a block row (#88795)
gitea/wcs/pipeline/head Build queued...
Details
gitea/wcs/pipeline/head Build queued...
Details
This commit is contained in:
parent
723945d2d2
commit
0973014218
|
@ -851,6 +851,8 @@ $(function() {
|
|||
data: form_data,
|
||||
headers: {'x-wcs-ajax-action': 'block-add-row'},
|
||||
success: function(result, text_status, jqXHR) {
|
||||
var new_form_token = $(result).find('input[name="_form_id"]').val()
|
||||
$('input[name="_form_id"]').val(new_form_token)
|
||||
const $new_block = $(result).find('[data-field-id="' + block_id + '"]');
|
||||
$block.replaceWith($new_block);
|
||||
const $new_blockrow = $new_block.find('.BlockSubWidget').last();
|
||||
|
|
Loading…
Reference in New Issue