1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 09:26:03 +00:00

fix(tags): sixth audit: the tag box tells its rule, trims a paste; clear keeps the focus

- A name typed or pasted into the tag box that cannot be a tag shows the
  rule (letters a-z, digits, dots, dashes, underscores; at most 12
  characters) instead of nothing; the spaces a paste brings are dropped;
  "constructor" is no longer taken for a tag there is.
- "Clear the filters" hides with the message it is in: the search box takes
  the focus.
This commit is contained in:
catborise 2026-11-19 10:03:50 +03:00
parent bc1894e4d8
commit f6b1ee8985
9 changed files with 74 additions and 36 deletions

View file

@ -35,6 +35,9 @@ class TagsFieldTests(TestCase):
with translation.override("tr"):
html = TagsForm().as_p()
self.assertIn('data-add="Etiket ekle: %(tag)s"', html)
# and what a new name may be, shown when the one typed cannot be a tag
self.assertIn('data-rule="Yeni etiket: a-z harfleri, rakamlar, nokta, tire ve alt çizgi, harf ya da rakamla başlar; '
'en fazla 12 karakter"', html)
def test_the_tags_are_made_when_saved(self):
Tag.objects.create(name="prod")