version 0.3.24
[fms.git] / src / http / pages / announceidentitypage.cpp
index 2fbe97c..bf95295 100644 (file)
@@ -26,7 +26,7 @@ const std::string AnnounceIdentityPage::CreateLocalIdentityDropDown(const std::s
                st.ResultText(1,name);\r
                st.ResultText(2,pubkey);\r
 \r
-               rval+="<option value=\""+id+"\" title=\""+pubkey+"\">"+SanitizeOutput(CreateShortIdentityName(name,pubkey))+"</option>";\r
+               rval+="<option value=\""+id+"\" title=\""+pubkey+"\""+(selected==id?" selected":"")+">"+SanitizeOutput(CreateShortIdentityName(name,pubkey))+"</option>";\r
                st.Step();\r
        }\r
        rval+="</select>";\r
@@ -47,11 +47,11 @@ const std::string AnnounceIdentityPage::GeneratePage(const std::string &method,
        std::string pubkey="";\r
        int requestindex=0;\r
        bool willshow=false;\r
+       std::string localidentityidstr="";\r
 \r
        if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="announce" && ValidateFormPassword(queryvars))\r
        {\r
                SQLite3DB::Statement insert=m_db->Prepare("INSERT INTO tblIdentityIntroductionInserts(LocalIdentityID,Day,UUID,Solution) VALUES(?,?,?,?);");\r
-               std::string localidentityidstr="";\r
                int localidentityid=0;\r
                std::vector<std::string> uuids;\r
                std::vector<std::string> days;\r
@@ -87,9 +87,9 @@ const std::string AnnounceIdentityPage::GeneratePage(const std::string &method,
        content+="<input type=\"hidden\" name=\"formaction\" value=\"announce\">";\r
        content+="<table>";\r
        content+="<tr><td colspan=\"4\"><center>Select Identity : ";\r
-       content+=CreateLocalIdentityDropDown("localidentityid","");\r
+       content+=CreateLocalIdentityDropDown("localidentityid",localidentityidstr);\r
        content+="</td></tr>";\r
-       content+="<tr><td colspan=\"4\"><center>Type the answers of a few of the following puzzles.  You don't need to get them all correct, but remember that they are case sensitive.  Getting announced will take some time.  DO NOT continuously solve captchas.  Solve 30 at most, wait a day, and if your identity has not been announced, repeat until it is.</td></tr>";\r
+       content+="<tr><td colspan=\"4\"><center>Type the answers of a few of the following puzzles.  You don't need to get them all correct, but remember that they are case sensitive.  Getting announced will take some time and you must assign trust to other identities to see yourself announced.  DO NOT continuously solve captchas.  Solve 30 at most, wait a day, and if your identity has not been announced, repeat until it is.</td></tr>";\r
        content+="<tr>";\r
 \r
        date-=Poco::Timespan(1,0,0,0,0);\r
@@ -98,7 +98,7 @@ const std::string AnnounceIdentityPage::GeneratePage(const std::string &method,
 \r
        if(st.RowReturned()==false)\r
        {\r
-               content+="<td colspan=\"4\"><center>You must wait for some puzzles to be downloaded.  Check back later.</td>";\r
+               content+="<td colspan=\"4\"><center>You must wait for some puzzles to be downloaded.  Make sure you have assigned trust to some other identities' trust lists and check back later.</td>";\r
        }\r
        \r
        while(st.RowReturned() && shown<20)\r