github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/components/edit/Option.html (about) 1 <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 2 {% import ( 3 "github.com/kyleu/dbaudit/app/lib/types" 4 ) %} 5 6 {% func Option(key string, id string, x any, t *types.Option) %}{% stripspace %} 7 {% switch t.V.Key() %} 8 {% case types.KeyBool %} 9 {%= Bool(key, id, x.(bool), true) %} 10 {% default %} 11 <div class="two-pane"> 12 <div class="l">{%= Any(key, id, x, t.V) %}</div> 13 <div class="r"><button title="click to set field to null" type="button" onclick="dbaudit.setSiblingToNull(this);">∅</button></div> 14 </div> 15 {% endswitch %} 16 {% endstripspace %}{% endfunc %}