Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['curname', 'acronym', 'countryid'], 'required'], ['countryid', 'in', 'range' => array_keys(DatabaseHelper::getCountriesList())], ['curname', 'unique'], [['acronym', 'curname'], 'string', 'max' => 255]];
 }
Exemplo n.º 2
0
?>

    <?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>

    <?php 
ActiveForm::end();
?>
Exemplo n.º 3
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>
Exemplo n.º 4
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>
Exemplo n.º 5
0
use yii\widgets\ActiveForm;
use common\helpers\DatabaseHelper;
use yii\jui\DatePicker;
/* @var $this yii\web\View */
/* @var $model common\models\rates\Rate */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="rate-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'quoteid')->dropDownList(DatabaseHelper::getQuotesFullnameList(), ['prompt' => 'Select quote']);
?>

    <div class="form-group">
        <?php 
echo Html::label('Company', 'rate-company', ['class' => 'control-label']);
?>
        <?php 
echo Html::input('string', 'rate-company', null, ['readonly' => true, 'class' => 'form-control']);
?>
    </div>
    <div class="form-group">
        <?php 
echo Html::label('Country', 'rate-country', ['class' => 'control-label']);
?>
        <?php 
Exemplo n.º 6
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']];
 }
Exemplo n.º 7
0
/* @var $this yii\web\View */
/* @var $model common\models\exchange\Exchange */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="exchange-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'exchname')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'countryid')->dropDownList(DatabaseHelper::getCountriesList());
?>
    <?php 
echo $form->field($model, 'web')->textInput(['maxlength' => true]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Exemplo n.º 8
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']];
 }
Exemplo n.º 9
0
use yii\helpers\Html;
use yii\grid\GridView;
use common\helpers\DatabaseHelper;
/* @var $this yii\web\View */
/* @var $searchModel common\models\exchange\ExchangeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Exchanges';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="exchange-index">

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

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'exchname', ['attribute' => 'country.countryname', 'filter' => Html::activeDropDownList($searchModel, 'countryid', DatabaseHelper::getCountriesList(), ['prompt' => 'Select country'])], ['attribute' => 'web', 'format' => 'url'], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Exemplo n.º 10
0
use yii\bootstrap\ActiveForm;
use common\helpers\DatabaseHelper;
/* @var $this yii\web\View */
/* @var $model common\models\index\Index */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="index-form">
    <?php 
$form = ActiveForm::begin(['id' => 'form-index-create', 'layout' => 'horizontal', 'fieldConfig' => ['template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}", 'horizontalCssClasses' => ['label' => 'col-sm-2', 'offset' => 'col-sm-offset-4', 'wrapper' => 'col-sm-6', 'error' => '', 'hint' => '']]]);
?>
    <?php 
echo $form->errorSummary($model);
?>
    <?php 
echo $form->field($model, 'exchangeid')->dropDownList(DatabaseHelper::getExchangesList(), ['prompt' => 'Select exchange']);
?>

    <?php 
echo $form->field($model, 'indname')->textInput(['maxlength' => true])->hint('Please provide the index name');
?>

    <?php 
echo $form->field($model, 'isin')->textInput(['maxlength' => true])->hint('Please provide the index ISIN');
?>

    <h2>Add quotes to index</h2>
    <hr/>
    <?php 
echo Html::button('Add quote', ['id' => 'add-quote-index', 'class' => 'btn btn-primary btn-sm']);
?>
Exemplo n.º 11
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['exchid'], 'integer'], ['countryid', 'in', 'range' => array_keys(DatabaseHelper::getCountriesList())], [['exchname', 'web'], 'safe']];
 }