19 public $mOptions = [];
24 public function _getId()
26 if ($this->mRoot->mContext->mXoopsUser) {
27 return $this->mRoot->mContext->mXoopsUser->get(
'uid');
29 $this->mRoot->mController->executeRedirect(XOOPS_URL .
'/user.php', 1, _MD_PROFILE_ERROR_REGISTER_REQUIRED);
36 public function &_getHandler()
38 $handler =& $this->mAsset->load(
'handler',
'data');
45 public function _setupActionForm()
48 $this->mActionForm =& $this->mAsset->create(
'form',
'edit_data');
49 $this->mActionForm->prepare();
55 public function prepare()
58 $this->mObject->set(
'uid', $this->_getId());
60 $defHandler =& xoops_getmodulehandler(
'definitions');
61 $this->mFields =& $defHandler->getFields4DataEdit();
70 $render->setTemplateName(
'profile_data_edit.html');
71 $render->setAttribute(
'actionForm', $this->mActionForm);
72 $render->setAttribute(
'object', $this->mObject);
73 $render->setAttribute(
'fields', $this->mFields);
74 $headerScript = $this->mRoot->mContext->getAttribute(
'headerScript');
75 $headerScript->addScript(
'$(".datepicker").each(function(){$(this).datepicker({dateFormat: "'._JSDATEPICKSTRING.
'"});});');
84 $this->mRoot->mController->executeForward(
'./index.php?action=DataList');
93 $this->mRoot->mController->executeRedirect(
'./index.php?action=DataList', 1, _MD_PROFILE_ERROR_DBUPDATE_FAILED);
102 $this->mRoot->mController->executeForward(
'./index.php?action=DataList');