You are here

gallery_assist.austoben.inc in Gallery Assist 7

File

gallery_assist.austoben.inc
View source
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
function gallery_assist_austoben() {
  $form = array();
  $form['cero'] = array(
    '#type' => 'fieldset',
    '#title' => "My cero Set",
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#tree' => TRUE,
    '#weight' => -50,
  );
  $form['cero'] += gallery_assist_austoben_uno('cero');
  $form['ga_assignments_settings'] = array(
    '#type' => 'vertical_tabs',
  );
  foreach (array(
    'Fisrt',
    'Second',
    'Thirth',
  ) as $k) {
    $form[strtolower($k)] = array(
      '#type' => 'fieldset',
      '#title' => "My {$k} Set",
      '#collapsible' => TRUE,
      '#collapsed' => TRUE,
      '#group' => 'ga_assignments_settings',
      '#tree' => TRUE,
    );
    $form[strtolower($k)] += gallery_assist_austoben_uno(strtolower($k));
  }
  $form['supertest'] = array(
    '#type' => 'vertical_tabs',
  );
  $form['ultimo'] = array(
    '#type' => 'fieldset',
    '#title' => 'My Vertical Set I',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#group' => 'supertest',
    '#tree' => TRUE,
  );
  $form['ultimo']['uno'] = array(
    '#type' => 'textfield',
    '#title' => 'Uno title',
  );
  $form['ultimo']['dos'] = array(
    '#type' => 'textfield',
    '#title' => 'Dos title',
  );
  $form['settingformset'] = array(
    '#type' => 'fieldset',
    '#title' => 'My Vertical Set II',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#description' => t('Set different settings which will effect site wide.'),
    '#group' => 'supertest',
    '#tree' => TRUE,
  );

  // Replicating the above textarea, this is just for demo.
  $form['settingformset']['tres'] = array(
    '#type' => 'textfield',
    '#title' => 'Tres title',
  );
  $form['settingformset']['cuatro'] = array(
    '#type' => 'textfield',
    '#title' => 'Cuatro title',
  );
  return $form;
}
function gallery_assist_austoben_uno($prefix) {
  $form = array();
  $form["{$prefix}_blabla"] = array(
    '#type' => 'textfield',
    '#title' => 'Text',
    '#description' => 'Lorem ipsum lorem ipsum lorem ipsum.',
  );

  // Replicating the above textarea, this is just for demo.
  $form["{$prefix}_setting"] = array(
    '#type' => 'textarea',
    '#required' => TRUE,
    '#title' => t('Contact mail.'),
    '#description' => t('Body text when a new comment is posted by users.'),
  );
  return $form;
}