Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3476: better UI for form "fixed" fields #3477

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- New `loadEmojis` hook, to customize emojis at runtime.
- Upgrade to Bootstrap 5
- Fix: removing the "add to contact" button in occupant modal in singleton mode (as there is no roster).
- #3476: better UI for form "fixed" fields

### Breaking changes:

Expand Down
3 changes: 3 additions & 0 deletions src/templates/form_fixed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { html } from "lit";

export default (o) => html`<p>${o.text}</p>`;
3 changes: 0 additions & 3 deletions src/templates/form_help.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/utils/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import tplFile from 'templates/file.js';
import tplDateInput from 'templates/form_date.js';
import tplFormCaptcha from '../templates/form_captcha.js';
import tplFormCheckbox from '../templates/form_checkbox.js';
import tplFormHelp from '../templates/form_help.js';
import tplFormFixed from '../templates/form_fixed.js';
import tplFormInput from '../templates/form_input.js';
import tplFormSelect from '../templates/form_select.js';
import tplFormTextarea from '../templates/form_textarea.js';
Expand Down Expand Up @@ -479,7 +479,7 @@ export function xFormField2TemplateResult(xfield, options = {}) {
});

} else if (xfield['type'] === 'fixed') {
return tplFormHelp(xfield);
return tplFormFixed(xfield);

} else if (xfield['type'] === 'jid-multi') {
return tplFormTextarea({ ...default_vals, ...xfield });
Expand Down
Loading