File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,17 +10,23 @@ KB.on('dom.ready', function () {
10
10
function ToggleActiveCheckbox ( e ) {
11
11
const urlParams = new URLSearchParams ( window . location . search ) ;
12
12
13
+ var task_id = null ;
14
+ var taskIdElem = document . getElementById ( 'form-task_id' ) ;
15
+ if ( taskIdElem != null ) {
16
+ task_id = taskIdElem . value ;
17
+ }
18
+
13
19
if ( URLRewrite ) {
14
20
const link = '/MarkdownPlus/Checkbox' ;
15
21
KB . http . postJson ( link , {
16
- 'task_id' : urlParams . get ( ' task_id' ) ,
22
+ 'task_id' : task_id ,
17
23
'number' : e . target . getAttribute ( 'number' )
18
24
} ) ;
19
25
}
20
26
else {
21
27
const link = '?controller=CheckboxController&action=toggle&plugin=MarkdownPlus' ;
22
28
KB . http . postJson ( link , {
23
- 'task_id' : urlParams . get ( ' task_id' ) ,
29
+ 'task_id' : task_id ,
24
30
'number' : e . target . getAttribute ( 'number' )
25
31
} ) ;
26
32
}
You can’t perform that action at this time.
0 commit comments