* * @package chamilo.attendance */ // protect a course script api_protect_course_script(true); // error messages if (isset($error)) { echo Display::return_message(get_lang('The form contains incorrect or incomplete data. Please check your input.'), 'error', false); } if (!isset($error)) { $token = Security::get_token(); } // display form $form = new FormValidator( 'attendance_add', 'POST', 'index.php?action=attendance_add&'.api_get_cidreq() ); $form->addElement('header', '', get_lang('Create a new attendance list')); $form->addElement('hidden', 'sec_token', $token); $form->addText('title', get_lang('Title'), true); $form->applyFilter('title', 'html_filter'); $form->addHtmlEditor( 'description', get_lang('Description'), false, false, ['ToolbarSet' => 'Basic', 'Width' => '100%', 'Height' => '150'] ); // Advanced Parameters if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id() == 0) { $form->addButtonAdvancedSettings('id_qualify'); $form->addElement('html', ''); } $form->addButtonCreate(get_lang('Save')); $form->display();