Refactor wizard forms by NB-Core · Pull Request #13 · NB-Core/modules · GitHub
Skip to content

Refactor wizard forms#13

Merged
NB-Core merged 1 commit into
tlwizardfrom
codex/replace-form-markup-with-tw_form-helpers
Jul 13, 2025
Merged

Refactor wizard forms#13
NB-Core merged 1 commit into
tlwizardfrom
codex/replace-form-markup-with-tw_form-helpers

Conversation

@NB-Core

@NB-Core NB-Core commented Jul 13, 2025

Copy link
Copy Markdown
Owner

Summary

  • use tw_form_open() and tw_form_close() in Translation Wizard pages
  • leave forms with special name attributes untouched

Testing

  • php -l systems/translationwizard/translationwizard/changescheme.php
  • php -l systems/translationwizard/translationwizard/deleteempty.php
  • php -l systems/translationwizard/translationwizard/edit_single.php
  • php -l systems/translationwizard/translationwizard/editchecked.php
  • php -l systems/translationwizard/translationwizard/fix.php
  • php -l systems/translationwizard/translationwizard/insert_central.php
  • php -l systems/translationwizard/translationwizard/known.php
  • php -l systems/translationwizard/translationwizard/list.php
  • php -l systems/translationwizard/translationwizard/push.php
  • php -l systems/translationwizard/translationwizard/scanmodules.php
  • php -l systems/translationwizard/translationwizard/searchandedit.php
  • php -l systems/translationwizard/translationwizard/searchandreplace.php
  • php -l systems/translationwizard/translationwizard/truncate.php

https://chatgpt.com/codex/tasks/task_e_6873cfa5f8f08329883b84325ba0db59

@NB-Core NB-Core requested a review from Copilot July 13, 2025 15:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors all Translation Wizard pages to use the tw_form_open() and tw_form_close() helpers instead of manually injecting <form> tags via rawoutput(), while leaving forms with special name attributes untouched.

  • Replaced raw <form> open/close calls with tw_form_open()/tw_form_close() throughout the wizard.
  • Ensured each module’s form now correctly pairs open/close helpers.
  • Left existing special-named forms (outside of tw_form_*) intact.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
systems/translationwizard/translationwizard/truncate.php Swapped in tw_form_open()/tw_form_close() for <form>
systems/translationwizard/translationwizard/searchandreplace.php Wrapped form blocks with tw_form_open()/tw_form_close()
systems/translationwizard/translationwizard/searchandedit.php Replaced raw form tags with tw_form_* wrappers
systems/translationwizard/translationwizard/scanmodules.php Updated form open/close to use tw_form_*
systems/translationwizard/translationwizard/push.php Converted raw <form> calls to tw_form_open()/tw_form_close()
systems/translationwizard/translationwizard/list.php Swapped raw form tags for tw_form_*
systems/translationwizard/translationwizard/known.php Replaced raw <form> calls with tw_form_open()/tw_form_close()
systems/translationwizard/translationwizard/insert_central.php Updated form start/end to use tw_form_* helpers
systems/translationwizard/translationwizard/fix.php Changed raw form calls to tw_form_open()/tw_form_close()
systems/translationwizard/translationwizard/editchecked.php Replaced rawoutput("</form>") with tw_form_close()
systems/translationwizard/translationwizard/edit_single.php Wrapped the single edit form with tw_form_*
systems/translationwizard/translationwizard/deleteempty.php Swapped raw form tags for tw_form_open()/tw_form_close()
systems/translationwizard/translationwizard/changescheme.php Introduced tw_form_open()/tw_form_close() (with explicit POST)
Comments suppressed due to low confidence (2)

systems/translationwizard/translationwizard/searchandreplace.php:161

  • [nitpick] Indentation here is deeper than the surrounding code. Align the tw_form_open() call with its matching addnav() to improve readability.
                                tw_form_open("searchandreplace&mode=save");

systems/translationwizard/translationwizard/known.php:143

  • [nitpick] This tw_form_open() call is not indented consistently with its surrounding block—consider normalizing indentation to match project style.
tw_form_open("known$redirect");

Comment thread systems/translationwizard/translationwizard/changescheme.php
@NB-Core NB-Core merged commit cf3069f into tlwizard Jul 13, 2025
@NB-Core NB-Core deleted the codex/replace-form-markup-with-tw_form-helpers branch July 13, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants