use the same way to display all banners and services contents
[citadel.git] / webcit / vcard_edit.c
index a0d143636a1062bbaf2f25f3cad4962f5a049c31..4f6183dc570775b37d05cec92022d16092f07a59 100644 (file)
@@ -175,15 +175,13 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) {
 
        /** Display the form */
        output_headers(1, 1, 2, 0, 0, 0);
-       wprintf("<div id=\"banner\">\n"
-               "<table class=\"vcard_edit_banner\"><tr><td>"
-               "<span class=\"titlebar\">"
-               "<img src=\"static/savecontact_48x.gif\">");
+       wprintf("<div id=\"banner\">\n");
+       wprintf("<img src=\"static/savecontact_48x.gif\">");
+       wprintf("<h1>");
        wprintf(_("Edit contact information"));
-       wprintf("</span>"
-               "</td></tr></table>\n"
-               "</div>\n<div id=\"content\">\n"
-       );
+       wprintf("</h1>");
+       wprintf("</div>\n");
+       wprintf("<div id=\"content\" class=\"service\">\n");
 
        wprintf("<form method=\"POST\" action=\"submit_vcard\">\n");
        wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
@@ -363,7 +361,7 @@ void submit_vcard(void) {
        char buf[SIZ];
        int i;
 
-       if (strlen(bstr("ok_button")) == 0) { 
+       if (IsEmptyStr(bstr("ok_button"))) { 
                readloop("readnew");
                return;
        }
@@ -419,7 +417,7 @@ void submit_vcard(void) {
 
        for (i=0; i<num_tokens(bstr("other_inetemail"), '\n'); ++i) {
                extract_token(buf, bstr("other_inetemail"), i, '\n', sizeof buf);
-               if (strlen(buf) > 0) {
+               if (!IsEmptyStr(buf)) {
                        vcard_add_prop(v, "email;internet", buf);
                }
        }