Loading data/authdb.js +9 −0 Changes for data/authdb.js: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -8,3 +8,12 @@ selectElement.addEventListener("change", (event) => { window.location.replace(url); }); function moveElement(srcclass, destid){ const src= document.getElementById(srcclass).childNodes; for(const srcnode of src){ if(srcnode.selected == true){ document.getElementById(destid).appendChild(srcnode); src.removeChild(srcnode); } } } data/index.html +1 −0 Changes for data/index.html: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ <html lang="en"> <head> <link rel="stylesheet" href="/style.css"> <script type="text/javascript" src="authdb.js"></script> </head> <body> <div id="header"> Loading data/style.css +33 −0 Changes for data/style.css: 33 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ body { display: table; min-width:700px; min-height:100vh; width:100%; } #navbar { Loading Loading @@ -91,6 +92,38 @@ a.button { text-decoration: none; } #notingroup{ height:30vh; min-width: 20vw; width:100%; text-align: center; } #ingroup{ height:30vh; min-width: 20vw; width:100%; text-align: center; } ul.selectionlist { background: #ffffff;; color: buttontext; border: 1px outset buttonborder; text-decoration: none; padding: 0 2em; height:100%; width:100%; } .switchgpogroup{ text-align:center; } .gpoform{ width:100%; } .usertoolbar li{ list-style:none; display:inline-block; Loading src/admin.cpp +27 −8 Changes for src/admin.cpp: 27 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -1529,17 +1529,36 @@ namespace authdb { uuid_unparse(gpid,cgpid); form << "<form method=\"post\" enctype=\"multipart/form-data\">" << "<table>" form << "<table>" << "<form method=\"post\" enctype=\"multipart/form-data\">" << "<tr><td><label for=\"gpoid\">Policy ID:</label></td>" << "<td><input type=\"text\" name=\"gpoid\" value=\"" << cgpid << "\"></td></tr>" << "<td></td><td><input type=\"text\" name=\"gpoid\" value=\"" << cgpid << "\" class=\"gpoform\" ></td></tr>" << "<tr><td><label for=\"gponame\">Policy Name:</label></td>" << "<td><input type=\"text\" name=\"gponame\"></td></tr>" << "<td></td><td><input type=\"text\" name=\"gponame\" class=\"gpoform\" ></td></tr>" << "<tr><td><label for=\"gpodesc\">Policy Description:</label></td>" << "<td><input type=\"text\" name=\"gpodesc\"></td></tr>" << "<tr><td></td><td><input type=\"submit\" value=\"Save\"></td></tr>" << "</table>" << "</form"; << "<td></td><td><input type=\"text\" name=\"gpodesc\" class=\"gpoform\" ></td></tr>" <<"<tr><td><select id=\"notingroup\" class=\"selectionlist\" multiple>"; size_t urd=sizeof(AuthHeader),uend=backend->end(); while(urd<uend){ AuthData::Record cur; backend->setPos(urd); backend->read((unsigned char*)&cur,sizeof(AuthData::Record)); urd=backend->getPos()+cur.datasize; if(cur.type == GroupData && strcmp(cur.fieldname,"groupname")==0){ cur.data = new char[cur.datasize]; backend->read((unsigned char*)cur.data,cur.datasize); form <<"<option>" << cur.data << "</option>"; delete[] cur.data; } } form <<"</select></td><td class=\"switchgpogroup\"><p><a class=\"button\" onclick=\"moveElement('notingroup','ingroup')\">→</a>" << "</p><p><a class=\"button\" onclick=\"moveElement('ingroup','notingroup')\" >←</a></p></td>" <<"<td><select id=\"ingroup\" class=\"selectionlist\" multiple>"; form <<"</select></td></tr>" << "<tr><td></td><td></td><td><input type=\"submit\" value=\"Save\"></td></tr>" << "</form>" << "</table>"; libhtmlpp::HtmlElement root=_IndexElement; libhtmlpp::HtmlElement *content=root.getElementbyID("content"); Loading Loading
data/authdb.js +9 −0 Changes for data/authdb.js: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -8,3 +8,12 @@ selectElement.addEventListener("change", (event) => { window.location.replace(url); }); function moveElement(srcclass, destid){ const src= document.getElementById(srcclass).childNodes; for(const srcnode of src){ if(srcnode.selected == true){ document.getElementById(destid).appendChild(srcnode); src.removeChild(srcnode); } } }
data/index.html +1 −0 Changes for data/index.html: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ <html lang="en"> <head> <link rel="stylesheet" href="/style.css"> <script type="text/javascript" src="authdb.js"></script> </head> <body> <div id="header"> Loading
data/style.css +33 −0 Changes for data/style.css: 33 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ body { display: table; min-width:700px; min-height:100vh; width:100%; } #navbar { Loading Loading @@ -91,6 +92,38 @@ a.button { text-decoration: none; } #notingroup{ height:30vh; min-width: 20vw; width:100%; text-align: center; } #ingroup{ height:30vh; min-width: 20vw; width:100%; text-align: center; } ul.selectionlist { background: #ffffff;; color: buttontext; border: 1px outset buttonborder; text-decoration: none; padding: 0 2em; height:100%; width:100%; } .switchgpogroup{ text-align:center; } .gpoform{ width:100%; } .usertoolbar li{ list-style:none; display:inline-block; Loading
src/admin.cpp +27 −8 Changes for src/admin.cpp: 27 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -1529,17 +1529,36 @@ namespace authdb { uuid_unparse(gpid,cgpid); form << "<form method=\"post\" enctype=\"multipart/form-data\">" << "<table>" form << "<table>" << "<form method=\"post\" enctype=\"multipart/form-data\">" << "<tr><td><label for=\"gpoid\">Policy ID:</label></td>" << "<td><input type=\"text\" name=\"gpoid\" value=\"" << cgpid << "\"></td></tr>" << "<td></td><td><input type=\"text\" name=\"gpoid\" value=\"" << cgpid << "\" class=\"gpoform\" ></td></tr>" << "<tr><td><label for=\"gponame\">Policy Name:</label></td>" << "<td><input type=\"text\" name=\"gponame\"></td></tr>" << "<td></td><td><input type=\"text\" name=\"gponame\" class=\"gpoform\" ></td></tr>" << "<tr><td><label for=\"gpodesc\">Policy Description:</label></td>" << "<td><input type=\"text\" name=\"gpodesc\"></td></tr>" << "<tr><td></td><td><input type=\"submit\" value=\"Save\"></td></tr>" << "</table>" << "</form"; << "<td></td><td><input type=\"text\" name=\"gpodesc\" class=\"gpoform\" ></td></tr>" <<"<tr><td><select id=\"notingroup\" class=\"selectionlist\" multiple>"; size_t urd=sizeof(AuthHeader),uend=backend->end(); while(urd<uend){ AuthData::Record cur; backend->setPos(urd); backend->read((unsigned char*)&cur,sizeof(AuthData::Record)); urd=backend->getPos()+cur.datasize; if(cur.type == GroupData && strcmp(cur.fieldname,"groupname")==0){ cur.data = new char[cur.datasize]; backend->read((unsigned char*)cur.data,cur.datasize); form <<"<option>" << cur.data << "</option>"; delete[] cur.data; } } form <<"</select></td><td class=\"switchgpogroup\"><p><a class=\"button\" onclick=\"moveElement('notingroup','ingroup')\">→</a>" << "</p><p><a class=\"button\" onclick=\"moveElement('ingroup','notingroup')\" >←</a></p></td>" <<"<td><select id=\"ingroup\" class=\"selectionlist\" multiple>"; form <<"</select></td></tr>" << "<tr><td></td><td></td><td><input type=\"submit\" value=\"Save\"></td></tr>" << "</form>" << "</table>"; libhtmlpp::HtmlElement root=_IndexElement; libhtmlpp::HtmlElement *content=root.getElementbyID("content"); Loading