@modernman00/shared-js-lib 1.2.29 → 1.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AcctMgt/processAll.js +1 -1
- package/Http.js +8 -2
- package/config/version.php +1 -1
- package/package.json +1 -1
package/AcctMgt/processAll.js
CHANGED
|
@@ -47,7 +47,7 @@ export const loginSubmission = async (formId, loginURL, redirect, css = null, le
|
|
|
47
47
|
showLoader();
|
|
48
48
|
localStorage.setItem('redirect', redirect);
|
|
49
49
|
|
|
50
|
-
await postFormData(loginURL,
|
|
50
|
+
await postFormData(loginURL, formId, redirect, css);
|
|
51
51
|
} else {
|
|
52
52
|
|
|
53
53
|
alert('The form cannot be submitted. Please check the errors');
|
package/Http.js
CHANGED
|
@@ -11,9 +11,9 @@ import { redirectAfterDelay, parseErrorResponse } from './general.js';
|
|
|
11
11
|
* @param {string|null} css - The CSS framework to use for notification styling (e.g., 'W3css', 'bulma').
|
|
12
12
|
NOTICE:::Make sure you set the notification id as the formId_notification
|
|
13
13
|
*/
|
|
14
|
-
export const postFormData = async (url,
|
|
14
|
+
export const postFormData = async (url, formId, redirect = null, css = null) => {
|
|
15
15
|
|
|
16
|
-
let notificationForm = `${
|
|
16
|
+
let notificationForm = `${formId}_notification`;
|
|
17
17
|
const notificationId = id(notificationForm);
|
|
18
18
|
|
|
19
19
|
|
|
@@ -34,6 +34,12 @@ export const postFormData = async (url, form, redirect = null, css = null) => {
|
|
|
34
34
|
// }
|
|
35
35
|
|
|
36
36
|
// extract the form entries
|
|
37
|
+
// extract the form entriesËËË
|
|
38
|
+
const form = id(formId)
|
|
39
|
+
|
|
40
|
+
if (!form) {
|
|
41
|
+
throw new Error('Form element not found');
|
|
42
|
+
}
|
|
37
43
|
|
|
38
44
|
let formEntries = new FormData(form);
|
|
39
45
|
|
package/config/version.php
CHANGED
package/package.json
CHANGED