mirror of
https://github.com/s00500/ESPUI.git
synced 2025-07-04 06:10:18 +00:00
Added 'type' proptert to text input elements
Now the text input element can support other HTML input types suxh as date, time, color, password, etc
This commit is contained in:
@ -848,7 +848,18 @@ void ESPUIClass::setElementStyle(uint16_t id, String style, int clientId)
|
||||
}
|
||||
}
|
||||
|
||||
void ESPUIClass::setPanelWide(uint16_t id, bool wide) {
|
||||
void ESPUIClass::setInputType(uint16_t id, String type, int clientId)
|
||||
{
|
||||
Control* control = getControl(id);
|
||||
if (control)
|
||||
{
|
||||
control->inputType = type;
|
||||
updateControl(control, clientId);
|
||||
}
|
||||
}
|
||||
|
||||
void ESPUIClass::setPanelWide(uint16_t id, bool wide)
|
||||
{
|
||||
Control* control = getControl(id);
|
||||
if (control)
|
||||
{
|
||||
@ -1124,6 +1135,8 @@ void ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, uint16_t startin
|
||||
item["panelStyle"] = String(control->panelStyle);
|
||||
if (control->elementStyle.length())
|
||||
item["elementStyle"] = String(control->elementStyle);
|
||||
if (control->inputType.length())
|
||||
item["inputType"] = String(control->inputType);
|
||||
if (control->wide == true)
|
||||
item["wide"] = true;
|
||||
if (control->vertical == true)
|
||||
|
Reference in New Issue
Block a user