Skip to content

Commit

Permalink
FIX Disable js if no javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 26, 2020
1 parent 8ceafa2 commit 35e886f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/class/html.formother.class.php
Expand Up @@ -742,7 +742,7 @@ public static function selectColor($set_color = '', $prefix = 'f_color', $form_n
if (!is_array($arrayofcolors) || count($arrayofcolors) < 1)
{
$langs->load("other");
if (empty($conf->dol_use_jmobile))
if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax))
{
$out .= '<link rel="stylesheet" media="screen" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jpicker/css/jPicker-1.1.6.css" />';
$out .= '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jpicker/jpicker-1.1.6.js"></script>';
Expand Down Expand Up @@ -788,7 +788,7 @@ public static function selectColor($set_color = '', $prefix = 'f_color', $form_n
}
else // In most cases, this is not used. We used instead function with no specific list of colors
{
if (empty($conf->dol_use_jmobile))
if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax))
{
$out .= '<link rel="stylesheet" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/colorpicker/jquery.colorpicker.css" type="text/css" media="screen" />';
$out .= '<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/colorpicker/jquery.colorpicker.js" type="text/javascript"></script>';
Expand Down

0 comments on commit 35e886f

Please sign in to comment.