Minor - format code

pull/3383/head
Julio Montoya 5 years ago
parent 79fd1765a6
commit 461f06bd93
  1. 1
      main/attendance/attendance_edit.php
  2. 19
      main/session/session_category_edit.php

@ -7,7 +7,6 @@
*
* @author Christian Fasanando <christian1827@gmail.com>
*/
api_protect_course_script(true);
// error messages

@ -1,9 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Edition script for sessions categories.
*
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -11,7 +11,7 @@ require_once __DIR__.'/../inc/global.inc.php';
// setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script(true);
$id = intval($_GET['id']);
$id = (int) $_GET['id'];
$formSent = 0;
$errorMsg = '';
@ -33,9 +33,16 @@ if (!$infos = Database::fetch_array($result)) {
header('Location: session_list.php');
exit();
}
$year_start = $month_start = $day_start = null;
$year_end = $month_end = $day_end = null;
if ($infos['date_start']) {
list($year_start, $month_start, $day_start) = explode('-', $infos['date_start']);
}
if ($infos['date_end']) {
list($year_end, $month_end, $day_end) = explode('-', $infos['date_end']);
}
if (!api_is_platform_admin() && $infos['session_admin_id'] != $_user['user_id'] && !api_is_session_admin()) {
api_not_allowed(true);
@ -96,7 +103,9 @@ if (!empty($return)) {
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
<?php echo get_lang('TheTimeLimitsAreReferential'); ?>
<a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('EditTimeLimit'); ?></a>
<a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}">
<?php echo get_lang('EditTimeLimit'); ?>
</a>
</div>
</div>
<div style="display: <?php echo $formSent ? 'display' : 'none'; ?>;" id="options">
@ -404,7 +413,7 @@ if (!empty($return)) {
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
<button class="btn btn-success" type="submit" value="<?php echo get_lang('Edit'); ?>">
<button class="btn btn-primary" type="submit" value="<?php echo get_lang('Edit'); ?>">
<?php echo get_lang('Edit'); ?>
</button>
</div>

Loading…
Cancel
Save