More UI fixes replacing <form> tags with Formvalidator

skala
Julio Montoya 13 years ago
parent 47dfa8fa21
commit 3b6a1100e7
  1. 2
      main/exercice/overview.php
  2. 19
      main/exercice/qti2.php
  3. 6
      main/inc/lib/userportal.lib.php
  4. 4
      main/template/default/auth/courses_categories.php
  5. 22
      main/template/default/layout/hot_courses.tpl

@ -70,7 +70,7 @@ if ($is_allowed_to_edit ) {
}
//Exercise name
$html .= Display::tag('h1', $objExercise->name .' '.$edit_link);
$html .= Display::page_header( $objExercise->name .' '.$edit_link);
//Exercise description
$html .= Display::div($objExercise->description, array('class'=>'exercise_description'));

@ -41,19 +41,12 @@ function ch_qti2_display_form() {
$form = '<div class="actions">';
$form .= '<a href="exercice.php?show=test">' . Display :: return_icon('back.png', get_lang('BackToExercisesList'),'',ICON_SIZE_MEDIUM).'</a>';
$form .= '</div>';
$form .= '<form action='.api_get_self()."?".api_get_cidreq().' method="post" enctype="multipart/form-data">';
$form .= '<div class="row"><div class="form_header">'.$name_tools.'</div></div>';
$form .= '<div class="row">';
$form .= '<div class="label" style="padding:10px">';
$form .= '<span class="form_required">*</span>';
$form .= get_lang('DownloadFile').' :';
$form .= '</div>';
$form .= '<div class="formw">';
$form .= '<div style="padding:10px">
<input type="file" name="userFile"><br /><br />
<button type="submit" class="upload" name="submit" value="'.get_lang('Send').'">'.get_lang('SendFile').'</button>
</div>';
$form .= '</div></div>';
$form_validator = new FormValidator('qti_upload', 'post',api_get_self()."?".api_get_cidreq(), null, array('enctype' => 'multipart/form-data') );
$form_validator->addElement('header', $name_tools);
$form_validator->addElement('file', 'userFile', get_lang('DownloadFile'));
$form_validator->addElement('style_submit_button', 'submit', get_lang('Send'), 'class="upload"');
$form .= $form_validator->return_form();
echo $form;
}

@ -836,8 +836,8 @@ class IndexManager {
if (api_get_setting('allow_social_tool') == 'true') {
$link = '?f=social';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'" class="message-body">'.get_lang('Inbox').$cant_msg.' </a></li>';
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'" class="message-body">'.get_lang('Compose').' </a></li>';
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.get_lang('Inbox').$cant_msg.' </a></li>';
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.get_lang('Compose').' </a></li>';
if (api_get_setting('allow_social_tool') == 'true') {
if ($total_invitations == 0) {
@ -845,7 +845,7 @@ class IndexManager {
} else {
$total_invitations = ' ('.$total_invitations.')';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php" class="message-body">'.get_lang('PendingInvitations').' '.$total_invitations.' </a></li>';
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.get_lang('PendingInvitations').' '.$total_invitations.' </a></li>';
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.get_lang('EditProfile').'</a></li>';
$profile_content .= '</ul>';

@ -167,11 +167,11 @@ $stok = Security::get_token();
if (!in_array($course['code'], $user_coursecodes)) {
if ($course['subscribe'] == SUBSCRIBE_ALLOWED) {
echo '<div class="course-link-desc right">
<a class="a_button gray small" href="'. api_get_self().'?action=subscribe_course&amp;sec_token='.$stok.'&amp;subscribe_course='.$course['code'].'&amp;search_term='.$search_term.'&amp;category_code='.$code.'">'.get_lang('Subscribe').'</a></div>';
<a class="btn btn-primary" href="'. api_get_self().'?action=subscribe_course&amp;sec_token='.$stok.'&amp;subscribe_course='.$course['code'].'&amp;search_term='.$search_term.'&amp;category_code='.$code.'">'.get_lang('Subscribe').'</a></div>';
}
}
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
echo '<div class="course-link-desc right"><a class="ajax a_button white small" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&amp;code='.$course['code'].'" title="'.$icon_title.'" class="thickbox">'.get_lang('Description').'</a></div>';
echo '<div class="course-link-desc right"><a class="ajax btn" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&amp;code='.$course['code'].'" title="'.$icon_title.'" class="thickbox">'.get_lang('Description').'</a></div>';
}
echo '</div>';
echo '</div>';

@ -45,22 +45,26 @@
</div>
<div class="categories-course-links">
{* World *}
{if ($hot_course.extra_info.visibility == 3)}
<div class="course-link-desc right">
<a class="btn btn-primary" title="" href="{$_p.web_course}{$hot_course.extra_info.path}/index.php">
{"GoToCourse"|get_lang}
</a>
</div>
{/if}
{* Description *}
<div class="course-link-desc right">
{if ($hot_course.extra_info.visibility == 3)}
<a class="ajax a_button white small" title="" href="{$_p.web_ajax}course_home.ajax.php?a=show_course_information&code={$hot_course.course_code}">
<a class="ajax btn" title="" href="{$_p.web_ajax}course_home.ajax.php?a=show_course_information&code={$hot_course.course_code}">
{"Description"|get_lang}
</a>
{/if}
</div>
{* World *}
{if ($hot_course.extra_info.visibility == 3)}
<div class="course-link-desc right">
<a class="a_button gray small" title="" href="{$_p.web_course}{$hot_course.extra_info.path}/index.php">
{"GoToCourse"|get_lang}
</a>
</div>
{/if}
</div>
</div>
</div>

Loading…
Cancel
Save