Add host part in *DropDownLists
This commit is contained in:
parent
c890ce5128
commit
4a2501e5ba
2 changed files with 6 additions and 5 deletions
1
app.js
1
app.js
|
@ -35,6 +35,7 @@ app.use(express.static(path.join(__dirname, 'public')));
|
|||
|
||||
app.use((req, res, next) => {
|
||||
res.locals.uonetplusUrl = "http://" + req.get('host').replace("uonetplus-opiekun", "uonetplus");
|
||||
res.locals.currentHost = "http://" + req.get('host');
|
||||
res.locals.mainHost = "http://" + req.get('host')
|
||||
.replace(/(cufs|uonetplus|uonetplus-opiekun|uonetplus-uzytkownik)\./, "");
|
||||
next();
|
||||
|
|
|
@ -53,11 +53,11 @@ prepend content
|
|||
li
|
||||
label(for="uczenDropDownList") Uczeń:
|
||||
select#uczenDropDownList(name="uczenDropDownList")
|
||||
option(selected="selected", value=opiekunRoot +"/Uczen/UczenOnChange?&id=420") Jurek Owczyk
|
||||
option(value=opiekunRoot +"/Uczen/UczenOnChange?&id=400") Joanna Czerwińska
|
||||
option(selected="selected", value=currentHost + opiekunRoot +"/Uczen/UczenOnChange?&id=420") Jurek Owczyk
|
||||
option(value=currentHost + opiekunRoot +"/Uczen/UczenOnChange?&id=400") Joanna Czerwińska
|
||||
li
|
||||
label(for="dziennikDropDownList") Dziennik:
|
||||
select#dziennikDropDownList(name="dziennikDropDownList")
|
||||
option(value=opiekunRoot + "/Dziennik/DziennikOnChange?&id=303") III 2017
|
||||
option(value=opiekunRoot + "/Dziennik/DziennikOnChange?&id=202") II 2016
|
||||
option(selected="selected", value=opiekunRoot + "/Dziennik/DziennikOnChange?&id=101") I 2015
|
||||
option(value=currentHost + opiekunRoot + "/Dziennik/DziennikOnChange?&id=303") III 2017
|
||||
option(value=currentHost + opiekunRoot + "/Dziennik/DziennikOnChange?&id=202") II 2016
|
||||
option(selected="selected", value=currentHost + opiekunRoot + "/Dziennik/DziennikOnChange?&id=101") I 2015
|
||||
|
|
Loading…
Reference in a new issue