Merge "Fix inconsistent inline help text in forms"
This commit is contained in:
commit
58f187f843
horizon
openstack_dashboard/static/dashboard/less
@ -211,13 +211,12 @@ horizon.addInitFunction(function () {
|
||||
|
||||
// Apply standard handler for everything but checkboxes.
|
||||
$(document).tooltip({
|
||||
selector: "div.form-field :input:not(:checkbox)",
|
||||
selector: "div.form-field .help-icon",
|
||||
placement: function (tip, input) {
|
||||
// Position to the right unless this is a "split" for in which case put
|
||||
// the tooltip below so it doesn't block the next field.
|
||||
return $(input).closest("form[class*='split']").length ? "bottom" : 'right';
|
||||
},
|
||||
trigger: 'focus',
|
||||
title: function () {
|
||||
return $(this).closest('div.form-field').children('.help-block').text();
|
||||
}
|
||||
|
@ -14,6 +14,9 @@
|
||||
{% for field in form.visible_fields %}
|
||||
<div class="control-group form-field clearfix{% if field.errors %} error{% endif %} {{ field.css_classes }}">
|
||||
{{ field.label_tag }}
|
||||
{% if field.help_text %}
|
||||
<span class="help-icon"><i class="icon-question-sign"></i></span>
|
||||
{% endif %}
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<span class="help-inline">{{ error }}</span>
|
||||
|
@ -968,6 +968,7 @@ form label {
|
||||
text-align: left;
|
||||
color: @gray;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.modal {
|
||||
|
Loading…
x
Reference in New Issue
Block a user