示例#1
0
 /**
  * Class constructor setup control group
  *
  * @param string $name
  * @access public
  */
 public function __construct($name = 'post_format')
 {
     parent::__construct($name);
     $this->setLabel(Translate::translate('Post format'));
     /*TODO implement dependency
     		$format = new Select( 'format' );
     		$format->setLabel( Translate::translate( 'Post format' ) );
     		$format->setOptions(
     			array(
     				array(
     					'label' => Translate::translate( 'Standard' ),
     					'value' => false,
     				),
     				array(
     					'label' => Translate::translate( 'Video' ),
     					'value' => 'video',
     				),
     				array(
     					'label' => Translate::translate( 'Gallery' ),
     					'value' => 'gallery',
     				),
     				array(
     					'label' => Translate::translate( 'Audio' ),
     					'value' => 'audio',
     				),
     			)
     		);
     		$this->addControl( $format );
     		*/
     $group = new Group('video');
     $group->setLabel(Translate::translate('Video'));
     $url = new Text('url');
     $url->setLabel(Translate::translate('YouTube or Vimeo file URL'));
     $url->setValidation('url');
     //			$url->setDependency($format, 'silverwp_post_format_dep_boolean', 'video');
     $group->addControl($url);
     $this->addControl($group);
     $group = new Gallery('gallery');
     $group->setLabel(Translate::translate('Gallery'));
     $this->addControl($group);
     $group = new Group('audio');
     $group->setLabel(Translate::translate('Audio'));
     $audio = new Text('url');
     $audio->setLabel(Translate::translate('SoundCloud audio URL'));
     $audio->setValidation('url');
     //$audio->setDependency($format, 'silverwp_post_format_dep_boolean', 'audio');
     $group->addControl($audio);
     $this->addControl($group);
 }
示例#2
0
 protected function setUp()
 {
     $realization_time = new Text('realization_time');
     $realization_time->setLabel(Translate::translate('Realization time'));
     $this->addControl($realization_time);
     $partners = new Wpeditor('partners');
     $partners->setLabel(Translate::translate('Partners'));
     $this->addControl($partners);
     $contact = new Textarea('contact');
     $contact->setLabel(Translate::translate('Contact'));
     $this->addControl($contact);
     $external_url = new Text('external_url');
     $external_url->setLabel(Translate::translate('External URL'));
     $external_url->setValidation('url');
     $this->addControl($external_url);
     $group = new Group('persons');
     $group->setLabel(Translate::translate('Persons engage in project'));
     $group->setSortable(true);
     $group->setRepeating(true);
     $label = new Text('label');
     $label->setLabel(Translate::translate('Label'));
     $group->addControl($label);
     $name = new Text('person');
     $name->setLabel(Translate::translate('Person'));
     $group->addControl($name);
     $this->addControl($group);
     $attachments = new Attachments('attachments');
     $this->addControl($attachments);
 }
示例#3
0
 /**
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setRepeating(true);
     $this->setSortable(true);
     $this->setLabel(Translate::translate('Gallery'));
     $upload = new Upload('image');
     $upload->setLabel(Translate::translate('Image'));
     $this->addControl($upload);
 }
示例#4
0
 protected function setUp()
 {
     $attachments = new Attachments('attachments');
     $this->addControl($attachments);
     $checkbox = new Checkbox('main_page_promo');
     $checkbox->setLabel(Translate::translate('Promotion on main page'));
     $this->addControl($checkbox);
     $place = new Text('place');
     $place->setLabel(Translate::translate('Place'));
     $this->addControl($place);
     $address = new Text('address');
     $address->setLabel(Translate::translate('Event address'));
     $this->addControl($address);
     $program = new Group('program');
     $program->setLabel(Translate::translate('Program'));
     $program->setRepeating(true);
     $program->setSortable(true);
     $label = new Text('title');
     $label->setLabel(Translate::translate('Title'));
     $program->addControl($label);
     $description = new Wpeditor('description');
     $description->setLabel(Translate::translate('Description'));
     $program->addControl($description);
     $this->addControl($program);
     $start = new Group('start');
     $start->setLabel(Translate::translate('Start'));
     $date = new Date('date_start');
     $date->setLabel(Translate::translate('Date start'));
     $start->addControl($date);
     $time = new Text('time_start');
     $time->setLabel(Translate::translate('Time start'));
     $start->addControl($time);
     $this->addControl($start);
     $end = new Group('end');
     $end->setLabel(Translate::translate('End'));
     $date = new Date('date_end');
     $date->setLabel(Translate::translate('Date end'));
     $end->addControl($date);
     $time = new Text('time_end');
     $time->setLabel(Translate::translate('Time end'));
     $end->addControl($time);
     $this->addControl($end);
 }
示例#5
0
 /**
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setRepeating(true);
     $this->setSortable(true);
     $this->setLabel(Translate::translate('Attachments'));
     $upload = new Upload('attachment');
     $upload->setLabel(Translate::translate('File'));
     $this->addControl($upload);
 }
示例#6
0
 /**
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setRepeating(true);
     $this->setSortable(true);
     $this->setLabel(Translate::translate('Video'));
     $url = new Text('url');
     $url->setLabel(Translate::translate('URL'))->setValidation('url');
     $this->addControl($url);
     $name = new Text('name');
     $name->setLabel(Translate::translate('Name'));
     $this->addControl($name);
 }
示例#7
0
 /**
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setSortable(true);
     $this->setRepeating(true);
     //set up default configuration
     $this->setLabel(Translate::translate('Social Accounts'));
     $name = new Text('name');
     $name->setLabel('Name');
     $this->addControl($name);
     $url = new Text('url');
     $url->setLabel('URL')->setValidation('url');
     $this->addControl($url);
     $icon = new Fontello('icon');
     $icon->setLabel(Translate::translate('Icon'));
     $this->addControl($icon);
 }