Beispiel #1
0
 /**
  * authorarticles.
  *
  * @param   string  $selected  The key that is selected
  * @param   string  $name      The name for the field
  * @param   array   $attribs   Additional HTML attributes for the <select> tag*
  *
  * @return  string  HTML
  */
 public static function authorarticles($selected = null, $name = 'authorarticles', $attribs = array())
 {
     $options = array();
     $options[] = array('name' => 'JNO', 'value' => '');
     $options[] = array('name' => 'Top', 'value' => 'top');
     $options[] = array('name' => 'Bottom', 'value' => 'bottom');
     return EHtmlSelect::btnGroupList($selected, $name, $attribs, $options, null);
 }
Beispiel #2
0
 /**
  * numericUnitsControl
  *
  * @param   string  $selectedNumeric  Value
  * @param   string  $nameNumeric      The name for the field
  * @param   string  $selectedUnit     Value
  * @param   string  $nameUnit         The name for the field
  * @param   string  $units            The name for the field
  * @param   string  $label            Label
  * @param   string  $desc             Description
  * @param   array   $idTag            Additional HTML attributes for the <select> tag
  * @param   string  $class            Class
  *
  * @return  string  HTML
  */
 public static function numericUnitsControl($selectedNumeric, $nameNumeric, $selectedUnit, $nameUnit, $units, $label, $desc, $idTag = null, $class = null)
 {
     if (!$idTag) {
         $idTag = self::generateIdTag();
     }
     $bogusNameTag = self::generateIdTag();
     if (!empty($class)) {
         $class = 'class="' . $class . '"';
     }
     $control = '<input type="text" name="' . $nameNumeric . '" id="' . $idTag . '" value="' . $selectedNumeric . '" ' . $class . '/> &nbsp;';
     $control .= EHtmlSelect::btnGroupList($selectedUnit, $nameUnit, array(), $units, $idTag . '_units');
     return self::genericControl($label, $desc, $nameNumeric, $control);
 }