Add generated code for added page weight
This commit is contained in:
@@ -189,6 +189,12 @@
|
||||
"title": "Description",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "weight",
|
||||
"required": false,
|
||||
"title": "Page tree weight",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "visible",
|
||||
"required": false,
|
||||
|
||||
@@ -335,6 +335,7 @@ func (r PageUpdate) Auditable() map[string]interface{} {
|
||||
out["title"] = r.Title
|
||||
out["handle"] = r.Handle
|
||||
out["description"] = r.Description
|
||||
out["weight"] = r.Weight
|
||||
out["visible"] = r.Visible
|
||||
out["blocks"] = r.Blocks
|
||||
|
||||
@@ -385,6 +386,9 @@ func (r *PageUpdate) Fill(req *http.Request) (err error) {
|
||||
if val, ok := post["description"]; ok {
|
||||
r.Description = val
|
||||
}
|
||||
if val, ok := post["weight"]; ok {
|
||||
r.Weight = parseInt(val)
|
||||
}
|
||||
if val, ok := post["visible"]; ok {
|
||||
r.Visible = parseBool(val)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user