<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

$sortId = 5;
$toolId = $this->toolID;
$listId = 14;
$listName = 'Stundenabrechnung';

$list = new \Stundenabrechnung(false, $toolId);

$settingsArray = array();

$subGroup = 'Stundenabrechnung';

$setting = new Setting();
$setting->name = 'title1';
$setting->description = 'Überschrift';
$setting->subGroup = $subGroup;
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_INPUTNORMAL);
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'title2';
$setting->description = 'Untertitel';
$setting->help = '(für max. 2 Zeilen)';
$setting->subGroup = $subGroup;
$setting->toolId = $toolId;
$setting->config->size = 3;
$setting->config->loadConfiguration(SC_TEXTBOX);
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'endbem';
$setting->description = 'Schlussbemerkung';
$setting->help = 'Schlusssatz (für max. 4 Zeilen)';
$setting->subGroup = $subGroup;
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_INPUTNORMAL);
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'portrait';
$setting->description = 'Druckausgabe';
$setting->subGroup = $subGroup;
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_MULTIHYBRID);
$setting->config->items['radio'] = array(1 => 'Hochformat', 0 => 'Querformat');
$setting->disabled = array();
$setting->disabled[1] = true;
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'listsettings';
$setting->description = 'Weitere Einstellungen';
$setting->subGroup = $subGroup;
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_MULTIHYBRID);
$items = array();
for ($i = 1; $i <= 28; ++$i) {
  $optionName = 'option' . $i;
  $title = $list->getEinstellDarstellungNameForOption($optionName);
  if (!is_null($title)) {
    $items[$optionName] = $title;
  }
}

$setting->config->items['checkbox'] = $items;
array_push($settingsArray, $setting);