File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
frontend/javascript/modules Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ export default class ConditionalForm {
15
15
16
16
_submitForm ( e ) {
17
17
e . preventDefault ( ) ;
18
+ let uid = this . form . uid . value ;
18
19
let payload = {
19
- uid : this . form . uid . value ,
20
+ uid : uid ,
20
21
description : this . form . querySelector ( 'input[name=description]' ) . value ,
21
22
dueDate : this . form . querySelector ( 'input[name=due_date]' ) . value
22
23
} ;
@@ -26,6 +27,12 @@ export default class ConditionalForm {
26
27
} , ( ) => {
27
28
$ ( this . form . closest ( '.modal' ) ) . modal ( 'hide' ) ;
28
29
if ( location . pathname . split ( '/' ) [ 1 ] === "slideshow" ) {
30
+ $ ( '#createConditional' ) . on ( 'hidden.bs.modal' , function ( ) {
31
+ var condBtn = $ ( 'div[data-uid="' + uid + '"] button' )
32
+ . first ( ) ;
33
+ $ ( condBtn ) . text ( "Conditionaled" ) . off ( "click" ) . addClass ( "disabled" ) ;
34
+ $ ( condBtn ) . next ( ) . hide ( ) ;
35
+ } ) ;
29
36
reveal . right ( ) ;
30
37
} else {
31
38
location . reload ( ) ;
Original file line number Diff line number Diff line change @@ -42,10 +42,6 @@ export default class Presentation {
42
42
$ ( '#createConditional' ) . modal ( ) ;
43
43
$ ( '#createConditional input[type="text"]' ) . val ( '' ) ;
44
44
$ ( '#createConditional input[name="uid"]' ) . val ( uid ) ;
45
- $ ( '#createConditional' ) . on ( 'hidden.bs.modal' , function ( ) {
46
- $ ( e . target ) . text ( "Conditionaled" ) . off ( "click" ) . addClass ( "disabled" ) ;
47
- $ ( e . target ) . next ( ) . hide ( ) ;
48
- } ) ;
49
45
} ) ;
50
46
$ ( e . target ) . click ( e => {
51
47
e . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments