public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList($Radius = DropdownField::create('Radius')->setTitle(_t('SearchForm.RADIUS', 'SearchForm.RADIUS'))->setSource(self::$radius)->setValue(Session::get('SearchForm.Radius') ? Session::get('SearchForm.Radius') : self::$default_radius));
     $Radius->addExtraClass('input-lg');
     $actions = new FieldList($Search = BootstrapLoadingFormAction::create('doSearch')->setButtonContent(_t('SearchForm.UPDATERADIUS', 'SearchForm.UPDATERADIUS') . ' <span class="glyphicon glyphicon-screenshot" aria-hidden="true"></span>'));
     $Search->addExtraClass('btn-info btn-lg btn-block');
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("Radius"));
 }
 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'))->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(ReadonlyField::create('FirstName')->setTitle(_t('PasswordEditForm.FIRSTNAME', 'PasswordEditForm.FIRSTNAME')), ReadonlyField::create('Surname')->setTitle(_t('PasswordEditForm.SURNAME', 'PasswordEditForm.SURNAME')), ReadonlyField::create('Email')->setTitle(_t('PasswordEditForm.EMAIL', 'PasswordEditForm.EMAIL')), $Password = new BootstrapConfirmedPasswordField('Password', _t('Member.db_Password', 'Member.db_Password')));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doEdit')->setTitle(_t('PasswordEditForm.CHANGEPASSWORD', 'PasswordEditForm.CHANGEPASSWORD')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("Password"));
     if (Member::currentUser()) {
         $this->loadDataFrom(Member::currentUser());
     }
 }
 public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList(ReadonlyField::create('Title')->setTitle(_t('Box.TITLE', 'Box.TITLE')), TextareaField::create('Description')->setTitle(_t('Box.DESCRIPTION', 'Box.DESCRIPTION')), CheckboxField::create("Public")->setTitle(_t('Box.PUBLIC', 'Box.PUBLIC')), $Members = CheckboxSetField::create('Members')->setTitle(_t('Box.MEMBERS', 'Box.MEMBERS'))->setSource(Member::get()->map('ID', 'Name')), HiddenField::create('BoxID'));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doEdit')->setTitle(_t('BoxEditForm.DOEDIT', 'BoxEditForm.DOEDIT')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("Description"));
     if (isset($GLOBALS['BoxID'])) {
         $Box = Box::get()->byID($GLOBALS['BoxID']);
         $this->loadDataFrom($Box);
     }
 }
 public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList(TextField::create('FirstName')->setTitle('Vorname'), TextField::create('Surname')->setTitle('Nachname'), ReadonlyField::create('Email')->setTitle('Email'), BootstrapConfirmedPasswordField::create('Password')->setTitle('Passwort')->setShowOnClick(true), $isAuthor = CheckboxField::create("Author")->setTitle("Content Author"), $isAdmin = CheckboxField::create("Admin")->setTitle("Administrator"), HiddenField::create('ID'));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doEdit')->setTitle('Änderungen speichern'));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("FirstName", "Surname"));
     if (isset($GLOBALS['MemberID'])) {
         $Member = Member::get()->byID($GLOBALS['MemberID']);
         $this->loadDataFrom($Member);
         if ($Member->IsAdmin()) {
             $isAdmin->setValue(true);
         }
         if ($Member->IsContentAuthor()) {
             $isAuthor->setValue(true);
         }
     }
 }
 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($Version = BootstrapSemVerField::create('Version')->setTitle(_t('BoxVersion.VERSION', 'BoxVersion.VERSION')), $Description = TextareaField::create('Description')->setTitle(_t('Box.DESCRIPTION', 'Box.DESCRIPTION')), $File = new BootstrapUploadField('File', _t('Box.FILE', 'Box.FILE')), $BoxID = HiddenField::create('BoxID'));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doAdd')->setTitle(_t('BoxAddForm.DOADD', 'BoxAddForm.DOADD')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("Version", "Description", "File", "BoxID"));
     if (isset($GLOBALS['BoxID'])) {
         $Box = Box::get()->byID($GLOBALS['BoxID']);
         $BoxID->setValue($Box->ID);
         $Description->setValue($Box->Description);
         $File->setFolderName("Uploads/Boxes/" . $Box->Slug);
     }
     // Upload Parameters
     $exts = array('box');
     $validator = new Upload_Validator();
     $validator->setAllowedExtensions($exts);
     //$validator->setAllowedMaxFileSize(5000000);
     $upload = Upload::create();
     $upload->setValidator($validator);
     $File->setUpload($upload);
     $this->loadDataFrom(singleton('BoxProvider'));
 }
 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());
 }
 public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList($Message = TextareaField::create('Text')->setTitle(_t('Message.MESSAGETEXT', 'Message.MESSAGETEXT')), new HiddenField("ReceiverID", null, (int) $controller->urlParams['ID']));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doSend')->setTitle(_t('Message.BUTTONSEND', 'Message.BUTTONSEND')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("Text", "ReceiverID"));
 }
 public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList(TextField::create('FirstName')->setTitle('Vorname'), TextField::create('Surname')->setTitle('Nachname'), EmailField::create('Email')->setTitle('Email'), BootstrapConfirmedPasswordField::create('Password')->setTitle('Passwort'), CheckboxField::create("Author")->setTitle("Content Author"), CheckboxField::create("Admin")->setTitle("Administrator"));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doAdd')->setTitle('Benutzer hinzufügen'));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("FirstName", "Surname", "Email", "Password"));
 }
 public function __construct($controller, $name, $fields = null, $actions = null)
 {
     $fields = new FieldList(TextField::create('Title')->setTitle(_t('Box.TITLE', 'Box.TITLE')), TextareaField::create('Description')->setTitle(_t('Box.DESCRIPTION', 'Box.DESCRIPTION')), CheckboxField::create("Public")->setTitle(_t('Box.PUBLIC', 'Box.PUBLIC')), $Members = CheckboxSetField::create('Members')->setTitle(_t('Box.MEMBERS', 'Box.MEMBERS'))->setSource(Member::get()->map('ID', 'Name')));
     $actions = new FieldList($Submit = BootstrapLoadingFormAction::create('doAdd')->setTitle(_t('BoxAddForm.DOADD', 'BoxAddForm.DOADD')));
     parent::__construct($controller, $name, $fields, $actions, new RequiredFields("Title", "Description"));
 }