Пример #1
0
    color: red;
}
label {
    font-weight: normal !important;
}
CSS;
$this->registerCss($css);
?>

<div class="personal-form">


    <div class="row">
        <div class="col-sm-3 pull-right">
            <?php 
echo \common\components\cropper\CropAvatarWidget::widget(['imgSrc' => strlen($model->picture_name) > 14 ? Yii::$app->homeUrl . '/uploads/personCardPhoto/' . $model->personal_id . '/' . $model->picture_name : '', 'imgSavePath' => '/uploads/personCardPhoto/' . $model->personal_id . '/', 'imgClass' => 'profile-user-img img-responsive img-rounded', 'imgCropType' => common\components\cropper\CropAvatarWidget::PERSON_AVATAR, 'imgPersonalID' => $model->personal_id]);
?>
        </div>
        <div class="col-sm-9">
            <?php 
$form = ActiveForm::begin(['id' => 'personal-form']);
?>
            <div class="row">
                <div class="col-sm-12">
                    <?php 
echo Html::submitButton('保 存', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-info']);
?>
                </div>
            </div>
            <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 6, 'attributes' => ['personal_id' => ['type' => Form::INPUT_HIDDEN, 'label' => false, 'columnOptions' => ['colspan' => 0]], 's_date' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入登记日期..', 'maxlength' => 8]], 'code1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工编码..', 'maxlength' => 36]], 'name1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工姓名..', 'maxlength' => 50]]]]);
Пример #2
0
            <div class="col-md-9">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <?php 
echo Html::encode($this->title);
?>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-4 <?php 
echo strlen(Yii::$app->homeUrl) <= 1 ? 'hidden' : '';
?>
" >
                                <div class="box-body box-profile">
                                    <?php 
echo \common\components\cropper\CropAvatarWidget::widget(['imgSrc' => $user_avatar, 'imgSavePath' => '/uploads/user/avatar/']);
?>
                                    <h5 class="profile-username text-center" id="user_avatar"><?php 
echo $user->profile->name ? $user->profile->name : $user->username;
?>
</h5>
                                    <p class="text-muted text-center"><?php 
echo $user->profile->bio;
?>
</p>
                                </div>
                            </div>
                            <div class="col-md-<?php 
echo strlen(Yii::$app->homeUrl) <= 1 ? 12 : 8;
?>
">