Skip to content

fix: Update HTML Structure of Login Screen#54

Open
sergioceron wants to merge 1 commit intomasterfrom
coderops/fix-swarm-70-task-eb0
Open

fix: Update HTML Structure of Login Screen#54
sergioceron wants to merge 1 commit intomasterfrom
coderops/fix-swarm-70-task-eb0

Conversation

@sergioceron
Copy link
Copy Markdown
Member

Automated fix by CoderOps.

Swarm: sw5
Task: Update HTML Structure of Login Screen

Copilot AI review requested due to automatic review settings April 15, 2026 00:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the login.php page markup to use more semantic HTML (main/section/fieldset/label), improve accessibility attributes, and simplify the login form structure.

Changes:

  • Replaces the legacy table-based layout with semantic form markup (<main>, <fieldset>, <label>).
  • Adds basic accessibility improvements (labels, aria-live, aria-describedby) and client-side required fields.
  • Refactors the focus-on-load script to target the new form name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread login.php
@@ -14,135 +14,59 @@
$sselected = 1; $subtitle = $_i18n["login.submenu"]; $selected = $_GET[ "sm" ];
$items = array( $_i18n["login.submenu"], $_i18n["register.submenu"] ); $links = array( "./login.php", "./register.php" );
include("includes/header.php");
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After include("includes/header.php"); the script remains in PHP mode, but the next line outputs raw HTML (<main ...>). This will cause a PHP parse error unless you close PHP (?>) or echo/print the HTML.

Suggested change
include("includes/header.php");
include("includes/header.php");
?>

Copilot uses AI. Check for mistakes.
Comment thread login.php
<br>
<?php } ?>
</section>
<?php $fields = " " . base64_decode( $_GET[ "tk" ] );?>
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base64_decode($_GET["tk"]) is called without checking that tk exists. On newer PHP versions, passing null to base64_decode() can raise a TypeError. Consider defaulting to an empty string when tk is missing (and only decoding when it is present).

Suggested change
<?php $fields = " " . base64_decode( $_GET[ "tk" ] );?>
<?php $fields = " " . ( isset( $_GET[ "tk" ] ) ? base64_decode( $_GET[ "tk" ] ) : "" );?>

Copilot uses AI. Check for mistakes.
Comment thread login.php
focusControl.focus();
}
};
</script>
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The page no longer includes ./includes/foot.php and also ends with </html> without closing </body>. Since includes/header.php opens the <body> tag, this leaves the document structure incomplete and will also drop the footer/scripts from includes/foot.php. Restore the footer include and ensure </body></html> are properly closed.

Suggested change
</script>
</script>
<?php include("./includes/foot.php"); ?>
</body>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants