skala
Yannick Warnier 16 years ago
commit 2db0e514d1
  1. 85
      main/admin/style_preview.php
  2. 4
      main/exercice/exercise.class.php
  3. 6
      main/inc/lib/formvalidator/Element/datepicker.php

@ -1,28 +1,34 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
$language_file = array('create_course', 'courses', 'admin');
require_once '../inc/global.inc.php';
if (isset($_GET['style']) AND $_GET['style']<>'') {
$style=Security::remove_XSS($_GET['style']);
$all_styles = api_get_themes();
if (in_array($style, $all_styles[0])) {
echo '<link href="../css/'.$style.'/default.css" rel="stylesheet" type="text/css">';
}
} else {
$currentstyle = api_get_setting('stylesheets');
echo '<link href="../css/'.$currentstyle.'/default.css" rel="stylesheet" type="text/css">';
// Setting the section (for the tabs).
$this_section = SECTION_PLATFORM_ADMIN;
// Access restriction.
api_protect_admin_script();
// Manipulation of the platform-wide css setting.
if (isset($_GET['style']) && $_GET['style'] != '') {
$_setting['stylesheets'] = Security::remove_XSS($_GET['style']);
}
//Display::display_header($tool_name);
require_once api_get_path(INCLUDE_PATH).'banner.inc.php';
// Hiding the link "Teacher/Student view", it is not needed to be shown here.
$_setting['student_view_enabled'] = 'false';
require_once api_get_path(INCLUDE_PATH).'header.inc.php';
$week_days_short = api_get_week_days_short();
$months_long = api_get_months_long();
?>
<!-- start of #main wrapper for #content and #menu divs -->
<!-- Begin Of script Output -->
<div class="maincontent">
<h3>Tool title</h3>
<div class="maincontent" id="content">
<h3><?php echo get_lang('Title'); ?></h3>
<div id="courseintro">
<p>This is the introduction text.
<p><?php echo get_lang('IntroductionText'); ?></p>
</div>
<div id="courseintro_icons">
<a href="#"><?php Display::display_icon('edit.gif', get_lang('Edit')); ?></a><a href="#"><?php Display::display_icon('delete.gif', get_lang('Delete')); ?></a></div>
@ -36,20 +42,20 @@ require_once api_get_path(INCLUDE_PATH).'banner.inc.php';
<table>
<tr>
<td width="220">
<table id="smallcalendar">
<table id="smallcalendar" class="data_table">
<tr id="title">
<td width="10%"><a href="#"><<</a></td>
<td width="80%" colspan="5" align="center"> 2006</td>
<td width="10%"><a href="#">>></a></td>
<td width="10%"><a href="#"><?php Display::display_icon('action_prev.png'); ?></a></td>
<td width="80%" colspan="5" align="center"><?php echo $months_long[6]; ?> 2010</td>
<td width="10%"><a href="#"><?php Display::display_icon('action_next.png'); ?></a></td>
</tr>
<tr>
<td class="weekdays">Mon</td>
<td class="weekdays">Tue</td>
<td class="weekdays">Wed</td>
<td class="weekdays">Thu</td>
<td class="weekdays">Fri</td>
<td class="weekdays">Sat</td>
<td class="weekdays">Sun</td>
<td class="weekdays"><?php echo $week_days_short[1]; ?></td>
<td class="weekdays"><?php echo $week_days_short[2]; ?></td>
<td class="weekdays"><?php echo $week_days_short[3]; ?></td>
<td class="weekdays"><?php echo $week_days_short[4]; ?></td>
<td class="weekdays"><?php echo $week_days_short[5]; ?></td>
<td class="weekdays"><?php echo $week_days_short[6]; ?></td>
<td class="weekdays"><?php echo $week_days_short[0]; ?></td>
</tr>
<tr>
<td>&nbsp;</td>
@ -117,10 +123,10 @@ require_once api_get_path(INCLUDE_PATH).'banner.inc.php';
<td align="right"></td>
</tr>
</table>
<table class="data_table" width="100%">
<table class="data_table" style="width: 250px;">
<tr>
<th style="width:100px"><a href="#">Firstname</a>&nbsp;&#8595; </th>
<th style="width:100px"><a href="#">Lastname</a></th>
<th style="width: 50%;"><a href="#"><?php echo get_lang('FirstName'); ?></a>&nbsp;&#8595; </th>
<th><a href="#"><?php echo get_lang('LastName'); ?></a></th>
</tr>
<tr class="row_odd">
<td>Julio</td>
@ -141,18 +147,21 @@ require_once api_get_path(INCLUDE_PATH).'banner.inc.php';
</tr>
</table>
</div>
<div class="menu" style="width:200px">
<form action="#" method="post" id="loginform" name="loginform"><br />
<label>Username</label><br />
<div class="menu" id="menu">
<form action="#" method="post" id="formLogin" name="formLogin"><br />
<label><?php echo get_lang('UserName'); ?></label><br />
<input type="text" name="login" id="login" size="15" value="" /><br />
<label>Password</label><br />
<label><?php echo get_lang('Password'); ?></label><br />
<input type="password" name="password" id="password" size="15" /><br />
<button class="login" type="submit" name="submitAuth"disabled="disabled" >Enter</button>
<button class="login" type="submit" name="submitAuth"disabled="disabled" ><?php echo get_lang('LoginEnter'); ?></button>
<div class="clear">
&nbsp;
</div>
</form>
<div class="menusection"><span class="menusectioncaption">User</span>
<div class="menusection"><span class="menusectioncaption"><?php echo get_lang('User'); ?></span>
<ul class="menulist">
<li><a href="#">Course Management</a></li>
<li><a href="#">Create Course</a></li>
<li><a href="#"><?php echo get_lang('CourseManagement'); ?></a></li>
<li><a href="#"><?php echo get_lang('CourseCreate'); ?></a></li>
</ul>
</div>
<div class="note"><b>Example notice</b><br />

@ -1009,8 +1009,8 @@ class Exercise
//$form -> addElement('date', 'start_time', get_lang('ExeStartTime'), array('language'=>'es','format' => 'dMYHi'));
//$form -> addElement('date', 'end_time', get_lang('ExeEndTime'), array('language'=>'es','format' => 'dMYHi'));
$form->addElement('datepicker', 'start_time', get_lang('ExeStartTime'), array('form_name'=>'exercise_admin'));
$form->addElement('datepicker', 'end_time', get_lang('ExeEndTime'), array('form_name'=>'exercise_admin'));
$form->addElement('datepicker', 'start_time', get_lang('ExeStartTime'), array('form_name'=>'exercise_admin'), 5);
$form->addElement('datepicker', 'end_time', get_lang('ExeEndTime'), array('form_name'=>'exercise_admin'), 5);
//$form -> addElement('select', 'enabletimercontroltotalminutes',get_lang('ExerciseTimerControlMinutes'),$time_minutes_option);
$form -> addElement('html','</div>');

@ -9,7 +9,7 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date
/**
* Constructor
*/
function HTML_QuickForm_datepicker($elementName = null, $elementLabel = null, $attributes = null)
function HTML_QuickForm_datepicker($elementName = null, $elementLabel = null, $attributes = null, $optionIncrement = null)
{
$js_form_name = $attributes['form_name'];
unset($attributes['form_name']);
@ -38,6 +38,10 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date
//$this->_options['addEmptyOption'] = true;
//$this->_options['emptyOptionValue'] = 0;
//$this->_options['emptyOptionText'] = ' -- ';
if (isset($optionIncrement)) {
$this->_options['optionIncrement']['i'] = intval($optionIncrement);
}
}
/**
* HTML code to display this datepicker

Loading…
Cancel
Save