9ea8653ef7
Had to make various other changes due to incompatibilities. - Use the new `lit` package instead of `lit-html` or `lit-element` - Drop `haunted` since it breaks the rules by specifying `type: module` but then doesn't import with file extensions - Use Sass Dart instead of node-sass (fixes #2445) - Upgrade Karma
23 lines
849 B
JavaScript
23 lines
849 B
JavaScript
import { html } from "lit";
|
|
|
|
export default (o) => html`
|
|
<div class="form-group">
|
|
${ o.type !== 'hidden' ? html`<label for="${o.id}">${o.label}</label>` : '' }
|
|
|
|
<!-- This is a hack to prevent Chrome from auto-filling the username in
|
|
any of the other input fields in the MUC configuration form. -->
|
|
${ (o.type === 'password' && o.fixed_username) ? html`
|
|
<input class="hidden-username" type="text" autocomplete="username" value="${o.fixed_username}"></input>
|
|
` : '' }
|
|
|
|
<input
|
|
autocomplete="${o.autocomplete || ''}"
|
|
class="form-control"
|
|
id="${o.id}"
|
|
name="${o.name}"
|
|
placeholder="${o.placeholder || ''}"
|
|
type="${o.type}"
|
|
value="${o.value || ''}"
|
|
?required=${o.required} />
|
|
</div>`;
|