Browse Source

Fix recruitement candidature cancel pre-action (#26386)

* Fix recruitement candidature cancel pre-action

* fix lang file

---------

Co-authored-by: Hystepik <lucas.marcouiller@gmail.com>
Lucas Marcouiller 1 year ago
parent
commit
d8116b8ce4

+ 2 - 0
htdocs/langs/en_US/recruitment.lang

@@ -77,3 +77,5 @@ ExtrafieldsApplication=Complementary attributes (job applications)
 MakeOffer=Make an offer
 WeAreRecruiting=We are recruiting. This is a list of open positions to be filled...
 NoPositionOpen=No positions open at the moment
+ConfirmClose=Confirm cancelation
+ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature

+ 7 - 0
htdocs/recruitment/recruitmentcandidature_card.php

@@ -396,6 +396,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
 		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), $text, 'confirm_closeas', $formquestion, '', 1, 250);
 	}
 
+	if ($action == 'close') {
+		$langs->load("propal");
+
+		//Form to close proposal (signed or not)
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ConfirmClose'), $langs->trans('ConfirmCloseAsk'), 'confirm_close', $formquestion, '', 1, 250);
+	}
+
 	// Confirm create user
 	if ($action == 'create_user') {
 		$login = (GETPOSTISSET('login') ? GETPOST('login', 'alphanohtml') : $object->login);