|
46 | 46 | <link rel="icon" type="image/vnd.microsoft.icon"
|
47 | 47 | href="/images/skin/erda-user-friendly/favicon.ico"/>
|
48 | 48 |
|
| 49 | + <!-- site-specific variables used to adjust displayed information --> |
| 50 | + <script type="text/javascript" src="/images/site-conf.js"></script> |
| 51 | + |
49 | 52 | <script type="text/javascript" src="/assets/vendor/jquery/js/jquery.js"></script>
|
50 | 53 | <script type="text/javascript" src="/assets/vendor/jquery-ui/js/jquery-ui.js"></script>
|
51 | 54 | <script type="text/javascript" src="/images/lib/country-dropdown/js/msdropdown/jquery.dd.min.js"></script>
|
|
69 | 72 | /* We assume UCPH users here and leave external users to FAQ entry */
|
70 | 73 | function login(user) {
|
71 | 74 | if (user == "extoid") {
|
72 |
| - window.open('https://ui.erda.dk', '_blank'); |
73 |
| - } else if (user == "cert") { |
| 75 | + window.open('https://ui-oid.erda.dk', '_blank'); |
| 76 | + } else if (user == "extoidc") { |
| 77 | + window.open('https://ui-oidc.erda.dk', '_blank'); |
| 78 | + } else if (user == "extcert") { |
74 | 79 | window.open('https://ui-cert.erda.dk', '_blank');
|
75 | 80 | } else if (user == "migoid") {
|
76 | 81 | window.open('https://ui-ext.erda.dk', '_blank');
|
| 82 | + } else if (user == "migcert") { |
| 83 | + window.open('https://ui-cert.erda.dk', '_blank'); |
77 | 84 | } else {
|
78 |
| - window.open('https://ui-sid.erda.dk/cgi-sid/login.py', '_blank'); |
| 85 | + window.open('https://ui-sid.erda.dk/cgi-sid/login.py', |
| 86 | + '_blank'); |
79 | 87 | }
|
80 | 88 | }
|
81 | 89 | function signup(user) {
|
82 | 90 | if (user == "extoid") {
|
83 |
| - window.open('https://ui-sid.erda.dk/cgi-sid/signup.py?show=kitoid', |
| 91 | + window.open('https://ui-oid.erda.dk/wsgi-bin/autocreate.py', |
| 92 | + '_blank'); |
| 93 | + } else if (user == "extoidc") { |
| 94 | + window.open('https://ui-oidc.erda.dk/wsgi-bin/autocreate.py', |
84 | 95 | '_blank');
|
85 |
| - } else if (user == "cert") { |
86 |
| - window.open('https://ui-sid.erda.dk/cgi-sid/signup.py?show=extcert', |
| 96 | + } else if (user == "extcert") { |
| 97 | + window.open('https://ui-cert.erda.dk/wsgi-bin/extcert.py', |
87 | 98 | '_blank');
|
88 | 99 | } else if (user == "migoid") {
|
89 |
| - window.open('https://ui-sid.erda.dk/cgi-sid/reqoid.py', '_blank'); |
| 100 | + window.open('https://ui-sid.erda.dk/cgi-sid/reqoid.py', |
| 101 | + '_blank'); |
| 102 | + } else if (user == "migcert") { |
| 103 | + window.open('https://ui-cert.erda.dk/cgi-sid/reqcert.py', |
| 104 | + '_blank'); |
90 | 105 | } else {
|
91 |
| - window.open('https://ui-sid.erda.dk/cgi-sid/signup.py', '_blank'); |
| 106 | + window.open('https://ui-sid.erda.dk/cgi-sid/signup.py', |
| 107 | + '_blank'); |
92 | 108 | }
|
93 | 109 | }
|
94 | 110 |
|
|
104 | 120 | supported_languages.push($(this).val());
|
105 | 121 | }
|
106 | 122 | });
|
107 |
| - console.log("found supported langs: "+supported_languages); |
| 123 | + //console.debug("found supported langs: "+supported_languages); |
108 | 124 | if (locale && supported_languages.indexOf(locale) >= 0) {
|
109 | 125 | user_lang = locale;
|
110 | 126 | } else {
|
111 |
| - console.log(locale+" not supported - fall back to: "+default_lang); |
| 127 | + console.warn(locale+" not supported - fall back to: "+default_lang); |
112 | 128 | user_lang = default_lang;
|
113 | 129 | }
|
114 | 130 |
|
|
154 | 170 | $("#langselect").val(user_lang);
|
155 | 171 | switch_language(user_lang);
|
156 | 172 | $("#langselect").msDropdown().fadeIn(500);
|
| 173 | + |
| 174 | + var auth_methods = lookup_site_conf('auth_methods', ['extoid', 'migoid', 'extcert']); |
| 175 | + var query = window.location.search; |
| 176 | + const urlParams = new URLSearchParams(query); |
| 177 | + var show = []; |
| 178 | + var quicktabs = ['extoid', 'extoidc', 'migoid', 'extcert']; |
| 179 | + urlParams.forEach((value, key) => { |
| 180 | + //console.log("Found "+value+" in "+key); |
| 181 | + if (quicktabs.indexOf(value) >= 0) { |
| 182 | + show.push(value); |
| 183 | + } |
| 184 | + }); |
| 185 | + if (!urlParams.get('show')) { |
| 186 | + if (auth_methods.length > 0) { |
| 187 | + //console.log("show auth_methods: " + auth_methods); |
| 188 | + show = auth_methods; |
| 189 | + } else { |
| 190 | + //console.log("show quicktabs: " + quicktabs); |
| 191 | + show = quicktabs; |
| 192 | + } |
| 193 | + } else { |
| 194 | + //console.log("show urlparams: " + show); |
| 195 | + } |
157 | 196 | });
|
158 | 197 | </script>
|
159 | 198 |
|
@@ -249,13 +288,9 @@ <h3>Site Status</h3>
|
249 | 288 | <div class="col-12 align-self-center">
|
250 | 289 | <h1>Keep everything organized with ERDA</h1>
|
251 | 290 | <p class="sub-title">ERDA - Electronic Research Data Archive is a storage, sharing and archiving facility provided by University of Copenhagen to employees and students.</p>
|
252 |
| - <button style="color: #fff; background-color: #46743C; border-radius: 30px; width: 120px; height: 40px;" value="log in" onClick="login('extoid');">Log in</button> |
| 291 | + <button style="color: #fff; background-color: #46743C; border-radius: 30px; width: 120px; height: 40px;" value="log in" onClick="login('extoidc');">Log in</button> |
253 | 292 | <div id="signupform" class="hidden">
|
254 |
| - <form method='post' action='https://ui.erda.dk/wsgi-bin/autocreate.py'> |
255 |
| - <!-- IMPORTANT: openid.ku.dk fails if we change these to https --> |
256 |
| - <input type='hidden' name='openid.ns' value='http://specs.openid.net/auth/2.0' /> |
257 |
| - <input type='hidden' name='openid.ns.sreg' value='http://openid.net/extensions/sreg/1.1' /> |
258 |
| - <input type='hidden' name='openid.sreg.required' value='nickname,fullname,email,o,ou,country,state,role' /> |
| 293 | + <form method='post' action='https://ui-oidc.erda.dk/wsgi-bin/autocreate.py'> |
259 | 294 | <input class="signupbutton" type="submit" value="sign up" />
|
260 | 295 |
|
261 | 296 | </form>
|
|
0 commit comments