MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / profileEditItem

Function profileEditItem

deployments/desktop/static/desktop.js:5006–5015  ·  view source on GitHub ↗
(label, id, value, variant = "wide", multiline = false, hint = "")

Source from the content-addressed store, hash-verified

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");

Callers 1

renderProfileInfoGridFunction · 0.85

Calls 1

escapeHtmlFunction · 0.70

Tested by

no test coverage detected