osCommerce / oscommerce2

osCommerce Online Merchant v2.x
http://www.oscommerce.com
MIT License
281 stars 222 forks source link

Previewed mail data will be lost when click on the cancel button #640

Open Gergely opened 5 years ago

Gergely commented 5 years ago

https://github.com/osCommerce/oscommerce2/blob/de0e97d15d43ac6a9a6cfb2847134a82a0148f2b/catalog/admin/mail.php#L174

When we press cancel in origin codebase then form data will be lost and we can not edit again.

HTML::form() and HTML::button() static functions can not handle HTML5 standards when we want to repost the previewed page with cancel button for edit email contents again

One better HTML5 concept:

<form name="mail" method="post">
  <button type="submit" formaction="/mail.php?action=send_email_to_user">Send</button>
  <button type="submit" formaction="/mail.php">Cancel (Submit back to previous page for edit)</button>
</form>