Mercurial > hg > fapweb
changeset 977:a1da651a2e45
Add compo notes field.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 29 Nov 2014 13:08:17 +0200 |
parents | b0a8cb63334e |
children | 2c435f651a47 |
files | admajax.php admin.js dbdefs.inc.php msite.inc.php |
diffstat | 4 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/admajax.php Sat Nov 29 12:46:41 2014 +0200 +++ b/admajax.php Sat Nov 29 13:08:17 2014 +0200 @@ -154,6 +154,7 @@ " Name: ".stGetFormTextInput(40, SET_LEN_COMPO_NAME, "name", $id, $prefix, $item["name"])."<br />\n". $str1. " ".stGetFormTextArea(8, 60, "description", $id, $prefix, $item["description"])."<br />\n". + " ".stGetFormTextArea(8, 40, "notes", $id, $prefix, $item["notes"])."\n". " ".stGetFormCheckBoxInput("visible", $id, $prefix, $item["visible"], "Visible")."\n". $str2."\n". " ".stGetFormButtonInput("update", $id, $prefix, "Update", "updateCompo(".$id.")")."\n". @@ -1716,8 +1717,8 @@ if ($type == "compo" && stValidateRequestCompoData(FALSE, 0)) { $sql = stPrepareSQL( - "INSERT INTO compos (name,description,visible,voting,show_authors,preview_type) VALUES (%S,%Q,0,0,0,0)", - "name", "description"); + "INSERT INTO compos (name,description,notes,visible,voting,show_authors,preview_type) VALUES (%S,%Q,%Q,0,0,0,0)", + "name", "description", "notes"); stExecSQLCond($sql, "OK, compo added."); } @@ -1840,6 +1841,7 @@ array_merge(array( "name" => "S", "description" => "Q", + "notes" => "Q", "visible" => "B", ), $cdata));
--- a/admin.js Sat Nov 29 12:46:41 2014 +0200 +++ b/admin.js Sat Nov 29 13:08:17 2014 +0200 @@ -361,7 +361,7 @@ // function addCompo() { - var args = jsMakePostArgs({"name":1, "description":1}, "nc", ""); + var args = jsMakePostArgs({"name":1, "description":1, "notes":1}, "nc", ""); var msuccess = function(txt) { @@ -387,7 +387,7 @@ function updateCompo(id) { - var args = jsMakePostArgs({"name":1, "description":1, "visible":3, "voting":3, "show_authors":3, "cpath":1, "preview_type":4}, "co", id, true); + var args = jsMakePostArgs({"name":1, "description":1, "notes":1, "visible":3, "voting":3, "show_authors":3, "cpath":1, "preview_type":4}, "co", id, true); var msuccess = function(txt) {
--- a/dbdefs.inc.php Sat Nov 29 12:46:41 2014 +0200 +++ b/dbdefs.inc.php Sat Nov 29 13:08:17 2014 +0200 @@ -258,6 +258,7 @@ array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), array("name" , "VARCHAR(".SET_LEN_COMPO_NAME.")"), array("description" , "VARCHAR(".SET_LEN_COMPO_DESC.")"), + array("notes" , "VARCHAR(".SET_LEN_COMPO_NOTES.")"), array("visible" , "INT", "DEFAULT 0"), array("voting" , "INT", "DEFAULT 0"),