Improve documentation

This commit is contained in:
sparkyx 2023-12-02 18:20:27 +01:00
parent ff0bc1651e
commit 4f1d7e155a

View file

@ -75,6 +75,26 @@
* @endcode
*
* The afterSaveFct is the function called after saving, the param is the HTML Element
@code PHP
// to redirect : we take the pk_id and redirect to another location
$obj=$this->get_object_name();
$url=DRIVINGSCHOOL_URL;
$script=<<<EOF
(function(){
{$obj}.afterSaveFct=function(p_param) {
let student=p_param.attributes["ctl_pk_id"].value;
window.location="{$url}/do.php?do=student&student_id="+student+"&act=detail";
}})();
EOF;
echo create_script($script);
{$obj}.afterSaveFct=function(p_param) {
let student=p_param.attributes["ctl_pk_id"].value;
window.location="{$url}/do.php?do=student&student_id="+student+"&act=detail";
}})();
@endcode
*/
class Manage_Table_SQL