Commit ae18673f0750e897c99f3f5ea3de475a4d900246

Authored by michael
1 parent 71b6d867

fixed #2724- was checking if the variable was set from a hidden input field

also, redirect to listFields on successful editing


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2327 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/editDocFieldBL.php
@@ -23,12 +23,13 @@ if (checkSession()) { @@ -23,12 +23,13 @@ if (checkSession()) {
23 $oPatternCustom = & new PatternCustom(); 23 $oPatternCustom = & new PatternCustom();
24 24
25 if (isset($fForStore)) { 25 if (isset($fForStore)) {
  26 +
26 $oDocField = DocumentField::get($fDocFieldID); 27 $oDocField = DocumentField::get($fDocFieldID);
27 $oDocField->setName($fDocFieldName); 28 $oDocField->setName($fDocFieldName);
28 $oDocField->setDataType($fDocFieldDataType); 29 $oDocField->setDataType($fDocFieldDataType);
29 30
30 - //check if checkbox checked  
31 - if (isset($fDocFieldIsGeneric)) { 31 + //check if checkbox checked || hidden value
  32 + if ($fDocFieldIsGeneric) {
32 $oDocField->setIsGeneric(true); 33 $oDocField->setIsGeneric(true);
33 } else { 34 } else {
34 $oDocField->setIsGeneric(false); 35 $oDocField->setIsGeneric(false);
@@ -49,8 +50,9 @@ if (checkSession()) { @@ -49,8 +50,9 @@ if (checkSession()) {
49 controllerRedirect("addMetaDataForField", "fDocFieldID=$fDocFieldID"); 50 controllerRedirect("addMetaDataForField", "fDocFieldID=$fDocFieldID");
50 } 51 }
51 } 52 }
52 - // otherwise, print out success message  
53 - $oPatternCustom->setHtml(getEditPageSuccess()); 53 + // otherwise, go to the list page
  54 + controllerRedirect("listDocFields", "");
  55 + //$oPatternCustom->setHtml(getEditPageSuccess());
54 } else { 56 } else {
55 // if fail print out fail message 57 // if fail print out fail message
56 $oPatternCustom->setHtml(getEditPageFail()); 58 $oPatternCustom->setHtml(getEditPageFail());