/*
* $Id$
- *
- * Handles on-screen editing of vCard objects.
- *
*/
-
+/**
+ * \defgroup vCardEdit Handles on-screen editing of vCard objects.
+ * \ingroup WebFrontend
+ */
+/*@{*/
#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];
char primary_inetemail[256];
char other_inetemail[SIZ];
char extrafields[SIZ];
- char displayname[256];
+ char fullname[256];
char title[256];
char org[256];
}
else if (!strcasecmp(key, "fn")) {
- safestrncpy(displayname, value, sizeof displayname);
+ safestrncpy(fullname, value, sizeof fullname);
}
else if (!strcasecmp(key, "title")) {
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>"
"<SPAN CLASS=\"titlebar\">"
- "<img src=\"/static/savecontact_48x.gif\">");
+ "<img src=\"static/savecontact_48x.gif\">");
wprintf(_("Edit contact information"));
wprintf("</SPAN>"
"</TD></TR></TABLE>\n"
"</div>\n<div id=\"content\">\n"
);
- wprintf("<FORM METHOD=\"POST\" action=\"/submit_vcard\">\n");
- wprintf("<div id=\"fix_scrollbar_bug\">"
+ wprintf("<FORM METHOD=\"POST\" action=\"submit_vcard\">\n");
+ wprintf("<div class=\"fix_scrollbar_bug\">"
"<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<TABLE border=0><TR>"
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:"));
}
-
+/**
+ * \brief commit the edits to the citadel server
+ */
void edit_vcard(void) {
long msgnum;
char *partnum;
-
+/**
+ * \brief parse edited vcard from the browser
+ */
void submit_vcard(void) {
char buf[SIZ];
int i;
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"),
serv_puts("end:vcard");
serv_puts("000");
- if (!strcmp(bstr("return_to"), "/select_user_to_edit")) {
+ if (!strcmp(bstr("return_to"), "select_user_to_edit")) {
select_user_to_edit(NULL, NULL);
}
- else if (!strcmp(bstr("return_to"), "/do_welcome")) {
+ else if (!strcmp(bstr("return_to"), "do_welcome")) {
do_welcome();
}
else {
readloop("readnew");
}
}
+
+
+
+/*@}*/