mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Required fields in forms and bug fixes
Summary: - Adding little green asterisk at the end of field title. - Fixing bug on columns component. Adding paragraph as a column and then selecting it was throwing error in the RightPanel - Fixing boolean column bug in the editor - Adding (--Choose--) placeholder for dropdowns - Fixing columns logic: Dragging and dropping columns can unexpectedly add more columns. - Added favicon and default page title - Added svg to sync file for electron. Test Plan: Updated Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D4172
This commit is contained in:
@@ -1416,6 +1416,7 @@ export class DocWorkerApi {
|
||||
throw new ApiError('Form not found', 404);
|
||||
}
|
||||
const Tables = activeDoc.docData!.getMetaTable('_grist_Tables');
|
||||
const tableRecord = Tables.getRecord(section.tableRef);
|
||||
const Views_section_field = activeDoc.docData!.getMetaTable('_grist_Views_section_field');
|
||||
const fields = Views_section_field.filterRecords({parentId: sectionId});
|
||||
const Tables_column = activeDoc.docData!.getMetaTable('_grist_Tables_column');
|
||||
@@ -1521,6 +1522,11 @@ export class DocWorkerApi {
|
||||
const doc = await this._dbManager.getDoc(req);
|
||||
const tableId = await getRealTableId(String(section.tableRef), {activeDoc, req});
|
||||
|
||||
const rawSectionRef = tableRecord?.rawViewSectionRef;
|
||||
const rawSection = !rawSectionRef ? null :
|
||||
activeDoc.docData!.getMetaTable('_grist_Views_section').getRecord(rawSectionRef);
|
||||
const tableName = rawSection?.title;
|
||||
|
||||
const template = handlebars.compile(form);
|
||||
const renderedHtml = template({
|
||||
// Trusted content generated by us.
|
||||
@@ -1532,6 +1538,7 @@ export class DocWorkerApi {
|
||||
CONTENT: html,
|
||||
SUCCESS_TEXT: box.successText || 'Thank you! Your response has been recorded.',
|
||||
SUCCESS_URL: redirectUrl,
|
||||
TITLE: `${section.title || tableName || tableId || 'Form'} - Grist`
|
||||
});
|
||||
res.status(200).send(renderedHtml);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user