forked from MapComplete/MapComplete
Refactoring: remove AsMarkdown() from the old BaseUIElement
This commit is contained in:
parent
54265ba0c6
commit
fb48c57e42
5 changed files with 2 additions and 49 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import BaseUIElement from "../BaseUIElement"
|
||||
import { Translation } from "../i18n/Translation"
|
||||
import Translations from "../i18n/Translations"
|
||||
|
||||
|
|
@ -32,7 +31,7 @@ export abstract class Validator {
|
|||
|
||||
constructor(
|
||||
name: string,
|
||||
explanation: string | BaseUIElement,
|
||||
explanation: string,
|
||||
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search",
|
||||
textArea?: false | boolean
|
||||
) {
|
||||
|
|
@ -45,11 +44,7 @@ export abstract class Validator {
|
|||
if (this.name.endsWith("textfielddef")) {
|
||||
this.name = this.name.substring(0, this.name.length - "TextFieldDef".length)
|
||||
}
|
||||
if (typeof explanation === "string") {
|
||||
this.explanation = explanation
|
||||
} else {
|
||||
this.explanation = explanation.AsMarkdown()
|
||||
}
|
||||
this.explanation = explanation
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue