Commit 7e70c493 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #7910: Check for double form names

parent f9a8e5f7
Pipeline #1519 failed with stage
in 2 minutes and 9 seconds
......@@ -185,10 +185,15 @@ INSERT INTO FormElement (formId, name, label, mode, type, checkType, class, ord,
checkPattern)
VALUES
# Make the form a 'delete form' for records Form/FormElement.
(1, 'Delete FE', '', 'show', 'beforeDelete', 'all', 'action', 10, 0, 0, '', '', '', '',
(1, '', 'Delete FE', 'show', 'beforeDelete', 'all', 'action', 10, 0, 0, '', '', '', '',
'sqlAfter={{DELETE FROM FormElement WHERE formId={{id:R}} }}',
0, '', '', '', 'none', 'no', ''),
# Check for double form name
(1, '', 'Check for double form name', 'show', 'beforeSave', 'all', 'action', 20, 0, 0, '', '', '', '',
'sqlValidate={{!SELECT f.id FROM Form AS f WHERE f.name!="" AND f.name="{{name:F:alnumx}}" AND f.id!={{id:R0}} }}\nexpectRecords=0\nmessageFail=There is already another form with the name "{{name:F:alnumx}}".',
0, '', '', '', 'none', 'no', ''),
# Basic
(1, 'name', 'Name', 'required', 'text', 'pattern', 'native', 110, 0, 0,
'<a href="{{documentation:Y}}#form-name">Info</a>', '', '', '', 'autofocus',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment