Update card.php
This commit is contained in:
parent
0d9280f945
commit
97f3296c73
@ -565,6 +565,7 @@ if ($action == 'create') {
|
|||||||
print '<script>';
|
print '<script>';
|
||||||
print '$( document ).ready(function() {';
|
print '$( document ).ready(function() {';
|
||||||
print '$("#updateAmountWithLastSalary").on("click", function updateAmountWithLastSalary() {
|
print '$("#updateAmountWithLastSalary").on("click", function updateAmountWithLastSalary() {
|
||||||
|
console.log("We click on link to autofill salary amount");
|
||||||
var fk_user = $("#fk_user").val()
|
var fk_user = $("#fk_user").val()
|
||||||
var url = "'.DOL_URL_ROOT.'/salaries/ajax/ajaxsalaries.php?fk_user="+fk_user;
|
var url = "'.DOL_URL_ROOT.'/salaries/ajax/ajaxsalaries.php?fk_user="+fk_user;
|
||||||
if (fk_user != -1) {
|
if (fk_user != -1) {
|
||||||
@ -584,7 +585,6 @@ if ($action == 'create') {
|
|||||||
} else {
|
} else {
|
||||||
console.error("Error: Ajax url "+url+" has returned the wrong key.");
|
console.error("Error: Ajax url "+url+" has returned the wrong key.");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.error("Error: Ajax url "+url+" has returned an empty page.");
|
console.error("Error: Ajax url "+url+" has returned an empty page.");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user