即使项目被删除,CRUD 表单仍在保存项目吗?或许?

发布于 2024-11-15 12:30:52 字数 287 浏览 4 评论 0原文

我有一个表格,显示一个项目以及与该项目关联的所有系统。每个系统都有可以更新的详细信息,更新完成后(例如位置、硬件类型等),您单击“保存”按钮,它将保存更改。还有一个删除按钮(您猜对了)用于从项目中删除系统(系统通过 ajax 调用删除,成功删除后,系统通过 jQuery 隐藏功能从视图中删除)。现在这是奇怪的部分。当按下保存更改按钮时,删除的项目将被保存回项目中。

我的问题是, .hide() 是否实际上将其从表单中删除,或者只是对用户隐藏系统?如果是,我应该使用什么,以便在按下保存更改按钮后系统不会被添加回来?

I have a form that shows a project and all the systems associated to that project. Each system has details which can be updated and once the updates are done (e.g. Location, hardware type, etc), you click the Save button and it will save the changes. There is also a delete button to (you guessed it) delete a system from the project (the system is deleted via an ajax call and upon successful deletion, the system is removed from view via jQuery hide function). Now here is the odd part. When the save changes button is pressed, the deleted item will be saved BACK into the project.

My question is, does the .hide() actually remove it from the form or is it just hiding the system from the user? If yes, what should I be using so that the system doesn't get added back once the save changes button is depressed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文