From 3bd8e2df7b7357d4d109dc353709c12a72e92ffe Mon Sep 17 00:00:00 2001 From: Theo Cochereau Date: Tue, 11 Feb 2025 15:17:26 +0100 Subject: [PATCH 1/4] bu --- .../official-site/sqlpage/migrations/01_documentation.sql | 1 + sqlpage/templates/form.handlebars | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/examples/official-site/sqlpage/migrations/01_documentation.sql b/examples/official-site/sqlpage/migrations/01_documentation.sql index b19a35cb..e33ea37b 100644 --- a/examples/official-site/sqlpage/migrations/01_documentation.sql +++ b/examples/official-site/sqlpage/migrations/01_documentation.sql @@ -293,6 +293,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S ('create_new', 'In a multiselect with a dropdown, this option allows the user to enter new values, that are not in the list of options.', 'BOOLEAN', FALSE, TRUE), ('step', 'The increment of values in an input of type number. Set to 1 to allow only integers.', 'REAL', FALSE, TRUE), ('description', 'A helper text to display near the input field.', 'TEXT', FALSE, TRUE), + ('description_md', 'A helper text to display near the input field - formatted using markdown.', 'TEXT', FALSE, TRUE), ('pattern', 'A regular expression that the value must match. For instance, [0-9]{3} will only accept 3 digits.', 'TEXT', FALSE, TRUE), ('autofocus', 'Automatically focus the field when the page is loaded', 'BOOLEAN', FALSE, TRUE), ('width', 'Width of the form field, between 1 and 12.', 'INTEGER', FALSE, TRUE), diff --git a/sqlpage/templates/form.handlebars b/sqlpage/templates/form.handlebars index 4c33b12d..5b4f005b 100644 --- a/sqlpage/templates/form.handlebars +++ b/sqlpage/templates/form.handlebars @@ -31,6 +31,9 @@ {{#if description}} {{description}} {{/if}} + {{#if description_md}} + {{description_md}} + {{/if}} @@ -123,6 +126,9 @@ {{#if description}} {{description}} {{/if}} + {{#if description_md}} + {{description_md}} + {{/if}} {{/if}} {{/if}} From 3830269f6a0b4213ab5036c088675c53109c01a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Cochereau?= Date: Tue, 11 Feb 2025 21:57:49 +0100 Subject: [PATCH 2/4] bu --- sqlpage/templates/form.handlebars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlpage/templates/form.handlebars b/sqlpage/templates/form.handlebars index 5b4f005b..2fb2617c 100644 --- a/sqlpage/templates/form.handlebars +++ b/sqlpage/templates/form.handlebars @@ -32,7 +32,7 @@ {{description}} {{/if}} {{#if description_md}} - {{description_md}} + {{markdown description_md}} {{/if}} From 6c4cfdca6409a574b2628ef5edc514c1c88a6368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Cochereau?= Date: Tue, 11 Feb 2025 22:02:41 +0100 Subject: [PATCH 3/4] bu --- sqlpage/templates/form.handlebars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlpage/templates/form.handlebars b/sqlpage/templates/form.handlebars index 2fb2617c..0c9ba319 100644 --- a/sqlpage/templates/form.handlebars +++ b/sqlpage/templates/form.handlebars @@ -127,7 +127,7 @@ {{description}} {{/if}} {{#if description_md}} - {{description_md}} + {{markdown description_md}} {{/if}} {{/if}} From e32c8bc4eef348b011921216e382f422498b58e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Cochereau?= Date: Tue, 11 Feb 2025 22:04:31 +0100 Subject: [PATCH 4/4] bu --- examples/official-site/sqlpage/migrations/01_documentation.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/official-site/sqlpage/migrations/01_documentation.sql b/examples/official-site/sqlpage/migrations/01_documentation.sql index e33ea37b..e9f2664d 100644 --- a/examples/official-site/sqlpage/migrations/01_documentation.sql +++ b/examples/official-site/sqlpage/migrations/01_documentation.sql @@ -340,7 +340,7 @@ When loading the page, the value for `:username` will be `NULL` if no value has '{"name": "Last name", "required": true, "description": "We need your last name for legal purposes."},'|| '{"name": "Resume", "type": "textarea"},'|| '{"name": "Birth date", "type": "date", "max": "2010-01-01", "value": "1994-04-16"},'|| - '{"name": "Password", "type": "password", "pattern": "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$", "required": true, "description": "Minimum eight characters, at least one letter and one number."},'|| + '{"name": "Password", "type": "password", "pattern": "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$", "required": true, "description_md": "**Password Requirements:** Minimum **8 characters**, at least **one letter** & **one number**. *Tip:* Use a passphrase for better security!"},'|| '{"label": "I accept the terms and conditions", "name": "terms", "type": "checkbox", "required": true}'|| ']')), ('form','Create prepended and appended inputs to make your forms easier to use.',