summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-15 00:02:52 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-29 12:33:03 -0500
commitd2ae7364bb969afbaa86fed28c8c756c0a19ab02 (patch)
treef392267da47282aefb5d06faa91f9e556be7de4a /ext/bg/js/settings/main.js
parent3033fea31e4bc9ba7198d2d31d6f6046813926d1 (diff)
Update anki-templates.js to control the value of fieldTemplates
Also assigns a value of null when using the default value
Diffstat (limited to 'ext/bg/js/settings/main.js')
-rw-r--r--ext/bg/js/settings/main.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js
index c0b2deb6..3c7d6fce 100644
--- a/ext/bg/js/settings/main.js
+++ b/ext/bg/js/settings/main.js
@@ -80,7 +80,6 @@ async function formRead(options) {
options.anki.server = $('#interface-server').val();
options.anki.screenshot.format = $('#screenshot-format').val();
options.anki.screenshot.quality = parseInt($('#screenshot-quality').val(), 10);
- options.anki.fieldTemplates = $('#field-templates').val();
if (optionsAnkiEnableOld && !ankiErrorShown()) {
options.anki.terms.deck = $('#anki-terms-deck').val();
@@ -146,12 +145,7 @@ async function formWrite(options) {
$('#screenshot-format').val(options.anki.screenshot.format);
$('#screenshot-quality').val(options.anki.screenshot.quality);
- let templates = options.anki.fieldTemplates;
- if (typeof templates !== 'string') { templates = profileOptionsGetDefaultFieldTemplates(); }
-
- $('#field-templates').val(templates);
-
- onAnkiTemplatesValidateCompile();
+ await ankiTemplatesUpdateValue();
await onAnkiOptionsChanged(options);
await onDictionaryOptionsChanged(options);