Hide uninstall package button on unmodifiable paths (#8255)

This commit is contained in:
rubenwardy 2019-03-05 07:12:58 +00:00 committed by Nils Dagsson Moskopp
parent 17fcbff308
commit f205d99aa7
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 7 additions and 3 deletions

View File

@ -134,9 +134,13 @@ local function get_formspec(tabview, name, tabdata)
end end
retval = retval .. "textarea[5.85,2.2;6.35,2.9;;" .. retval = retval .. "textarea[5.85,2.2;6.35,2.9;;" ..
fgettext("Information:") .. ";" .. desc .. "]" .. fgettext("Information:") .. ";" .. desc .. "]"
"button[5.5,4.65;3.25,1;btn_mod_mgr_delete_mod;" ..
fgettext("Uninstall Package") .. "]" if core.may_modify_path(selected_pkg.path) then
retval = retval ..
"button[5.5,4.65;3.25,1;btn_mod_mgr_delete_mod;" ..
fgettext("Uninstall Package") .. "]"
end
end end
return retval return retval
end end