/** * @inheritdoc */ public function loadAttributesFromState($values) { /** @var array $oldAuthClients */ $oldAuthClients = isset($values['authClients']) ? $values['authClients'] : []; unset($values['authClients']); parent::setAttributes($values, false); $this->authClients = []; foreach ($oldAuthClients as $index => $client) { $new = new AuthClientConfig(); $new->setAttributes($client, false); $this->authClients[$index] = $new; } return true; }
?> <div class="modal fade" id="add-auth-client-modal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title"><?php echo Yii::t('app', 'Add auth client'); ?> </h4> </div> <div class="modal-body"> <?php echo $form->field($authClientConfigModel, "[-1]class_name")->widget(\kartik\widgets\TypeaheadBasic::className(), ['data' => AuthClientConfig::classNameAutoComplete(), 'pluginOptions' => ['highlight' => true]]); ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-default pull-left" data-dismiss="modal"> <?php echo Icon::show('times'); ?> <?php echo Yii::t('app', 'Cancel'); ?> </button> <button type="button" class="btn btn-primary" id="add-auth-client"> <?php echo Icon::show('floppy-o');