mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT Better feedback for validation errors in ModelAdmin
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@73031 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
644c7e06c6
commit
9260326ee6
@ -58,7 +58,7 @@ $(document).ready(function() {
|
|||||||
$('#statusMessage').css('top', newTopValue);
|
$('#statusMessage').css('top', newTopValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
// Search form
|
// Search form
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
@ -202,7 +202,11 @@ $(document).ready(function() {
|
|||||||
$.post(formAction, form.formToArray(), function(result){
|
$.post(formAction, form.formToArray(), function(result){
|
||||||
$('#right #ModelAdminPanel').html(result);
|
$('#right #ModelAdminPanel').html(result);
|
||||||
|
|
||||||
statusMessage(ss.i18n._t('ModelAdmin.SAVED', 'Saved'));
|
if($('#right #ModelAdminPanel form').hasClass('validationerror')) {
|
||||||
|
statusMessage(ss.i18n._t('ModelAdmin.VALIDATIONERROR', 'Validation Error'), 'bad');
|
||||||
|
} else {
|
||||||
|
statusMessage(ss.i18n._t('ModelAdmin.SAVED', 'Saved'), 'good');
|
||||||
|
}
|
||||||
|
|
||||||
// TODO/SAM: It seems a bit of a hack to have to list all the little updaters here.
|
// TODO/SAM: It seems a bit of a hack to have to list all the little updaters here.
|
||||||
// Is livequery a solution?
|
// Is livequery a solution?
|
||||||
|
@ -22,6 +22,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
|
|||||||
'ModelAdmin.SAVED': "Saved",
|
'ModelAdmin.SAVED': "Saved",
|
||||||
'ModelAdmin.REALLYDELETE': "Do you really want to delete?",
|
'ModelAdmin.REALLYDELETE': "Do you really want to delete?",
|
||||||
'ModelAdmin.DELETED': "Deleted",
|
'ModelAdmin.DELETED': "Deleted",
|
||||||
|
'ModelAdmin.VALIDATIONERROR': "Validation Error",
|
||||||
'LeftAndMain.PAGEWASDELETED': "This page was deleted. To edit a page, select it from the left.",
|
'LeftAndMain.PAGEWASDELETED': "This page was deleted. To edit a page, select it from the left.",
|
||||||
'LeftAndMain.CONFIRMUNSAVED': "Are you sure you want to navigate away from this page?\n\nWARNING: Your changes have not been saved.\n\nPress OK to continue, or Cancel to stay on the current page."
|
'LeftAndMain.CONFIRMUNSAVED': "Are you sure you want to navigate away from this page?\n\nWARNING: Your changes have not been saved.\n\nPress OK to continue, or Cancel to stay on the current page."
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user