Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ v31.0.00
Messenger: fixed overflowing images and iframes on Message Wall
Planner: fixed "present in room" attendance counts in Lesson Plan to exclude Present - Offsite
Staff: fixed staff coverage showing on timetable when not accepted yet or declined
Staff: fixed the issue of including staff email while submitting a job application form
School Admin: fixed inactive grade scales not selectable in Manage External Assessment

Deprecations
Expand Down
23 changes: 16 additions & 7 deletions modules/Staff/applicationFormProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

use Gibbon\Data\Validator;
use Gibbon\Services\Format;
use Gibbon\Comms\EmailTemplate;
use Gibbon\Contracts\Comms\Mailer;
use Gibbon\Comms\NotificationEvent;
use Gibbon\Forms\CustomFieldHandler;
use Gibbon\Contracts\Comms\Mailer;
use Gibbon\Data\Validator;
use Gibbon\Domain\System\EmailTemplateGateway;
use Gibbon\Domain\System\SettingGateway;
use Gibbon\Domain\User\UserGateway;
use Gibbon\Forms\CustomFieldHandler;
use Gibbon\Forms\PersonalDocumentHandler;
use Gibbon\Domain\System\EmailTemplateGateway;
use Gibbon\Forms\Builder\FormBuilderInterface;
use Gibbon\Services\Format;

require_once '../../gibbon.php';

Expand Down Expand Up @@ -110,7 +110,16 @@
$referenceEmail1 = $_POST['referenceEmail1'] ?? '';
$referenceEmail2 = $_POST['referenceEmail2'] ?? '';
$agreement = isset($_POST['agreement']) ? ($_POST['agreement'] == 'on' ? 'Y' : 'N') : null;


if (!empty($gibbonPersonID)) {
$staffDetails = $container->get(UserGateway::class)->getSafeUserData($gibbonPersonID);

if (!empty($staffDetails)) {
$officialName = $staffDetails['officialName'];
$email = $staffDetails['email'];
$gender = $staffDetails['gender'];
}
}

//VALIDATE INPUTS
if (count($gibbonStaffJobOpeningIDs) < 1 or ($gibbonPersonID == null and ($surname == '' or $firstName == '' or $preferredName == '' or $officialName == '' or $gender == '' or $dob == '' or $languageFirst == '' or $email == '' or $homeAddress == '' or $homeAddressDistrict == '' or $homeAddressCountry == '' or $phone1 == '')) or (isset($_POST['referenceEmail1']) and $referenceEmail1 == '') or (isset($_POST['referenceEmail2']) and $referenceEmail2 == '') or (isset($_POST['agreement']) and $agreement != 'Y')) {
Expand Down
Loading