Minor UI changes see BT#10849

ofaj
jmontoyaa 9 years ago
parent 81d94453f0
commit 367e79297a
  1. 15
      search.php
  2. 4
      user_portal.php

@ -136,12 +136,13 @@ $(document).ready(function() {
contentType: "application/x-www-form-urlencoded",
type: "GET",
url: "'.api_get_path(WEB_AJAX_PATH).'extra_field.ajax.php?a=search_options_from_tags&type=session&from=extra_domaine&search="+themeDefault+"&options="+domainListToString,
success: function(data) {
success: function(data) {
var selectToString = "";
selectToString += "<option></option>";
jQuery.each(JSON.parse(data), function(i, item) {
selectToString += "<optgroup label=\'"+item.text+"\'>";
jQuery.each(item.children, function(j, data) {
selectToString += "<optgroup label=\'"+item.text+"\'>";
// Add empty value
jQuery.each(item.children, function(j, data) {
if (data.text != "") {
selectToString += "<option value=\'"+data.text+"\'> " +data.text+"</option>"
}
@ -150,10 +151,12 @@ $(document).ready(function() {
});
for (i = 0; i <= 5; i++) {
var themeId = "#"+themeDefault+"_"+i;
var themeId = "#"+themeDefault+"_"+i;
var beforeValue = $(themeId).find(":selected").val()
$(themeId).find("option").remove().end();
$(themeId).empty();
$(themeId).html(selectToString);
$(themeId).html(selectToString);
$(themeId).val(beforeValue);
$(themeId).selectpicker("refresh");
}
}

@ -248,7 +248,9 @@ if (api_is_student()) {
'diagnosis_completed'
);
if ($diagnosisComplete === false) {
if ($diagnosisComplete === false ||
is_array($diagnosisComplete) && empty($diagnosisComplete['value'])
) {
$url = api_get_path(WEB_PATH).'search.php';
$link = Display::url($url, $url);
Display::addFlash(

Loading…
Cancel
Save