SimpleSettingController: Löschen-Button nur anzeigen, wenn Objekt einwilligt
[kivitendo-erp.git] / templates / webpages / simple_system_setting / form.html
index da8e4a2..26ca5b4 100644 (file)
@@ -18,7 +18,7 @@
  <p>
   [% L.hidden_tag("action", "SimpleSystemSetting/dispatch") %]
   [% L.submit_tag("action_" _  (SELF.object.id ? "update" : "create"), LxERP.t8("Save"), onclick="return kivi.validate_form('#form');") %]
-  [%- IF SELF.object.id && (!SELF.object.can("orphaned") || SELF.object.orphaned) -%]
+  [%- IF SELF.object.id && (!SELF.object.can("orphaned") || SELF.object.orphaned) && (!SELF.object.can("can_be_deleted") || SELF.object.can_be_deleted) -%]
     [% L.submit_tag("action_delete", LxERP.t8("Delete"), confirm=LxERP.t8("Do you really want to delete this object?")) %]
   [%- END %]
   <a href="[% SELF.list_url %]">[%- LxERP.t8("Cancel") %]</a>