(label, id, value, variant = "wide", multiline = false, hint = "")
| 5004 | } |
| 5005 | |
| 5006 | function profileEditItem(label, id, value, variant = "wide", multiline = false, hint = "") { |
| 5007 | const variantClass = variant ? ` ${variant}` : ""; |
| 5008 | const escapedValue = escapeHtml(value || ""); |
| 5009 | const placeholder = hint ? ` placeholder="${escapeHtml(hint)}"` : ""; |
| 5010 | const control = multiline |
| 5011 | ? `<textarea id="${escapeHtml(id)}" rows="2"${placeholder}>${escapedValue}</textarea>` |
| 5012 | : `<input id="${escapeHtml(id)}" value="${escapedValue}"${placeholder}>`; |
| 5013 | const hintText = hint ? `<small>${escapeHtml(hint)}</small>` : ""; |
| 5014 | return `<label class="profile-info-item editable${variantClass}"><span>${escapeHtml(label)}</span>${control}${hintText}</label>`; |
| 5015 | } |
| 5016 | |
| 5017 | function renderProfileInfoGrid(profile, raw, userInfo, details) { |
| 5018 | const target = $("profileInfoGrid"); |
no test coverage detected