* @author Julio Montoya BeezNest 2011 Bug fixing * * @package chamilo.course_progress */ // protect a course script api_protect_course_script(true); if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') { $header_form = get_lang('NewThematicAdvance'); if ($action === 'thematic_advance_edit') { $header_form = get_lang('EditThematicAdvance'); } // display form $form = new FormValidator( 'thematic_advance', 'POST', api_get_self().'?'.api_get_cidreq() ); $form->addElement('header', $header_form); //$form->addElement('hidden', 'thematic_advance_token',$token); $form->addElement('hidden', 'action', $action); if (!empty($thematic_advance_id)) { $form->addElement('hidden', 'thematic_advance_id', $thematic_advance_id); } if (!empty($thematic_id)) { $form->addElement('hidden', 'thematic_id', $thematic_id); } $radios = []; $radios[] = $form->createElement( 'radio', 'start_date_type', null, get_lang('StartDateFromAnAttendance'), '1', [ 'onclick' => 'check_per_attendance(this)', 'id' => 'from_attendance', ] ); $radios[] = $form->createElement( 'radio', 'start_date_type', null, get_lang('StartDateCustom'), '2', [ 'onclick' => 'check_per_custom_date(this)', 'id' => 'custom_date', ] ); $form->addGroup($radios, null, get_lang('StartDateOptions')); if (isset($thematic_advance_data['attendance_id']) && $thematic_advance_data['attendance_id'] == 0) { $form->addElement('html', '
'); } else { $form->addElement('html', ''); if (isset($thematic_advance_data['attendance_id']) && $thematic_advance_data['attendance_id'] == 0 ) { $form->addElement('html', '