当前位置: 首页>>代码示例>>PHP>>正文


PHP X2Model::renderModelAutocomplete方法代码示例

本文整理汇总了PHP中X2Model::renderModelAutocomplete方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Model::renderModelAutocomplete方法的具体用法?PHP X2Model::renderModelAutocomplete怎么用?PHP X2Model::renderModelAutocomplete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在X2Model的用法示例。


在下文中一共展示了X2Model::renderModelAutocomplete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 /**
  * Called by the MultiTypeAutocomplete widget to render autocomplete input
  * @param string $modelType
  */
 public function run($modelType, $name = null)
 {
     $htmlOptions = array();
     if ($name) {
         $htmlOptions['name'] = $name;
     }
     X2Model::renderModelAutocomplete($modelType, true, $htmlOptions);
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:12,代码来源:AjaxGetModelAutocompleteAction.php

示例2: array

">


    <div class='row'>
        <?php 
    echo CHtml::label(Yii::t('app', 'Link Type:'), 'RelationshipModelName');
    echo CHtml::dropDownList('RelationshipModelName', 'Contacts', $linkableModelsOptions, array('id' => 'relationship-type', 'class' => 'x2-select field'));
    echo CHtml::link('', '#', array('onclick' => 'return false;', 'id' => 'quick-create-record', 'class' => 'fa fa-plus fa-lg pseudo-link', 'style' => 'visibility: hidden; height:16px;'));
    ?>
    </div>

    <div class='row'>
        <?php 
    echo CHtml::label(Yii::t('app', 'Name:'), 'RelationshipName');
    echo "<div id='inline-relationships-autocomplete-container'>";
    X2Model::renderModelAutocomplete('Contacts');
    echo CHtml::hiddenField('RelationshipModelId');
    echo "</div>";
    echo CHtml::textField('myName', $model->name, array('disabled' => 'disabled'));
    ?>
        <!-- <input type="hidden" id='RelationshipModelId' name="RelationshipModelId"> -->
    </div>

    <div class='row'>
        <?php 
    echo X2Html::label(Yii::t('app', 'Label:'), 'RelationshipLabelButton');
    echo X2Html::textField('secondLabel');
    echo X2Html::textField('firstLabel', '', array('title' => Yii::t('app', 'Create a different label for ') . $model->name));
    echo X2Html::hiddenField('mutual', 'true');
    echo X2Html::link('', '', array('id' => 'RelationshipLabelButton', 'class' => 'pseudo-link fa fa-long-arrow-right', 'title' => Yii::t('app', 'Create a different label for ') . $model->name));
    ?>
开发者ID:tymiles003,项目名称:X2CRM,代码行数:31,代码来源:_inlineRelationshipsWidget.php

示例3: array

echo CHtml::openTag('div', X2Html::mergeHtmlOptions(array('class' => "multi-type-autocomplete-container", 'id' => $namespacedId), $this->htmlOptions));
if (isset($this->model)) {
    echo CHtml::activeDropDownList($this->model, $this->selectName, $this->options, array('class' => ''));
} else {
    echo CHtml::dropDownList($this->selectName, $this->selectValue, $this->options, array('class' => 'x2-select type-select'));
}
$htmlOptions = array();
if (isset($this->model)) {
    echo CHtml::activeLabel($this->model, $this->autocompleteName, array('style' => $this->selectValue === 'calendar' ? 'display: none;' : ''));
}
if (isset($this->autocompleteName)) {
    $htmlOptions['name'] = isset($this->model) ? CHtml::resolveName($this->model, $this->autocompleteName) : $this->autocompleteName;
}
if ($this->selectValue === 'calendar') {
    $htmlOptions['disabled'] = 'disabled';
    $htmlOptions['style'] = 'display: none;';
    $this->selectValue = 'Contacts';
}
if (!in_array($this->selectValue, $this->staticOptions)) {
    X2Model::renderModelAutocomplete($this->selectValue, false, $htmlOptions, $this->autocompleteValue);
} else {
    ?>
        <input class="record-name-autocomplete" type="hidden"></input>
        <?php 
}
if (isset($this->model)) {
    echo CHtml::activeHiddenField($this->model, $this->hiddenInputName, array('class' => 'hidden-id'));
} else {
    echo CHtml::hiddenField($this->hiddenInputName, $this->hiddenInputValue, array('class' => 'hidden-id'));
}
echo CHtml::closeTag('div');
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:_multiTypeAutocomplete.php

示例4: array

        <div class='cell'>
            <?php 
    echo $form->label($model, 'associationType', array('class' => 'action-associationType-label'));
    echo $form->dropDownList($model, 'associationType', $associationTypeOptions, array('class' => 'action-associationType-dropdown'));
    ?>
            <div id='<?php 
    echo $this->resolveId('association-type-autocomplete-container');
    ?>
' 
             <?php 
    echo $model->associationType === 'calendar' ? 'style="display: none;"' : '';
    ?>
>
            <?php 
    echo CHtml::label(Yii::t('app', 'Association Name'), 'associationName', array('class' => 'action-associationName-label'));
    $autocomplete = X2Model::renderModelAutocomplete(X2Model::getModelName($model->associationType), false, array('name' => 'Actions[associationName]'));
    if ($autocomplete !== 'failure') {
        echo $autocomplete;
    } else {
        // dummy input to be replaced with autocomplete
        echo '<input disabled="disabled">';
    }
    echo $form->hiddenField($model, 'associationId', array('data-default' => ''));
    ?>
            </div>
            <?php 
    echo CHtml::hiddenField('calendarEventTab', true);
    ?>
        </div>
        <?php 
}
开发者ID:keyeMyria,项目名称:CRM,代码行数:31,代码来源:_eventForm.php

示例5: function

 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley,
 * California 95067, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 *****************************************************************************************/
$namespacedId = $this->namespace . "-multi-type-autocomplete-container";
Yii::app()->clientScript->registerScript('multiTypeAutocompleteJS' . $this->namespace, "\n\n\$(function () {\n    var container\$ = \$('#" . $namespacedId . "');\n\n    container\$.find ('select').change (function () {\n        var modelType = container\$.find ('select').val ();\n        var throbber\$ = x2.forms.inputLoading (container\$.find ('.record-name-autocomplete'));\n        \$.ajax ({\n            type: 'GET',\n            url: 'ajaxGetModelAutocomplete',\n            data: {\n                modelType: modelType\n            },\n            success: function (data) {\n                // remove span element used by jQuery widget\n                container\$.find ('input').\n                    first ().next ('span').remove ();\n\n                // replace old autocomplete with the new one\n                container\$.find ('input').first ().replaceWith (data); \n     \n                // remove the loading gif\n                throbber\$.remove ();\n            }\n        });\n    });\n});\n\n", CClientScript::POS_END);
?>
<div id="<?php 
echo $namespacedId;
?>
" 
 class="multi-type-autocomplete-container form2">
<?php 
echo CHtml::dropDownList($this->selectName, $this->value, $this->options, array('class' => 'x2-select type-select'));
X2Model::renderModelAutocomplete($this->value, false, array());
echo CHtml::hiddenField($this->hiddenInputName, '', array('class' => 'hidden-id'));
?>
</div>
开发者ID:keyeMyria,项目名称:CRM,代码行数:30,代码来源:_multiTypeAutocomplete.php


注:本文中的X2Model::renderModelAutocomplete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。