diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-17 20:59:03 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-17 20:59:03 -0700 |
commit | 5bd9f33df927c55448f08f2cc847c1b0432993f5 (patch) | |
tree | 09c5803e50d2ea7a54d7934fe0756c7b32392b78 | |
parent | cc61653bc4cc23e29817a035514adf428607ea84 (diff) |
renaming Time input element to Timestamp to be more specific, also fixing default inputs to reflect new element
-rw-r--r-- | management/editor/editor.go | 4 | ||||
-rw-r--r-- | management/editor/elements.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/management/editor/editor.go b/management/editor/editor.go index 2c51d5d..dc6f181 100644 --- a/management/editor/editor.go +++ b/management/editor/editor.go @@ -147,13 +147,13 @@ func addPostDefaultFieldsToEditorView(p Editable, e *Editor) { }), }, Field{ - View: Input("Timestamp", p, map[string]string{ + View: Timestamp("Timestamp", p, map[string]string{ "type": "hidden", "class": "timestamp __ponzu", }), }, Field{ - View: Input("Updated", p, map[string]string{ + View: Timestamp("Updated", p, map[string]string{ "type": "hidden", "class": "updated __ponzu", }), diff --git a/management/editor/elements.go b/management/editor/elements.go index b06049d..dd04070 100644 --- a/management/editor/elements.go +++ b/management/editor/elements.go @@ -37,11 +37,11 @@ func Textarea(fieldName string, p interface{}, attrs map[string]string) []byte { return domElement(e) } -// Time returns the []byte of an <input> HTML element with a label. +// Timestamp returns the []byte of an <input> HTML element with a label. // IMPORTANT: // The `fieldName` argument will cause a panic if it is not exactly the string // form of the struct field that this editor input is representing -func Time(fieldName string, p interface{}, attrs map[string]string) []byte { +func Timestamp(fieldName string, p interface{}, attrs map[string]string) []byte { var data string val := valueFromStructField(fieldName, p) if val.Int() == 0 { |