mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
Fix action uri
This commit is contained in:
parent
6321b9e02c
commit
dcc262b64e
|
|
@ -345,6 +345,10 @@ export class Request {
|
||||||
*/
|
*/
|
||||||
send()
|
send()
|
||||||
{
|
{
|
||||||
|
if (this.uri === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
if (this.xhr.readyState !== 1) {
|
if (this.xhr.readyState !== 1) {
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,17 @@ export class FormView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create FormData
|
||||||
|
/* todo: implement once we know how to handle this in the backend/php
|
||||||
|
const formData = new FormData(),
|
||||||
|
dataLength = data.length;
|
||||||
|
|
||||||
|
for (let key in data) {
|
||||||
|
if (data.hasOwnProperty(key)) {
|
||||||
|
formData.append(key, data[key].constructor === Array ? JSON.stringify(data[key]) : data[key]);
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -395,7 +406,7 @@ export class FormView {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.method = typeof e.attributes['method'] !== 'undefined' ? e.attributes['method'].value : 'EMPTY';
|
this.method = typeof e.attributes['method'] !== 'undefined' ? e.attributes['method'].value : 'EMPTY';
|
||||||
this.action = typeof e.action !== 'undefined' ? e.action : 'EMPTY';
|
this.action = typeof e.getAttribute('action') !== 'undefined' ? e.getAttribute('action') : 'EMPTY';
|
||||||
|
|
||||||
const elements = this.getFormElements(),
|
const elements = this.getFormElements(),
|
||||||
length = elements.length;
|
length = elements.length;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user