Commit 49c0dcfb9a0eec7e7ed649058c3673bc501adf3c

Authored by kevin_fourie
1 parent 76949623

KTS-2088

"The " in the name of a Document Type, Transition or State does not reflect in Edit mode"
Fixed.

Committed By: Kevin
Reviewed By: Conrad

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@6808 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/admin/documentTypes.php
... ... @@ -39,6 +39,8 @@ require_once(KT_LIB_DIR . '/metadata/metadatautil.inc.php');
39 39 require_once(KT_LIB_DIR . "/widgets/fieldWidgets.php");
40 40 require_once(KT_LIB_DIR . "/templating/kt3template.inc.php");
41 41  
  42 +require_once(KT_LIB_DIR . "/util/sanitize.inc");
  43 +
42 44 class KTDocumentTypeDispatcher extends KTAdminDispatcher {
43 45  
44 46 var $sHelpPage = 'ktcore/admin/document types.html';
... ... @@ -159,6 +161,7 @@ class KTDocumentTypeDispatcher extends KTAdminDispatcher {
159 161 $oTemplate->setData(array(
160 162 'context' => $this,
161 163 'oDocumentType' => $oDocumentType,
  164 + 'sDocTypeName' => sanitizeForHTML($oDocumentType->getName()),
162 165 'aCurrentFieldsets' => $aCurrentFieldsets,
163 166 'bAnyFieldsets' => count($aAvailableFieldsets) > 0,
164 167 'bAvailableFieldsets' => count($vocab) > 0,
... ...
templates/ktcore/documenttypes/edit.smarty
... ... @@ -3,7 +3,7 @@
3 3 <form method="POST" action="{$smarty.server.PHP_SELF}">
4 4 <input type="hidden" name="action" value="editobject">
5 5 <input type="hidden" name="fDocumentTypeId" value="{$oDocumentType->getId()}">
6   -<input type="textbox" name="name" value="{$oDocumentType->getName()}">
  6 +<input type="textbox" name="name" value="{$sDocTypeName}">
7 7 <input type="submit" name="submit" value="{i18n}Change{/i18n}" />
8 8 </form>
9 9  
... ...