Skip to content

Fix incorrect language replacement in label text (ex. FileField)#9

Open
crazyzubr wants to merge 1 commit intojacobsvante:masterfrom
crazyzubr:master
Open

Fix incorrect language replacement in label text (ex. FileField)#9
crazyzubr wants to merge 1 commit intojacobsvante:masterfrom
crazyzubr:master

Conversation

@crazyzubr
Copy link

Wrong line in old code:

field_label.html(field_label.html().replace(/\ \[.+\]/, ''));

But field_label - is a jquery collection and field_label.html() - is HTML in first element on jquery collection. As a result, all label elements are replaced with the text in the first element. Because a container can contain more than one label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant