Browse Source

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

John Livingston 11 months ago
parent
commit
4526681f11
4 changed files with 6 additions and 5 deletions
  1. 1 0
      CHANGES.md
  2. 3 0
      src/templates/form_fixed.js
  3. 0 3
      src/templates/form_help.js
  4. 2 2
      src/utils/html.js

+ 1 - 0
CHANGES.md

@@ -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:
 

+ 3 - 0
src/templates/form_fixed.js

@@ -0,0 +1,3 @@
+import { html } from "lit";
+
+export default  (o) => html`<p>${o.text}</p>`;

+ 0 - 3
src/templates/form_help.js

@@ -1,3 +0,0 @@
-import { html } from "lit";
-
-export default  (o) => html`<p class="form-help">${o.text}</p>`;

+ 2 - 2
src/utils/html.js

@@ -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';
@@ -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 });