コード例 #1
0
         * 'default_value'
         */
        parent::__construct($name, $label, $args);
    }
    /**
     * Rendering Color field
     * @package Skip
     * @since 1.0
     * @return string $html Returns The HTML Code.
     */
    public function render()
    {
        global $skip_javascripts;
        $skip_javascripts[] = '
			$("#' . $this->params['id'] . '").colorpicker({
				altField: "#' . $this->params['id'] . '",
				altProperties: "background-color",
コード例 #2
0
 /**
  * Rendering Field
  * @since 1.0
  * @return string $html Returns The HTML Code.
  */
 public function render()
 {
     global $skip_javascripts;
     $autocomplete_values = array();
     foreach ($this->elements as $key => $value) {
         array_push($autocomplete_values, '"' . $value . '"');
     }
     $values = implode(',', $autocomplete_values);
     // If there are any autocomplete values show JS
     if (count($autocomplete_values) > 0) {
         $skip_javascripts[] = '$("#' . $this->params['id'] . '").autocomplete({ source: [' . $values . '] });';
     }
     return parent::render();
 }
コード例 #3
0
/**
 * Textfield getter Function
 * @since 1.0.0
 * @param string $name Name of field.
 * @param string $label Label of field.
 * @param string $description Description of field which is shown under element
 * @see textfield()
 * @ignore
 */
function get_textfield($name, $label = FALSE, $description = FALSE)
{
    $textfield = new Textfield($name, $label, $description);
    return $textfield->render();
}