Lines 152-159
require( [ 'koha-backend', 'widget', 'text-marc' ], function( KohaBackend, Widge
Link Here
|
152 |
$( this.node ) |
152 |
$( this.node ) |
153 |
.find('.control-number-widget-assign').click( function() { |
153 |
.find('.control-number-widget-assign').click( function() { |
154 |
var sequence = $( widget.node ).find('.control-number-widget-sequence').val(); |
154 |
var sequence = $( widget.node ).find('.control-number-widget-sequence').val(); |
|
|
155 |
const token = $("input[name='csrf_token']").first().val(); |
155 |
$.post( |
156 |
$.post( |
156 |
'/cgi-bin/koha/svc/cataloguing/control_num_sequences/' + sequence |
157 |
'/cgi-bin/koha/svc/cataloguing/control_num_sequences/' + sequence + '?csrf_token=' + token |
157 |
).done( function( result ) { |
158 |
).done( function( result ) { |
158 |
if ( result.next_value ) widget.setControlNumber( result.next_value ); |
159 |
if ( result.next_value ) widget.setControlNumber( result.next_value ); |
159 |
} ); |
160 |
} ); |
160 |
- |
|
|