public function init()
 {
     // Element: path
     $this->addElement('Text', 'path', array('label' => 'Path Prefix', 'description' => 'This is prepended to the file path on upload. Defaults ' . 'to "public". Must be relative to the SocialEngine path.'));
     // Element: baseUrl
     $this->addElement('Text', 'baseUrl', array('label' => 'Base URL', 'description' => 'This is the base URL used for generating the file ' . 'URLs. Should only be used for pull-type CDNs.', 'filters' => array('StringTrim')));
     parent::init();
 }
Example #2
0
 public function init()
 {
     // Element: adapter
     $this->addElement('Select', 'adapter', array('label' => 'VFS Adapter', 'required' => true, 'allowEmpty' => false, 'multiOptions' => array('ftp' => 'FTP', 'ssh' => 'SSH/SCP')));
     // Element: host
     $this->addElement('Text', 'params_host', array('label' => 'Remote Host', 'required' => true, 'allowEmpty' => false, 'filters' => array('StringTrim')));
     // Element: username
     $this->addElement('Text', 'params_username', array('label' => 'Username', 'required' => true, 'allowEmpty' => false, 'filters' => array('StringTrim')));
     // Element: password
     $this->addElement('Text', 'params_password', array('label' => 'Password', 'required' => true, 'allowEmpty' => false, 'filters' => array('StringTrim')));
     // Element: path
     $this->addElement('Text', 'params_path', array('label' => 'Path', 'required' => true, 'allowEmpty' => false, 'filters' => array('StringTrim')));
     // Element: baseUrl
     $this->addElement('Text', 'baseUrl', array('label' => 'Base URL', 'required' => true, 'allowEmpty' => false, 'filters' => array('StringTrim')));
     parent::init();
 }
Example #3
0
 public function init()
 {
     // Element: accessKey
     $this->addElement('Text', 'accessKey', array('label' => 'Access Key', 'required' => true, 'allowEmpty' => false, 'filters' => array('StringTrim')));
     // Element: secretKey
     $this->addElement('Text', 'secretKey', array('label' => 'Secret Key', 'required' => true, 'allowEmpty' => false, 'filters' => array('StringTrim')));
     // Element: region
     $this->addElement('Select', 'region', array('label' => 'Region', 'required' => true, 'allowEmpty' => false, 'multiOptions' => array('us-west-1' => 'United States (West)', 'us-east-1' => 'United States (East)', 'eu-west-1' => 'Europe (Ireland)', 'ap-southeast-1' => 'Asia Pacific (Singapore)', 'ap-northeast-1' => 'Asia Pacific (Japan)')));
     // Element: bucket
     $this->addElement('Text', 'bucket', array('label' => 'Bucket', 'description' => 'If the bucket does not exist, we will attempt to ' . 'create it. Please note the following restrictions on bucket names:<br />' . '-Must start and end with a number or letter<br />' . '-Must only contain lowercase letters, numbers, and dashes [a-z0-9-]<br />' . '-Must be between 3 and 255 characters long', 'required' => true, 'allowEmpty' => false, 'validators' => array(array('StringLength', true, array(3, 255)), array('Regex', true, array('/^[a-z0-9][a-z0-9-]+[a-z0-9]$/')))));
     $this->getElement('bucket')->getDecorator('description')->setOption('escape', false);
     // Element: path
     $this->addElement('Text', 'path', array('label' => 'Path Prefix', 'description' => 'This is prepended to the file path. Defaults to "public".', 'filters' => array('StringTrim')));
     // Element: baseUrl
     $this->addElement('Text', 'baseUrl', array('label' => 'CloudFront Domain', 'description' => 'If you are using Amazon CloudFront for this bucket, ' . 'enter the domain here.', 'filters' => array('StringTrim')));
     parent::init();
 }
Example #4
0
 public function init()
 {
     $this->setDescription('You may leave all fields below blank to use the ' . 'default SocialEngine database.');
     // Element: adapter
     //    $this->addElement('Text', 'adapter', array(
     //      'label' => 'Database Adapter',
     //    ));
     // Element: host
     $this->addElement('Text', 'host', array('label' => 'Database Host'));
     // Element: username
     $this->addElement('Text', 'username', array('label' => 'Database Username'));
     // Element: password
     $this->addElement('Text', 'password', array('label' => 'Database Password'));
     // Element: database
     $this->addElement('Text', 'dbname', array('label' => 'Database Name'));
     parent::init();
 }
 public function init()
 {
     // Get enabled storage services
     $serviceTable = Engine_Api::_()->getDbtable('services', 'storage');
     $serviceTypesTable = Engine_Api::_()->getDbtable('serviceTypes', 'storage');
     $view = Zend_Registry::get('Zend_View');
     $multiOptions = array();
     foreach ($serviceTable->fetchAll(array('enabled = ?' => true)) as $service) {
         $serviceType = $serviceTypesTable->find($service->servicetype_id)->current();
         $multiOptions[$service->service_id] = $view->translate('%1$s (ID: %2$s)', $serviceType->title, $service->service_id);
     }
     if (empty($multiOptions)) {
         $this->addError('This service requires at least one (two recommended) ' . 'other enabled services.');
         return;
     }
     // Element: adapter
     $this->addElement('MultiCheckbox', 'services', array('label' => 'Services', 'description' => 'Services to use. Selecting none will use all enabled services.', 'multiOptions' => $multiOptions));
     parent::init();
 }