mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 19:26:08 +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 {
|
||||
$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 {
|
||||
if (!empty($title) && !empty($tag) && !empty($content) && !empty($media)) {
|
||||
|
|
@ -1022,12 +1022,12 @@ post('/admin/autosave', function () {
|
|||
}
|
||||
}
|
||||
} 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 {
|
||||
$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');
|
||||
echo $response;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue