mirror of
https://github.com/danpros/htmly.git
synced 2026-04-21 04:56:23 +05:30
Autosave message
Added a message why the draft was not saved
This commit is contained in:
parent
3397d76b01
commit
eb4330abc8
2 changed files with 4 additions and 4 deletions
|
|
@ -1009,7 +1009,7 @@ post('/admin/autosave', function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$response = json_encode(array('message' => 'No content to save.', 'file' => ''));
|
$response = json_encode(array('message' => '<strong>Cannot save draft!</strong><br>Please fill in all required fields', 'file' => ''));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($title) && !empty($tag) && !empty($content) && !empty($media)) {
|
if (!empty($title) && !empty($tag) && !empty($content) && !empty($media)) {
|
||||||
|
|
@ -1022,12 +1022,12 @@ post('/admin/autosave', function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$response = json_encode(array('message' => 'No content to save.', 'file' => ''));
|
$response = json_encode(array('message' => '<strong>Cannot save draft!</strong><br>Please fill in all required fields', 'file' => ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$response = json_encode(array('message' => 'No content to save.', 'file' => ''));
|
$response = json_encode(array('message' => '<strong>Cannot save draft!</strong><br>Please fill in all required fields', 'file' => ''));
|
||||||
}
|
}
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
echo $response;
|
echo $response;
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ function updateData() {
|
||||||
$("#response").fadeOut(600, function() {
|
$("#response").fadeOut(600, function() {
|
||||||
$("#response").css("display", "none");
|
$("#response").css("display", "none");
|
||||||
});
|
});
|
||||||
}, 3000);
|
}, 6000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue