bug: fixed issue of label showing [title] tag
This commit is contained in:
@@ -750,13 +750,19 @@ def register_routes(bp):
|
|||||||
flash('Process not found', 'danger')
|
flash('Process not found', 'danger')
|
||||||
return redirect(url_for('conssheets.index'))
|
return redirect(url_for('conssheets.index'))
|
||||||
|
|
||||||
# Get header fields for this process
|
# Get header fields for this process, stripping [title] prefix
|
||||||
header_fields = query_db('''
|
header_fields_raw = query_db('''
|
||||||
SELECT * FROM cons_process_fields
|
SELECT * FROM cons_process_fields
|
||||||
WHERE process_id = ? AND table_type = 'header' AND is_active = 1
|
WHERE process_id = ? AND table_type = 'header' AND is_active = 1
|
||||||
ORDER BY sort_order, id
|
ORDER BY sort_order, id
|
||||||
''', [process_id])
|
''', [process_id])
|
||||||
|
|
||||||
|
header_fields = []
|
||||||
|
for hf in header_fields_raw:
|
||||||
|
hf_dict = dict(hf)
|
||||||
|
hf_dict['field_label'] = strip_title_prefix(hf_dict['field_label'])
|
||||||
|
header_fields.append(hf_dict)
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
# Validate required fields
|
# Validate required fields
|
||||||
missing_required = []
|
missing_required = []
|
||||||
@@ -816,13 +822,19 @@ def register_routes(bp):
|
|||||||
flash('Permission denied', 'danger')
|
flash('Permission denied', 'danger')
|
||||||
return redirect(url_for('conssheets.index'))
|
return redirect(url_for('conssheets.index'))
|
||||||
|
|
||||||
# Get header fields
|
# Get header fields for this process, stripping [title] prefix
|
||||||
header_fields = query_db('''
|
header_fields_raw = query_db('''
|
||||||
SELECT * FROM cons_process_fields
|
SELECT * FROM cons_process_fields
|
||||||
WHERE process_id = ? AND table_type = 'header' AND is_active = 1
|
WHERE process_id = ? AND table_type = 'header' AND is_active = 1
|
||||||
ORDER BY sort_order, id
|
ORDER BY sort_order, id
|
||||||
''', [sess['process_id']])
|
''', [sess['process_id']])
|
||||||
|
|
||||||
|
header_fields = []
|
||||||
|
for hf in header_fields_raw:
|
||||||
|
hf_dict = dict(hf)
|
||||||
|
hf_dict['field_label'] = strip_title_prefix(hf_dict['field_label'])
|
||||||
|
header_fields.append(hf_dict)
|
||||||
|
|
||||||
# Get existing values
|
# Get existing values
|
||||||
existing_values = query_db('''
|
existing_values = query_db('''
|
||||||
SELECT cpf.field_name, cshv.field_value
|
SELECT cpf.field_name, cshv.field_value
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<div class="session-list-meta">
|
<div class="session-list-meta">
|
||||||
<span>Started: {{ s.created_at[:16] }}</span>
|
<span>Started: {{ s.created_at[:16] }}</span>
|
||||||
<span>•</span>
|
<span>•</span>
|
||||||
<span>{{ s.scan_count or 0 }} lots scanned</span>
|
<span>{{ s.scan_count or 0 }} Scanned</span>
|
||||||
</div>
|
</div>
|
||||||
{% if s.header_preview %}
|
{% if s.header_preview %}
|
||||||
<div class="session-list-meta" style="margin-top: var(--space-xs); font-size: 0.8rem;">
|
<div class="session-list-meta" style="margin-top: var(--space-xs); font-size: 0.8rem;">
|
||||||
|
|||||||
Reference in New Issue
Block a user