Index: admin_templates/config/config_general.tpl =================================================================== --- admin_templates/config/config_general.tpl (revision 15471) +++ admin_templates/config/config_general.tpl (working copy) @@ -165,6 +165,16 @@ $event.status = $event.Name == 'OnCancel' ? true : validate_password_fields(); } ); + + + $(document).ready(function () { + var $error_cell = $('.field-.error'); + + if ( $error_cell.length ) { + $(window).scrollTop($error_cell.position().top - 15); + } + }); + \ No newline at end of file Index: admin_templates/config/config_universal.tpl =================================================================== --- admin_templates/config/config_universal.tpl (revision 15471) +++ admin_templates/config/config_universal.tpl (working copy) @@ -136,6 +136,16 @@ $event.status = $event.Name == 'OnCancel' ? true : validate_password_fields(); } ); + + + $(document).ready(function () { + var $error_cell = $('.field-.error'); + + if ( $error_cell.length ) { + $(window).scrollTop($error_cell.position().top - 15); + } + }); + \ No newline at end of file Index: admin_templates/incs/config_blocks.tpl =================================================================== --- admin_templates/incs/config_blocks.tpl (revision 15471) +++ admin_templates/incs/config_blocks.tpl (working copy) @@ -89,7 +89,7 @@ -   +   @@ -116,17 +116,16 @@ -   +   - +
-
Index: units/configuration/configuration_event_handler.php =================================================================== --- units/configuration/configuration_event_handler.php (revision 15471) +++ units/configuration/configuration_event_handler.php (working copy) @@ -320,8 +320,6 @@ $skin_deleted = true; } } - - $this->Application->StoreVar('config_was_updated', 1); } /** @@ -367,6 +365,8 @@ } if ( $event->status == kEvent::erSUCCESS ) { + $event->SetRedirectParam('action_completed', 1); + if ( $new_category_id !== false ) { // root category was submitted $module = $this->Application->GetVar('module'); @@ -400,9 +400,14 @@ $this->Application->DeleteUnitCache($changed); } - elseif ( $this->Application->GetVar('errors_' . $event->getPrefixSpecial()) ) { - // because we have list out there, and this is item - $this->Application->removeObject($event->getPrefixSpecial()); + else{ + $errors = $this->Application->GetVar('errors_' . $event->getPrefixSpecial()); + + if ( $errors ) { + // because we have list out there, and this is item + $this->Application->SetVar('first_error', key($errors)); + $this->Application->removeObject($event->getPrefixSpecial()); + } } // keeps module and section in REQUEST to ensure, that last admin template will work