Listing & Form & Refactoring

- finished implementing forms
- fixed form reset when clicking on new
- fixed responsive for select all checkbox and toggle item details
- refactored listing items' actions
- added Trash action
- cleaned up validations on models
- fixed syntax
- fixed tests
This commit is contained in:
Jonathan Labreuille
2015-09-15 16:00:07 +02:00
parent 79f1896cf3
commit 2a4945c956
21 changed files with 196 additions and 183 deletions

View File

@@ -39,11 +39,13 @@ class Subscribers {
wp_send_json($result);
}
function update($data) {
}
function delete($id) {
$subscriber = Subscriber::findOne($id);
if($subscriber !== false) {
$result = $subscriber->delete();
} else {
$result = false;
}
wp_send_json($result);
}
}