From 067d1b4cab633ab49f562a923b7ff6f46a71e54a Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 2 Mar 2015 10:41:47 +0100 Subject: [PATCH] Fix DatePicker attributes. --- main/course_progress/thematic_advance.php | 3 +-- main/gradebook/lib/fe/linkaddeditform.class.php | 4 ---- main/inc/lib/formvalidator/FormValidator.class.php | 1 - main/mySpace/user_add.php | 2 +- main/newscorm/lp_add.php | 4 ++-- main/newscorm/lp_edit.php | 4 ++-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/main/course_progress/thematic_advance.php b/main/course_progress/thematic_advance.php index 79f1ee302f..8161b1d05e 100755 --- a/main/course_progress/thematic_advance.php +++ b/main/course_progress/thematic_advance.php @@ -47,7 +47,7 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') { $form->addElement('html', ''); if (isset($thematic_advance_data['attendance_id']) && $thematic_advance_data['attendance_id'] == 0) { @@ -99,7 +99,6 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') { } else { echo ''; } - } } diff --git a/main/gradebook/lib/fe/linkaddeditform.class.php b/main/gradebook/lib/fe/linkaddeditform.class.php index 6c7b189515..a39586ddc9 100755 --- a/main/gradebook/lib/fe/linkaddeditform.class.php +++ b/main/gradebook/lib/fe/linkaddeditform.class.php @@ -146,10 +146,6 @@ class LinkAddEditForm extends FormValidator } } - // ELEMENT: date - //$this->add_datepicker('date',get_lang('Date')); - //$defaults['date'] = ($form_type == self :: TYPE_EDIT ? $link->get_date() : time()); - // ELEMENT: description if ($link->needs_name_and_description()) { $this->addElement('textarea', 'description', get_lang('Description'), array ('rows' => '3','cols' => '34')); diff --git a/main/inc/lib/formvalidator/FormValidator.class.php b/main/inc/lib/formvalidator/FormValidator.class.php index 37636ee3e3..89fd569fff 100755 --- a/main/inc/lib/formvalidator/FormValidator.class.php +++ b/main/inc/lib/formvalidator/FormValidator.class.php @@ -390,7 +390,6 @@ EOT; $this->addRule(array($name_1, $name_2), get_lang('StartDateShouldBeBeforeEndDate'), 'date_compare', 'lte'); } - /** * Adds a progress bar to the form. * diff --git a/main/mySpace/user_add.php b/main/mySpace/user_add.php index 2ce74a61b0..e56fb2d104 100755 --- a/main/mySpace/user_add.php +++ b/main/mySpace/user_add.php @@ -169,7 +169,7 @@ $form->addGroup($group, 'mail', get_lang('SendMailToNewUser'), ' '); $form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0); $group = array (); $group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('On'), 1); -$group[] = $form->createElement('DatePicker', 'expiration_date', null, array('form_name' => $form->getAttribute('name'), 'onchange' => 'javascript: enable_expiration_date();')); +$group[] = $form->createElement('DatePicker', 'expiration_date', null, array('onchange' => 'javascript: enable_expiration_date();')); $form->addGroup($group, 'max_member_group', null, '', false); // Active account or inactive account $form->addElement('radio', 'active', get_lang('ActiveAccount'), get_lang('Active'), 1); diff --git a/main/newscorm/lp_add.php b/main/newscorm/lp_add.php index e467f20e3c..766a8e94e9 100755 --- a/main/newscorm/lp_add.php +++ b/main/newscorm/lp_add.php @@ -132,13 +132,13 @@ $form -> addElement('html',''); diff --git a/main/newscorm/lp_edit.php b/main/newscorm/lp_edit.php index 2ff29b1fa2..17ab40e6f0 100755 --- a/main/newscorm/lp_edit.php +++ b/main/newscorm/lp_edit.php @@ -173,7 +173,7 @@ if ($publicated_on!='0000-00-00 00:00:00' && !empty($publicated_on)) { } $form->addElement('html','
'); -$form->addElement('DatePicker', 'publicated_on', get_lang('PublicationDate'), array('form_name'=>'form1'), 5); +$form->addElement('DatePicker', 'publicated_on', get_lang('PublicationDate')); $form->addElement('html','
'); //End date @@ -185,7 +185,7 @@ if ($expired_on!='0000-00-00 00:00:00' && !empty($expired_on)) { } $form->addElement('html','
'); -$form->addElement('DatePicker', 'expired_on', get_lang('ExpirationDate'), array('form_name'=>'exercise_admin'), 5); +$form->addElement('DatePicker', 'expired_on', get_lang('ExpirationDate')); $form->addElement('html','
'); if (api_is_platform_admin()) {