Forum Replies Created
-
AuthorPosts
-
GordianParticipant
I registered my email class inside ‘class-emails.php’ and created file with my class inside ’email’ folder of HRM module. Is that enough or should I do anything else?
P. S. Should I do include method in the class-emails.php to show location of my class file?
GordianParticipantShould I register my new form (\wp-content\wp-content\plugins\erp\modules\hrm\views\js-templates\violation-form.php) somewhere as it was made for my new model (in hrm.php)?
P.S. I’ve done all modification in hrm.js, hrm.min.js, hrm.php and so on. But no result…
- This reply was modified 4 years, 7 months ago by Gordian.
GordianParticipant@mehedi,
thanks for your help! I did it. I deleted ‘einformed’ variable from Class Employee protected data.GordianParticipantThank you!
Just to make it clear… I created a field in employees table. The name of field is ‘einformed’.
I want this field to take parametr ‘no’ in case if posted date of birth (in the form) is not the same as it is in DB. So, ‘einformed ‘ variable doesn’t mentioned is the form. I’m trying to use it only in ‘update employee’ function.P.S. I’v added it to the employee model, but there is no success.
GordianParticipantThis is my code inside class-employee.php, update employee function of hrm module.
//update user einformed if license_date was changed
if ( isset( $posted[‘license_date’] ) && $posted[‘license_date’] !== $this->erp_user->license_date ) {$this->erp_user->update( [ ‘user_id’ => $this->user_id, ‘einformed’ => ‘no’ ] );
if ( is_wp_error( $result ) ) {
return $result;
}
} -
AuthorPosts