Add media button

This commit is contained in:
Eduard Urbach 2017-10-10 12:14:52 +02:00
parent 5c3f3dab1b
commit 46a3715bae

View File

@ -8,6 +8,7 @@ import (
"strings"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/utils"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
@ -88,6 +89,8 @@ func RenderField(b *bytes.Buffer, v *reflect.Value, field reflect.StructField, i
arrayIDPrefix := fmt.Sprintf("%s[%d].", field.Name, sliceIndex)
RenderObject(b, arrayObj, arrayIDPrefix)
}
b.WriteString(`<div class="buttons"><button>` + utils.Icon("plus") + `Add ` + field.Name + `</button></div>`)
default:
panic("No edit form implementation for " + idPrefix + field.Name + " with type " + field.Type.String())
}