lib/Psc/UI/Form.php
public static function attachLabel($element, $label, $type = self::LABEL_TOP) {
    Code::value($type, self::LABEL_TOP, self::LABEL_CHECKBOX);

    if ($label != NULL) {
      $element->templateContent->label = fHTML::label($label, $element)
        ->addClass('\Psc\label')
      ;
    
      if ($type == self::LABEL_TOP) {
        $element->templatePrepend('%label%');  // nicht überschreiben sondern prependen
      }
    
      if ($type == self::LABEL_CHECKBOX) {
        $element->template = '%self% %label%';
        $element->templateContent->label->addClass('checkbox-label');
      }
    }
    
    return $element;
  }
public static function attachLabel($element, $label, $type = self::LABEL_TOP) {
    Code::value($type, self::LABEL_TOP, self::LABEL_CHECKBOX);

    if ($label != NULL) {
      $element->templateContent->label = fHTML::label($label, $element)
        ->addClass('\Psc\label')
      ;
    
      if ($type == self::LABEL_TOP) {
        $element->templatePrepend('%label%');  // nicht überschreiben sondern prependen
      }
    
      if ($type == self::LABEL_CHECKBOX) {
        $element->template = '%self% %label%';
        $element->templateContent->label->addClass('checkbox-label');
      }
    }
    
    return $element;
  }
public static function attachLabel ( $ element , $ label , $ type = self :: LABEL_TOP ) { Code :: value ( $ type , self :: LABEL_TOP , self :: LABEL_CHECKBOX ) ; if ( $ label != NULL ) { $ element -> templateContent -> label = fHTML :: label ( $ label , $ element ) -> addClass ( '\Psc\label' ) ; if ( $ type == self :: LABEL_TOP ) { $ element -> templatePrepend ( '%label%' ) ; // nicht überschreiben sondern prependen } if ( $ type == self :: LABEL_CHECKBOX ) { $ element -> template = '%self% %label%' ; $ element -> templateContent -> label -> addClass ( 'checkbox-label' ) ; } } return $ element ; }
benutzt von dropBox2
benutzt von dropBox2