Merge pull request #2462 from githubjeka/patch-1

Update colorPickerField.php
This commit is contained in:
Lucas Bartholemy 2017-04-05 18:01:41 +02:00 committed by GitHub
commit ce549b543f

View File

@ -5,10 +5,10 @@ use yii\helpers\Html;
humhub\assets\HumHubColorPickerAsset::register($this);
?>
<?= Html::activeTextInput($model, $field, ['class' => 'form-control', 'id' => $inputId, 'value' => $model->color, 'style' => 'display:none']); ?>
<?= Html::activeTextInput($model, $field, ['class' => 'form-control', 'id' => $inputId, 'value' => $model->$field, 'style' => 'display:none']); ?>
<script type="text/javascript">
$(function() {
humhub.modules.ui.colorpicker.apply('#<?= $container ?>', '#<?= $inputId ?>', '<?= $model->color ?>')
humhub.modules.ui.colorpicker.apply('#<?= $container ?>', '#<?= $inputId ?>', '<?= $model->$field ?>')
});
</script>