mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
fix select-boxes submit their old value, if they are onchange="1"
@Nathan: Not sure if this is the right fix, but I can't see where we use Lit's FormatMixing, which defines serializedValue (and therefore select-box always returns the old modalValue)
This commit is contained in:
parent
d23c8cbcb4
commit
c2166c5750
@ -250,16 +250,6 @@ export class Et2DateDuration extends Et2InputWidget(LitElement)
|
||||
this.formatter = formatDuration;
|
||||
}
|
||||
|
||||
getValue()
|
||||
{
|
||||
if(this.readOnly)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.value;
|
||||
}
|
||||
|
||||
get value() : string
|
||||
{
|
||||
let value = 0;
|
||||
@ -543,4 +533,4 @@ export class Et2DateDuration extends Et2InputWidget(LitElement)
|
||||
}
|
||||
|
||||
// @ts-ignore TypeScript is not recognizing that this is a LitElement
|
||||
customElements.define("et2-date-duration", Et2DateDuration);
|
||||
customElements.define("et2-date-duration", Et2DateDuration);
|
@ -126,11 +126,7 @@ const Et2InputWidgetMixin = (superclass) =>
|
||||
|
||||
getValue()
|
||||
{
|
||||
if(this.readOnly)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.serializedValue !== "undefined" ? this.serializedValue : this.modalValue;
|
||||
return this.readOnly ? null : this.value;
|
||||
}
|
||||
|
||||
|
||||
|
@ -75,11 +75,6 @@ export class Et2WidgetWithSelect extends Et2InputWidget(LionSelect)
|
||||
}
|
||||
}
|
||||
|
||||
getValue()
|
||||
{
|
||||
return this.readOnly ? null : this.modalValue;
|
||||
}
|
||||
|
||||
set_value(val)
|
||||
{
|
||||
let oldValue = this.modalValue;
|
||||
@ -635,4 +630,4 @@ export class Et2SelectYear extends Et2Select
|
||||
}
|
||||
|
||||
// @ts-ignore TypeScript is not recognizing that this widget is a LitElement
|
||||
customElements.define("et2-select-year", Et2SelectYear);
|
||||
customElements.define("et2-select-year", Et2SelectYear);
|
@ -45,16 +45,7 @@ export class Et2Textbox extends Et2InputWidget(LionInput)
|
||||
{
|
||||
super.connectedCallback();
|
||||
}
|
||||
|
||||
getValue()
|
||||
{
|
||||
if(this.readOnly)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-ignore TypeScript is not recognizing that Et2Textbox is a LitElement
|
||||
customElements.define("et2-textbox", Et2Textbox);
|
||||
customElements.define("et2-textbox", Et2Textbox);
|
Loading…
Reference in New Issue
Block a user