xmpp.chapril.org-conversejs/src/plugins/muc-views/templates/ad-hoc-command-form.js
Shaun Wu 9ea8653ef7 Upgrade to Webpack 3
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
2021-04-30 13:50:50 +02:00

24 lines
955 B
JavaScript

import { __ } from 'i18n';
import { html } from "lit";
export default (o, command) => {
const i18n_hide = __('Hide');
const i18n_run = __('Execute');
return html`
<form @submit=${o.runCommand}>
${ command.alert ? html`<div class="alert alert-${command.alert_type}" role="alert">${command.alert}</div>` : '' }
<fieldset class="form-group">
<input type="hidden" name="command_node" value="${command.node}"/>
<input type="hidden" name="command_jid" value="${command.jid}"/>
<p class="form-help">${command.instructions}</p>
${ command.fields }
</fieldset>
<fieldset>
<input type="submit" class="btn btn-primary" value="${i18n_run}">
<input type="button" class="btn btn-secondary button-cancel" value="${i18n_hide}" @click=${o.hideCommandForm}>
</fieldset>
</form>
`;
}