version 0.2.5
[fms.git] / src / http / pages / localidentitiespage.cpp
index 8b6afcb..f84362e 100644 (file)
@@ -203,9 +203,9 @@ const std::string LocalIdentitiesPage::GeneratePage(const std::string &method, c
 \r
        content+="<hr>";\r
 \r
-       content+="<form name=\"frmlocalidentity\" method=\"POST\">";\r
-       content+="<input type=\"hidden\" name=\"formaction\" value=\"update\">";\r
-       content+="<table><tr><td></td><th>Name</th><th>Single Use</th><th>Publish Trust List</th><th>Publish Board List</th><th>Publish Freesite</th><th>Announced? *</th></tr>";\r
+//     content+="<form name=\"frmlocalidentity\" method=\"POST\">";\r
+//     content+="<input type=\"hidden\" name=\"formaction\" value=\"update\">";\r
+       content+="<table><tr><th>Name</th><th>Single Use</th><th>Publish Trust List</th><th>Publish Board List</th><th>Publish Freesite</th><th>Announced? *</th></tr>";\r
 \r
        SQLite3DB::Statement st=m_db->Prepare("SELECT LocalIdentityID,tblLocalIdentity.Name,tblLocalIdentity.PublicKey,tbLLocalIdentity.PublishTrustList,tblLocalIdentity.SingleUse,tblLocalIdentity.PublishBoardList,tblIdentity.IdentityID,tblLocalIdentity.PublishFreesite FROM tblLocalIdentity LEFT JOIN tblIdentity ON tblLocalIdentity.PublicKey=tblIdentity.PublicKey ORDER BY tblLocalIdentity.Name;");\r
        st.Step();\r
@@ -237,8 +237,8 @@ const std::string LocalIdentitiesPage::GeneratePage(const std::string &method, c
                }\r
 \r
                content+="<tr>";\r
-               content+="<td><input type=\"checkbox\" name=\"chkidentityid["+countstr+"]\" value=\""+id+"\"></td>";\r
-               content+="<td title=\""+publickey+"\">"+SanitizeOutput(name+keypart)+"...</td>";\r
+//             content+="<td><input type=\"checkbox\" name=\"chkidentityid["+countstr+"]\" value=\""+id+"\"></td>";\r
+               content+="<td title=\""+publickey+"\"><form name=\"frmupdate\""+countstr+"\" method=\"POST\"><input type=\"hidden\" name=\"formaction\" value=\"update\"><input type=\"hidden\" name=\"chkidentityid["+countstr+"]\" value=\""+id+"\">"+SanitizeOutput(name+keypart)+"...</td>";\r
                content+="<td>"+CreateTrueFalseDropDown("singleuse["+countstr+"]",singleuse)+"</td>";\r
                content+="<td>"+CreateTrueFalseDropDown("publishtrustlist["+countstr+"]",publishtrustlist)+"</td>";\r
                content+="<td>"+CreateTrueFalseDropDown("publishboardlist["+countstr+"]",publishboardlist)+"</td>";\r
@@ -251,12 +251,14 @@ const std::string LocalIdentitiesPage::GeneratePage(const std::string &method, c
                {\r
                        content+="<td>Yes</td>";\r
                }\r
+               content+="<td><input type=\"submit\" value=\"Update\"></form></td>";\r
+               content+="<td><form name=\"frmdel\""+countstr+"\" method=\"POST\"><input type=\"hidden\" name=\"formaction\" value=\"delete\"><input type=\"hidden\" name=\"chkidentityid["+countstr+"]\" value=\""+id+"\"><input type=\"submit\" value=\"Delete\"></form></td>";\r
                content+="</tr>";\r
                st.Step();\r
                count++;\r
        }\r
 \r
-       content+="<tr><td colspan=\"5\"><center><input type=\"submit\" value=\"Update Selected\"> <input type=\"submit\" value=\"Delete Selected\"></td></tr>";\r
+//     content+="<tr><td colspan=\"5\"><center><input type=\"submit\" value=\"Update Selected\"> <input type=\"submit\" value=\"Delete Selected\" onClick=\"if(confirm('Delete Selected Identities?')){frmlocalidentity.formaction.value='delete';}else{return false;}\"></td></tr>";\r
        content+="</table>";\r
        content+="<p class=\"paragraph\">* An identity is considered successfully announced when you have downloaded a trust list from someone that contains the identity.</p>";\r
        content+="<p class=\"paragraph\">Single Use Identities will automatically be deleted 7 days after creation.</p>";\r