]> code.citadel.org Git - citadel.git/commitdiff
Added an address book popup to the access controls of rooms.
authorDave West <davew@uncensored.citadel.org>
Sun, 28 Oct 2007 21:31:48 +0000 (21:31 +0000)
committerDave West <davew@uncensored.citadel.org>
Sun, 28 Oct 2007 21:31:48 +0000 (21:31 +0000)
Now you can select a user to invite into the room.
This needs further attention since in this case we should only allow
selecting from actual users and prevent the option of selecting from
other address book rooms.
Unfortunately that is beyond me, I can not for the life of me see how
this Ajax stuff works.

webcit/roomops.c

index 0b54167500e850dc9972fa240be56b91762594ab..ae8490bdf81db5c37dfb2a6b8f534eafad9acb9b 100644 (file)
@@ -2143,12 +2143,23 @@ void display_whok(void)
        wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
         wprintf(_("Invite:"));
        wprintf(" ");
-        wprintf("<input type=\"text\" name=\"username\" style=\"width:100%%\"><br />\n"
+        wprintf("<input type=\"text\" name=\"username\" id=\"username_id\" style=\"width:100%%\"><br />\n"
                "<input type=\"hidden\" name=\"invite_button\" value=\"Invite\">"
                "<input type=\"submit\" value=\"%s\">"
                "</form></CENTER>\n", _("Invite"));
+               /** Pop open an address book -- begin **/
+               wprintf(
+                       "<a href=\"javascript:PopOpenAddressBook('username_id|%s');\" "
+                       "title=\"%s\">"
+                       "<img align=middle border=0 width=24 height=24 src=\"static/viewcontacts_24x.gif\">"
+                       "&nbsp;%s</a>",
+                       _("User"), 
+                       _("Users"), _("Users")
+               );
+               /** Pop open an address book -- end **/
 
        wprintf("</td></tr></table>\n");
+       address_book_popup();
         wDumpContent(1);
 }