mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-07-02 02:24:27 +00:00
feat: add field template editor, editable field names (#1396)
* feat: add basic field template editor * fix: fix various issues with adding templates, reduce reused code * feat: add field name editing on entries * ui: add multiline checkbox to field template editor * refactor: move stylesheets to central file * fix(ui): fix untranslated key * docs: update field documentation
This commit is contained in:
committed by
GitHub
parent
0f319985c4
commit
1b0bbba080
@@ -80,7 +80,7 @@ def test_build_tag_panel_remove_alias_callback(
|
||||
|
||||
alias: TagAlias = unwrap(library.get_alias(tag.id, tag.alias_ids[0]))
|
||||
|
||||
panel.remove_alias_callback(alias.name, alias.id)
|
||||
panel.remove_alias_callback(alias.id)
|
||||
|
||||
assert len(panel.alias_ids) == 1
|
||||
assert len(panel.alias_names) == 1
|
||||
|
||||
@@ -225,7 +225,9 @@ def test_remove_text_field_entry_with_multiple_fields(library: Library, entry_fu
|
||||
def test_update_entry_field(library: Library, entry_full: Entry):
|
||||
title_field = entry_full.text_fields[0]
|
||||
|
||||
library.update_text_field(entry_full.id, title_field, "new value", title_field.is_multiline)
|
||||
library.update_text_field(
|
||||
entry_full.id, title_field, title_field.name, "new value", title_field.is_multiline
|
||||
)
|
||||
|
||||
entry = next(library.all_entries(with_joins=True))
|
||||
assert entry.text_fields[0].value == "new value"
|
||||
@@ -241,7 +243,9 @@ def test_update_entry_with_multiple_identical_text_fields(library: Library, entr
|
||||
library.add_field_to_entries(entry_full.id, field=empty_title)
|
||||
|
||||
# update one of the fields
|
||||
library.update_text_field(entry_full.id, title_field, "new value", title_field.is_multiline)
|
||||
library.update_text_field(
|
||||
entry_full.id, title_field, title_field.name, "new value", title_field.is_multiline
|
||||
)
|
||||
|
||||
# Then only one should be updated
|
||||
entry = next(library.all_entries(with_joins=True))
|
||||
|
||||
Reference in New Issue
Block a user