-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #10738 - Added javascript to focus on alert in puppetclasses tab #2445
Conversation
@@ -0,0 +1,6 @@ | |||
$(document).on('ContentLoad', function(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New JS files also need to be listed in config/environments/production.rb for precompilation unless only required by another.
@domcleal, Added the file to the config, and to the hostgroups form. |
Sorry, just looked again and we already have Or perhaps it can be part of the errorFields code in onContentLoad() in the main application.js, in case it finds a use elsewhere? |
@domcleal Thanks for pointing me to the About moving it to |
Probably because it's also used in config_groups, it's a bit more generic than just host (or host + hostgroup) editing.
Okay, sounds good. I hadn't checked how common that style of error reporting was. |
In this case, there is justification for separation, I can't assume that both host and config_groups will use tabbed layout to show puppet classes.
Basically every tab needs to report that it has validation errors. Now we handle a bit more specific case of a classic field validation errors. We need to add some kind of support for errors that are not specific to a certain field. |
@@ -1,6 +1,6 @@ | |||
<% if obj.errors[:puppetclasses].any? %> | |||
<%= alert :class => "alert-block alert-danger base in fade", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you add has-error
to the alert class and remove .form-group
from app/assets/javascript/application.js:62, the focus will work using the generic error focus handling.
Thanks @tbrisker, looks more elegant than my suggestion. |
Merged as fa229d3, thanks @ShimShtein. |
- Added an AIX icon using lzaps dummy languages. Used a green similar to teh AIX logo - Renamed Freebsd to the text format which is used by the operating system page
- Added an AIX icon using lzaps dummy languages. Used a green similar to teh AIX logo - Renamed Freebsd to the text format which is used by the operating system page
No description provided.