fields/field.field_divider.php
/**
		 * Displays setting panel in section editor.
		 *
		 * @param XMLElement $wrapper - parent element wrapping the field
		 * @param array $errors - array with field errors, $errors['name-of-field-element']
		 */
Displays setting panel in section editor.
Displays setting panel in section editor .
public function displaySettingsPanel(XMLElement &$wrapper, $errors = null) {
			parent::displaySettingsPanel($wrapper, $errors);
			$order = $this->get('sortorder');
			$group = new XMLElement('div');
			$group->setAttribute('class', 'two columns');
			$label = Widget::Label(__('Margin'));
			$label->setAttribute('class', 'column');
			$label->appendChild(
				new XMLElement('i', __('Optional'))
			);
			$label->appendChild(Widget::Input(
				"fields[{$order}][margin]", $this->get('margin')
			));
			$label->appendChild(
				new XMLElement('p', __('You can override the default spacing, e.g 25px 0px 35px 0px'), array('class' => 'help'))
			);
			$group->appendChild($label);
			$wrapper->appendChild($group);
			$group = new XMLElement('div');
			$group->setAttribute('class', 'two columns');
			$label = Widget::Label(null, null, 'column');
			$input = Widget::Input('fields['.$order.'][show-label]', 'yes', 'checkbox');
			if ($this->get('show-label') == 'yes') $input->setAttribute('checked', 'checked');
			$label->setValue(__('%s Display the label?', array($input->generate())));
			$group->appendChild($label);
			$wrapper->appendChild($group);
		}
public function displaySettingsPanel ( XMLElement & $ wrapper , $ errors = null ) { parent :: displaySettingsPanel ( $ wrapper , $ errors ) ; $ order = $ this -> get ( 'sortorder' ) ; $ group = new XMLElement ( 'div' ) ; $ group -> setAttribute ( 'class' , 'two columns' ) ; $ label = Widget :: Label ( __ ( 'Margin' ) ) ; $ label -> setAttribute ( 'class' , 'column' ) ; $ label -> appendChild ( new XMLElement ( 'i' , __ ( 'Optional' ) ) ) ; $ label -> appendChild ( Widget :: Input ( " fields[ { $ order } ][margin] " , $ this -> get ( 'margin' ) ) ) ; $ label -> appendChild ( new XMLElement ( 'p' , __ ( 'You can override the default spacing, e.g 25px 0px 35px 0px' ) , array ( 'class' => 'help' ) ) ) ; $ group -> appendChild ( $ label ) ; $ wrapper -> appendChild ( $ group ) ; $ group = new XMLElement ( 'div' ) ; $ group -> setAttribute ( 'class' , 'two columns' ) ; $ label = Widget :: Label ( null , null , 'column' ) ; $ input = Widget :: Input ( 'fields[' . $ order . '][show-label]' , 'yes' , 'checkbox' ) ; if ( $ this -> get ( 'show-label' ) == 'yes' ) $ input -> setAttribute ( 'checked' , 'checked' ) ; $ label -> setValue ( __ ( '%s Display the label?' , array ( $ input -> generate ( ) ) ) ) ; $ group -> appendChild ( $ label ) ; $ wrapper -> appendChild ( $ group ) ; }
Displays setting panel in section editor.
Displays setting panel in section editor .
// Initialize field settings based on class defaults (name, placement) // Margin // Show Label