mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Set attributes in input form controls (#1805)
* 🔨 add autocapitalize, autocomplete, autocorrect and spellcheck attributes * 🔨 switch autocapitalize to none * 🔨 add attributes to dev-state * 🔨 add attributes to entity-picker
This commit is contained in:
parent
d97e356376
commit
028003dffc
@ -38,7 +38,16 @@ class HaEntityPicker extends EventsMixin(LocalizeMixin(PolymerElement)) {
|
|||||||
allow-custom-value="[[allowCustomEntity]]"
|
allow-custom-value="[[allowCustomEntity]]"
|
||||||
on-change='_fireChanged'
|
on-change='_fireChanged'
|
||||||
>
|
>
|
||||||
<paper-input autofocus="[[autofocus]]" label="[[_computeLabel(label, localize)]]" class="input" value="[[value]]" disabled="[[disabled]]">
|
<paper-input
|
||||||
|
autofocus="[[autofocus]]"
|
||||||
|
label="[[_computeLabel(label, localize)]]"
|
||||||
|
class="input"
|
||||||
|
autocapitalize='none'
|
||||||
|
autocomplete='off'
|
||||||
|
autocorrect='off'
|
||||||
|
spellcheck='false'
|
||||||
|
value="[[value]]"
|
||||||
|
disabled="[[disabled]]">
|
||||||
<paper-icon-button slot="suffix" class="clear-button" icon="hass:close" no-ripple="" hidden$="[[!value]]">Clear</paper-icon-button>
|
<paper-icon-button slot="suffix" class="clear-button" icon="hass:close" no-ripple="" hidden$="[[!value]]">Clear</paper-icon-button>
|
||||||
<paper-icon-button slot="suffix" class="toggle-button" icon="[[_computeToggleIcon(opened)]]" hidden="[[!_states.length]]">Toggle</paper-icon-button>
|
<paper-icon-button slot="suffix" class="toggle-button" icon="[[_computeToggleIcon(opened)]]" hidden="[[!_states.length]]">Toggle</paper-icon-button>
|
||||||
</paper-input>
|
</paper-input>
|
||||||
|
@ -120,6 +120,10 @@ class HaPanelDevService extends PolymerElement {
|
|||||||
always-float-label
|
always-float-label
|
||||||
label='Service Data (JSON, optional)'
|
label='Service Data (JSON, optional)'
|
||||||
value='{{serviceData}}'
|
value='{{serviceData}}'
|
||||||
|
autocapitalize='none'
|
||||||
|
autocomplete='off'
|
||||||
|
autocorrect='off'
|
||||||
|
spellcheck='false'
|
||||||
></paper-textarea>
|
></paper-textarea>
|
||||||
<paper-button
|
<paper-button
|
||||||
on-click='_callService'
|
on-click='_callService'
|
||||||
|
@ -91,10 +91,20 @@ class HaPanelDevState extends EventsMixin(PolymerElement) {
|
|||||||
<paper-input
|
<paper-input
|
||||||
label="State"
|
label="State"
|
||||||
required
|
required
|
||||||
|
autocapitalize='none'
|
||||||
|
autocomplete='off'
|
||||||
|
autocorrect='off'
|
||||||
|
spellcheck='false'
|
||||||
value='{{_state}}'
|
value='{{_state}}'
|
||||||
class='state-input'
|
class='state-input'
|
||||||
></paper-input>
|
></paper-input>
|
||||||
<paper-textarea label="State attributes (JSON, optional)" value='{{_stateAttributes}}'></paper-textarea>
|
<paper-textarea
|
||||||
|
label="State attributes (JSON, optional)"
|
||||||
|
autocapitalize='none'
|
||||||
|
autocomplete='off'
|
||||||
|
autocorrect='off'
|
||||||
|
spellcheck='false'
|
||||||
|
value='{{_stateAttributes}}'></paper-textarea>
|
||||||
<paper-button on-click='handleSetState' raised>Set State</paper-button>
|
<paper-button on-click='handleSetState' raised>Set State</paper-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user