Feature #2099 - Coding the page for editition training requests (4).

skala
Ivan Tcholakov 14 years ago
parent 85b6c86c01
commit 5a35a260fe
  1. 44
      main/admin/course_request_edit.php
  2. 7
      main/create_course/add_course.php
  3. 2
      main/lang/bulgarian/create_course.inc.php
  4. 2
      main/lang/english/create_course.inc.php

@ -106,25 +106,57 @@ if (!is_array($course_request_info)) {
exit;
}
global $_configuration;
$dbnamelength = strlen($_configuration['db_prefix']);
// Ensure the database prefix + database name do not get over 40 characters.
$maxlength = 40 - $dbnamelength;
// Build the form.
$form = new FormValidator('add_course');
// Form title.
$form->addElement('header', '', $tool_name);
// Title
// Title.
$form->addElement('text', 'title', get_lang('CourseName'), array('size' => '60', 'id' => 'title'));
$form->applyFilter('title', 'html_filter');
$form->addElement('static', null, null, get_lang('Ex'));
// Course category.
$categories_select = $form->addElement('select', 'category_code', get_lang('Fac'), array());
$form->applyFilter('category_code', 'html_filter');
CourseManager::select_and_sort_categories($categories_select);
$form->addElement('static', null, null, get_lang('TargetFac'));
// Other form's elements...
//...
// Course code.
$form->add_textfield('wanted_code', get_lang('Code'), false, array('size' => '$maxlength', 'maxlength' => $maxlength));
$form->applyFilter('wanted_code', 'html_filter');
$form->addRule('wanted_code', get_lang('Max'), 'maxlength', $maxlength);
// The teacher.
$titular = & $form->add_textfield('tutor_name', get_lang('Professor'), null, array('size' => '60', 'disabled' => 'disabled'));
//$form->applyFilter('tutor_name', 'html_filter');
// Description of the requested course.
$form->addElement('textarea', 'description', get_lang('Description'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addRule('description', get_lang('ThisFieldIsRequired'), 'required', '', '');
// Objectives of the requested course.
$form->addElement('textarea', 'objetives', get_lang('Objectives'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addRule('objetives', get_lang('ThisFieldIsRequired'), 'required', '', '');
// Target audience of the requested course.
$form->addElement('textarea', 'target_audience', get_lang('TargetAudience'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addRule('target_audience', get_lang('ThisFieldIsRequired'), 'required', '', '');
// Course language.
$form->addElement('select_language', 'course_language', get_lang('Ln'));
$form->applyFilter('select_language', 'html_filter');
// Submit buttons.
$submit_buttons[] = FormValidator::createElement('style_submit_button', 'save_button', get_lang('Save'), array('class' => 'save'));
$submit_buttons[] = FormValidator::createElement('style_submit_button', 'accept_button', get_lang('Accept'), array('class' => 'save', 'style' => 'background-image: url('.api_get_path(WEB_IMG_PATH).'action_accept.gif);'));
$submit_buttons[] = FormValidator::createElement('style_submit_button', 'reject_button', get_lang('Reject'), array('class' => 'save', 'style' => 'background-image: url('.api_get_path(WEB_IMG_PATH).'action_reject.gif);'));
$submit_buttons[] = FormValidator::createElement('style_submit_button', 'ask_info_button', get_lang('AskAdditionalInfo'), array('class' => 'save', 'style' => 'background-image: url('.api_get_path(WEB_IMG_PATH).'request_info.gif);'));
$form->addGroup($submit_buttons);
// Set the default values based on the corresponding database record.

@ -86,15 +86,18 @@ $form->addElement('text', 'title', get_lang('CourseName'), array('size' => '60',
$form->applyFilter('title', 'html_filter');
$form->addElement('static', null, null, get_lang('Ex'));
// Course category.
$categories_select = $form->addElement('select', 'category_code', get_lang('Fac'), array());
$form->applyFilter('category_code', 'html_filter');
CourseManager::select_and_sort_categories($categories_select);
$form->addElement('static', null, null, get_lang('TargetFac'));
// Course code.
$form->add_textfield('wanted_code', get_lang('Code'), false, array('size' => '$maxlength', 'maxlength' => $maxlength));
$form->applyFilter('wanted_code', 'html_filter');
$form->addRule('wanted_code', get_lang('Max'), 'maxlength', $maxlength);
// The teacher.
$titular = & $form->add_textfield('tutor_name', get_lang('Professor'), null, array('size' => '60', 'disabled' => 'disabled'));
$form->addElement('static', null, null, get_lang('ExplicationTrainers'));
//$form->applyFilter('tutor_name', 'html_filter');
@ -114,6 +117,7 @@ if ($course_validation_feature) {
$form->addRule('target_audience', get_lang('ThisFieldIsRequired'), 'required', '', '');
}
// Course language.
$form->addElement('select_language', 'course_language', get_lang('Ln'));
$form->applyFilter('select_language', 'html_filter');
@ -150,7 +154,10 @@ if ($course_validation_feature) {
}
// Submit button.
$form->addElement('style_submit_button', null, $course_validation_feature ? get_lang('CreateThisCourseRequest') : get_lang('CreateCourseArea'), 'class="add"');
// The progress bar of this form.
$form->add_progress_bar();
// Set default values.

@ -146,4 +146,6 @@ $CourseCreationFailed = "Курсът не е създаден поради по
$CourseRequestCreationFailed = "Заявката за нов курс не е създадена поради появила се грешка.";
$CourseRequestEdit = "Редактиране на заявка за нов курс";
$CourseRequestHasNotBeenFound = "Заявката за нов курс, до която искате достъп не е намерена или не съществува.";
$Accept = "Одобряване";
$Reject = "Отхвърляне";
?>

@ -146,4 +146,6 @@ $CourseCreationFailed = "The training has not been created due to internal error
$CourseRequestCreationFailed = "The training request has not been created due to internal error.";
$CourseRequestEdit = "Edit a training request";
$CourseRequestHasNotBeenFound = "The training request you wanted to access has not been found or it does not exist.";
$Accept = "Accept";
$Reject = "Reject";
?>
Loading…
Cancel
Save