- Adapt Sync Wordpress Component to Catalog introduction

- Small bug fixes
This commit is contained in:
Josako
2024-10-17 10:31:13 +02:00
parent 7f12c8b355
commit 74cc7ae95e
12 changed files with 94 additions and 30 deletions

View File

@@ -135,6 +135,14 @@ def edit_catalog(catalog_id):
form = CatalogForm(obj=catalog)
tenant_id = session.get('tenant').get('id')
# Convert arrays to comma-separated strings for display
if request.method == 'GET':
form.html_tags.data = ', '.join(catalog.html_tags or '')
form.html_end_tags.data = ', '.join(catalog.html_end_tags or '')
form.html_included_elements.data = ', '.join(catalog.html_included_elements or '')
form.html_excluded_elements.data = ', '.join(catalog.html_excluded_elements or '')
form.html_excluded_classes.data = ', '.join(catalog.html_excluded_classes or '')
if request.method == 'POST' and form.validate_on_submit():
form.populate_obj(catalog)
# Handle Embedding Variables