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 {
1515
1616 _submitForm ( e ) {
1717 e . preventDefault ( ) ;
18+ let uid = this . form . uid . value ;
1819 let payload = {
19- uid : this . form . uid . value ,
20+ uid : uid ,
2021 description : this . form . querySelector ( 'input[name=description]' ) . value ,
2122 dueDate : this . form . querySelector ( 'input[name=due_date]' ) . value
2223 } ;
@@ -26,6 +27,12 @@ export default class ConditionalForm {
2627 } , ( ) => {
2728 $ ( this . form . closest ( '.modal' ) ) . modal ( 'hide' ) ;
2829 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+ } ) ;
2936 reveal . right ( ) ;
3037 } else {
3138 location . reload ( ) ;
Original file line number Diff line number Diff line change @@ -42,10 +42,6 @@ export default class Presentation {
4242 $ ( '#createConditional' ) . modal ( ) ;
4343 $ ( '#createConditional input[type="text"]' ) . val ( '' ) ;
4444 $ ( '#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- } ) ;
4945 } ) ;
5046 $ ( e . target ) . click ( e => {
5147 e . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments