diff --git a/src/qqq/components/forms/EntityForm.tsx b/src/qqq/components/forms/EntityForm.tsx
index e115732..c56a851 100644
--- a/src/qqq/components/forms/EntityForm.tsx
+++ b/src/qqq/components/forms/EntityForm.tsx
@@ -59,15 +59,17 @@ import * as Yup from "yup";
interface Props
{
- id?: string;
- isModal: boolean;
- table?: QTableMetaData;
- closeModalHandler?: (event: object, reason: string) => void;
- defaultValues: { [key: string]: string };
- disabledFields: { [key: string]: boolean } | string[];
- isCopy?: boolean;
- onSubmitCallback?: (values: any, tableName: string) => void;
- overrideHeading?: string;
+ id?: string,
+ isModal: boolean,
+ table?: QTableMetaData,
+ closeModalHandler?: (event: object, reason: string) => void,
+ defaultValues: { [key: string]: string },
+ disabledFields: { [key: string]: boolean } | string[],
+ isCopy?: boolean,
+ onSubmitCallback?: (values: any, tableName: string) => void,
+ overrideHeading?: string,
+ saveButtonLabel?: string,
+ saveButtonIcon?: string,
}
EntityForm.defaultProps = {
@@ -79,6 +81,8 @@ EntityForm.defaultProps = {
disabledFields: {},
isCopy: false,
onSubmitCallback: null,
+ saveButtonLabel: "Save",
+ saveButtonIcon: "save",
};
@@ -1331,12 +1335,14 @@ function EntityForm(props: Props): JSX.Element
)) : null}
-
-
-
-
-
-
+ {formFields &&
+
+
+
+
+
+
+ }
);
@@ -1355,6 +1361,8 @@ function EntityForm(props: Props): JSX.Element
disabledFields={showEditChildForm.disabledFields}
onSubmitCallback={props.onSubmitCallback ? props.onSubmitCallback : submitEditChildForm}
overrideHeading={`${showEditChildForm.rowIndex != null ? "Editing" : "Creating New"} ${showEditChildForm.table.label}`}
+ saveButtonLabel="OK"
+ saveButtonIcon="check"
/>
diff --git a/src/qqq/pages/records/view/RecordView.tsx b/src/qqq/pages/records/view/RecordView.tsx
index f52e9de..86ba88e 100644
--- a/src/qqq/pages/records/view/RecordView.tsx
+++ b/src/qqq/pages/records/view/RecordView.tsx
@@ -1081,16 +1081,19 @@ function RecordView({table, record: overrideRecord, launchProcess}: Props): JSX.
)) : null}
-
-
- {
- table.capabilities.has(Capability.TABLE_DELETE) && table.deletePermission &&
- }
- {
- table.capabilities.has(Capability.TABLE_UPDATE) && table.editPermission &&
- }
-
-
+ {
+ tableMetaData && record && ((table.capabilities.has(Capability.TABLE_DELETE) && table.deletePermission) || (table.capabilities.has(Capability.TABLE_UPDATE) && table.editPermission)) &&
+
+
+ {
+ table.capabilities.has(Capability.TABLE_DELETE) && table.deletePermission &&
+ }
+ {
+ table.capabilities.has(Capability.TABLE_UPDATE) && table.editPermission &&
+ }
+
+
+ }
diff --git a/src/qqq/styles/qqq-override-styles.css b/src/qqq/styles/qqq-override-styles.css
index 23735a0..883c864 100644
--- a/src/qqq/styles/qqq-override-styles.css
+++ b/src/qqq/styles/qqq-override-styles.css
@@ -841,4 +841,27 @@ input[type="search"]::-webkit-search-results-decoration
max-width: 100% !important;
flex-grow: 1 !important;
}
-}
\ No newline at end of file
+}
+
+.stickyBottomButtonBar
+{
+ padding-bottom: 1rem !important;
+ padding-right: 0 !important;
+ margin-bottom: -4rem !important;
+ margin-top: -1.5rem !important;
+ position: sticky;
+ bottom: 0;
+ background: linear-gradient(to bottom, transparent 0, #f0f2f5 4px);
+ z-index: 10; /* have needed a little here, e.g. to get above MuiDataGrid-overlay and ACE */
+}
+
+.modalBottomButtonBar
+{
+ padding-bottom: 0 !important;
+ padding-right: 0 !important;
+}
+
+.stickyBottomButtonBar>.MuiGrid-container
+{
+ padding-top: 1rem;
+}