Commit 4c88ce8d authored by Shakarim Sapa's avatar Shakarim Sapa

- Fix

parent adcae0bc
...@@ -35,6 +35,7 @@ class BlogBidController extends BaseController { ...@@ -35,6 +35,7 @@ class BlogBidController extends BaseController {
$transaction = Yii::$app->db->beginTransaction(); $transaction = Yii::$app->db->beginTransaction();
try { try {
var_dump($model->validate()); die;
if($model->save()) { if($model->save()) {
$model->send(); $model->send();
......
...@@ -74,21 +74,16 @@ if ($cacheEmail!==false && BlogBids::find()->where(['email' => $cacheEmail])->ex ...@@ -74,21 +74,16 @@ if ($cacheEmail!==false && BlogBids::find()->where(['email' => $cacheEmail])->ex
xhr.onreadystatechange = function() xhr.onreadystatechange = function()
{ {
if (xhr.readyState == 4){ if (xhr.readyState == 4){
try try {
{
var response = JSON.parse(xhr.responseText); var response = JSON.parse(xhr.responseText);
} } catch(e) {
catch(e)
{
var response = xhr.responseText; var response = xhr.responseText;
} }
form.find('.has-error').removeClass('has-error'); form.find('.has-error').removeClass('has-error');
if(response.success) if(response.success) {
{ if(form.find('.message-box.send_secce').length > 0) {
if(form.find('.message-box.send_secce').length > 0)
{
console.log('asd'); console.log('asd');
form.find('.message-box.send_secce').fadeIn('fast'); form.find('.message-box.send_secce').fadeIn('fast');
form.find('.content').css('visibility','hidden'); form.find('.content').css('visibility','hidden');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment