Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function buildBillableCheckbox(projectParam, taskParam) {
- var billableCheckbox = AJS.$("#worktime-dialog #billable");
- var isChecked = false;
- if (projectParam != null && taskParam != null) {
- if ((taskParam.accountableType != null && taskParam.accountableType != "none")
- || (taskParam.accountableType == null && projectParam.billable == "true") ) {
- isChecked = true;
- }
- billableCheckbox.prop('checked', isChecked);
- if (!isChecked) {
- AJS.$('#worktime-dialog #reasonsNotAccountable').parent().show();
- } else {
- AJS.$('#worktime-dialog #reasonsNotAccountable').parent().hide();
- }
- }
- billableChange(); //enable billable change trigger
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement