peertube-plugin-livechat/conversejs/custom/plugins/poll/templates/poll-form.js
John Livingston a7250efd06
Poll WIP (#231):
* backend save WIP
* various fixes
2024-07-05 11:23:26 +02:00

30 lines
851 B
JavaScript

// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
//
// SPDX-License-Identifier: AGPL-3.0-only
import { html } from 'lit'
import { __ } from 'i18n'
export function tplPollForm (el) {
const i18nOk = __('Ok')
return html`
${el.alert_message ? html`<div class="error">${el.alert_message}</div>` : ''}
${
el.form_fields
? html`
<form class="converse-form" @submit=${ev => el.formSubmit(ev)}>
<p class="title">${el.title}</p>
<p class="form-help instructions">${el.instructions}</p>
<div class="form-errors hidden"></div>
${el.form_fields}
<fieldset class="buttons form-group">
<input type="submit" class="btn btn-primary" value="${i18nOk}" />
</fieldset>
</form>`
: ''
}`
}