summaryrefslogtreecommitdiff
path: root/system/admin/config/config.go
diff options
context:
space:
mode:
authorSteve <nilslice@gmail.com>2016-12-19 11:19:53 -0800
committerGitHub <noreply@github.com>2016-12-19 11:19:53 -0800
commit3791fadda7b761ffba38c567da29e2e71acd1dfb (patch)
tree79d810f9aafa1868ee0760983937470d0eea3db8 /system/admin/config/config.go
parentb20c5bdee38682edc851e646d815a34689c3c923 (diff)
[addons] Creating foundation for plugin-like system "Addons" (#24)
* adding addons dir and sample addon which enables the use of a new input element in forms for referencing other content. "addons" is a conceptual plugin-like feature, similar to wordpress "plugins" dir, but not as sophisticated
Diffstat (limited to 'system/admin/config/config.go')
-rw-r--r--system/admin/config/config.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/system/admin/config/config.go b/system/admin/config/config.go
index b898b49..ab17425 100644
--- a/system/admin/config/config.go
+++ b/system/admin/config/config.go
@@ -1,24 +1,25 @@
package config
import (
- "github.com/bosssauce/ponzu/content"
"github.com/bosssauce/ponzu/management/editor"
+ "github.com/bosssauce/ponzu/system/item"
)
-//Config represents the confirgurable options of the system
+// Config represents the confirgurable options of the system
type Config struct {
- content.Item
+ item.Item
editor editor.Editor
Name string `json:"name"`
Domain string `json:"domain"`
+ HTTPPort string `json:"http_port"`
AdminEmail string `json:"admin_email"`
ClientSecret string `json:"client_secret"`
Etag string `json:"etag"`
CacheInvalidate []string `json:"cache"`
}
-// String partially implements content.Identifiable and overrides Item's String()
+// String partially implements item.Identifiable and overrides Item's String()
func (c *Config) String() string { return c.Name }
// Editor partially implements editor.Editable
@@ -40,6 +41,11 @@ func (c *Config) MarshalEditor() ([]byte, error) {
}),
},
editor.Field{
+ View: editor.Input("HTTPPort", c, map[string]string{
+ "type": "hidden",
+ }),
+ },
+ editor.Field{
View: editor.Input("AdminEmail", c, map[string]string{
"label": "Adminstrator Email (will be notified of internal system information)",
}),