mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:43:16 +08:00
FIX: label helpers on sign up form are not hidden (#8603)
This commit fe9293b8b5
created a regression.
The problem is that dom changed a little bit.
Before it was
```
<tr class="instructions create-account-email">
<td></td>
<div id="account-email-validation" class="tip bad ember-view"></div>
<td><label>Never shown to the public.</label></td>
</tr>
```
And after we got
```
<tr class="instructions create-account-email">
<td></td>
<div id="account-email-validation" class="tip bad ember-view"> </div>
<td><label>Never shown to the public.</label></td>
</tr>
```
That small space may look like not important change.
However, now helpers are hitting that CSS rule:
```
.login-form {
.tip {
&:not(:empty) + td {
display: none;
}
}
```
To fix it, we should render template only if there is a reason - like it was before
```
if (reason) {
buffer.push(iconHTML(this.good ? "check" : "times") + " " + reason);
}
```
* FIX: remove rerenderTriggers
This commit is contained in:
parent
9fe11d0fc3
commit
b47b1d8af8
|
@ -4,7 +4,6 @@ import { iconHTML } from "discourse-common/lib/icon-library";
|
|||
|
||||
export default Component.extend({
|
||||
classNameBindings: [":tip", "good", "bad"],
|
||||
rerenderTriggers: ["validation"],
|
||||
tipIcon: null,
|
||||
tipReason: null,
|
||||
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
{{#if tipReason}}
|
||||
{{tipIcon}} {{tipReason}}
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user