From c365e539949e0b0eed47f787b5288666f72e800a Mon Sep 17 00:00:00 2001 From: Prashant Mittal Date: Tue, 26 Sep 2023 17:10:16 +0530 Subject: [PATCH] [rolodex] adds back method to populate contact edit form --- apps/rolodex/views/partials/app/contact_list.ejs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/rolodex/views/partials/app/contact_list.ejs b/apps/rolodex/views/partials/app/contact_list.ejs index 72659027..22bd0196 100644 --- a/apps/rolodex/views/partials/app/contact_list.ejs +++ b/apps/rolodex/views/partials/app/contact_list.ejs @@ -5,6 +5,11 @@ window.deleteContact = deleteContact; window.renderTable = renderTable; + window.setContactEditForm = function (id, name){ + document.getElementById("edit-contact-name").value = name + document.getElementById("edit-contact-id").value = id + } + getContacts().then((result) => { document.querySelector("#contact-list-table > table").appendChild(renderTable(result)) })