| Re: cancel button |
| by Mamba on 2024/11/13 3:05:31 A better solution seems to be to use le="color: #000000"><?php button type="button" like this: le="color: #000000"><?php <button type="button" class="btn btn-danger me-1" name="cancel" id="cancel" onClick="history.go(-1);return true;">' . _CANCEL . '</button> - Clarity: Each button's purpose is explicitly defined by its type attribute (submit, reset, button), making the form's behavior clear at a glance. - Uniformity: Using the same element type for all buttons enhances uniformity, making styling and scripting more predictable. - Ease of Updates: If you decide to add features like tooltips, loading indicators, or other interactive elements, "button" elements offer more flexibility. - "button" elements are also more flexible for styling
|
| cancel button |
| by goffy on 2024/11/11 11:21:55 hi it seems that there is a problem with cancel button in bootstrap5 currently we are using le="color: #000000"><?php button class="btn btn-danger me-1" onClick="history.go(-1);return true;" . _CANCEL . /button but this cause that it is treated like clicking on confirm button, as the submit event takes place my solution is to replace by le="color: #000000"><?php input type="button" class="btn btn-danger me-1" name="cancel" id="cancel" onClick="history.go(-1);return true;" value=". _CANCEL . " I created a PR https://github.com/XOOPS/XoopsCore25/pull/1481 or is there a better solution? |