* Doxygen groups. Sorted the files into groups. so now we have a nice structure
[citadel.git] / webcit / vcard_edit.c
index 7ff6a76aab17d4d251141aa2002f957032b9aa76..a08306bed841a5c0ed0b6964de1cb76967dad914 100644 (file)
@@ -1,16 +1,22 @@
 /*
  * $Id$
- *
- * Handles on-screen editing of vCard objects.
- *
  */
-
+/**
+ * \defgroup vCardEdit Handles on-screen editing of vCard objects.
+ * \ingroup WebcitDisplayItems
+ */
+/*@{*/
 #include "webcit.h"
 #include "vcard.h"
 
-/* Edit the vCard component of a MIME message.  Supply the message number
+/**
+ * \brief Edit the vCard component of a MIME message.  
+ * Supply the message number
  * and MIME part number to fetch.  Or, specify -1 for the message number
  * to start with a blank card.
+ * \param msgnum number of the item on the citadel server
+ * \param partnum what???
+ * \param return_to where to go back in the browser after edit ????
  */
 void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
        char buf[SIZ];
@@ -38,7 +44,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
        char primary_inetemail[256];
        char other_inetemail[SIZ];
        char extrafields[SIZ];
-       char displayname[256];
+       char fullname[256];
        char title[256];
        char org[256];
 
@@ -116,7 +122,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
                        }
 
                        else if (!strcasecmp(key, "fn")) {
-                               safestrncpy(displayname, value, sizeof displayname);
+                               safestrncpy(fullname, value, sizeof fullname);
                        }
 
                        else if (!strcasecmp(key, "title")) {
@@ -169,7 +175,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
                vcard_free(v);
        }
 
-       /* Display the form */
+       /** Display the form */
        output_headers(1, 1, 2, 0, 0, 0);
        wprintf("<div id=\"banner\">\n"
                "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
@@ -182,7 +188,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
        );
 
        wprintf("<FORM METHOD=\"POST\" action=\"submit_vcard\">\n");
-       wprintf("<div id=\"fix_scrollbar_bug\">"
+       wprintf("<div class=\"fix_scrollbar_bug\">"
                "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
 
        wprintf("<TABLE border=0><TR>"
@@ -214,9 +220,9 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
 
        wprintf(_("Display name:"));
        wprintf("<br>"
-               "<INPUT TYPE=\"text\" NAME=\"displayname\" "
+               "<INPUT TYPE=\"text\" NAME=\"fullname\" "
                "VALUE=\"%s\" MAXLENGTH=\"40\"><br><br>\n",
-               displayname
+               fullname
        );
 
        wprintf(_("Title:"));
@@ -335,7 +341,9 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
 }
 
 
-
+/**
+ * \brief commit the edits to the citadel server
+ */
 void edit_vcard(void) {
        long msgnum;
        char *partnum;
@@ -347,7 +355,9 @@ void edit_vcard(void) {
 
 
 
-
+/**
+ * \brief parse edited vcard from the browser
+ */
 void submit_vcard(void) {
        char buf[SIZ];
        int i;
@@ -375,7 +385,7 @@ void submit_vcard(void) {
                bstr("prefix"),
                bstr("suffix") );
        serv_printf("title:%s", bstr("title") );
-       serv_printf("fn:%s", bstr("displayname") );
+       serv_printf("fn:%s", bstr("fullname") );
        serv_printf("org:%s", bstr("org") );
        serv_printf("adr:%s;%s;%s;%s;%s;%s;%s",
                bstr("pobox"),
@@ -410,3 +420,7 @@ void submit_vcard(void) {
                readloop("readnew");
        }
 }
+
+
+
+/*@}*/