@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function updateCollectionItems(&$collection) |
| 35 | 35 | { |
| 36 | - $collection = $collection->filterByCallback(function ($item) { |
|
| 36 | + $collection = $collection->filterByCallback(function($item) { |
|
| 37 | 37 | return ( |
| 38 | 38 | $item->PostDate <= DBDatetime::now() && |
| 39 | 39 | $item->EndPostDate >= DBDatetime::now() |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | */ |
| 82 | 82 | public function getCMSFields() |
| 83 | 83 | { |
| 84 | - $this->beforeUpdateCMSFields(function ($fields) { |
|
| 84 | + $this->beforeUpdateCMSFields(function($fields) { |
|
| 85 | 85 | $app = new UploadField('Application', 'Application Form'); |
| 86 | 86 | $app |
| 87 | 87 | ->setDescription('optional - include application file to print and complete manually') |
@@ -58,9 +58,9 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | $labels = parent::fieldLabels($includerelations); |
| 60 | 60 | |
| 61 | - $labels['Name'] = _t(__CLASS__ . '.NameLabel', 'Name'); |
|
| 62 | - $labels['Title'] = _t(__CLASS__ . '.TitleLabel', 'Title'); |
|
| 63 | - $labels['Jobs'] = _t(Job::class . '.PLURALNAME', 'Jobs'); |
|
| 61 | + $labels['Name'] = _t(__CLASS__.'.NameLabel', 'Name'); |
|
| 62 | + $labels['Title'] = _t(__CLASS__.'.TitleLabel', 'Title'); |
|
| 63 | + $labels['Jobs'] = _t(Job::class.'.PLURALNAME', 'Jobs'); |
|
| 64 | 64 | |
| 65 | 65 | return $labels; |
| 66 | 66 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $fields->dataFieldByName('Name') |
| 76 | 76 | ->setDescription(_t( |
| 77 | - __CLASS__ . '.NameDescription', |
|
| 77 | + __CLASS__.'.NameDescription', |
|
| 78 | 78 | 'For internal reference only' |
| 79 | 79 | )); |
| 80 | 80 | |
@@ -83,18 +83,18 @@ discard block |
||
| 83 | 83 | { |
| 84 | 84 | $labels = parent::fieldLabels($includerelations); |
| 85 | 85 | |
| 86 | - $labels['Name'] = _t(__CLASS__ . '.NameLabel', 'Applicant'); |
|
| 87 | - $labels['Job.Title'] = _t(__CLASS__ . '.JobLabel', 'Job'); |
|
| 88 | - $labels['Job.ID'] = _t(__CLASS__ . '.JobLabel', 'Job'); |
|
| 89 | - $labels['Created'] = _t(__CLASS__ . '.CreatedLabel', 'Application Date'); |
|
| 90 | - $labels['Created.Nice'] = _t(__CLASS__ . '.CreatedLabel', 'Application Date'); |
|
| 91 | - $labels['FirstName'] = _t(__CLASS__ . '.FirstNameLabel', 'First'); |
|
| 92 | - $labels['LastName'] = _t(__CLASS__ . '.LastNameLabel', 'Last'); |
|
| 93 | - $labels['Email'] = _t(__CLASS__ . '.EmailLabel', 'Email'); |
|
| 94 | - $labels['Phone'] = _t(__CLASS__ . '.PhoneLabel', 'Phone'); |
|
| 95 | - $labels['Available'] = _t(__CLASS__ . '.AvailableLabel', 'Date Available'); |
|
| 96 | - $labels['Resume'] = _t(__CLASS__ . '.ResumeLabel', 'Resume'); |
|
| 97 | - $labels['Content'] = _t(__CLASS__ . '.ContentLabel', 'Cover Letter'); |
|
| 86 | + $labels['Name'] = _t(__CLASS__.'.NameLabel', 'Applicant'); |
|
| 87 | + $labels['Job.Title'] = _t(__CLASS__.'.JobLabel', 'Job'); |
|
| 88 | + $labels['Job.ID'] = _t(__CLASS__.'.JobLabel', 'Job'); |
|
| 89 | + $labels['Created'] = _t(__CLASS__.'.CreatedLabel', 'Application Date'); |
|
| 90 | + $labels['Created.Nice'] = _t(__CLASS__.'.CreatedLabel', 'Application Date'); |
|
| 91 | + $labels['FirstName'] = _t(__CLASS__.'.FirstNameLabel', 'First'); |
|
| 92 | + $labels['LastName'] = _t(__CLASS__.'.LastNameLabel', 'Last'); |
|
| 93 | + $labels['Email'] = _t(__CLASS__.'.EmailLabel', 'Email'); |
|
| 94 | + $labels['Phone'] = _t(__CLASS__.'.PhoneLabel', 'Phone'); |
|
| 95 | + $labels['Available'] = _t(__CLASS__.'.AvailableLabel', 'Date Available'); |
|
| 96 | + $labels['Resume'] = _t(__CLASS__.'.ResumeLabel', 'Resume'); |
|
| 97 | + $labels['Content'] = _t(__CLASS__.'.ContentLabel', 'Cover Letter'); |
|
| 98 | 98 | |
| 99 | 99 | return $labels; |
| 100 | 100 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | public function getName() |
| 106 | 106 | { |
| 107 | 107 | if ($this->FirstName) { |
| 108 | - return $this->FirstName . ' ' . $this->LastName; |
|
| 108 | + return $this->FirstName.' '.$this->LastName; |
|
| 109 | 109 | } else { |
| 110 | 110 | return 'No Name'; |
| 111 | 111 | } |
@@ -202,8 +202,8 @@ discard block |
||
| 202 | 202 | $link = Controller::join_links( |
| 203 | 203 | Director::absoluteBaseURL(), |
| 204 | 204 | singleton(JobAdmin::class)->Link(), |
| 205 | - 'Dynamic-Jobs-Model-JobSubmission/EditForm/field/Dynamic-Jobs-Model-JobSubmission/item/' . |
|
| 206 | - $this->ID . '/edit' |
|
| 205 | + 'Dynamic-Jobs-Model-JobSubmission/EditForm/field/Dynamic-Jobs-Model-JobSubmission/item/'. |
|
| 206 | + $this->ID.'/edit' |
|
| 207 | 207 | ); |
| 208 | 208 | |
| 209 | 209 | return $link; |
@@ -66,8 +66,8 @@ |
||
| 66 | 66 | { |
| 67 | 67 | $labels = parent::fieldLabels($includerelations); |
| 68 | 68 | |
| 69 | - $labels['Name'] = _t(__CLASS__ . '.NameLabel', 'Name'); |
|
| 70 | - $labels['Title'] = _t(__CLASS__ . '.TitleLabel', 'Title'); |
|
| 69 | + $labels['Name'] = _t(__CLASS__.'.NameLabel', 'Name'); |
|
| 70 | + $labels['Title'] = _t(__CLASS__.'.TitleLabel', 'Title'); |
|
| 71 | 71 | |
| 72 | 72 | return $labels; |
| 73 | 73 | } |
@@ -139,13 +139,13 @@ discard block |
||
| 139 | 139 | { |
| 140 | 140 | $labels = parent::fieldLabels($includerelations); |
| 141 | 141 | |
| 142 | - $labels['Title'] = _t(__CLASS__ . '.TitleLabel', 'Position Name'); |
|
| 143 | - $labels['Content'] = _t(__CLASS__ . '.ContentLabel', 'Introduction'); |
|
| 144 | - $labels['PositionType'] = _t(__CLASS__ . '.PositionTypeLabel', 'Position Type'); |
|
| 145 | - $labels['PostDate'] = _t(__CLASS__ . '.PostDateLabel', 'Post Start Date'); |
|
| 146 | - $labels['EndPostDate'] = _t(__CLASS__ . '.EndPostDateLabel', 'Post End Date'); |
|
| 147 | - $labels['Details'] = _t(__CLASS__ . '.DetailsTab', "Details"); |
|
| 148 | - $labels['Submissions'] = _t(__CLASS__ . '.SubmissionsTab', 'Submissions'); |
|
| 142 | + $labels['Title'] = _t(__CLASS__.'.TitleLabel', 'Position Name'); |
|
| 143 | + $labels['Content'] = _t(__CLASS__.'.ContentLabel', 'Introduction'); |
|
| 144 | + $labels['PositionType'] = _t(__CLASS__.'.PositionTypeLabel', 'Position Type'); |
|
| 145 | + $labels['PostDate'] = _t(__CLASS__.'.PostDateLabel', 'Post Start Date'); |
|
| 146 | + $labels['EndPostDate'] = _t(__CLASS__.'.EndPostDateLabel', 'Post End Date'); |
|
| 147 | + $labels['Details'] = _t(__CLASS__.'.DetailsTab', "Details"); |
|
| 148 | + $labels['Submissions'] = _t(__CLASS__.'.SubmissionsTab', 'Submissions'); |
|
| 149 | 149 | //$labels['Categories'] = _t(JobCategory::class . '.SlideType', 'Image or Video'); |
| 150 | 150 | |
| 151 | 151 | return $labels; |
@@ -156,12 +156,12 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function getCMSFields() |
| 158 | 158 | { |
| 159 | - $this->beforeUpdateCMSFields(function ($fields) { |
|
| 159 | + $this->beforeUpdateCMSFields(function($fields) { |
|
| 160 | 160 | $fields->dataFieldByName('Content') |
| 161 | 161 | ->setTitle($this->fieldLabel('Content')) |
| 162 | 162 | ->setRows(10); |
| 163 | 163 | |
| 164 | - $fields->addFieldsToTab('Root.' . $this->fieldLabel('Details'), [ |
|
| 164 | + $fields->addFieldsToTab('Root.'.$this->fieldLabel('Details'), [ |
|
| 165 | 165 | DropdownField::create( |
| 166 | 166 | 'PositionType', |
| 167 | 167 | $this->fieldLabel('PositionType'), |
@@ -169,12 +169,12 @@ discard block |
||
| 169 | 169 | )->setEmptyString('--select--'), |
| 170 | 170 | DateField::create('PostDate', $this->fieldLabel('PostDate')) |
| 171 | 171 | ->setDescription(_t( |
| 172 | - __CLASS__ . '.PostDateDescription', |
|
| 172 | + __CLASS__.'.PostDateDescription', |
|
| 173 | 173 | 'Date position should appear on website' |
| 174 | 174 | )), |
| 175 | 175 | DateField::create('EndPostDate', $this->fieldLabel('EndPostDate')) |
| 176 | 176 | ->setDescription(_t( |
| 177 | - __CLASS__ . '.EndPostDateDescription', |
|
| 177 | + __CLASS__.'.EndPostDateDescription', |
|
| 178 | 178 | 'Date position should be removed from website' |
| 179 | 179 | )), |
| 180 | 180 | ]); |
@@ -183,11 +183,11 @@ discard block |
||
| 183 | 183 | // categories |
| 184 | 184 | $categoriesField = ListboxField::create( |
| 185 | 185 | 'Categories', |
| 186 | - _t(JobCategory::class . '.PLURALNAME', 'Categories'), |
|
| 186 | + _t(JobCategory::class.'.PLURALNAME', 'Categories'), |
|
| 187 | 187 | JobCategory::get()->map() |
| 188 | 188 | ); |
| 189 | 189 | |
| 190 | - $fields->addFieldsToTab('Root.' . $this->fieldLabel('Details'), [ |
|
| 190 | + $fields->addFieldsToTab('Root.'.$this->fieldLabel('Details'), [ |
|
| 191 | 191 | $categoriesField, |
| 192 | 192 | ]); |
| 193 | 193 | |
@@ -202,12 +202,12 @@ discard block |
||
| 202 | 202 | $sections = $this->Sections()->sort('Sort'); |
| 203 | 203 | $sectionsField = GridField::create( |
| 204 | 204 | 'Sections', |
| 205 | - _t(JobSection::class . '.PLURALNAME', 'Sections'), |
|
| 205 | + _t(JobSection::class.'.PLURALNAME', 'Sections'), |
|
| 206 | 206 | $sections, |
| 207 | 207 | $config |
| 208 | 208 | ) |
| 209 | 209 | ->setDescription(_t( |
| 210 | - __CLASS__ . '.SectionsDescription', |
|
| 210 | + __CLASS__.'.SectionsDescription', |
|
| 211 | 211 | 'ex: Requirements, Education, Duties, etc.' |
| 212 | 212 | )); |
| 213 | 213 | |
@@ -225,12 +225,12 @@ discard block |
||
| 225 | 225 | $submissions = $this->Submissions(); |
| 226 | 226 | $submissionsField = GridField::create( |
| 227 | 227 | 'Submissions', |
| 228 | - _t(JobSubmission::class . '.PLURALNAME', 'Submissions'), |
|
| 228 | + _t(JobSubmission::class.'.PLURALNAME', 'Submissions'), |
|
| 229 | 229 | $submissions, |
| 230 | 230 | $config |
| 231 | 231 | ) |
| 232 | 232 | ; |
| 233 | - $fields->addFieldsToTab('Root.' . $this->fieldLabel('Submissions'), [ |
|
| 233 | + $fields->addFieldsToTab('Root.'.$this->fieldLabel('Submissions'), [ |
|
| 234 | 234 | $submissionsField, |
| 235 | 235 | ]); |
| 236 | 236 | } |
@@ -289,15 +289,15 @@ discard block |
||
| 289 | 289 | return [ |
| 290 | 290 | 'JOB_MANAGE' => [ |
| 291 | 291 | 'name' => _t( |
| 292 | - __CLASS__ . '.JOB_MANAGE', |
|
| 292 | + __CLASS__.'.JOB_MANAGE', |
|
| 293 | 293 | 'Manage Jobs' |
| 294 | 294 | ), |
| 295 | 295 | 'category' => _t( |
| 296 | - __CLASS__ . '.JOB_MANAGE_CATEGORY', |
|
| 296 | + __CLASS__.'.JOB_MANAGE_CATEGORY', |
|
| 297 | 297 | 'Jobs' |
| 298 | 298 | ), |
| 299 | 299 | 'help' => _t( |
| 300 | - __CLASS__ . '.JOB_MANAGE_HELP', |
|
| 300 | + __CLASS__.'.JOB_MANAGE_HELP', |
|
| 301 | 301 | 'Access to add, edit and delete Jobs' |
| 302 | 302 | ), |
| 303 | 303 | 'sort' => 400, |
@@ -82,24 +82,24 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function getCMSFields() |
| 84 | 84 | { |
| 85 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 85 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 86 | 86 | $fields->dataFieldByName('Content') |
| 87 | 87 | ->setRows(8); |
| 88 | 88 | |
| 89 | 89 | $fields->dataFieldByName('Limit') |
| 90 | - ->setTitle(_t(__CLASS__ . 'LimitLabel', 'Posts to show')); |
|
| 90 | + ->setTitle(_t(__CLASS__.'LimitLabel', 'Posts to show')); |
|
| 91 | 91 | |
| 92 | 92 | $fields->insertBefore( |
| 93 | 93 | 'Limit', |
| 94 | 94 | $fields->dataFieldByName('JobCollectionID') |
| 95 | - ->setTitle(_t(__CLASS__ . 'JobCollectionLabel', 'Jobs Listing Page')) |
|
| 95 | + ->setTitle(_t(__CLASS__.'JobCollectionLabel', 'Jobs Listing Page')) |
|
| 96 | 96 | ->setEmptyString('') |
| 97 | 97 | ); |
| 98 | 98 | |
| 99 | 99 | $fields->insertAfter( |
| 100 | 100 | 'BlogID', |
| 101 | 101 | DropdownField::create('CategoryID', _t( |
| 102 | - __CLASS__ . 'CategoryLabel', |
|
| 102 | + __CLASS__.'CategoryLabel', |
|
| 103 | 103 | 'Category' |
| 104 | 104 | )) |
| 105 | 105 | ->setHasEmptyDefault(true) |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | { |
| 147 | 147 | $count = $this->getPostsList()->count(); |
| 148 | 148 | $label = _t( |
| 149 | - Job::class . '.PLURALS', |
|
| 149 | + Job::class.'.PLURALS', |
|
| 150 | 150 | 'A Job Posting|{count} Job Postings', |
| 151 | 151 | ['count' => $count] |
| 152 | 152 | ); |
@@ -168,6 +168,6 @@ discard block |
||
| 168 | 168 | */ |
| 169 | 169 | public function getType() |
| 170 | 170 | { |
| 171 | - return _t(__CLASS__ . '.BlockType', 'Job Posts'); |
|
| 171 | + return _t(__CLASS__.'.BlockType', 'Job Posts'); |
|
| 172 | 172 | } |
| 173 | 173 | } |