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

Function captureProfileDraft

deployments/desktop/static/desktop.js:1482–1500  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1480 }
1481
1482 function captureProfileDraft() {
1483 const ids = [
1484 "profileUserId",
1485 "scholarUrl",
1486 "homepageUrl",
1487 "pdfPaths",
1488 "profileDirectionsInput",
1489 "profileKeywordsInput",
1490 "profileAuthorsInput",
1491 "profileInstitutionsInput",
1492 "profileTopicsInput"
1493 ];
1494 const draft = {};
1495 ids.forEach((id) => {
1496 if ($(id)) draft[id] = $(id).value;
1497 });
1498 if ($("resetProfile")) draft.resetProfile = $("resetProfile").checked;
1499 return draft;
1500 }
1501
1502 function restoreProfileDraft(draft = {}) {
1503 Object.entries(draft).forEach(([id, value]) => {

Callers 1

setLocaleFunction · 0.85

Calls 1

$Function · 0.70

Tested by

no test coverage detected