diff --git a/Layer-2__Business_logic/content/forms/Job_Offer_form.php b/Layer-2__Business_logic/content/forms/Job_Offer_form.php index 7340270..ec8bf07 100644 --- a/Layer-2__Business_logic/content/forms/Job_Offer_form.php +++ b/Layer-2__Business_logic/content/forms/Job_Offer_form.php @@ -1166,6 +1166,13 @@ class JobOfferForm extends SkillsForm $smarty->assign('data', $this->data); $smarty->assign('checks', $this->checks); + $num1 = rand(1,9); + $num2 = rand(1,9); + $result = $num1 + $num2; + $smarty->assign('num1', $num1); + $smarty->assign('num2', $num2); + $smarty->assign('result', $result); + $smarty->display("Job_Offer_post_faster_form.tpl"); } @@ -1217,7 +1224,11 @@ class JobOfferForm extends SkillsForm // Some field can not be empty - + if ( $_POST["captcha"] != $_POST["result"] ) + { + $this->checks['result'] = "fail"; + $this->checks['captcha'] = gettext('Please fill correctly the solution'); + } if ( $this->data['VacancyTitle']=='' ) { $this->checks['result'] = "fail";