mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #818 from tractorcow/3.0-duplicate-field-description-fix
FIXED: Issue with duplicate help tips appearing on select fields in CMS
This commit is contained in:
commit
95005818c3
@ -6,15 +6,17 @@
|
||||
*/
|
||||
$(".cms form .field .middleColumn > [title]").entwine({
|
||||
onmatch: function() {
|
||||
|
||||
var title = this.prop("title");
|
||||
var field = this.closest(".field");
|
||||
|
||||
if(title && title.length) {
|
||||
if(title && title.length && field.has('.help').length == 0) {
|
||||
var span = $("<span></span>", {
|
||||
"class": "help",
|
||||
"text": title
|
||||
});
|
||||
|
||||
this.closest(".field").append(span);
|
||||
field.append(span);
|
||||
this.removeProp("title");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user