public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList($Nickname = TextField::create('Nickname')->setTitle(_t('Member.NICKNAME', 'Member.NICKNAME'))->setValue(Session::get('FormInfo.GoogleSignupForm.Nickname')), $Type = OptionsetField::create('Type')->setTitle(_t('Member.TYPE', 'Member.TYPE'))->setSource(array("refugee" => _t('Member.TYPEREFUGEESIGNUP', 'Member.TYPEREFUGEESIGNUP'), "hostel" => _t('Member.TYPEHOSTELSIGNUP', 'Member.TYPEHOSTELSIGNUP'), "donator" => _t('Member.TYPEDONATORSIGNUP', 'Member.TYPEDONATORSIGNUP'))), $Location = BootstrapGeoLocationField::create('Location')->setTitle(_t('Member.LOCATION', 'Member.LOCATION')), LiteralField::create('Accept_TOS', _t('SignupForm.CONFIRMTOS', 'SignupForm.CONFIRMTOS')));
     $Type->setRightTitle(_t('Member.TYPEDESCRIPTION', 'Member.TYPEDESCRIPTION'));
     $Location->setRightTitle(_t('Member.LOCATIONDESCRIPTION', 'Member.LOCATIONDESCRIPTION'));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doSignup')->setTitle(_t('SignupForm.BUTTONSIGNUP', 'SignupForm.BUTTONSIGNUP')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields(array("Nickname", "Type", "Location")));
 }
 public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList($Nickname = TextField::create('Nickname')->setTitle(_t('Member.NICKNAME', 'Member.NICKNAME')), $Type = OptionsetField::create('Type')->setTitle(_t('Member.TYPE', 'Member.TYPE'))->setSource(array("refugee" => _t('Member.TYPEREFUGEESIGNUP', 'Member.TYPEREFUGEESIGNUP'), "hostel" => _t('Member.TYPEHOSTELSIGNUP', 'Member.TYPEHOSTELSIGNUP'), "donator" => _t('Member.TYPEDONATORSIGNUP', 'Member.TYPEDONATORSIGNUP'))), $Location = BootstrapGeoLocationField::create('Location')->setTitle(_t('Member.LOCATION', 'Member.LOCATION')), $Email = EmailField::create('Email')->setTitle(_t('Member.EMAIL', 'Member.EMAIL')), PasswordField::create('Password')->setTitle(_t('Member.PASSWORD', 'Member.PASSWORD')), LiteralField::create('Accept_TOS', _t('SignupForm.CONFIRMTOS', 'SignupForm.CONFIRMTOS')));
     $Type->setRightTitle(_t('Member.TYPEDESCRIPTION', 'Member.TYPEDESCRIPTION'));
     $Location->setRightTitle(_t('Member.LOCATIONDESCRIPTION', 'Member.LOCATIONDESCRIPTION'));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doSignup')->setTitle(_t('SignupForm.BUTTONSIGNUP', 'SignupForm.BUTTONSIGNUP')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredUniqueFields($required = array("Nickname", "Type", "Location", "Email", "Password"), $unique = array("Email" => _t('SignupForm.EMAILEXISTS', 'SignupForm.EMAILEXISTS')), $objectClass = 'Member'));
 }
 public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList($Nickname = TextField::create('Nickname')->setTitle(_t('Member.NICKNAME', 'Member.NICKNAME')), $Location = BootstrapGeoLocationField::create('Location')->setTitle(_t('Member.LOCATION', 'Member.LOCATION')), $About = TextareaField::create('About')->setTitle(_t('DonatorProfile.ABOUT', 'DonatorProfile.ABOUT'))->setPlaceholder(_t('DonatorProfile.ABOUTDESCRIPTION', 'DonatorProfile.ABOUTDESCRIPTION')), $Active = CheckboxField::create('Active')->setTitle(_t('Member.ACTIVE', 'Member.ACTIVE')), $Avatar = BootstrapFileField::create('Avatar')->setTitle(_t('Member.AVATAR', 'Member.AVATAR')));
     $Location->setRightTitle(_t('Member.LOCATIONDESCRIPTION', 'Member.LOCATIONDESCRIPTION'));
     $About->setRightTitle(_t('DonatorProfile.ABOUTDESCRIPTION', 'DonatorProfile.ABOUTDESCRIPTION'));
     // Upload Parameters
     $exts = array('jpg', 'jpeg', 'gif', 'png');
     $validator = new Upload_Validator();
     $validator->setAllowedExtensions($exts);
     $validator->setAllowedMaxFileSize(5000000);
     $upload = Upload::create();
     $upload->setValidator($validator);
     // Avatar Upload Folder
     $Avatar->setFolderName("Uploads/Members/" . Member::currentUser()->ID . "/Avatars");
     $Avatar->setUpload($upload);
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doSave')->setTitle(_t('HostelEditForm.SAVEBUTTON', 'HostelEditForm.SAVEBUTTON')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("Nickname", "Location", "About"));
     $this->loadDataFrom(Member::currentUser());
 }
 public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList($Nickname = TextField::create('Nickname')->setTitle(_t('Member.NICKNAME', 'Member.NICKNAME')), $Location = BootstrapGeoLocationField::create('Location')->setTitle(_t('Member.LOCATION', 'Member.LOCATION')), $Adults = DropdownField::create('Adults')->setTitle(_t('RefugeeProfile.ADULTS', 'RefugeeProfile.ADULTS'))->setSource(Config::inst()->get('Member', 'people_sum')), $Children = DropdownField::create('Children')->setTitle(_t('RefugeeProfile.CHILDREN', 'RefugeeProfile.CHILDREN'))->setSource(Config::inst()->get('Member', 'people_sum')), $Baby = CheckboxField::create('Baby')->setTitle(_t('RefugeeProfile.BABY', 'RefugeeProfile.BABY')), $About = TextareaField::create('About')->setTitle(_t('RefugeeProfile.ABOUT', 'RefugeeProfile.ABOUT'))->setPlaceholder(_t('RefugeeProfile.ABOUTDESCRIPTION', 'RefugeeProfile.ABOUTDESCRIPTION')), $Active = CheckboxField::create('Active')->setTitle(_t('Member.ACTIVE', 'Member.ACTIVE')), $Avatar = BootstrapFileField::create('Avatar')->setTitle(_t('Member.AVATAR', 'Member.AVATAR')));
     $Location->setRightTitle(_t('Member.LOCATIONDESCRIPTION', 'Member.LOCATIONDESCRIPTION'));
     $Adults->setRightTitle(_t('RefugeeProfile.ADULTSDESCRIPTION', 'RefugeeProfile.ADULTSDESCRIPTION'));
     $Children->setRightTitle(_t('RefugeeProfile.CHILDRENDESCRIPTION', 'RefugeeProfile.CHILDRENDESCRIPTION'));
     $Baby->setRightTitle(_t('RefugeeProfile.BABYDESCRIPTION', 'RefugeeProfile.BABYDESCRIPTION'));
     $About->setRightTitle(_t('RefugeeProfile.ABOUTDESCRIPTION', 'RefugeeProfile.ABOUTDESCRIPTION'));
     // Upload Parameters
     $exts = array('jpg', 'jpeg', 'gif', 'png');
     $validator = new Upload_Validator();
     $validator->setAllowedExtensions($exts);
     $validator->setAllowedMaxFileSize(5000000);
     $upload = Upload::create();
     $upload->setValidator($validator);
     // Avatar Upload Folder
     $Avatar->setFolderName("Uploads/Members/" . Member::currentUser()->ID . "/Avatars");
     $Avatar->setUpload($upload);
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doSave')->setTitle(_t('RefugeeEditForm.SAVEBUTTON', 'RefugeeEditForm.SAVEBUTTON')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("Nickname", "Location", "Adults", "Children", "About"));
     $this->loadDataFrom(Member::currentUser());
 }