}
-void display_openid_name_request(const StrBuf *claimed_id, const StrBuf *username)
-{
- StrBuf *Buf = NULL;
-
- output_headers(1, 1, 2, 0, 0, 0);
- wc_printf("<div id=\"login_screen\">\n");
-
- Buf = NewStrBufPlain(NULL, StrLength(claimed_id));
- StrEscAppend(Buf, claimed_id, NULL, 0, 0);
- svprintf(HKEY("VERIFIED"), WCS_STRING, _("Your OpenID <tt>%s</tt> was successfully verified."),
- ChrPtr(Buf));
- SVPutBuf("CLAIMED_ID", Buf, 0);
-
-
- if (StrLength(username) > 0) {
- Buf = NewStrBufPlain(NULL, StrLength(username));
- StrEscAppend(Buf, username, NULL, 0, 0);
- svprintf(HKEY("REASON"), WCS_STRING,
- _("However, the user name '%s' conflicts with an existing user."),
- ChrPtr(Buf));
- FreeStrBuf(&Buf);
- }
- else {
- svput("REASON", WCS_STRING, "");
- }
-
- svput("ACTION_REQUESTED", WCS_STRING, _("Please specify the user name you would like to use."));
-
- svput("USERNAME_BOX", WCS_STRING, _("User name:"));
- svput("NEWUSER_BUTTON", WCS_STRING, _("New User"));
- svput("EXIT_BUTTON", WCS_STRING, _("Exit"));
-
- svprintf(HKEY("BOXTITLE"), WCS_STRING, _("%s - powered by <a href=\"http://www.citadel.org\">Citadel</a>"),
- ChrPtr(WC->serv_info->serv_humannode));
-
- do_template("openid_manual_create", NULL);
- wDumpContent(2);
-}
-
/* Initialize the session
do_welcome();
}
} else {
- display_openid_name_request(sbstr("openid_url"), sbstr("name"));
+ const StrBuf *Buf;
+
+ putbstr("__claimed_id", NewStrBufDup(sbstr("openid_url")));
+ Buf = sbstr("name");
+ if (StrLength(Buf) > 0)
+ putbstr("__username", NewStrBufDup(Buf));
+ begin_burst();
+ do_template("openid_manual_create", NULL);
+ end_burst();
}
}
*/
else if (!strcasecmp(ChrPtr(result), "verify_only")) {
- display_openid_name_request(claimed_id, username);
+ putbstr("__claimed_id", claimed_id);
+ claimed_id = NULL;
+ if (StrLength(username) > 0) {
+ putbstr("__username", username);
+ username = NULL;
+ }
+ begin_burst();
+ do_template("openid_manual_create", NULL);
+ end_burst();
}
/* Did we manage to log in? If so, continue with the normal flow... */
- if (WC->logged_in) {
+ else if (WC->logged_in) {
if (WC->need_regi) {
display_reg(1);
} else {
-<?=("beginbox")>
+<?=("head")>
+<div id="login_screen">
+<?=("beginbox_1")>
+<?SERV:HUMANNODE><?_(" - powered by <a href='http://www.citadel.org'>Citadel</a>")>
+<?=("beginbox_2")>
<?HELLO>
<div class="login_infos">
- <img src="static/openid-small.gif"><?VERIFIED><br />
- <?REASON><br />
- <?ACTION_REQUESTED><br />
+ <img src="static/openid-small.gif"><?_("Your OpenID")> <tt><?BSTR("__claimed_id", "X")></tt> <?_("was successfully verified.")><br />
+<??("COND:BSTR", 1, "__username")><?_("However, the user name")> '<?BSTR("__claimed_id", "X")>' <?_("conflicts with an existing user.")<??("X", 1)>
+<br />
+ <?_("Please specify the user name you would like to use.")><br />
</div>
<form action="openid_manual_create" method="POST" class="box" id="login_form">
- <input type="hidden" NAME="openid_url" VALUE="<?CLAIMED_ID>">
- <label for="uname"><?USERNAME_BOX></label>
+ <input type="hidden" NAME="openid_url" VALUE="<?BSTR("__claimed_id", "U")>">
+ <label for="uname"><?_("User name:")></label>
<input type="text" name="name" id="uname" > <br>
<div class="logbuttons">
- <input type="submit" name="newuser_action" value="<?NEWUSER_BUTTON>" class="logbutton" >
- <input type="submit" name="exit_action" value="<?EXIT_BUTTON>" class="logbutton">
+ <input type="submit" name="newuser_action" value="<?_("New User")>" class="logbutton" >
+ <input type="submit" name="exit_action" value="<?_("Exit")>" class="logbutton">
<br>
</div>
</form>
<?=("endbox")>
+<?=("trailing")>