Content deleted Content added
force reload() |
make response wikitext computed in vue app in preparation for adding a preview |
||
Line 177:
canSubmit: function () {
return !this.haveSubmitted && this.selectedResponse !== 'none';
},▼
responseWikiText: function () {
// Computed here so that we can use it for the api preview,
// does not include the leading newline
}
responseText += ' --~~~~';
return responseText;
}
},
Line 196 ⟶ 206:
this.reporterName,
this.sectionNum,
this.
▲ this.commentValue
).then(
// arrow functions to simplify `this`
Line 252 ⟶ 261:
reporterName,
sectionNum,
responseWikiText
) {
return new Promise( function ( resolve, reject ) {
// wikitext is computed in Vue app so that it can have a preview too,
▲ let responseText = '\n: {{EFFP|' + responseOption + '}}';
// we just need to add the leading newline
▲ }
▲ responseText += ' --~~~~';
const editParams = {
action: 'edit',
Line 269 ⟶ 275:
baserevid: mw.config.get( 'wgCurRevisionId' ),
nocreate: true,
appendtext:
assert: 'user',
assertuser: mw.config.get( 'wgUserName' )
|