From e82ae68634df85b06ff816525aa64a72ac9d8771 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 17 Oct 2016 15:04:29 -0700 Subject: adding partial time helper and hard coding date & time inputs --- management/editor/editor.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'management/editor') diff --git a/management/editor/editor.go b/management/editor/editor.go index 486c22f..c7500b6 100644 --- a/management/editor/editor.go +++ b/management/editor/editor.go @@ -43,6 +43,20 @@ func Form(post Editable, fields ...Field) ([]byte, error) { // content items with Item embedded have some default fields we need to render editor.ViewBuf.Write([]byte(``)) + + publishTime := ` +
+ + +
+
+ + +
+ ` + + editor.ViewBuf.Write([]byte(publishTime)) + addPostDefaultFieldsToEditorView(post, editor) submit := ` @@ -86,20 +100,6 @@ func addFieldToEditorView(e *Editor, f Field) { func addPostDefaultFieldsToEditorView(p Editable, e *Editor) { defaults := []Field{ - Field{ - View: Input("Date", p, map[string]string{ - "label": "Publish Date", - "type": "date", - "class": "date __ponzu", - }), - }, - Field{ - View: Input("Time", p, map[string]string{ - "label": "Publish Time", - "type": "time", - "class": "time __ponzu", - }), - }, Field{ View: Input("Slug", p, map[string]string{ "label": "URL Slug", -- cgit v1.2.3