diff --git a/docs/en_US/images/preferences_sql_results_grid.png b/docs/en_US/images/preferences_sql_results_grid.png index 84e0bca71..15eaf9cdc 100644 Binary files a/docs/en_US/images/preferences_sql_results_grid.png and b/docs/en_US/images/preferences_sql_results_grid.png differ diff --git a/docs/en_US/preferences.rst b/docs/en_US/preferences.rst index c1c5a9227..d1e23e563 100644 --- a/docs/en_US/preferences.rst +++ b/docs/en_US/preferences.rst @@ -381,7 +381,7 @@ preferences for copied data. auto-size to the maximum width of the data in the column as loaded in the first batch. If set to *Column name*, the column will be sized to the widest of the data type or column name. -* Specify the maximum width of the column in pixel when 'Columns sized by' is +* Specify the maximum width of the column in pixels when 'Columns sized by' is set to *Column data*. If 'Columns sized by' is set to *Column name* then this setting won't have any effect. * Use the *Result copy field separator* drop-down listbox to select the field diff --git a/web/pgadmin/authenticate/__init__.py b/web/pgadmin/authenticate/__init__.py index 1228f1cee..66231ac56 100644 --- a/web/pgadmin/authenticate/__init__.py +++ b/web/pgadmin/authenticate/__init__.py @@ -72,12 +72,22 @@ def login(): # Validate the user if not auth_obj.validate(): for field in form.errors: + flash_login_attempt_error = None if user: if config.MAX_LOGIN_ATTEMPTS > 0: user.login_attempts += 1 + left_attempts = \ + config.MAX_LOGIN_ATTEMPTS - user.login_attempts + flash_login_attempt_error = \ + gettext('You are left with {0} more attempts.'. + format(left_attempts)) db.session.commit() for error in form.errors[field]: flash(error, 'warning') + + if flash_login_attempt_error: + flash(flash_login_attempt_error, 'warning') + return redirect(get_post_logout_redirect()) # Authenticate the user diff --git a/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py b/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py index 5d7aa404d..d5dac4bf1 100644 --- a/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py +++ b/web/pgadmin/tools/sqleditor/utils/query_tool_preferences.py @@ -285,10 +285,10 @@ def register_query_tool_preferences(self): self.column_data_max_width = self.preference.register( 'Results_grid', 'column_data_max_width', - gettext("Maximum column width (in Pixel)"), 'integer', 0, + gettext("Maximum column width"), 'integer', 0, category_label=PREF_LABEL_RESULTS_GRID, help_str=gettext( - 'Specify the maximum width of the column when ' + 'Specify the maximum width of the column in pixels when ' '\'Columns sized by \' is set to \'Column data\'.' ), )