本文整理汇总了PHP中FormOther::showColor方法的典型用法代码示例。如果您正苦于以下问题:PHP FormOther::showColor方法的具体用法?PHP FormOther::showColor怎么用?PHP FormOther::showColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormOther
的用法示例。
在下文中一共展示了FormOther::showColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dol_htmlentitiesbr
$ways = $object->print_all_ways();
print $langs->trans("Ref") . '</td><td>';
print '<a href="' . DOL_URL_ROOT . '/categories/index.php?leftmenu=cat&type=' . $type . '">' . $langs->trans("Root") . '</a> >> ';
foreach ($ways as $way) {
print $way . "<br>\n";
}
print '</td></tr>';
// Description
print '<tr><td class="notopnoleft">';
print $langs->trans("Description") . '</td><td>';
print dol_htmlentitiesbr($object->description);
print '</td></tr>';
// Color
print '<tr><td class="notopnoleft">';
print $langs->trans("Color") . '</td><td>';
print $formother->showColor($object->color);
print '</td></tr>';
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
// Note that $action and $object may have been modified by hook
if (empty($reshook) && !empty($extrafields->attribute_label)) {
print $object->showOptionals($extrafields);
}
print '</table>';
dol_fiche_end();
/*
* Boutons actions
*/
print "<div class='tabsAction'>\n";
if ($user->rights->categorie->creer) {
$socid = $object->socid ? "&socid=" . $object->socid : "";
print "<a class='butAction' href='edit.php?id=" . $object->id . $socid . "&type=" . $type . "'>" . $langs->trans("Modify") . "</a>";
示例2: show_theme
//.........这里部分代码省略.........
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print '';
}
if ($edit) print '<br>('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';*/
} else {
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->trans("TopMenuBackgroundColor") . '</td>';
print '<td colspan="' . ($colspan - 1) . '">';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''), 'THEME_ELDY_TOPMENU_BACK1', 'formcolor', 1) . ' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), '');
if ($color) {
print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #' . $color . '" value="' . $color . '">';
} else {
print $langs->trans("Default");
}
}
print ' (' . $langs->trans("Default") . ': <strong>7882aa</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
print '</td>';
}
// BackgroundTableTitleColor
if ($foruserprofile) {
} else {
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->trans("BackgroundTableTitleColor") . '</td>';
print '<td colspan="' . ($colspan - 1) . '">';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1, array()), ''), 'THEME_ELDY_BACKTITLE1', 'formcolor', 1) . ' ';
} else {
print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
}
print ' (' . $langs->trans("Default") . ': <strong>e6e6e6</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
print '</td>';
print '</tr>';
}
// TextTitleColor
if ($foruserprofile) {
} else {
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->trans("TextTitleColor") . '</td>';
print '<td colspan="' . ($colspan - 1) . '">';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', 'formcolor', 1) . ' ';
} else {
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default"));
}
print ' (' . $langs->trans("Default") . ': <strong>3c3c14</strong>, ' . $langs->trans("NotSupportedByAllThemes") . ', ' . $langs->trans("PressF5AfterChangingThis") . ')';
print '</td>';
print '</tr>';
}
// Use Hover
$var = !$var;
if ($foruserprofile) {
/* Must first change option to choose color of highlight instead of yes or no.
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
print '<td><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER" disabled="disabled" type="checkbox" '.($conf->global->THEME_ELDY_USE_HOVER?" checked":"").'></td>';
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
print '<td><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled="disabled"').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>';