gluon-web-model: add Warning

This commit is contained in:
Maciej Krüger 2022-05-24 10:31:34 +02:00 committed by Alexander List
parent 6285e3de0c
commit 099febb41f
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<div class="gluon-warning">
<%=self.content%>
</div>

View File

@ -196,6 +196,24 @@ function Template:__init__(template)
self.template = template self.template = template
end end
local Warning = class(Node)
M.Warning = Warning
function Warning:__init__(...)
Node.__init__(self, ...)
self.default = nil
self.size = nil
self.optional = false
self.template = "model/warning"
self.error = false
end
function Warning:setcontent(content)
self.content = content
end
local AbstractValue = class(Node) local AbstractValue = class(Node)
M.AbstractValue = AbstractValue M.AbstractValue = AbstractValue