Skip to content

Commit

Permalink
Bug #2, fix aria-required HTML form attribute [iet:8503203]
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Mar 29, 2017
1 parent 0225133 commit ae22930
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static function printOucu() {
?>
<input
id="oucu" name="oucu" value="<?php Ou_Open_Id_Form::printOucu() ?>"
required="required" aria-required="1" pattern="[a-z]{2,4}\d{1,7}" minlength="3" maxlength="9"
required="required" aria-required="true" pattern="[a-z]{2,4}\d{1,7}" minlength="3" maxlength="9"
title="<?php print_string( 'login_field_help', OUOP_STRING ) ?>" /></label>

<input type="hidden" name="openid_url" />
Expand Down
7 changes: 5 additions & 2 deletions user/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
require_once __DIR__ . '/../../../vendor/autoload.php';

define('DEBUG', filter_input(INPUT_GET, 'debug'));
define('USER_LOGGED_IN', isloggedin()); // Was: 0 !== $USER->id;
define('USER_LOGGED_IN', isloggedin()); // Was: ( 0 !== $USER->id )

if (DEBUG) {
$CFG->debug = DEBUG_DEVELOPER;
Expand Down Expand Up @@ -43,7 +43,10 @@
header('Access-Control-Allow-Origin: ' . $CFG->wwwroot); // Security.
header('Content-Type: application/json; charset=utf-8');
echo json_encode([
'stat' => $stat, 'msg' => $msg, 'debug' => OuUser::debugLevel(), 'user' => $user, 'profile' => $prof->profile, 'body_class' => $prof->body_class,
'stat' => $stat, 'msg' => $msg, 'debug' => OuUser::debugLevel(),
'user' => $user,
'profile' => $prof->profile,
'body_class' => $prof->body_class,
'user_roles' => OuUser::getRoles(),
'redirect_url' => USER_LOGGED_IN ? $prof->redirect_url : null,
'consent_embed_url' => USER_LOGGED_IN ? OuUser::getConsentEmbedUrl() : null,
Expand Down

0 comments on commit ae22930

Please sign in to comment.