This following customization will hide the Add and Edit Success Message (either by using message box or the common message that displayed in the page) after you add and edit the record in websites that generated by PHPMaker. If users add/copy records or edit record many times, they usually feel uncomfortable whenever they must click on the OK button (if using message box) or see the success message. In other words, they do not need that message that inform them about the condition after adding or editing process has been completed.
This is very useful especially for users who do not want to see the success message after adding or editing the record many times. Typically for advanced users, so they will be focus on add/edit process. I added two constants in configuration file in order to adjust the setting based on your needs as Administrator for the web application. If you want to hide the message or message box after add and or edit process, then simply change the second parameter to become FALSE. The default value is TRUE which means the success message will be displayed after add and edit process has been done.
Updated on September 5, 2012: This customization has been implemented in PHPMaker version 9.0.4, it matches to each other, and as a result, it works properly.
Updated on November 29, 2012: This customization has been implemented in PHPMaker version 9.1.0, it matches to each other, and as a result, it works properly.
Updated on February 10, 2013: This customization has been implemented in PHPMaker version 9.2.0, it matches to each other, and as a result, it works properly.
Updated on June 17, 2013: This customization below has been handled by using MasinoFixedWidthSite extension. You don’t need to implement the customization below if you use my extensions together with the original PHPMaker Template and Extension files.
[hidepost]
-
Open your \Script\ewcfg.php file, and find this code:
// General
before that line, please insert the following code:
// Begin of modification Disable Add Success Message Box, by Masino Sinaga, August 1, 2012 define("MS_SHOW_ADD_SUCCESS_MESSAGE", TRUE, TRUE); define("MS_SHOW_EDIT_SUCCESS_MESSAGE", TRUE, TRUE); // End of modification Disable Add Success Message Box, by Masino Sinaga, August 1, 2012
-
Open your \Script\add-script.php file, and find this code:
if ($this->getSuccessMessage() == "") $this->setSuccessMessage($Language->Phrase("AddSuccess")); // Set up success message
then replace it with the following code:
// Begin of modification Disable Add Success Message Box, by Masino Sinaga, August 1, 2012 if (MS_SHOW_ADD_SUCCESS_MESSAGE==TRUE) { if ($this->getSuccessMessage() == "") $this->setSuccessMessage($Language->Phrase("AddSuccess")); // Set up success message } // End of modification Disable Add Success Message Box, by Masino Sinaga, August 1, 2012
-
Open your \Script\edit-script.php file, and find this code:
if ($this->getSuccessMessage() == "") $this->setSuccessMessage($Language->Phrase("UpdateSuccess")); // Update success
then replace it with the following code:
// Begin of modification Disable Add Success Message Box, by Masino Sinaga, August 1, 2012 if (MS_SHOW_EDIT_SUCCESS_MESSAGE==TRUE) { if ($this->getSuccessMessage() == "") $this->setSuccessMessage($Language->Phrase("UpdateSuccess")); // Update success } // End of modification Disable Add Success Message Box, by Masino Sinaga, August 1, 2012
- Finally, re-generate your script files using PHPMaker as always.
[/hidepost]
Leave a Reply
You must be logged in to post a comment.