Commit 08a807ed301ee082b5a911fafd4e5c4645c0a8f9
1 parent
fb4288ae
Add do_updateFieldset and fix changes since this was first developed.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3761 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
21 additions
and
9 deletions
presentation/lookAndFeel/knowledgeTree/ajaxConditional.php
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | require_once("../../../config/dmsDefaults.php"); |
| 3 | 3 | require_once(KT_DIR . "/presentation/Html.inc"); |
| 4 | 4 | require_once(KT_LIB_DIR . "/templating/templating.inc.php"); |
| 5 | -require_once(KT_LIB_DIR . "/documentmanagement/DocumentFieldSet.inc"); | |
| 5 | +require_once(KT_LIB_DIR . "/metadata/fieldset.inc.php"); | |
| 6 | 6 | require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc"); |
| 7 | 7 | require_once(KT_LIB_DIR . "/documentmanagement/MDCondition.inc"); |
| 8 | 8 | require_once(KT_LIB_DIR . "/database/dbutil.inc"); |
| ... | ... | @@ -19,18 +19,11 @@ require_once(KT_DIR . "/presentation/webpageTemplate.inc"); |
| 19 | 19 | class AjaxConditionalDispatcher extends KTDispatcher { |
| 20 | 20 | |
| 21 | 21 | function do_main() { |
| 22 | - $oTemplating = new KTTemplating; | |
| 23 | - | |
| 24 | - $oTemplate = $oTemplating->loadTemplate("ktcore/widget_fieldset_conditional"); | |
| 25 | - $aTemplateData = array( | |
| 26 | - "fieldset_id" => 3, | |
| 27 | - ); | |
| 28 | - return $oTemplate->render($aTemplateData); | |
| 22 | + return "AJAX Error"; | |
| 29 | 23 | } |
| 30 | 24 | |
| 31 | 25 | function handleOutput($data) { |
| 32 | 26 | print $data; |
| 33 | - | |
| 34 | 27 | } |
| 35 | 28 | |
| 36 | 29 | function do_verifyAndUpdate() { |
| ... | ... | @@ -45,6 +38,25 @@ class AjaxConditionalDispatcher extends KTDispatcher { |
| 45 | 38 | return ; |
| 46 | 39 | } |
| 47 | 40 | |
| 41 | + function do_updateFieldset() { | |
| 42 | + header('Content-Type: application/xml'); | |
| 43 | + return ' | |
| 44 | +<div class="widget"> | |
| 45 | +<label> | |
| 46 | +<select name="test123"> | |
| 47 | + <option value="1">Option 1</option> | |
| 48 | + <option value="2">Option 2</option> | |
| 49 | + <option value="3">Option 3</option> | |
| 50 | + <option value="4">Option 4</option> | |
| 51 | + <option value="5">Option 5</option> | |
| 52 | + <option value="6">Option 6</option> | |
| 53 | +</select> | |
| 54 | + Test 123. Was that not nice? | |
| 55 | +</label> | |
| 56 | +</div> | |
| 57 | + '; | |
| 58 | + } | |
| 59 | + | |
| 48 | 60 | } |
| 49 | 61 | |
| 50 | 62 | $oDispatcher = new AjaxConditionalDispatcher(); | ... | ... |