Index: branches/5.2.x/core/admin_templates/incs/config_blocks.tpl =================================================================== diff -u -N -r15471 -r15525 --- branches/5.2.x/core/admin_templates/incs/config_blocks.tpl (.../config_blocks.tpl) (revision 15471) +++ branches/5.2.x/core/admin_templates/incs/config_blocks.tpl (.../config_blocks.tpl) (revision 15525) @@ -89,7 +89,7 @@ -   +   @@ -116,17 +116,16 @@ -   +   - +
-
Index: branches/5.2.x/core/admin_templates/config/config_general.tpl =================================================================== diff -u -N -r15471 -r15525 --- branches/5.2.x/core/admin_templates/config/config_general.tpl (.../config_general.tpl) (revision 15471) +++ branches/5.2.x/core/admin_templates/config/config_general.tpl (.../config_general.tpl) (revision 15525) @@ -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: branches/5.2.x/core/admin_templates/config/config_universal.tpl =================================================================== diff -u -N -r15471 -r15525 --- branches/5.2.x/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 15471) +++ branches/5.2.x/core/admin_templates/config/config_universal.tpl (.../config_universal.tpl) (revision 15525) @@ -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: branches/5.2.x/core/units/configuration/configuration_event_handler.php =================================================================== diff -u -N -r15471 -r15525 --- branches/5.2.x/core/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 15471) +++ branches/5.2.x/core/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 15525) @@ -1,6 +1,6 @@ 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