Ejemplo n.º 1
0
?>

    <?php 
echo $form->field($model, 'shortname')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'englishname')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'acronym')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'exchid')->dropDownList(DatabaseHelper::getExchangesList(), ['prompt' => 'Select exchange']);
?>

    <?php 
echo $form->field($model, 'companyid')->dropDownList(DatabaseHelper::getCompaniesList(), ['prompt' => 'Select company']);
?>

    <?php 
echo $form->field($model, 'privileged')->checkbox();
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
Ejemplo n.º 2
0
/* @var $searchModel common\models\quote\QuoteSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Quotes';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="quote-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a('Create Quote', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'fullname', 'englishname', 'acronym', ['attribute' => 'exch.exchname', 'filter' => Html::activeDropDownList($searchModel, 'exchid', DatabaseHelper::getExchangesList(), ['prompt' => 'Select exchange'])], ['attribute' => 'company.companyname'], ['label' => 'Indeces', 'content' => function ($model, $key, $index, $column) {
    $value = '';
    foreach ($model->indeces as $index) {
        $value .= '[' . $index->indname . ']';
    }
    return $value;
}], ['attribute' => 'privileged', 'format' => 'boolean'], 'ActiveFlag', ['class' => 'yii\\grid\\ActionColumn']]]);
?>
</div>
Ejemplo n.º 3
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['fullname', 'shortname', 'englishname', 'acronym', 'exchid', 'companyid'], 'required'], ['exchid', 'in', 'range' => array_keys(DatabaseHelper::getExchangesList())], ['companyid', 'in', 'range' => array_keys(DatabaseHelper::getCompaniesList())], ['ActiveFlag', 'integer'], ['ChangeDate', 'safe'], [['fullname', 'shortname', 'englishname', 'acronym'], 'string', 'max' => 255], ['privileged', 'boolean']];
 }
Ejemplo n.º 4
0
<div class="index-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a('Create Index', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'exchange.country.countryname', ['attribute' => 'exchange.exchname', 'filter' => Html::activeDropDownList($searchModel, 'exchangeid', DatabaseHelper::getExchangesList(), ['prompt' => 'Select exchange'])], 'indname', 'isin', 'ActiveFlag', ['class' => \yii\grid\ActionColumn::className(), 'header' => 'Actions', 'buttons' => ['view' => function ($url, $model, $key) {
    $options = ['title' => Yii::t('yii', 'View'), 'aria-label' => Yii::t('yii', 'View'), 'data-pjax' => '0', 'class' => 'actionModal'];
    return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $url, $options);
}]]]]);
?>

    <?php 
\yii\bootstrap\Modal::begin(['headerOptions' => ['id' => 'modal-header'], 'id' => 'modal', 'options' => ['class' => 'slide'], 'clientOptions' => ['backdrop' => 'static', 'keyboard' => FALSE]]);
echo "<div id='modal-body'></div>";
\yii\bootstrap\Modal::end();
?>

</div>
Ejemplo n.º 5
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['exchangeid', 'indname', 'isin'], 'required'], ['exchangeid', 'in', 'range' => array_keys(DatabaseHelper::getExchangesList())], [['indname', 'isin'], 'string', 'max' => 255], [['indname', 'isin'], 'trim'], ['indname', 'unique']];
 }