- if (this.mode == "problem")
- {
- // Show problem solution (on click)
- elementArray.push(
- h('div',
- {
- attrs: { id: "solution-div" },
- "class": { "section-content": true },
- },
- [
- h('h3',
- {
- "class": { clickable: true },
- domProps: { innerHTML: translations["Show solution"] },
- on: { click: this.toggleShowSolution },
- }
- ),
- h('p',
- {
- attrs: { id: "problem-solution" },
- domProps: { innerHTML: this.problem.solution }
- }
- )
- ]
- )
- );
- }
-
- <input type="checkbox" id="modal-newproblem" class="modal">
- <div role="dialog" aria-labelledby="newProblemTxt">
- <div v-show="stage=='nothing'" class="card newproblem-form">
- <label for="modal-newproblem" class="modal-close"></label>
- <h3 id="newProblemTxt">{{ translate("Add a problem") }}</h3>
- <form @submit.prevent="previewNewProblem">
+ <input type="checkbox" id="modal-newproblem" class="modal"/>
+ <div role="dialog" aria-labelledby="modalProblemTxt">
+ <div v-show="!modalProb.preview" class="card newproblem-form">
+ <label for="modal-newproblem" class="modal-close">
+ </label>
+ <h3 id="modalProblemTxt">
+ {{ translate("Add a problem") }}
+ </h3>
+ <form @submit.prevent="previewProblem()">