new balance
This commit is contained in:
18
backend/widgets/DateRangeWidget.php
Normal file
18
backend/widgets/DateRangeWidget.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace backend\widgets;
|
||||
|
||||
|
||||
use yii\base\Widget;
|
||||
|
||||
class DateRangeWidget extends Widget
|
||||
{
|
||||
public $model;
|
||||
|
||||
public function run()
|
||||
{
|
||||
return $this->render('date_range', ['model' => $this->model]);
|
||||
}
|
||||
|
||||
}
|
19
backend/widgets/SummRangeWidget.php
Normal file
19
backend/widgets/SummRangeWidget.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace backend\widgets;
|
||||
|
||||
|
||||
use yii\base\Widget;
|
||||
|
||||
class SummRangeWidget extends Widget
|
||||
{
|
||||
public $model;
|
||||
public $range_attribute;
|
||||
|
||||
public function run()
|
||||
{
|
||||
return $this->render('summ_range', ['model' => $this->model]);
|
||||
}
|
||||
|
||||
}
|
21
backend/widgets/views/date_range.php
Normal file
21
backend/widgets/views/date_range.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $model \yii\db\ActiveRecord
|
||||
*/
|
||||
use yii\jui\DatePicker;
|
||||
|
||||
echo DatePicker::widget([
|
||||
'model' => $model,
|
||||
'attribute' => 'dt_from',
|
||||
'language' => 'ru',
|
||||
'dateFormat' => 'dd-MM-yyyy',
|
||||
]);
|
||||
|
||||
echo " - ";
|
||||
|
||||
echo DatePicker::widget([
|
||||
'model' => $model,
|
||||
'attribute' => 'dt_to',
|
||||
'language' => 'ru',
|
||||
'dateFormat' => 'dd-MM-yyyy',
|
||||
]);
|
12
backend/widgets/views/summ_range.php
Normal file
12
backend/widgets/views/summ_range.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $model \yii\db\ActiveRecord
|
||||
*/
|
||||
|
||||
echo \yii\helpers\Html::activeTextInput($model, 'summ_from', [
|
||||
'placeholder' => 'От',
|
||||
]);
|
||||
echo ' - ';
|
||||
echo \yii\helpers\Html::activeTextInput($model, 'summ_to', [
|
||||
'placeholder' => 'До',
|
||||
]);
|
Reference in New Issue
Block a user