update
This commit is contained in:
@@ -28,30 +28,22 @@
|
||||
{{ template "fielset" $value }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<template id="arrayItem">
|
||||
|
||||
</template>
|
||||
|
||||
<template id="objectItem">
|
||||
|
||||
</template>
|
||||
{{ end }}
|
||||
|
||||
{{ define "value" }}
|
||||
{{ if eq .HTMLType "textarea" }}
|
||||
<textarea class="scroll" name="{{ .Name }}:{{ .Type }}" id="{{.Name }}" data-parent-type="{{ .Parent.Type }}">{{ .Content.Other }}</textarea>
|
||||
<textarea class="scroll" name="{{ .Name }}" id="{{.Name }}" data-parent-type="{{ .Parent.Type }}">{{ .Content.Other }}</textarea>
|
||||
{{ else if eq .HTMLType "datetime" }}
|
||||
<input name="{{ .Name }}:{{ .Type }}" id="{{ .Name }}" value="{{ .Content.Other.Format "2006-01-02T15:04" }}" type="datetime-local" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
<input name="{{ .Name }}" id="{{ .Name }}" value="{{ .Content.Other.Format "2006-01-02T15:04" }}" type="datetime-local" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
{{ else }}
|
||||
<input name="{{ .Name }}:{{ .Type }}" id="{{ .Name }}" value="{{ .Content.Other }}" type="{{ .HTMLType }}" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
<input name="{{ .Name }}" id="{{ .Name }}" value="{{ .Content.Other }}" type="{{ .HTMLType }}" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "fielset" }}
|
||||
<fieldset id="{{ .Name }}" data-type="{{ .Type }}">
|
||||
<h3>{{ SplitCapitalize .Title }}</h3>
|
||||
{{ if not (eq .Title "") }}<h3>{{ SplitCapitalize .Title }}</h3>{{ end }}
|
||||
<div class="action add">
|
||||
<i class="material-icons">add</i>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user