Skip to content

Commit

Permalink
Merge e98c090 into 72754ff
Browse files Browse the repository at this point in the history
  • Loading branch information
willkoua committed Jun 10, 2016
2 parents 72754ff + e98c090 commit 219f15a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/Template/Missions/view.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ echo 'var acceptUrl="' . $this->Url->Build(['controller' => 'Applications', 'act
echo 'var detailsUrl="' . $this->Url->Build(['controller' => 'Applications', 'action' => 'view']) . '";';
echo 'var rejectCandidateTr="' . __('Reject the candidate') . '";';
echo 'var acceptCandidateTr="' . __('Accept the candidate') . '";';
echo 'var warning="' . __('WARNING') . '";';
if($mission->getTypeId() == 4){
echo 'var attentionTXT="' . __('The validation of this candidate requires that there is an associate professor at mission') . '";';
}else if($mission->getTypeId() == 1){
echo 'var attentionTXT="' . __('The validation of this candidate requires that it be paid for the work he provides') . '";';
}
echo 'var detailsTr="' . __('View details') . '";';
$this->Html->scriptEnd();
if ($user && $user->hasPermissionName(['edit_mission', 'edit_missions'])) {
Expand Down
11 changes: 8 additions & 3 deletions webroot/js/missions/viewMentor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ $(document).ready(function () {
$('<a />', {
href: acceptUrl + '/' + aData.id,
text: acceptCandidateTr,
class: 'btn ' + (aData.accepted || aData.rejected ? 'btn-default disabled' : 'btn-success')
})
class: 'btn ' + (aData.accepted || aData.rejected ? 'btn-default disabled' : 'btn-success'),
"data-toggle": "popover",
title: warning,
"data-content": attentionTXT,
"data-trigger": "hover",
"data-placement": "top"
}).popover('show')
);
$('td:eq(2)', nRow).html(
$('<a />', {
Expand All @@ -39,4 +44,4 @@ $(document).ready(function () {
);
}
});
});
});

0 comments on commit 219f15a

Please sign in to comment.