User Tools


This shows you the differences between two versions of the page.

Link to this comparison view

en:devel:standardoutputmessage [2017/09/21 19:38] (current)
Line 1: Line 1:
 +====== Application Standard Message Output ======
 +coreBOS gives the developer a standard way of sending messages to the user in detail and edit view. The styling is based on Lighting Design.
 +You activate the message by settings the Smarty **ERROR_MESSAGE_CLASS** and **ERROR_MESSAGE** template variables.
 +The next script will output a message in each supported class:
 +<code php>
 +$smarty = new vtigerCRM_Smarty();​
 +$smarty->​assign('​APP',​ $app_strings);​
 +$smarty->​assign('​ERROR_MESSAGE_CLASS',​ '​cb-alert-warning'​);​
 +$smarty->​assign('​ERROR_MESSAGE',​ 'This is a WARNING message.'​);​
 +$smarty->​assign('​ERROR_MESSAGE_CLASS',​ '​cb-alert-danger'​);​
 +$smarty->​assign('​ERROR_MESSAGE',​ 'This is a DANGER message.'​);​
 +$smarty->​assign('​ERROR_MESSAGE_CLASS',​ '​cb-alert-info'​);​
 +$smarty->​assign('​ERROR_MESSAGE',​ 'This is an INFO message.'​);​
 +$smarty->​assign('​ERROR_MESSAGE_CLASS',​ '​cb-alert-success'​);​
 +$smarty->​assign('​ERROR_MESSAGE',​ 'This is a SUCESS message.'​);​
 +$smarty->​assign('​OPERATION_MESSAGE',​ 'This is a special operation NOT permitted message.'​);​
 +Copy the script to any module and call it directly. For example, create a script:
 +copy the contents above inside and save. Now go to your browser and type in: