From c86a80852c6eb3017d3a8fa78d59753cdf5bcabb Mon Sep 17 00:00:00 2001 From: Carlos Vargas Date: Fri, 16 Jan 2009 22:23:31 +0100 Subject: [PATCH] [svn r17785] Fixed not has button when category=Languages and restores the mark in link with # see FS#3472 --- main/admin/languages.php | 11 ++++++----- main/admin/settings.php | 21 +++++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/main/admin/languages.php b/main/admin/languages.php index ba0c5fe514..e0142b0ad5 100644 --- a/main/admin/languages.php +++ b/main/admin/languages.php @@ -1,5 +1,5 @@ ' - . ' '; + . ' '; } else { @@ -172,14 +172,15 @@ while ($row = mysql_fetch_array($result_select)) $row_td[] = $row['english_name']; // the third column $row_td[] = $row['dokeos_folder']; + // the fourth column with the visibility icon and the edit icon if ($row['available'] == 1) { - $row_td[] = "".Display::return_icon('visible.gif')." ".Display::return_icon('edit.gif', get_lang('Edit')).""; + $row_td[] = "".Display::return_icon('visible.gif')." ".Display::return_icon('edit.gif', get_lang('Edit')).""; } else { - $row_td[] = "".Display::return_icon('invisible.gif')." ".Display::return_icon('edit.gif', get_lang('Edit')).""; + $row_td[] = "".Display::return_icon('invisible.gif')." ".Display::return_icon('edit.gif', get_lang('Edit')).""; } $language_data[] = $row_td; diff --git a/main/admin/settings.php b/main/admin/settings.php index 992c57ca6d..157e94a811 100644 --- a/main/admin/settings.php +++ b/main/admin/settings.php @@ -1,4 +1,4 @@ - 'index.php', "name" => get_lang('PlatformAd $tool_name = get_lang('DokeosConfigSettings'); // Build the form -if (!empty($_GET['category']) and $_GET['category'] <> "Plugins" and $_GET['category'] <> "stylesheets") +if (!empty($_GET['category']) and $_GET['category'] <> "Plugins" and $_GET['category'] <> "stylesheets" ) { $form = new FormValidator('settings', 'post', 'settings.php?category='.$_GET['category']); $renderer = & $form->defaultRenderer(); @@ -127,12 +127,15 @@ if (!empty($_GET['category']) and $_GET['category'] <> "Plugins" and $_GET['cate $default_values = array(); foreach($settings as $row) { + ($countsetting['0']%10) < 5 ?$b=$countsetting['0']-10:$b=$countsetting['0']; if ($i % 10 == 0 and $i<$b){ - $form->addElement('html','
'); - $form->addElement('submit', null,get_lang('SaveSettings')); - $form->addElement('html','
'); + if ($_GET['category'] <> "Languages"){ + $form->addElement('html','
'); + $form->addElement('submit', null,get_lang('SaveSettings')); + $form->addElement('html','
'); + } }$i++; $form->addElement('header', null, get_lang($row['title'])); @@ -215,9 +218,11 @@ if (!empty($_GET['category']) and $_GET['category'] <> "Plugins" and $_GET['cate $form->addElement('static', null, get_lang($row['comment']), get_lang('CurrentValue').' : '.$row['selected_value'],$hideme); } } - $form->addElement('html','
'); - $form->addElement('submit', null,get_lang('SaveSettings')); - $form->addElement('html','
'); + if ($_GET['category'] <> "Languages"){ + $form->addElement('html','
'); + $form->addElement('submit', null,get_lang('SaveSettings')); + $form->addElement('html','
'); + } $form->setDefaults($default_values); if ($form->validate()) {