Exemple #1
0
                                </label>
                                <?php 
        if (strtolower($field->title) == 'about') {
            ?>
                                    <div class="col-sm-9">
                                        <p class="form-control-static"><?php 
            echo RichText::widget(['text' => $field->getUserValue($user, true)]);
            ?>
</p>
                                    </div>
                                <?php 
        } else {
            ?>
                                    <div class="col-sm-9">
                                        <?php 
            if ($field->field_type_class == MarkdownEditor::className()) {
                ?>
                                            <p class="form-control-static" style="min-height: 0 !important;padding-top:0;">
                                                <?php 
                echo MarkdownView::widget(['markdown' => $field->getUserValue($user, false)]);
                ?>
                                            </p>
                                        <?php 
            } else {
                ?>
                                            <p class="form-control-static"><?php 
                echo $field->getUserValue($user, false);
                ?>
</p>                     
                                        <?php 
            }
Exemple #2
0
 /**
  * Returns a list of all available field type classes.
  *
  * @return Array
  */
 public function getFieldTypes()
 {
     $fieldTypes = array_merge(array(Number::className() => Yii::t('UserModule.models_ProfileFieldType', 'Number'), Text::className() => Yii::t('UserModule.models_ProfileFieldType', 'Text'), TextArea::className() => Yii::t('UserModule.models_ProfileFieldType', 'Text Area'), Select::className() => Yii::t('UserModule.models_ProfileFieldType', 'Select List'), Date::className() => Yii::t('UserModule.models_ProfileFieldType', 'Date'), DateTime::className() => Yii::t('UserModule.models_ProfileFieldType', 'Datetime'), Birthday::className() => Yii::t('UserModule.models_ProfileFieldType', 'Birthday'), CountrySelect::className() => Yii::t('UserModule.models_ProfileFieldType', 'Country'), MarkdownEditor::className() => Yii::t('UserModule.models_ProfileFieldType', 'Markdown')), $this->fieldTypes);
     return $fieldTypes;
 }