Skip to content

Commit

Permalink
wip author message fix for non-preview vieweer
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasnteireho committed Mar 26, 2024
1 parent 3f11bb2 commit d918407
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/mobile/pages/pages-vm.js
Expand Up @@ -368,6 +368,11 @@ export default DefineMap.extend('PagesVM', {
return // these buttons skip rest of navigate
}

if (button.next === constants.qMESSAGE){
vm.handleMessage(button,vm)
return
}

vm.handleCodeAfter(button, vm, page, logic) // afterLogic fired, but GOTO resolves later

vm.setRepeatVariable(button) // set counting variables if exist
Expand Down Expand Up @@ -568,6 +573,14 @@ export default DefineMap.extend('PagesVM', {
}
},

handleMessage(button, ev){
ev && ev.preventDefault()
this.appState.modalContent = {
title: 'Author note:',
text: button.message || 'You have completed this A2J Guided Interview. Please close your browser window to exit.'
}
},

handlePreviewResponses (button, ev) {
ev && ev.preventDefault()
switch (button.next) {
Expand Down Expand Up @@ -613,6 +626,7 @@ export default DefineMap.extend('PagesVM', {
break
}
},

/** Track special button clicks in Matomo analytics
* @param button button id
*/
Expand Down

0 comments on commit d918407

Please sign in to comment.