mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
remove notes field from cloze
This commit is contained in:
parent
1800f30776
commit
f9ed0d657c
2 changed files with 3 additions and 7 deletions
|
@ -33,19 +33,17 @@ def addClozeModel(col):
|
|||
m = mm.new(_("Cloze"))
|
||||
fm = mm.newField(("Text"))
|
||||
mm.addField(m, fm)
|
||||
fm = mm.newField(_("Notes"))
|
||||
mm.addField(m, fm)
|
||||
for i in range(8):
|
||||
n = i+1
|
||||
t = mm.newTemplate(_("Cloze") + " %d" % n)
|
||||
fmt = "{{cloze:%d:Text}}%%s" % n
|
||||
fmt = "{{cloze:%d:Text}}" % n
|
||||
t['css'] += """
|
||||
.cloze {
|
||||
font-weight: bold;
|
||||
color: blue;
|
||||
}"""
|
||||
t['qfmt'] = fmt % ""
|
||||
t['afmt'] = fmt % "\n{{Notes}}"
|
||||
t['qfmt'] = fmt
|
||||
t['afmt'] = fmt
|
||||
mm.addTemplate(m, t)
|
||||
mm.add(m)
|
||||
return m
|
||||
|
|
|
@ -221,6 +221,4 @@ def test_modelChange():
|
|||
deck.models.change(basic, [f.id], cloze, map, map)
|
||||
f.load()
|
||||
assert f['Text'] == "f2"
|
||||
assert f['Notes'] == "b2"
|
||||
assert len(f.cards()) == 2
|
||||
assert "b2" in f.cards()[0].a()
|
||||
|
|
Loading…
Reference in a new issue