Have you ever thought about how to quickly copy the most popular item and then modify it to become a new group purchase item?
Or when editing an old project, you want to save it as a new project instead of saving,
Look at the picture below, the red part
The specific development code (non-details) is as follows
Modify the template and add buttons
include/template/manage_team_edit.html
Add js to handle cloneteam function
function cloneteam()
{
document.getElementById('-user-form').action=”/manage/team/edit.php?clone=1″;
document.getElementById( '-user-form').submit();
}
Note clone=1
In addition, the template was modified to add several hidden contents in order to copy the image image1 image2 fields in the old project
Modify manage/team/edit.php
The original code is like this
Now the code is like this