* a few more fields
authorArt Cancro <ajc@citadel.org>
Tue, 5 Mar 2002 22:09:43 +0000 (22:09 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 5 Mar 2002 22:09:43 +0000 (22:09 +0000)
webcit/vcard_edit.c

index 12f15cbe7d1b1f2173dc09919cc7ebd6078461e4..c09ae262c16fee4dcb27151fca6eb412c5a1e5f2 100644 (file)
@@ -52,6 +52,8 @@ void edit_vcard(void) {
        char state[SIZ];
        char zipcode[SIZ];
        char country[SIZ];
+       char hometel[SIZ];
+       char worktel[SIZ];
        char extrafields[SIZ];
 
        lastname[0] = 0;
@@ -66,6 +68,8 @@ void edit_vcard(void) {
        state[0] = 0;
        zipcode[0] = 0;
        country[0] = 0;
+       hometel[0] = 0;
+       worktel[0] = 0;
        extrafields[0] = 0;
 
        output_headers(1);
@@ -125,6 +129,14 @@ void edit_vcard(void) {
                        extract_token(country, value, 6, ';');
                }
 
+               else if (!strcasecmp(key, "tel;home")) {
+                       extract_token(hometel, value, 0, ';');
+               }
+
+               else if (!strcasecmp(key, "tel;work")) {
+                       extract_token(hometel, value, 0, ';');
+               }
+
                else {
                        strcat(extrafields, key);
                        strcat(extrafields, ":");
@@ -187,6 +199,15 @@ void edit_vcard(void) {
                "VALUE=\"%s\" MAXLENGTH=\"29\"></TD></TR></TABLE>\n",
                country);
 
+       wprintf("<TABLE BORDER=0><TR><TD>Home telephone:</TD>"
+               "<TD><INPUT TYPE=\"text\" NAME=\"hometel\" "
+               "VALUE=\"%s\" MAXLENGTH=\"29\"></TD></TR>\n",
+               hometel);
+       wprintf("<TR><TD>Work telephone:</TD>"
+               "<TD><INPUT TYPE=\"text\" NAME=\"worktel\" "
+               "VALUE=\"%s\" MAXLENGTH=\"29\"></TD></TR></TABLE>\n",
+               worktel);
+
        wprintf("<TEXTAREA NAME=\"extrafields\" ROWS=10 COLS=80 WIDTH=80>");
        escputs(extrafields);
        wprintf("</TEXTAREA><BR>\n");