Skip to content
Snippets Groups Projects
Commit e0e017ce authored by Alice Poggioli's avatar Alice Poggioli
Browse files

fix pb on indentation

parent f77f1940
No related branches found
No related tags found
1 merge request!151Bug/#140
Pipeline #5445 failed
...@@ -225,21 +225,20 @@ function InitManagementForType() { ...@@ -225,21 +225,20 @@ function InitManagementForType() {
let type_hidden_field = form.querySelectorAll('select[name="type"]'); let type_hidden_field = form.querySelectorAll('select[name="type"]');
type_hidden_field.forEach(function(select_hidden) { type_hidden_field.forEach(function(select_hidden) {
options_hidden = select_hidden.getElementsByTagName("option"); options_hidden = select_hidden.getElementsByTagName("option");
for (let option_hidden of options_hidden) { for (let option_hidden of options_hidden) {
option_hidden.removeAttribute("selected"); option_hidden.removeAttribute("selected");
str = option_hidden.value str = option_hidden.value
if (str.substr(str.length - 10) == 'types/1/"}') { if (str.substr(str.length - 10) == 'types/1/"}') {
//Actually selecting the option if it is the good one
//Actually selecting the option if it is the good one option_hidden.setAttribute("selected", "selected");
option_hidden.setAttribute("selected", "selected"); select_hidden.setAttribute("value", option_hidden.value);
select_hidden.setAttribute("value", option_hidden.value); }
} }
} //Trigerring a reload of the associated form
//Trigerring a reload of the associated form let parent_form = select_hidden.closest("sib-form");
let parent_form = select_hidden.closest("sib-form"); parent_form.component.inputChange();
parent_form.component.inputChange(); refreshPagination();
refreshPagination();
}); });
}); });
}, },
...@@ -360,14 +359,12 @@ function manageSelectLanguage() { ...@@ -360,14 +359,12 @@ function manageSelectLanguage() {
if (uriLanguage.substr(uriLanguage.length - 14) == 'languages/1/"}') { if (uriLanguage.substr(uriLanguage.length - 14) == 'languages/1/"}') {
//Redirection with the appropriate prefixe. //Redirection with the appropriate prefixe.
var redirect = "http://"+base_url+'/fr/'+pathAfterThePrefix var redirect = "http://"+base_url+'/fr/'+pathAfterThePrefix
document.location.href = redirect document.location.href = redirect
} else { }
else {
var redirect = "http://"+base_url+'/en/'+pathAfterThePrefix var redirect = "http://"+base_url+'/en/'+pathAfterThePrefix
document.location.href = redirect document.location.href = redirect
} }
}) })
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment