Everything is working except when in edit mode a couple of fields display their values correctly, the others are blank. The list view displays the correct values, if I enter the values they save / write back to the database correctly, they just don't want to render when the Edit button is clicked.
These two work perfectly:
var annual_salary = $(this).closest("tr").find('td.annualsalary').text();
$("#salary_annual_salary").val(annual_salary);
var superannuation = $(this).closest("tr").find('td.superannuation').text();
$("#salary_superannuation").val(superannuation);
These two do not show the values previously entered when you click Edit on the salary screen:
var car_allowance = $(this).closest("tr").find('td.car_allowance').text();
$("#salary_car_allowance").val(car_allowance);
var other_allowance = $(this).closest("tr").find('td.otherallowance').text();
$("#salary_other_allowance").val(other_allowance);
Here is where the LI elements are set earlier in the file.
I followed this set of instructions to create a few new fields:
http://forum.orangehrm.com/viewtopic.php?f=6&t=18413&sid=fa8d38e5b5825097a6299ef534636c93
Everything is working except when in edit mode a couple of fields display their values correctly, the others are blank. The list view displays the correct values, if I enter the values they save / write back to the database correctly, they just don't want to render when the Edit button is clicked.
These two work perfectly:
var annual_salary = $(this).closest("tr").find('td.annualsalary').text();
$("#salary_annual_salary").val(annual_salary);
var superannuation = $(this).closest("tr").find('td.superannuation').text();
$("#salary_superannuation").val(superannuation);
These two do not show the values previously entered when you click Edit on the salary screen:
var car_allowance = $(this).closest("tr").find('td.car_allowance').text();
$("#salary_car_allowance").val(car_allowance);
var other_allowance = $(this).closest("tr").find('td.otherallowance').text();
$("#salary_other_allowance").val(other_allowance);
Here is where the LI elements are set earlier in the file.
Any ideas why the first two work and the second two do not?
Ok... so the issue appears to be with the get on the Salary object in jquery.
var car_allowance = $(this).closest("tr").find('td.car_allowance').text();
$("#salary_car_allowance").val("TESTVALUE");
Works correctly and the PHP get in the list table works correctly. These items have been setup identically on the object / widget.
Any thoughts?