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')
|
||||
return redirect(url_for('conssheets.index'))
|
||||
|
||||
# Get header fields for this process
|
||||
header_fields = query_db('''
|
||||
# Get header fields for this process, stripping [title] prefix
|
||||
header_fields_raw = query_db('''
|
||||
SELECT * FROM cons_process_fields
|
||||
WHERE process_id = ? AND table_type = 'header' AND is_active = 1
|
||||
ORDER BY sort_order, 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':
|
||||
# Validate required fields
|
||||
missing_required = []
|
||||
@@ -816,13 +822,19 @@ def register_routes(bp):
|
||||
flash('Permission denied', 'danger')
|
||||
return redirect(url_for('conssheets.index'))
|
||||
|
||||
# Get header fields
|
||||
header_fields = query_db('''
|
||||
# Get header fields for this process, stripping [title] prefix
|
||||
header_fields_raw = query_db('''
|
||||
SELECT * FROM cons_process_fields
|
||||
WHERE process_id = ? AND table_type = 'header' AND is_active = 1
|
||||
ORDER BY sort_order, 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
|
||||
existing_values = query_db('''
|
||||
SELECT cpf.field_name, cshv.field_value
|
||||
|
||||
Reference in New Issue
Block a user