diff --git a/main/course_progress/index.php b/main/course_progress/index.php
old mode 100755
new mode 100644
index fc7f22f42c..0bf0c94be5
--- a/main/course_progress/index.php
+++ b/main/course_progress/index.php
@@ -168,7 +168,10 @@ function datetime_by_attendance(selected_value) {
url: "'.api_get_path(WEB_AJAX_PATH).'thematic.ajax.php?a=get_datetime_by_attendance",
data: "attendance_id="+selected_value+"&thematic_advance_id='.$thematic_id.'",
success: function(datos) {
- $("#div_datetime_attendance").html(datos);
+ $("#div_datetime_attendance").html(datos);
+ $("#start_date_select_calendar").val($("#start_date_select_calendar option:first").val());
+ // $("#duration_in_hours_element").focus();
+
}
});
}
diff --git a/main/course_progress/thematic_advance.php b/main/course_progress/thematic_advance.php
old mode 100755
new mode 100644
index ccc2be741f..02dcef0be2
--- a/main/course_progress/thematic_advance.php
+++ b/main/course_progress/thematic_advance.php
@@ -56,7 +56,8 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$form->addElement('html', '
');
}
- if (count($attendance_select) > 1) {
+ if (count($attendance_select) > 1) {
+
$form->addElement('select', 'attendance_select', get_lang('Attendances'), $attendance_select, array('id' => 'id_attendance_select', 'onchange' => 'datetime_by_attendance(this.value)'));
} else {
$form->addElement('html', '
'.get_lang('Attendances').'
'.get_lang('ThereAreNoAttendancesInsideCourse').'
');
@@ -64,13 +65,13 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$form->addElement('html', '
');
if (!empty($calendar_select)) {
- $form->addElement('select', 'start_date_by_attendance', get_lang('StartDate'), $calendar_select);
+ $form->addElement('select', 'start_date_by_attendance', get_lang('StartDate'), $calendar_select, array('id'=>'start_date_select_calendar'));
}
$form->addElement('html', '
');
$form->addElement('html', '
');
- $form->add_textfield('duration_in_hours', get_lang('DurationInHours'), false, array('size'=>'3'));
+ $form->add_textfield('duration_in_hours', get_lang('DurationInHours'), false, array('size'=>'3','id'=>'duration_in_hours_element'));
$form->add_html_editor('content', get_lang('Content'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
//$form->addElement('textarea', 'content', get_lang('Content'));
@@ -83,6 +84,22 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$form->addElement('style_submit_button', null, get_lang('Save'), 'id="update_button" class="save"');
}
//$form->addElement('html', '