Types

/views/components/edit/Option.html (538 B)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{% import (
"{{{ .Package }}}/app/lib/types"
) %}

{% func Option(key string, id string, x any, t *types.Option) %}{% stripspace %}
{% switch t.V.Key() %}
{% case types.KeyBool %}
{%= Bool(key, id, x.(bool), true) %}
{% default %}
<div class="two-pane">
<div class="l">{%= AnyByType(key, id, x, t.V) %}</div>
<div class="r"><button title="click to set field to null" type="button" onclick="{{{ .Exec }}}.setSiblingToNull(this);"></button></div>
</div>
{% endswitch %}
{% endstripspace %}{% endfunc %}