Skip to content

Commit

Permalink
Fix template for css and js
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 12, 2017
1 parent 838958a commit 0d4d451
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion htdocs/admin/tools/dolibarr_export.php
Expand Up @@ -116,7 +116,7 @@ function hideoptions () {
print '<div class="center">';
print $langs->trans("BackupDesc",DOL_DATA_ROOT);
print '</div>';
print '<br><br>';
print '<br>';

?>

Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/tools/dolibarr_import.php
Expand Up @@ -70,7 +70,7 @@
print '<div class="center">';
print $langs->trans("RestoreDesc",DOL_DATA_ROOT);
print '</div>';
print '<br><br>';
print '<br>';

?>
<fieldset>
Expand Down Expand Up @@ -156,7 +156,7 @@
print '<br>';
print '<textarea rows="1" id="restorecommand" class="centpercent">'.$langs->trans("ImportMySqlCommand",$command,($showpass?$paramclear:$paramcrypted)).'</textarea><br>';
print ajax_autoselect('restorecommand');

if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&amp;radio_dump=mysql_options">'.$langs->trans("UnHidePassword").'</a>';
//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&amp;radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
?>
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/en_US/admin.lang
Expand Up @@ -298,7 +298,7 @@ SetupIsReadyForUse=Module deployment is finished. You must however enable and se
NotExistsDirect=The alternative root directory is not defined to an existing directory.<br>
InfDirAlt=Since version 3, it is possible to define an alternative root directory. This allows you to store, into a dedicated directory, plug-ins and custom templates.<br>Just create a directory at the root of Dolibarr (eg: custom).<br>
InfDirExample=<br>Then declare it in the file <strong>conf.php</strong><br> $dolibarr_main_url_root_alt='http://myserver/custom'<br>$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'<br>If these lines are commented with "#", to enable them, just uncomment by removing the "#" character.
YouCanSubmitFile=For this step, you can send package using this tool: Select module file
YouCanSubmitFile=For this step, you can submit your package file here :
CurrentVersion=Dolibarr current version
CallUpdatePage=Go to the page that updates the database structure and data: %s.
LastStableVersion=Latest stable version
Expand Down
4 changes: 2 additions & 2 deletions htdocs/modulebuilder/template/css/mymodule.css.php
Expand Up @@ -22,7 +22,7 @@
*/

//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url.
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled. Language code is found on url.
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1);
Expand Down Expand Up @@ -50,7 +50,7 @@

session_cache_limiter(FALSE);

// Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined) and load permission if we need to use them in CSS
// Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS
/*if (empty($user->id) && ! empty($_SESSION['dol_login']))
{
$user->fetch('',$_SESSION['dol_login']);
Expand Down
18 changes: 18 additions & 0 deletions htdocs/modulebuilder/template/js/mymodule.js.php
Expand Up @@ -13,8 +13,22 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Library javascript to enable Browser notifications
*/

if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1');
if (!defined('NOREQUIREDB')) define('NOREQUIREDB','1');
if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1);
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1);
if (!defined('NOLOGIN')) define('NOLOGIN', 1);
if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1);
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1);
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');


/**
* \file htdocs/modulebuilder/template/js/mymodule.js.php
* \ingroup mymodule
Expand All @@ -41,4 +55,8 @@
// You can use CTRL+F5 to refresh your browser cache.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
else header('Cache-Control: no-cache');
?>

/* Javascript library of module MyModule */


0 comments on commit 0d4d451

Please sign in to comment.