/**
  * Construct new input field for: typeid
  * @param string $name
  * @param string $label
  * @param string $value optional, default: loading from $_POST
  */
 public function __construct($name, $label, $value = '')
 {
     parent::__construct($name, $label, $value);
     $this->addOption(0, '---- ' . __('select type'), array('data-sport' => 'all'));
     foreach (TypeFactory::AllTypes() as $id => $data) {
         $this->addOption($id, $data['name'], array('data-sport' => $data['sportid']));
     }
 }
 /**
  * Construct new input field for: weather
  * @param string $name
  * @param string $label
  * @param string $value optional, default: loading from $_POST
  */
 public function __construct($name, $label, $value = '')
 {
     parent::__construct($name, $label, $value);
     $Condition = new Condition(0);
     foreach (Condition::completeList() as $id) {
         $Condition->set($id);
         $this->addOption($id, $Condition->string());
     }
 }
 /**
  * Construct new input field for: shoeid
  * @param string $name
  * @param string $label
  * @param string $value optional, default: loading from $_POST
  */
 public function __construct($name, $label, $value = '')
 {
     parent::__construct($name, $label, $value);
     $this->addLayoutClass(TrainingFormular::$ONLY_RUNNING_CLASS);
     $this->addOption(0, '---- ' . __('select shoe'));
     foreach (ShoeFactory::NamesAsArray(!$this->showAll()) as $id => $name) {
         $this->addOption($id, $name);
     }
 }
 /**
  * Construct new input field for: typeid
  * @param string $name
  * @param string $label
  * @param string $value optional, default: loading from $_POST
  */
 public function __construct($name, $label, $value = '')
 {
     parent::__construct($name, $label, $value);
     $this->addLayoutClass(TrainingFormular::$ONLY_TYPES_CLASS);
     $this->addOption(0, '---- ' . __('select type'), array('data-sport' => 'all'));
     foreach (TypeFactory::AllTypes() as $id => $data) {
         $this->addOption($id, $data['name'], array('data-sport' => $data['sportid']));
     }
 }
 /**
  * Construct new input field for: sportid
  * @param string $name
  * @param string $label
  * @param string $value optional, default: loading from $_POST
  */
 public function __construct($name, $label, $value = '')
 {
     parent::__construct($name, $label, $value);
     foreach (SportFactory::AllSports() as $id => $sport) {
         $attributes = array();
         $attributes['data-kcal'] = $sport['kcal'];
         if ($sport['id'] == Configuration::General()->runningSport()) {
             $attributes['data-running'] = 'true';
         }
         if ($sport['outside'] == 1) {
             $attributes['data-outside'] = 'true';
         }
         if ($sport['distances'] == 1) {
             $attributes['data-distances'] = 'true';
         }
         if ($sport['power'] == 1) {
             $attributes['data-power'] = 'true';
         }
         $this->addOption($id, $sport['name'], $attributes);
     }
 }