Search in sources :

Example 11 with Tag

use of org.structr.api.util.html.Tag in project structr by structr.

the class IntegerSetting method render.

@Override
public void render(final Tag parent) {
    final Tag group = parent.block("div").css("form-group");
    group.block("label").text(getKey());
    final Tag input = group.empty("input").attr(new Attr("type", "text"), new Attr("name", getKey()));
    final Integer value = getValue();
    // display value if non-empty
    if (value != null) {
        input.attr(new Attr("value", value));
    }
    renderResetButton(group);
}
Also used : Tag(org.structr.api.util.html.Tag) Attr(org.structr.api.util.html.Attr)

Example 12 with Tag

use of org.structr.api.util.html.Tag in project structr by structr.

the class PasswordSetting method render.

@Override
public void render(final Tag parent) {
    final Tag group = parent.block("div").css("form-group");
    group.block("label").text(getKey());
    final Tag input = group.empty("input").attr(new Attr("type", "text"), new Attr("name", getKey()));
    final String value = getValue();
    // display value if non-empty
    if (value != null) {
        input.attr(new Attr("value", value));
    }
}
Also used : Tag(org.structr.api.util.html.Tag) Attr(org.structr.api.util.html.Attr)

Aggregations

Tag (org.structr.api.util.html.Tag)12 Attr (org.structr.api.util.html.Attr)11 Href (org.structr.api.util.html.attr.Href)3 Document (org.structr.api.util.html.Document)2 Css (org.structr.api.util.html.attr.Css)2 If (org.structr.api.util.html.attr.If)2 Onload (org.structr.api.util.html.attr.Onload)2 Type (org.structr.api.util.html.attr.Type)2 App (org.structr.core.app.App)2 StructrApp (org.structr.core.app.StructrApp)2 SchemaNode (org.structr.core.entity.SchemaNode)2 Tx (org.structr.core.graph.Tx)2 LinkedHashMap (java.util.LinkedHashMap)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 SettingsGroup (org.structr.api.config.SettingsGroup)1 Service (org.structr.api.service.Service)1 Rel (org.structr.api.util.html.attr.Rel)1 Services (org.structr.core.Services)1