Evidently, when an HTML checkbox is disabled, its value
authorArt Cancro <ajc@citadel.org>
Sun, 8 Jul 2007 04:15:38 +0000 (04:15 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 8 Jul 2007 04:15:38 +0000 (04:15 +0000)
is never sent to the server, even if the value was explicitly set.
Reworked the c_auth_mode setting due to this, because it was getting
unset.

webcit/siteconfig.c

index 438ddad9f03cdc30ee3ece7ec7430796a3b66bb5..ac50269ce8bfeb4dad039643be4967002d45a66a 100644 (file)
@@ -531,8 +531,9 @@ void display_siteconfig(void)
                case 52:
                        sprintf(&access[strlen(access)], "<TR><TD>");
                        sprintf(&access[strlen(access)], _("Enable host based authentication mode"));
-                       sprintf(&access[strlen(access)], "</TD><TD><input type=\"checkbox\" NAME=\"c_auth_mode\" VALUE=\"yes\" DISABLED %s>",
-                               ((atoi(buf) != 0) ? "CHECKED" : ""));
+                       sprintf(&access[strlen(access)], "</TD><TD><input type=\"hidden\" NAME=\"c_auth_mode\" VALUE=\"%s\">%s",
+                               buf,
+                               ((atoi(buf) != 0) ? "Yes" : "No"));
                        sprintf(&access[strlen(access)], "</TD></TR>\n");
                        break;
                case 53:
@@ -729,7 +730,7 @@ void siteconfig(void)
        serv_printf("%s", bstr("c_default_cal_zone"));
        serv_printf("%s", bstr("c_pftcpdict_port"));
        serv_printf("%s", bstr("c_mgesve_port"));
-       serv_printf("%s", ((!strcasecmp(bstr("c_auth_mode"), "yes") ? "1" : "0")));
+       serv_printf("%s", bstr("c_auth_mode"));
        serv_printf("%s", bstr("c_funambol_host"));
        serv_printf("%s", bstr("c_funambol_port"));
        serv_printf("%s", bstr("c_funambol_source"));