Test: smarty integration and iphone template
This commit is contained in:
parent
32967c6227
commit
127413f465
@ -122,6 +122,7 @@ function donnefocus(element) {
|
|||||||
|
|
||||||
{if $forgetpasslink || $helpcenterlink}
|
{if $forgetpasslink || $helpcenterlink}
|
||||||
<tr><td colspan="3" align="center">
|
<tr><td colspan="3" align="center">
|
||||||
|
{strip}
|
||||||
{if $forgetpasslink}
|
{if $forgetpasslink}
|
||||||
<a style="color: #888888; font-size: 10px" href="{$dol_url_root}/user/passwordforgotten.php">(
|
<a style="color: #888888; font-size: 10px" href="{$dol_url_root}/user/passwordforgotten.php">(
|
||||||
{$langs->trans('PasswordForgotten')}
|
{$langs->trans('PasswordForgotten')}
|
||||||
@ -137,6 +138,7 @@ function donnefocus(element) {
|
|||||||
{$langs->trans('NeedHelpCenter')}
|
{$langs->trans('NeedHelpCenter')}
|
||||||
{/if}
|
{/if}
|
||||||
)</a>
|
)</a>
|
||||||
|
{/strip}
|
||||||
</td></tr>
|
</td></tr>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@ -146,9 +148,9 @@ function donnefocus(element) {
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{if $dol_loginmesg}
|
{if $smarty.session.dol_loginmesg}
|
||||||
<center><table width="60%"><tr><td align="center"><div class="error">
|
<center><table width="60%"><tr><td align="center"><div class="error">
|
||||||
{$dol_loginmesg}
|
{$smarty.session.dol_loginmesg}
|
||||||
</div></td></tr></table></center>
|
</div></td></tr></table></center>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
@ -361,8 +361,6 @@ function dol_loginfunction2($langs,$conf,$mysoc)
|
|||||||
{
|
{
|
||||||
$smarty->template_dir = DOL_DOCUMENT_ROOT."/theme/phones/other/default/templates/";
|
$smarty->template_dir = DOL_DOCUMENT_ROOT."/theme/phones/other/default/templates/";
|
||||||
}
|
}
|
||||||
// Differencier les pages dans le cache
|
|
||||||
$cache_id = $conf->browser->phone;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -380,9 +378,6 @@ function dol_loginfunction2($langs,$conf,$mysoc)
|
|||||||
// Si feuille de style en php existe
|
// Si feuille de style en php existe
|
||||||
if (file_exists(DOL_DOCUMENT_ROOT.'/'.$conf->css.".php")) $conf->css.=".php?lang=".$langs->defaultlang;
|
if (file_exists(DOL_DOCUMENT_ROOT.'/'.$conf->css.".php")) $conf->css.=".php?lang=".$langs->defaultlang;
|
||||||
$smarty->assign('conf_css', DOL_URL_ROOT.'/'.$conf->css);
|
$smarty->assign('conf_css', DOL_URL_ROOT.'/'.$conf->css);
|
||||||
|
|
||||||
// Differencier les pages dans le cache
|
|
||||||
$cache_id = $conf->theme;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$smarty->assign('dol_url_root', DOL_URL_ROOT);
|
$smarty->assign('dol_url_root', DOL_URL_ROOT);
|
||||||
@ -508,13 +503,6 @@ function dol_loginfunction2($langs,$conf,$mysoc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error message
|
|
||||||
if (! empty($_SESSION["dol_loginmesg"]))
|
|
||||||
{
|
|
||||||
$smarty->assign('dol_loginmesg', $_SESSION["dol_loginmesg"]);
|
|
||||||
$_SESSION["dol_loginmesg"]="";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Home message
|
// Home message
|
||||||
if (! empty($conf->global->MAIN_HOME))
|
if (! empty($conf->global->MAIN_HOME))
|
||||||
{
|
{
|
||||||
@ -545,15 +533,15 @@ function dol_loginfunction2($langs,$conf,$mysoc)
|
|||||||
$smarty->assign('main_authentication', $conf->file->main_authentication);
|
$smarty->assign('main_authentication', $conf->file->main_authentication);
|
||||||
$smarty->assign('session_name', session_name());
|
$smarty->assign('session_name', session_name());
|
||||||
|
|
||||||
// Activation du cache
|
// Creation du template
|
||||||
$smarty->caching = 1;
|
$smarty->display('login.tpl');
|
||||||
|
|
||||||
// Creation et mise en cache du template avec un id
|
|
||||||
$smarty->display('login.tpl', $cache_id);
|
|
||||||
|
|
||||||
// Suppression de la version compilee
|
// Suppression de la version compilee
|
||||||
$smarty->clear_compiled_tpl('login.tpl');
|
$smarty->clear_compiled_tpl('login.tpl');
|
||||||
|
|
||||||
|
// Reset error message
|
||||||
|
$_SESSION["dol_loginmesg"] = '';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -81,9 +81,9 @@
|
|||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{if $dol_loginmesg}
|
{if $smarty.session.dol_loginmesg}
|
||||||
<div align="center">
|
<div align="center">
|
||||||
{$dol_loginmesg}
|
{$smarty.session.dol_loginmesg}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user