remove notes field from cloze

This commit is contained in:
Damien Elmes 2012-01-30 07:45:52 +09:00
parent 1800f30776
commit f9ed0d657c
2 changed files with 3 additions and 7 deletions

View file

@ -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

View file

@ -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()