$('#form-message-services').submit(function (e) {
e.preventDefault();
var form = $(this);
var data = new FormData(this);
var spiner = $('.fa-spinner');
var button = $('.send-button');
if ($('.textarea').val().length > 0) {
preloader(spiner, button);
$.ajax({
url: form.attr('action'),
method: form.attr('method'),
data: data,
async: false,
cache: false,
contentType: false,
processData: false,
success: function(data) {
var div = $('.cnt');
div.html(data);
div.scrollTop(div.prop('scrollHeight'));
$('.file-upload').html('');
form[0].reset();
},
});
setTimeout(function () {
preloader(spiner, button);
}, 500);
}
});
<?php
/**
* @var $this \yii\web\View
* @var $model \common\models\RegistryArkBanks
*/
use yii\helpers\Html;
use yii\helpers\Url;
...
$this->registerJsFile('/lk/static/js/vendor.js');
$script = <<<JS
$('input[type="datepicker"]').datepicker();
$('input[type="money"]').mask('000 000 000 000', {reverse: true});
...
JS;
$this->registerJs($script);
?>
<?= Html::beginForm(Url::to(['credit/update', 'id' => $model->id]), 'post', [
'id' => 'block-credit-create_form'
]) ?>
<div class="content form">
...
<div class="field">
<label>Сумма долга<span class="required-symbol">*</span></label>
<?= Html::input('money', 'RegistryArkBanks[contract_sum]', Html::encode($model->contract_sum), [
'class' => 'input _fill'
]) ?>
<div class="__error"><?= $model->getFirstError('contract_sum') ?></div>
</div>
<div class="field">
<label>Сумма, взятая в кредитной организации</label>
<?= Html::input('money', 'RegistryArkBanks[contract_initial_sum]', Html::encode($model->contract_initial_sum), [
'class' => 'input _fill'
]) ?>
<div class="__error"><?= $model->getFirstError('contract_initial_sum') ?></div>
</div>
<div class="field">
<label>Номер банковской карты</label>
<?= Html::input('text', 'RegistryArkBanks[contract_card_number]', Html::encode($model->contract_card_number), [
'class' => 'input _fill'
]) ?>
<div class="__error"><?= $model->getFirstError('contract_card_number') ?></div>
</div>
<div class="field">
<label>Дата заключения<span class="required-symbol">*</span></label>
<?= Html::input('datepicker', 'RegistryArkBanks[contract_date]', !empty($model->contract_date) ? date('Y-m-d', $model->contract_date) : null, [
'class' => 'input _fill'
]) ?>
<div class="__error"><?= $model->getFirstError('contract_date') ?></div>
</div>
<div class="field">
<label>Дата начала просрочки</label>
<?= Html::input('datepicker', 'RegistryArkBanks[date_start_overdue]', !empty($model->date_start_overdue) ? date('Y-m-d', $model->date_start_overdue) : null, [
'class' => 'input _fill'
]) ?>
<div class="__error"><?= $model->getFirstError('date_start_overdue') ?></div>
</div>
</div>
<div class="footer">
<button type="submit" href="#" class="btn _fill">Редактировать</button>
</div>
<?php Html::endForm() ?>
<?php
use yii\db\Migration;
/**
* Class m190423_135654_add_archive_column_user_table
*/
class m190423_135654_add_archive_column_user_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->execute("ALTER TABLE `user`
ADD `archive` int(11) NULL;");
$this->execute("ALTER TABLE `user`
ADD `archive_сomment` text NULL;");
$this->execute("ALTER TABLE `user`
ADD `reason_archive` int(11) NULL;");
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
echo "m190423_135654_add_archive_column_user_table cannot be reverted.\n";
return false;
}
/*
// Use up()/down() to run migration code without a transaction.
public function up()
{
}
public function down()
{
echo "m190423_135654_add_archive_column_user_table cannot be reverted.\n";
return false;
}
*/
}
[42000][1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(PARTITION BY ticket.user_id ORDER BY ticket.created_at DESC) AS rn FROM ' at line 2
строку id. Но как мне узнать session id. Если все параметры я уже использовал или те которые я заметил