From a356003fcef55e5a577ee9dc9131b6abd58bbf4b Mon Sep 17 00:00:00 2001 From: Dave West Date: Sat, 27 Oct 2007 14:47:05 +0000 Subject: [PATCH] Added mobile phone number to vCard --- webcit/vcard_edit.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index 746edeeef..d3e83a783 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -42,6 +42,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to, char *force_room char hometel[256]; char worktel[256]; char faxtel[256]; + char mobiletel[256]; char primary_inetemail[256]; char other_inetemail[SIZ]; char extrafields[SIZ]; @@ -64,6 +65,7 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to, char *force_room hometel[0] = 0; worktel[0] = 0; faxtel[0] = 0; + mobiletel[0] = 0; primary_inetemail[0] = 0; other_inetemail[0] = 0; title[0] = 0; @@ -155,6 +157,10 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to, char *force_room extract_token(faxtel, value, 0, ';', sizeof faxtel); } + else if (!strcasecmp(key, "tel;mobile")) { + 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); @@ -302,8 +308,14 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to, char *force_room wprintf(_("Work telephone:")); wprintf("" "\n", + "value=\"%s\" maxlength=\"29\">\n", worktel); + wprintf(""); + wprintf(_("Mobile telephone:")); + wprintf("" + "\n", + mobiletel); wprintf(""); wprintf(_("Fax number:")); wprintf("" @@ -434,6 +446,7 @@ void submit_vcard(void) { 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;mobile", bstr("mobiletel")); vcard_add_prop(v, "email;internet", bstr("primary_inetemail")); for (i=0; i