*/
/*@{*/
#include "webcit.h"
-#include "vcard.h"
/**
* \brief Edit the vCard component of a MIME message.
char country[256];
char hometel[256];
char worktel[256];
+ char faxtel[256];
+ char mobiletel[256];
char primary_inetemail[256];
char other_inetemail[SIZ];
char extrafields[SIZ];
country[0] = 0;
hometel[0] = 0;
worktel[0] = 0;
+ faxtel[0] = 0;
+ mobiletel[0] = 0;
primary_inetemail[0] = 0;
other_inetemail[0] = 0;
title[0] = 0;
extract_token(worktel, value, 0, ';', sizeof worktel);
}
+ else if (!strcasecmp(key, "tel;fax")) {
+ extract_token(faxtel, value, 0, ';', sizeof faxtel);
+ }
+
+ else if (!strcasecmp(key, "tel;cell")) {
+ extract_token(mobiletel, value, 0, ';', sizeof mobiletel);
+ }
+
else if (!strcasecmp(key, "email;internet")) {
if (primary_inetemail[0] == 0) {
safestrncpy(primary_inetemail, value, sizeof primary_inetemail);
/** Display the form */
output_headers(1, 1, 1, 0, 0, 0);
- svprintf("BOXTITLE", WCS_STRING, _("Edit contact information"));
+ svput("BOXTITLE", WCS_STRING, _("Edit contact information"));
do_template("beginbox");
wprintf("<form method=\"POST\" action=\"submit_vcard\">\n");
wprintf(_("Work telephone:"));
wprintf("</td>"
"<td><input type=\"text\" name=\"worktel\" "
- "value=\"%s\" maxlength=\"29\"></td></tr></table>\n",
+ "value=\"%s\" maxlength=\"29\"></td></tr>\n",
worktel);
+ wprintf("<tr><td>");
+ wprintf(_("Mobile telephone:"));
+ wprintf("</td>"
+ "<td><input type=\"text\" name=\"mobiletel\" "
+ "value=\"%s\" maxlength=\"29\"></td>\n",
+ mobiletel);
+ wprintf("<td>");
+ wprintf(_("Fax number:"));
+ wprintf("</td>"
+ "<td><input type=\"text\" name=\"faxtel\" "
+ "value=\"%s\" maxlength=\"29\"></td></tr></table>\n",
+ faxtel);
wprintf("<table class=\"vcard_edit_background_alt\">");
wprintf("<tr><td>");
long msgnum;
char *partnum;
- msgnum = atol(bstr("msgnum"));
+ msgnum = lbstr("msgnum");
partnum = bstr("partnum");
do_edit_vcard(msgnum, partnum, "", NULL);
}
char buf[SIZ];
int i;
- if (IsEmptyStr(bstr("ok_button"))) {
+ if (!havebstr("ok_button")) {
readloop("readnew");
return;
}
- if (!IsEmptyStr(bstr("force_room"))) {
+ if (havebstr("force_room")) {
gotoroom(bstr("force_room"));
}
vcard_add_prop(v, "tel;home", bstr("hometel"));
vcard_add_prop(v, "tel;work", bstr("worktel"));
+ vcard_add_prop(v, "tel;fax", bstr("faxtel"));
+ vcard_add_prop(v, "tel;cell", bstr("mobiletel"));
vcard_add_prop(v, "email;internet", bstr("primary_inetemail"));
for (i=0; i<num_tokens(bstr("other_inetemail"), '\n'); ++i) {