From 51231057e28e28465abac00f0af57fca82c90d30 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Thu, 10 Jul 2003 08:29:05 +0000 Subject: [PATCH] (#2728) don't allow Name or Generic to be edited if its the category field --- presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/editDocFieldUI.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/editDocFieldUI.inc b/presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/editDocFieldUI.inc index 545873a..b81f060 100644 --- a/presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/editDocFieldUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/editDocFieldUI.inc @@ -38,7 +38,8 @@ function getEditPage($iDocFieldID) { $sToRender .= "\n"; // allow changing the generic status if the field is not linked to a document type - if($checkBox == false) { + // and if this isn't the category field + if ( ($checkBox == false) || $oDocField->getName() != "Category") { $sToRender .= "Is Generic: " . getIsGenericCheckBox($oDocField) . "\n"; } else { $sToRender .= "getIsGeneric() . "\">\n"; @@ -121,7 +122,8 @@ function getDocFieldDisplay($oDocField) { return $oPatternListBox->render(); } else { return "iId . "\">\n" . - "getName() . "\">"; + "getName() . "\"" . + ($oDocField->getName() == "Category" ? "disabled=\"disabled\"" : "") . ">"; } } -- libgit2 0.21.4