Disable field if overwrite transaction is off
This commit is contained in:
parent
5a2fe13958
commit
657d1137c0
@ -263,6 +263,11 @@ if ($mode == 'overwrite')
|
|||||||
{
|
{
|
||||||
//print load_fiche_titre($langs->trans("TranslationOverwriteKey"), '', '')."\n";
|
//print load_fiche_titre($langs->trans("TranslationOverwriteKey"), '', '')."\n";
|
||||||
|
|
||||||
|
$disabled='';
|
||||||
|
if ($action == 'edit' || empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) $disabled=' disabled="disabled"';
|
||||||
|
$disablededit='';
|
||||||
|
if ($action == 'edit' || empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) $disablededit=' disabled';
|
||||||
|
|
||||||
print '<div class="justify"><span class="opacitymedium">';
|
print '<div class="justify"><span class="opacitymedium">';
|
||||||
print img_info().' '.$langs->trans("SomeTranslationAreUncomplete");
|
print img_info().' '.$langs->trans("SomeTranslationAreUncomplete");
|
||||||
$urlwikitranslatordoc='https://wiki.dolibarr.org/index.php/Translator_documentation';
|
$urlwikitranslatordoc='https://wiki.dolibarr.org/index.php/Translator_documentation';
|
||||||
@ -291,9 +296,6 @@ if ($mode == 'overwrite')
|
|||||||
// Line to add new record
|
// Line to add new record
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
$disablededit='';
|
|
||||||
if ($action == 'edit') $disablededit=' disabled';
|
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, $disablededit?1:0, 'maxwidthonsmartphone', 1);
|
print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, $disablededit?1:0, 'maxwidthonsmartphone', 1);
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
@ -315,9 +317,7 @@ if ($mode == 'overwrite')
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
||||||
//}
|
//}
|
||||||
$disabled='';
|
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add" title="'.dol_escape_htmltag($langs->trans("YouMustEnabledTranslationOverwriteBefore")).'">';
|
||||||
if ($action == 'edit' || empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) $disabled=' disabled="disabled"';
|
|
||||||
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add">';
|
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user