[svn r19639] last part of consistency improvements: form with form titles, no api_display_tool_title, actions bar, icons for actions, form layout.

skala
Patrick Cool 17 years ago
parent 74effcc413
commit 149025d3b0
  1. 6
      main/admin/configure_homepage.php
  2. 25
      main/admin/course_import.php
  3. 4
      main/admin/course_list.php
  4. 8
      main/admin/session_edit.php
  5. 5
      main/admin/session_export.php
  6. 9
      main/admin/session_import.php
  7. 2
      main/admin/session_list.php
  8. 4
      main/admin/user_list.php
  9. BIN
      main/img/course_add.gif

@ -1,4 +1,4 @@
<?php // $Id: configure_homepage.php 19111 2009-03-17 20:44:30Z iflorespaz $
<?php // $Id: configure_homepage.php 19639 2009-04-08 13:06:16Z pcool $
/*
===== =========================================================================
Dokeos - elearning and course management software
@ -650,6 +650,7 @@ switch($action){
//------------ Display for edit_notice case --------------
?>
<form action="<?php echo api_get_self(); ?>?action=<?php echo $action; ?>" method="post" style="margin:0px;">
<div class="row"><div class="form_header"><?php echo $tool_name; ?></div></div>
<input type="hidden" name="formSent" value="1"/>
<?php
@ -661,6 +662,7 @@ switch($action){
}
?>
<table border="0" cellpadding="5" cellspacing="0">
<tr><td colspan="2"><?php echo '<span style="font-style: italic;">'.get_lang('LetThoseFieldsEmptyToHideTheNotice').'</span>'; ?></tr>
<tr>
@ -694,10 +696,10 @@ switch($action){
$default = array();
$form = new FormValidator('configure_homepage_'.$action, 'post', api_get_self().'?action='.$action, '', array('style' => 'margin: 0px;'));
$renderer =& $form->defaultRenderer();
$renderer->setHeaderTemplate('');
$renderer->setFormTemplate('<form{attributes}><table border="0" cellpadding="5" cellspacing="0" width="100%">{content}</table></form>');
$renderer->setElementTemplate('{element}');
$renderer->setRequiredNoteTemplate('');
$form->addElement('header', '', $tool_name);
$form->addElement('hidden', 'formSent', '1');
$form->addElement('hidden', 'link_index', $action == 'edit_link' ? $link_index : '0');
$form->addElement('hidden', 'filename', $action == 'edit_link' ? $filename : '');

@ -164,10 +164,6 @@ $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAd
set_time_limit(0);
Display :: display_header($tool_name);
$form = new FormValidator('update_course');
$form->addElement('header', '', $tool_name);
$form->display();
if ($_POST['formSent'])
{
if(empty($_FILES['import_file']['tmp_name']))
@ -204,10 +200,27 @@ if (count($errors) != 0)
}
?>
<form method="post" action="<?php echo api_get_self(); ?>" enctype="multipart/form-data" style="margin:0px;">
<input type="file" name="import_file"/>
<div class="row"><div class="form_header"><?php echo $tool_name; ?></div></div>
<div class="row">
<div class="label"><?php echo get_lang('ImportCSVFileLocation');?></div>
<div class="formw">
<input type="file" name="import_file"/>
</div>
</div>
<div class="row">
<div class="label"></div>
<div class="formw">
<button type="submit" class="save" value="<?php echo get_lang('Import'); ?>"><?php echo get_lang('Import'); ?></button>
</div>
</div>
<input type="hidden" name="formSent" value="1"/>
<button type="submit" class="save" value="<?php echo get_lang('Import'); ?>"><?php echo get_lang('Import'); ?></button>
</form>
<div style="clear: both;"></div>
<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
<blockquote>

@ -1,4 +1,4 @@
<?php // $Id: course_list.php 19597 2009-04-07 14:38:36Z pcool $
<?php // $Id: course_list.php 19639 2009-04-08 13:06:16Z pcool $
/* For licensing terms, see /dokeos_license.txt */
/**
* This script shows a list of courses and allows searching for courses codes
@ -256,7 +256,7 @@ else
$form->addElement('style_submit_button', 'submit', get_lang('SearchCourse'),'class="search"');
$form->addElement('static','search_advanced_link',null,'<a href="course_list.php?search=advanced">'.get_lang('AdvancedSearch').'</a>');
echo '<div style="float:right;">
<a href="'.api_get_path(WEB_CODE_PATH).'admin/course_add.php">'.Display::return_icon('view_more_stats.gif',get_lang('AddSession')).get_lang('AddCourse').'</a>
<a href="'.api_get_path(WEB_CODE_PATH).'admin/course_add.php">'.Display::return_icon('course_add.gif',get_lang('AddSession')).get_lang('AddCourse').'</a>
</div>';
echo '<div class="actions">';

@ -96,8 +96,12 @@ $result=api_sql_query($sql,__FILE__,__LINE__);
$Coaches=api_store_result($result);
$thisYear=date('Y');
// display the header
Display::display_header($tool_name);
api_display_tool_title($tool_name);
// display the tool title
// api_display_tool_title($tool_name);
if (!empty($return)) {
Display::display_error_message($return,false);
}
@ -106,6 +110,8 @@ if (!empty($return)) {
<form method="post" name="form" action="<?php echo api_get_self(); ?>?page=<?php echo $_GET['page'] ?>&id=<?php echo $id; ?>" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<div class="row"><div class="form_header"><?php echo $tool_name; ?></div></div>
<table border="0" cellpadding="5" cellspacing="0" width="550">
<tr>

@ -247,9 +247,11 @@ if($_POST['formSent'] )
}
}
// display the header
Display::display_header($tool_name);
api_display_tool_title($tool_name);
// display the tool title
// api_display_tool_title($tool_name);
//select of sessions
@ -281,6 +283,7 @@ if(!empty($errorMsg))
<form method="post" action="<?php echo api_get_self(); ?>" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<div class="row"><div class="form_header"><?php echo $tool_name; ?></div></div>
<table border="0" cellpadding="5" cellspacing="0">
<tr>
<td nowrap="nowrap" valign="top"><?php echo get_lang('OutputFileType'); ?> :</td>

@ -1,4 +1,4 @@
<?php // $Id: session_import.php 19263 2009-03-25 00:15:16Z aportugal $
<?php // $Id: session_import.php 19639 2009-04-08 13:06:16Z pcool $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
@ -672,8 +672,12 @@ if ($_POST['formSent']) {
}
}
// display the header
Display::display_header($tool_name);
api_display_tool_title($tool_name);
// display the tool title
// api_display_tool_title($tool_name);
if (count($inserted_in_course) > 1) {
$msg = get_lang('SeveralCoursesSubscribedToSessionBecauseOfSameVisualCode').': ';
foreach ($inserted_in_course as $code => $title) {
@ -686,6 +690,7 @@ if (count($inserted_in_course) > 1) {
<form method="post" action="<?php echo api_get_self(); ?>" enctype="multipart/form-data" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<div class="row"><div class="form_header"><?php echo $tool_name; ?></div></div>
<table border="0" cellpadding="5" cellspacing="0">
<?php

@ -54,7 +54,7 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
Display :: display_header($tool_name);
$form = new FormValidator('advanced_search','get');
$form->addElement('header', '', $tool_name);
$active_group = array();
$active_group[] = $form->createElement('checkbox','active','',get_lang('Active'));
$active_group[] = $form->createElement('checkbox','inactive','',get_lang('Inactive'));

@ -1,4 +1,4 @@
<?php // $Id: user_list.php 19597 2009-04-07 14:38:36Z pcool $
<?php // $Id: user_list.php 19639 2009-04-08 13:06:16Z pcool $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
@ -579,7 +579,7 @@ else
if (api_is_platform_admin()) {
echo '<div style="float:right;">
<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'.Display::return_icon('view_more_stats.gif',get_lang('AddUsers')).get_lang('AddUsers').'</a>
<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'.Display::return_icon('add_user_big.gif',get_lang('AddUsers')).get_lang('AddUsers').'</a>
</div>';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Loading…
Cancel
Save