Advertisement
Guest User

Untitled

a guest
May 4th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. /**
  2.      * @return Form
  3.      */
  4.     public function AnonApplicationForm() {
  5.  
  6.     /*...*/
  7.  
  8.         if($this->getCurrentJob()){
  9.  
  10.             if($this->getCurrentJob()->IncludeProfileImage == 1){
  11.                 $profileImage = new FileField('ProfileImage', 'Profile Image');
  12.                 $profileImage->setFolderName('Uploads/Job/Profile');
  13.                 $profileImage->addExtraClass('form-control');
  14.                 $validator->addRequiredField('ProfileImage');
  15.             }else{
  16.                 $profileImage = new HiddenField('ProfileImage', '');
  17.             }
  18.         }else{
  19.             $profileImage = new HiddenField('ProfileImage', '');
  20.         }
  21.  
  22.         $fields = new FieldList(
  23.             $profileImage
  24.         );
  25.  
  26.     /*...*/
  27.  
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement