add confirm box and recover file feature

This commit is contained in:
chiu committed 2019-09-30 08:35:34 +08:00
1 parent 67ec45d3d0
commit 2695e0ff67
4 files changed
+363 -129

No files matched your search

@@ -24,8 +24,14 @@ class Admin::PatchfilesController < OrbitAdminController
@key = @file_to_show.file_show.keys[index]
@file_to_show.file_show[@key] = value.to_i
end
@file_to_show.update
redirect_to admin_patchfiles_path
if params["filefield"]["recovery_btn"] == "true"
@file_to_show.recovery = "true"
@file_to_show.update
redirect_to admin_patchfiles_path and return
else
@file_to_show.update
redirect_to admin_patchfiles_path and return
end
end
def showckeditor
end