FIX: update tag description field placeholder (#24644)
Improvements after https://github.com/discourse/discourse/pull/24561 1. Make placeholder more descriptive 2. Respect new line breaks in description
This commit is contained in:
parent
56795f5c07
commit
d9ac0c33ff
|
@ -13,7 +13,7 @@
|
|||
|
||||
<Textarea
|
||||
id="edit-description"
|
||||
@value={{readonly this.tagInfo.description}}
|
||||
@value={{readonly this.tagInfo.descriptionWithNewLines}}
|
||||
placeholder={{i18n "tagging.description"}}
|
||||
maxlength={{1000}}
|
||||
{{on
|
||||
|
|
|
@ -80,6 +80,10 @@ export default Component.extend({
|
|||
@action
|
||||
edit(event) {
|
||||
event?.preventDefault();
|
||||
this.tagInfo.set(
|
||||
"descriptionWithNewLines",
|
||||
this.tagInfo.description?.replaceAll("<br>", "\n")
|
||||
);
|
||||
this.setProperties({
|
||||
editing: true,
|
||||
newTagName: this.tag.id,
|
||||
|
@ -127,6 +131,7 @@ export default Component.extend({
|
|||
@action
|
||||
finishedEditing() {
|
||||
const oldTagName = this.tag.id;
|
||||
this.newTagDescription = this.newTagDescription.replaceAll("\n", "<br>");
|
||||
this.tag
|
||||
.update({ id: this.newTagName, description: this.newTagDescription })
|
||||
.then((result) => {
|
||||
|
|
|
@ -4308,7 +4308,7 @@ en:
|
|||
one: "Its synonym will also be deleted."
|
||||
other: "Its %{count} synonyms will also be deleted."
|
||||
edit_tag: "Edit tag name and description"
|
||||
description: "Description"
|
||||
description: "Description (max 1000 characters)"
|
||||
sort_by: "Sort by:"
|
||||
sort_by_count: "count"
|
||||
sort_by_name: "name"
|
||||
|
|
Loading…
Reference in New Issue