[svn r17785] Fixed not has button when category=Languages and restores the mark in link with # see FS#3472

skala
Carlos Vargas 17 years ago
parent 44474b699b
commit c86a80852c
  1. 11
      main/admin/languages.php
  2. 21
      main/admin/settings.php

@ -1,5 +1,5 @@
<?php
// $Id: languages.php 16954 2008-11-26 14:41:35Z pcool $
// $Id: languages.php 17785 2009-01-16 21:23:31Z cvargas1 $
/*
==============================================================================
Dokeos - elearning and course management software
@ -151,7 +151,7 @@ $result_select = api_sql_query($sql_select);
$language_data = array ();
while ($row = mysql_fetch_array($result_select))
{
$row_td = array ();
$row_td = array ();
$row_td[] = $row['id'];
// the first column is the original name of the language OR a form containing the original name
if ($_GET['action'] == 'edit' and $row['id'] == $_GET['id'])
@ -162,7 +162,7 @@ while ($row = mysql_fetch_array($result_select))
}
$row_td[] = '<input type="hidden" name="edit_id" value="'.$_GET['id'].'" /><input type="text" name="txt_name" value="'.$row['original_name'].'" /> '
. '<input type="checkbox" '.$checked.'name="platformlanguage" id="platformlanguage" value="'.$row['english_name'].'" /><label for="platformlanguage">'.$row['original_name'].' '.get_lang('AsPlatformLanguage').'</label> <input type="submit" name="Submit" value="'.get_lang('Ok').'" />';
. '<input type="checkbox" '.$checked.'name="platformlanguage" id="platformlanguage" value="'.$row['english_name'].'" /><label for="platformlanguage">'.$row['original_name'].' '.get_lang('AsPlatformLanguage').'</label> <input type="submit" name="Submit" value="'.get_lang('Ok').'" /><a name="value" />';
}
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[] = "<a href='".api_get_self()."?action=makeunavailable&id=".$row['id']."'>".Display::return_icon('visible.gif')."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."'>".Display::return_icon('edit.gif', get_lang('Edit'))."</a>";
$row_td[] = "<a href='".api_get_self()."?action=makeunavailable&id=".$row['id']."'>".Display::return_icon('visible.gif')."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::return_icon('edit.gif', get_lang('Edit'))."</a>";
}
else
{
$row_td[] = "<a href='".api_get_self()."?action=makeavailable&id=".$row['id']."'>".Display::return_icon('invisible.gif')."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."'>".Display::return_icon('edit.gif', get_lang('Edit'))."</a>";
$row_td[] = "<a href='".api_get_self()."?action=makeavailable&id=".$row['id']."'>".Display::return_icon('invisible.gif')."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::return_icon('edit.gif', get_lang('Edit'))."</a>";
}
$language_data[] = $row_td;

@ -1,4 +1,4 @@
<?php // $Id: settings.php 17783 2009-01-16 18:07:17Z cvargas1 $
<?php // $Id: settings.php 17785 2009-01-16 21:23:31Z cvargas1 $
/*
==============================================================================
Dokeos - elearning and course management software
@ -75,7 +75,7 @@ $interbreadcrumb[] = array ("url" => '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','<div align="right">');
$form->addElement('submit', null,get_lang('SaveSettings'));
$form->addElement('html','</div>');
if ($_GET['category'] <> "Languages"){
$form->addElement('html','<div align="right">');
$form->addElement('submit', null,get_lang('SaveSettings'));
$form->addElement('html','</div>');
}
}$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','<div align="right">');
$form->addElement('submit', null,get_lang('SaveSettings'));
$form->addElement('html','</div>');
if ($_GET['category'] <> "Languages"){
$form->addElement('html','<div align="right">');
$form->addElement('submit', null,get_lang('SaveSettings'));
$form->addElement('html','</div>');
}
$form->setDefaults($default_values);
if ($form->validate())
{

Loading…
Cancel
Save