Beispiel #1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     Widget::registerTranslations();
     if ($this->url === null) {
         throw new InvalidConfigException(Yii::t('cropper', 'MISSING_ATTRIBUTE', ['attribute' => 'url']));
     } else {
         $this->url = rtrim($this->url, '/') . '/';
     }
     if ($this->path === null) {
         throw new InvalidConfigException(Yii::t('cropper', 'MISSING_ATTRIBUTE', ['attribute' => 'path']));
     } else {
         $this->path = rtrim(Yii::getAlias($this->path), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
     }
 }
Beispiel #2
0
?>
<div class="site-signup">
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
$form = ActiveForm::begin(['id' => 'form-profile']);
?>
    <div class="row">
        <div class="col-xs-12 col-md-6">
            <div class="panel panel-default">
                <div class="panel-body">
                    <?php 
echo $form->field($model, 'photo')->widget(Widget::className(), ['uploadUrl' => Url::toRoute('/user/user/uploadPhoto')]);
?>
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-md-6">
            <div><?php 
echo $form->field($model, 'username');
?>
</div>
            <div><?php 
echo $form->field($model, 'email')->input('email');
?>
</div>
            <div><?php 
echo $form->field($model, 'sex')->dropDownList(User::getSexArray());