Fixing HTML code.

1.10.x
Julio Montoya 12 years ago
parent 3ce2029f24
commit 3657200151
  1. 33
      main/admin/course_edit.php
  2. 14
      main/course_home/activity.php

@ -110,26 +110,17 @@ $group=array();
$group[] = $form->createElement('select', 'platform_teachers', '', $teachers, ' id="platform_teachers" multiple=multiple size="4" style="width:300px;"'); $group[] = $form->createElement('select', 'platform_teachers', '', $teachers, ' id="platform_teachers" multiple=multiple size="4" style="width:300px;"');
$group[] = $form->createElement('select', 'course_teachers', '', $course_teachers, ' id="course_teachers" multiple=multiple size="4" style="width:300px;"'); $group[] = $form->createElement('select', 'course_teachers', '', $course_teachers, ' id="course_teachers" multiple=multiple size="4" style="width:300px;"');
$element_template = <<<EOT $multiSelectTemplate = $form->getDoubleMultipleSelectTemplate();
<div class="control-group">
<label>
<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
</label>
<div class="controls">
<table cellpadding="0" cellspacing="0">
<tr>
<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> <td>{element}</td>
</tr>
</table>
</div>
</div>
EOT;
$renderer = $form->defaultRenderer(); $renderer = $form->defaultRenderer();
$renderer -> setElementTemplate($element_template, 'group'); $renderer->setElementTemplate($multiSelectTemplate, 'group');
$form -> addGroup($group,'group',get_lang('CourseTeachers'),'</td><td width="80" align="center">'. $form->addGroup(
'<input class="arrowr" style="width:30px;height:30px;padding-right:12px" type="button" onclick="moveItem(document.getElementById(\'platform_teachers\'), document.getElementById(\'course_teachers\'))" ><br><br>' . $group,
'<input class="arrowl" style="width:30px;height:30px;padding-left:13px" type="button" onclick="moveItem(document.getElementById(\'course_teachers\'), document.getElementById(\'platform_teachers\'))" ></td><td>'); 'group',
get_lang('CourseTeachers'),
'</td><td width="80" align="center">'.
'<input class="arrowr" style="width:30px;height:30px;padding-right:12px" type="button" onclick="moveItem(document.getElementById(\'platform_teachers\'), document.getElementById(\'course_teachers\'))" ><br><br>' .
'<input class="arrowl" style="width:30px;height:30px;padding-left:13px" type="button" onclick="moveItem(document.getElementById(\'course_teachers\'), document.getElementById(\'platform_teachers\'))" ></td><td>'
);
$categories_select = $form->addElement('select', 'category_code', get_lang('CourseFaculty'), array() , array('style'=>'width:350px','id'=>'category_code_id', 'class'=>'chzn-select')); $categories_select = $form->addElement('select', 'category_code', get_lang('CourseFaculty'), array() , array('style'=>'width:350px','id'=>'category_code_id', 'class'=>'chzn-select'));
@ -144,7 +135,6 @@ $form->add_textfield( 'department_url', get_lang('CourseDepartmentURL'),false, a
$form->applyFilter('department_url','html_filter'); $form->applyFilter('department_url','html_filter');
$form->applyFilter('department_url','trim'); $form->applyFilter('department_url','trim');
$form->addElement('select_language', 'course_language', get_lang('CourseLanguage')); $form->addElement('select_language', 'course_language', get_lang('CourseLanguage'));
$form->applyFilter('select_language','html_filter'); $form->applyFilter('select_language','html_filter');
@ -235,8 +225,7 @@ function valide() {
document.update_course.submit(); document.update_course.submit();
} }
</script>"; </script>";
//api_display_tool_title($tool_name);
// Display the form // Display the form
$form->display(); $form->display();
/* FOOTER */
Display :: display_footer(); Display :: display_footer();

@ -114,13 +114,11 @@ if ($session_id == 0 && api_is_course_admin() && api_is_allowed_to_edit(null, tr
} }
} }
function return_block($title, $content) { function return_block($title, $content)
global $app; {
$rowDiv = '<div class="row">'; $html = '<div class="page-header">
if ($app['full_width']) { <h3>'.$title.'</h3>
$rowDiv = '<div class="row-fluid">'; </div>
} '.$content.'</div>';
$html = $rowDiv.'<div class="span12">
<div class="page-header"><h3>'.$title.'</h3></div></div></div>'.$rowDiv.$content.'</div>';
return $html; return $html;
} }

Loading…
Cancel
Save