-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2bc574
commit 3141710
Showing
6 changed files
with
143 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
use hipanel\helpers\Url; | ||
use hipanel\modules\client\widgets\combo\ClientCombo; | ||
use hipanel\modules\client\widgets\combo\SellerCombo; | ||
use kartik\date\DatePicker; | ||
use yii\helpers\Html; | ||
use yii\widgets\ActiveForm; | ||
|
||
/** @var yii\web\View $this */ | ||
/** @var hipanel\modules\finance\models\Bill $model */ | ||
/** @var array $billTypes */ | ||
/** @var array $billGroupLabels */ | ||
|
||
$form = ActiveForm::begin([ | ||
'id' => 'dynamic-form', | ||
'enableClientValidation' => true, | ||
'validationUrl' => Url::toRoute([ | ||
'validate-form', | ||
'scenario' => $model->isNewRecord ? $model->scenario : 'update' | ||
]), | ||
]) ?> | ||
|
||
<div class="container-items"><!-- widgetContainer --> | ||
<?php foreach ($models as $i => $model) { ?> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<div class="box box-danger"> | ||
<div class="box-body"> | ||
<div class="form-instance" xmlns="http://www.w3.org/1999/html" | ||
xmlns="http://www.w3.org/1999/html"> | ||
<?php | ||
print $form->field($model, "[$i]client_id")->widget(ClientCombo::className(), | ||
['formElementSelector' => '.form-instance']); | ||
print $form->field($model, "[$i]type")->dropDownList($billTypes, ['groups' => $billGroupLabels]); | ||
print $form->field($model, "[$i]sum"); | ||
?> | ||
<div class="form-group"> | ||
<?= Html::label(Yii::t('hipanel/finance', 'Date')) ?> | ||
<?= \kartik\widgets\DateTimePicker::widget([ | ||
'model' => $model, | ||
'attribute' => "[$i]time", | ||
'type' => DatePicker::TYPE_COMPONENT_APPEND, | ||
'pluginOptions' => [ | ||
'autoclose' => true, | ||
'format' => 'dd.mm.yyyy HH:ii:ss' | ||
], | ||
]) ?> | ||
</div> | ||
<?php | ||
print $form->field($model, "[$i]label"); | ||
?> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- ticket-_form --> | ||
</div> | ||
</div> | ||
<?php } ?> | ||
</div> | ||
<?= Html::submitButton(Yii::t('hipanel', 'Save'), ['class' => 'btn btn-default']) ?> | ||
| ||
<?= Html::button(Yii::t('hipanel', 'Cancel'), ['class' => 'btn btn-default', 'onclick' => 'history.go(-1)']) ?> | ||
<?php ActiveForm::end(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/* @var $this yii\web\View */ | ||
/* @var $model hipanel\modules\ticket\models\Thread */ | ||
/* @var $type string */ | ||
|
||
$this->title = Yii::t('hipanel/finance', 'Create payment'); | ||
$this->breadcrumbs->setItems([['label' => Yii::t('hipanel/finance', 'Payments'), 'url' => ['index']]]); | ||
$this->breadcrumbs->setItems([$this->title]); | ||
?> | ||
|
||
<div class="bill-create"> | ||
<?= $this->render('_form', [ | ||
'models' => $models, | ||
'billTypes' => $billTypes, | ||
'billGroupLabels' => $billGroupLabels | ||
]) ?> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
<?php | ||
|
||
use hipanel\helpers\Url; | ||
use hipanel\modules\finance\grid\BillGridView; | ||
use hipanel\widgets\Pjax; | ||
use yii\helpers\Html; | ||
|
||
$this->title = Html::encode($model->domain); | ||
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Domains'), 'url' => ['index']]; | ||
$this->title = Html::encode($model->domain); | ||
$this->params['breadcrumbs'][] = ['label' => Yii::t('hipanel/finance', 'Payments'), 'url' => ['index']]; | ||
$this->params['breadcrumbs'][] = $this->title; | ||
|
||
?> | ||
Yii::$app->response->redirect(Url::to('@bill/index'))->send(); | ||
|
||
<?php Pjax::begin(Yii::$app->params['pjax']) ?> | ||
Pjax::begin(Yii::$app->params['pjax']) ?> | ||
<div class="row"> | ||
|
||
<div class="col-md-4"> | ||
<?= BillGridView::detailView([ | ||
'model' => $model, | ||
'columns' => [ | ||
'seller_id', 'client_id', | ||
['attribute' => 'bill'], | ||
], | ||
]) ?> | ||
</div> | ||
<div class="col-md-4"> | ||
<?= BillGridView::detailView([ | ||
'model' => $model, | ||
'columns' => [ | ||
'seller_id', | ||
'client_id', | ||
|
||
], | ||
]) ?> | ||
</div> | ||
|
||
</div> | ||
<?php Pjax::end() ?> |