/** * Check user can view the read only element OR view in list view * * When processing the form, we always want to store the current userid * (subject to save-on-edit, but that's done elsewhere), regardless of * element access settings, see: * * http://fabrikar.com/forums/showthread.php?p=70554#post70554 * * So overriding the element model canView and returning true in that * case allows addDefaultDataFromRO to do that, whilst still enforcing * Read Access settings for detail/list view * * @param string $view View list/form @since 3.0.7 * * @return bool can view or not */ public function canView($view = 'form') { if ($this->app->input->get('task', '') == 'processForm') { return true; } return parent::canView($view); }
/** * Check user can view the read only element OR view in list view * * When processing the form, we always want to store the current userid * (subject to save-on-edit, but that's done elsewhere), regardless of * element access settings, see: * * http://fabrikar.com/forums/showthread.php?p=70554#post70554 * * So overriding the element model canView and returning true in that * case allows addDefaultDataFromRO to do that, whilst still enforcing * Read Access settings for detail/list view * * @param string $view View list/form @since 3.0.7 * * @return bool can view or not */ public function canView($view = 'form') { $app = JFactory::getApplication(); if ($app->input->get('task', '') == 'processForm') { return true; } return parent::canView($view); }