2017-06-19 18:59:02 +00:00
|
|
|
component InputText(id string, value string, label string, placeholder string)
|
2017-10-09 13:47:40 +00:00
|
|
|
.widget-section
|
2017-06-19 18:59:02 +00:00
|
|
|
label(for=id)= label + ":"
|
2017-10-09 13:47:40 +00:00
|
|
|
input.widget-ui-element.action(id=id, data-field=id, type="text", value=value, placeholder=placeholder, title=placeholder, data-action="save", data-trigger="change")
|
2017-06-19 18:59:02 +00:00
|
|
|
|
|
|
|
component InputTextArea(id string, value string, label string, placeholder string)
|
2017-10-09 13:47:40 +00:00
|
|
|
.widget-section
|
2017-06-19 18:59:02 +00:00
|
|
|
label(for=id)= label + ":"
|
2017-10-09 13:47:40 +00:00
|
|
|
textarea.widget-ui-element.action(id=id, data-field=id, placeholder=placeholder, title=placeholder, data-action="save", data-trigger="change")= value
|
2017-06-19 18:59:02 +00:00
|
|
|
|
2017-06-26 09:43:47 +00:00
|
|
|
component InputNumber(id string, value float64, label string, placeholder string, min string, max string, step string)
|
2017-10-09 13:47:40 +00:00
|
|
|
.widget-section
|
2017-06-19 18:59:02 +00:00
|
|
|
label(for=id)= label + ":"
|
2017-10-09 13:47:40 +00:00
|
|
|
input.widget-ui-element.action(id=id, data-field=id, type="number", value=value, min=min, max=max, step=step, placeholder=placeholder, title=placeholder, data-action="save", data-trigger="change")
|
2017-06-24 17:52:10 +00:00
|
|
|
|
2017-11-16 21:37:18 +00:00
|
|
|
component InputNumberWithButtons(id string, value float64, label string, placeholder string, min string, max string, step string)
|
|
|
|
.widget-section
|
|
|
|
label(for=id)= label + ":"
|
|
|
|
.number-input-container
|
|
|
|
input.widget-ui-element.action(id=id, data-field=id, type="number", value=value, min=min, max=max, step=step, placeholder=placeholder, title=placeholder, data-action="save", data-trigger="change")
|
2017-11-16 21:54:42 +00:00
|
|
|
button.action(data-action="addNumber", data-trigger="click", data-id=id, data-add="1")
|
2017-11-16 21:37:18 +00:00
|
|
|
RawIcon("plus")
|
2017-11-16 21:54:42 +00:00
|
|
|
button.action(data-action="addNumber", data-trigger="click", data-id=id, data-add="-1")
|
2017-11-16 21:37:18 +00:00
|
|
|
RawIcon("minus")
|
|
|
|
|
2017-10-21 22:17:35 +00:00
|
|
|
component InputSelection(id string, value string, label string, placeholder string, options []*arn.Option)
|
2017-10-09 13:47:40 +00:00
|
|
|
.widget-section
|
2017-06-24 17:52:10 +00:00
|
|
|
label(for=id)= label + ":"
|
2017-10-09 13:47:40 +00:00
|
|
|
select.widget-ui-element.action(id=id, data-field=id, value=value, title=placeholder, data-action="save", data-trigger="change")
|
2017-10-21 22:17:35 +00:00
|
|
|
each option in options
|
|
|
|
option(value=option.Value)= option.Label
|
2017-10-09 13:47:40 +00:00
|
|
|
|
2018-03-02 16:18:29 +00:00
|
|
|
component InputImage(id string, label string, src string)
|
|
|
|
.widget-section
|
|
|
|
label(for=id)= label + ":"
|
|
|
|
button.action(data-action="selectFile", data-trigger="click", data-preview-image-id=id + "-preview")
|
|
|
|
Icon("upload")
|
|
|
|
span Select file
|
|
|
|
|
2017-10-15 18:19:45 +00:00
|
|
|
component InputTags(id string, value []string, label string, tooltip string)
|
2017-10-09 13:47:40 +00:00
|
|
|
.widget-section
|
|
|
|
label(for=id)= label + ":"
|
|
|
|
.tags(id=id)
|
2017-10-12 10:07:17 +00:00
|
|
|
for index, tag := range value
|
2017-10-15 23:35:28 +00:00
|
|
|
.tag.tag-edit
|
2017-10-12 15:52:46 +00:00
|
|
|
span.tag-title.action(contenteditable="true", data-trigger="focusout", data-action="save", data-field=id + "[" + strconv.Itoa(index) + "]")= tag
|
|
|
|
button.tag-remove.action(data-action="arrayRemove", data-trigger="click", data-field=id, data-index=index)
|
|
|
|
RawIcon("trash")
|
2017-10-09 13:47:40 +00:00
|
|
|
|
2017-10-12 10:07:17 +00:00
|
|
|
button.tag-add.action(data-action="arrayAppend", data-trigger="click", data-field=id)
|
2017-10-09 13:47:40 +00:00
|
|
|
RawIcon("plus")
|
2017-10-15 18:19:45 +00:00
|
|
|
|
|
|
|
p!= tooltip
|
2017-10-09 13:47:40 +00:00
|
|
|
|