/** * Display Site Settings */ function display_site_settings() { global $DB, $PREFS, $DSP; $SD = new Fieldframe_SettingsDisplay(); $r = $SD->block() . $SD->row(array($SD->label('quality_setting_label', 'quality_setting_desc'), $SD->select('quality_setting', $this->site_settings['quality_setting'], array('y' => 'yes', 'n' => 'no')))) . $SD->row(array($SD->label('thumbs_setting_label', 'thumbs_setting_desc'), $SD->select('thumbs_setting', $this->site_settings['thumbs_setting'], array('y' => 'yes', 'n' => 'no')))) . $SD->block_c(); return $r; }
/** * Display Cell Settings * * @param array $cell_settings The cell's settings * @return string Settings HTML */ function display_cell_settings($cell_settings) { $SD = new Fieldframe_SettingsDisplay(); $settings = '<div style="margin-bottom: 10px;">'; $settings .= $SD->label('Region type'); $settings .= $SD->select('type', $cell_settings['type'], $this->types); $settings .= '</div>'; $settings .= '<div style="margin-bottom: 10px;">'; $settings .= $SD->label('Value to display'); $settings .= $SD->select('value', $cell_settings['value'], $this->values); $settings .= '</div>'; return $settings; }
/** * Display Field Settings * * @param array $field_settings The field's settings * @return array Settings HTML (cell1, cell2, rows) */ function display_field_settings($field_settings) { global $DSP, $LANG; $SD = new Fieldframe_SettingsDisplay(); // $r = $SD->block('Hotspotter Settings'); $r = '<table>'; $r .= $SD->row(array($DSP->qdiv('defaultBold', 'Select Your File Field'), $SD->select('file_field', $field_settings['file_field'], $this->_get_fields()))); $r .= $SD->row(array($DSP->qdiv('defaultBold', 'Select Your Matrix Field'), $SD->select('matrix_field', $field_settings['matrix_field'], $this->_get_fields()))); $r .= $SD->row(array($SD->label('Initial Height'), $SD->text('initial_height', $field_settings['initial_height']))); $r .= $SD->row(array($SD->label('Initial Width'), $SD->text('initial_width', $field_settings['initial_width']))); $r .= $SD->row(array($SD->label('Should Hotspots be Resizable?'), $SD->radio_group('resizable', $field_settings['resizable'], array('yes' => 'yes', 'no' => 'no')))); $r .= '</table>'; // $r .= $SD->block_c(); return array('cell2' => $r); // return array('cell2' => $cell2); }
/** * Display Cell Settings * * @param array $cell_settings The cell's settings * @return array Settings HTML (cell1, cell2, rows) */ function display_cell_settings($cell_settings) { global $DSP, $LANG; $LANG->fetch_language_file('ff_vz_upload'); // Initialize a new instance of SettingsDisplay $SD = new Fieldframe_SettingsDisplay(); $out = ''; // Get the file upload destinations $dests = $this->_get_upload_dests(); if ($dests) { // If there are any upload destinations, put them in a select box... $upload_dest = isset($cell_settings['vz_upload_dest']) ? $cell_settings['vz_upload_dest'] : key($dests); $out .= '<label class="itemWrapper">' . $DSP->qdiv('defaultBold', $LANG->line('settings_destination')) . $SD->select('vz_upload_dest', $upload_dest, $dests) . '</label>'; } else { $out .= '<p class="highlight">' . $LANG->line('no_destinations_found') . '</p>'; } // Which file types are allowed? $types = isset($cell_settings['vz_upload_types']) ? $cell_settings['vz_upload_types'] : '*.jpg;*.jpeg;*.png;*.gif'; $out .= '<label class="itemWrapper">' . $DSP->qdiv('defaultBold', $LANG->line('settings_types')) . $SD->text('vz_upload_types', $types) . '</label>'; // Return the settings block return $out; }
/** * Display Field * * @param string $field_name The field's name * @param mixed $field_data The field's current value * @param array $field_settings The field's settings * @return string The field's HTML */ function display_field($field_name, $field_data, $field_settings) { global $DSP; $this->prep_field_data($field_data); $SD = new Fieldframe_SettingsDisplay(); return $SD->select($field_name, $field_data, $field_settings['options']); }
function display_cell($cell_name, $cell_data, $cell_settings) { $SD = new Fieldframe_SettingsDisplay(); return $SD->select($cell_name, $cell_data, $cell_settings['options']); }
/** * Display Field Settings */ function display_field_settings($settings) { global $FF; // create a new SettingsDisplay instance $SD = new Fieldframe_SettingsDisplay(); // open the settings table $r = $SD->block(); $SD->row_count++; $rows = $this->field_settings($settings); // ------------------------------------------- // Field Conversion // ------------------------------------------- // was this previously a different fieldtype? if (isset($FF->data) && $FF->data['field_id'] && $FF->data['field_type'] != 'ftype_id_'.$this->_fieldtype_id) { array_unshift($rows, array( $SD->label('wygwam_convert_label', 'wygwam_convert_desc'), $SD->select('convert', (in_array($FF->data['field_fmt'], array('br', 'xhtml')) ? 'auto' : ''), array( '' => '--', 'auto' => 'Auto <br /> or XHTML', 'textile' => 'Textile' ) ) )); } // add the rows foreach ($rows as $row) { $r .= $SD->row($row); } // close the table $r .= $SD->block_c(); return array('rows' => array(array( '<div id="ft_wygwam" style="margin: -7px -11px -7px -7px; font-size: 12px;">'.$r.'</div>' ))); }
/** * Field Settings */ private function _field_settings($data, $attr = '') { global $LANG; $SD = new Fieldframe_SettingsDisplay(); return array(array($LANG->line('pt_switch_off_label'), '<input type="text" name="off_label" value="' . $data['off_label'] . '" ' . $attr . ' />'), array($LANG->line('pt_switch_off_val'), '<input type="text" name="off_val" value="' . $data['off_val'] . '" ' . $attr . ' />'), array($LANG->line('pt_switch_on_label'), '<input type="text" name="on_label" value="' . $data['on_label'] . '" ' . $attr . ' />'), array($LANG->line('pt_switch_on_val'), '<input type="text" name="on_val" value="' . $data['on_val'] . '" ' . $attr . ' />'), array($LANG->line('pt_switch_default'), $SD->select('default', $data['default'], array('off' => 'OFF', 'on' => 'ON')))); }