表格样式类

@param bool   $inline
@param string $labelPosition
@param int    $labelWidth
@param bool   $showMessage
@param string $autocomplete
@return FormStyle
340281
public static function style($inline = false, $labelPosition = 'right', $labelWidth = 125, $showMessage = true, $autocomplete = 'off')
    {
        return new FormStyle($inline, $labelPosition, $labelWidth, $showMessage, $autocomplete);
    }
247232
private function get_cta(
            $label,
            $is_primary = true,
            $is_disabled = false,
            $href = '',
            $target = '_blank'
        ) {
            $classes = array();

            if ( ! $is_primary ) {
                $classes[] = 'left';
            } else {
                $classes[] = 'button-primary';
                $classes[] = 'right';
            }

            if ( $is_disabled ) {
                $classes[] = 'disabled';
            }

            return sprintf(
                '<a %s class="button %s">%s</a>',
                empty( $href ) ? '' : 'href="' . $href . '" target="' . $target . '"',
                implode( ' ', $classes ),
                $label
            );
        }
1041280
function () {
/*Line 193 - 'AtomAutoCompleteBox.js' */                var item = this.get_selectedItem();
/*Line 194 - 'AtomAutoCompleteBox.js' */                var l = item;
/*Line 195 - 'AtomAutoCompleteBox.js' */                if (l && this._labelPath) {
/*Line 196 - 'AtomAutoCompleteBox.js' */                    l = l[this._labelPath];
/*Line 197 - 'AtomAutoCompleteBox.js' */                }
/*Line 198 - 'AtomAutoCompleteBox.js' */                AtomBinder.setValue(this, "displayLabel", l || "");
/*Line 199 - 'AtomAutoCompleteBox.js' */            }
115250
public function searchLabel($msginstancename = "defaultTranslationService", $selfedit = "false", $search, $language_search = null) {
		$this->msgInstanceName = $msginstancename;
		$this->selfedit = $selfedit;
	
		$array = $this->getAllMessagesFromService(($selfedit == "true"), $msginstancename, $language_search);
		$this->languages = $array["languages"];
		$this->search = $search;
		$this->language_search = $language_search;
		if($search) {
			$this->msgs = $array["msgs"];
	
			
			$regex = $this->stripRegexMetaChars($this->stripAccents($search));
			$this->results = $this->regex_search_array($array["msgs"], $regex);
			
			$this->error = false;
		}
		else
			$this->error = true;

		$webLibriary = new WebLibrary(array(), array('../utils.i18n.fine/src/views/css/style.css'));
		$this->template->getWebLibraryManager()->addLibrary($webLibriary);

		$this->content->addFile('../utils.i18n.fine/src/views/searchLabel.php', $this);
		$this->template->toHtml();
	}
67503
function Autocomplete(el, options) {
      _classCallCheck(this, Autocomplete);

      var _this38 = _possibleConstructorReturn(this, (Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete)).call(this, Autocomplete, el, options));

      _this38.el.M_Autocomplete = _this38;

      /**
       * Options for the autocomplete
       * @member Autocomplete#options
       * @prop {Number} duration
       * @prop {Number} dist
       * @prop {number} shift
       * @prop {number} padding
       * @prop {Boolean} fullWidth
       * @prop {Boolean} indicators
       * @prop {Boolean} noWrap
       * @prop {Function} onCycleTo
       */
      _this38.options = $.extend({}, Autocomplete.defaults, options);

      // Setup
      _this38.isOpen = false;
      _this38.count = 0;
      _this38.activeIndex = -1;
      _this38.oldVal;
      _this38.$inputField = _this38.$el.closest('.input-field');
      _this38.$active = $();
      _this38._setupDropdown();

      _this38._setupEventHandlers();
      return _this38;
    }
948120
public function MoodleQuickForm_selectwithlink($elementName=null, $elementLabel=null, $options=null, $attributes=null, $linkdata=null) {
        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
        self::__construct($elementName, $elementLabel, $options, $attributes, $linkdata);
    }
1083946
public function createPreviewHtmlElement($label = false) {
        if ($label) {
            $options['label'] = $this->translate->_($label);
        } else {
            $options['label'] = $this->translate->_('Preview HTML');
        }
        $options['nohidden'] = true;

        return $this->_form->createElement('Html', 'preview_html', $options);
    }
995013
public function __toHtml($submitted = false, $blnSimpleLayout = false, $blnLabel = true, $blnDisplayErrors = true, $intCount = 0)
    {
        $blnError = ($submitted && ! $this->__validator->validate($intCount) && $blnDisplayErrors) ? true : false;

        if (! $blnSimpleLayout) {
            // *** We asume that all dynamic fields greater than 0 are never required.
            if ($this->__validator->getRequired()) {
                $this->setMeta("class", "vf__required");
            } else {
                $this->setMeta("class", "vf__optional");
            }

            // *** Set custom meta.
            if ($blnError) {
                $this->setMeta("class", "vf__error");
            }

            if (! $blnLabel) {
                $this->setMeta("class", "vf__nolabel");
            }

            // Call this right before __getMetaString();
            $this->setConditionalMeta();

            $strOutput = "<div{$this->__getMetaString()}>\n";

            if ($blnError) {
                $strOutput .= "<p class=\"vf__error\">{$this->__validator->getError($intCount)}</p>";
            }

            if ($blnLabel) {
                $strLabel = (! empty($this->__requiredstyle) && $this->__validator->getRequired()) ? sprintf($this->__requiredstyle, $this->__label) : $this->__label;
                if (! empty($this->__label)) {
                    $strOutput .= "<label{$this->__getLabelMetaString()}>{$strLabel}</label>\n";
                }
            }
        } else {
            if ($blnError) {
                $this->setMeta("class", "vf__error");
            }

            $this->setMeta("class", "vf__multifielditem");

            // Call this right before __getMetaString();
            $this->setConditionalMeta();

            $strOutput = "<div{$this->__getMetaString()}\">\n";
        }

        $strOutput .= "<fieldset{$this->__getFieldMetaString()}>\n";

        foreach ($this->__fields as $objField) {
            switch (get_class($objField)) {
                case "ValidFormBuilder\\GroupField":
                    $strOutput .= $objField->toHtmlInternal($this->__getValue($submitted, $intCount), $submitted, $intCount);

                    break;
            }
        }

        $strOutput .= "</fieldset>\n";

        if (! empty($this->__tip)) {
            $strOutput .= "<small class=\"vf__tip\"{$this->__getTipMetaString()}>{$this->__tip}</small>\n";
        }

        $strOutput .= "</div>\n";

        return $strOutput;
    }
365898
protected static function createCheckBoxAndRadioButtonLabel($label, $input, $htmlOptions)
    {
        list ($hidden, $input) = self::normalizeCheckBoxAndRadio($input);
        return $hidden . ($label !== false
            ? self::tag('label', $htmlOptions, $input . ' ' . $label)
            : $input);
    }
768492
public static function validateEntityAutocomplete(array &$element, FormStateInterface $form_state, array &$complete_form) {
    parent::validateEntityAutocomplete($element, $form_state, $complete_form);

    $value = $form_state->getValue('members');
    $form_state->setValue('members', $value['target_id']);
  }
270284
public function inlineJs($jsCode, $uniqueId = null)
    {
        if ($uniqueId !== null) {
            if ($this->included->isIncluded($uniqueId)) {
                return new DataView();
            } else {
                $this->included->markAsIncluded($uniqueId);
            }
        }
        return new TagWithText('script', $jsCode);
    }
757030
public static function processAutocomplete(&$element, FormStateInterface $form_state, &$complete_form) {
    $element = parent::processAutocomplete($element, $form_state, $complete_form);
    $element['#attached']['library'][] = 'webform_strawberryfield/webform_strawberryfield.metadataauth.autocomplete';
    $element['#attached']['drupalSettings'] = [
        'webform_strawberryfield_autocomplete' => [],
      ];

    $element['#attributes']['data-strawberry-autocomplete'] = 'wikidata';
    return $element;
  }
595897
function autoAlignLabel() {
			// Auto-align label, depending on it's position
			if (!settings.hasOwnProperty("label") || (settings.hasOwnProperty("label") && !settings.label.hasOwnProperty("align"))) {
				switch(options.label.position) {
				case "left":
					options.label.align = "right";
					break;
				case "right":
					options.label.align = "left";
					break;
				default:
					options.label.align = "center";
				}

				if (options.label.rotate === "left") {
					options.label.align = "right";
				} else if (options.label.rotate === "right") {
					options.label.align = "left";
				}
			}

			if (!settings.hasOwnProperty("label") || (settings.hasOwnProperty("label") && !settings.label.hasOwnProperty("offset"))) {
				if (options.label.position === "left" || options.label.position === "right") {
					options.label.offset = {
						x: 10,
						y: 15
					};
				}
			}
		}
146022
public function toYaml($inline = 5, $indent = 2)
    {
        $yaml = new YamlFormatter(['inline' => $inline, 'indent' => $indent]);

        return $yaml->encode($this->toArray());
    }
1340566
public static function checkLabel( $label, $name, $id, $checked = false, $attribs = array() ) {
		return self::check( $name, $checked, array( 'id' => $id ) + $attribs ) .
			   '&#160;' .
			   self::label( $label, $id, $attribs );
	}
1334761
function () {

/*Line 139 - 'AtomAutoCompleteBox.js' */                if (!this._items || this._items.length == 0)
/*Line 140 - 'AtomAutoCompleteBox.js' */                    return;

/*Line 142 - 'AtomAutoCompleteBox.js' */                //if (this.get_selectedIndex() != -1)
/*Line 143 - 'AtomAutoCompleteBox.js' */                //    return;

/*Line 145 - 'AtomAutoCompleteBox.js' */                var ae = new AtomEnumerator(this._items);
/*Line 146 - 'AtomAutoCompleteBox.js' */                var lp = this._labelPath;

/*Line 148 - 'AtomAutoCompleteBox.js' */                var cl = this._displayLabel;

/*Line 150 - 'AtomAutoCompleteBox.js' */                if (cl)
/*Line 151 - 'AtomAutoCompleteBox.js' */                    cl = cl.toLowerCase();

/*Line 153 - 'AtomAutoCompleteBox.js' */                while (ae.next()) {
/*Line 154 - 'AtomAutoCompleteBox.js' */                    var item = ae.current();
/*Line 155 - 'AtomAutoCompleteBox.js' */                    var l = item;
/*Line 156 - 'AtomAutoCompleteBox.js' */                    if (lp)
/*Line 157 - 'AtomAutoCompleteBox.js' */                        l = l[lp];
/*Line 158 - 'AtomAutoCompleteBox.js' */                    if (l.toLowerCase().indexOf(cl)==0) {
/*Line 159 - 'AtomAutoCompleteBox.js' */                        AtomBinder.setValue(this, "selectedItem", item);
/*Line 160 - 'AtomAutoCompleteBox.js' */                        AtomBinder.setValue(this, "selectedText", l);
/*Line 161 - 'AtomAutoCompleteBox.js' */                        this.bringSelectionIntoView();
/*Line 162 - 'AtomAutoCompleteBox.js' */                        return;
/*Line 163 - 'AtomAutoCompleteBox.js' */                    }
/*Line 164 - 'AtomAutoCompleteBox.js' */                }
/*Line 165 - 'AtomAutoCompleteBox.js' */            }
1037395
protected function drawBackOfficeBaseInputsText($label, $inputKey)
    {
        $operatorSelectHtml = $this->drawBackOfficeInputOperators($inputKey);

        $currentValue = '';
        if (isset($this->values) && isset($this->values[$inputKey])) {
            $currentValue = $this->values[$inputKey];
        }

        return $this->facade->getParser()->render(
            'coupon/conditions-fragments/base-input-text.html',
            [
                'label' => $label,
                'inputKey' => $inputKey,
                'currentValue' => $currentValue,
                'operatorSelectHtml' => $operatorSelectHtml
            ]
        );
    }