276 "{0}://{1}".format(url.scheme(), url.authority()) |
276 "{0}://{1}".format(url.scheme(), url.authority()) |
277 ) |
277 ) |
278 realm = auth.realm() |
278 realm = auth.realm() |
279 if not realm and 'realm' in auth.options(): |
279 if not realm and 'realm' in auth.options(): |
280 realm = auth.option("realm") |
280 realm = auth.option("realm") |
281 if realm: |
281 info = ( |
282 info = self.tr( |
282 self.tr("<b>Enter username and password for '{0}', realm '{1}'</b>" |
283 "<b>Enter username and password for '{0}', realm '{1}'</b>" |
283 ).format(urlRoot, realm) |
284 ).format(urlRoot, realm) |
284 if realm else |
285 else: |
285 self.tr("<b>Enter username and password for '{0}'</b>" |
286 info = self.tr( |
286 ).format(urlRoot) |
287 "<b>Enter username and password for '{0}'</b>" |
287 ) |
288 ).format(urlRoot) |
|
289 |
288 |
290 from UI.AuthenticationDialog import AuthenticationDialog |
289 from UI.AuthenticationDialog import AuthenticationDialog |
291 import WebBrowser.WebBrowserWindow |
290 import WebBrowser.WebBrowserWindow |
292 |
291 |
293 dlg = AuthenticationDialog(info, auth.user(), |
292 dlg = AuthenticationDialog(info, auth.user(), |