Disable preview option if PHP does not support it.

This commit is contained in:
Laurent Destailleur 2008-04-17 11:34:08 +00:00
parent d1edb63eec
commit aad9b2332e

View File

@ -162,14 +162,17 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Activer onglet preview
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
print $html->selectyesno('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1);
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Activate previeuw tab on element card
if (function_exists("imagick_readimage"))
{
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
print $html->selectyesno('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1);
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
}
print '</table><br>';
@ -294,13 +297,16 @@ else
print '<td width="20">&nbsp;</td>';
print "</tr>";
// Activer onglet preview
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0)."</td>";
print '<td width="20">&nbsp;</td>';
print "</tr>";
// Activate previeuw tab on element card
if (function_exists("imagick_readimage"))
{
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0)."</td>";
print '<td width="20">&nbsp;</td>';
print "</tr>";
}
print '</table><br>';