mirror of
https://github.com/sartography/protocol-builder-mock.git
synced 2025-01-12 08:44:46 +00:00
Merge pull request #41 from sartography/user-lookup-fix
fix for user lookup stuff.
This commit is contained in:
commit
8a009522c2
@ -52,7 +52,7 @@ $(document).ready(function () {
|
||||
function SearchLDAP(event) {
|
||||
|
||||
let current_val = $('#NETBADGEID').val();
|
||||
let url = {{ base_href }} + "/search_ldap/" + current_val;
|
||||
let url = "{{base_href}}/search_ldap/" + current_val;
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
|
@ -59,9 +59,9 @@
|
||||
function selectStudies() {
|
||||
let uva_id = document.getElementById('uva_id').value;
|
||||
if (uva_id == 'all') {
|
||||
window.location.href = '/'
|
||||
window.location.href = "{{base_href}}/";
|
||||
} else {
|
||||
window.location.href = "/user_studies/" + uva_id;
|
||||
window.location.href = "{{base_href}}/user_studies/" + uva_id;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -152,12 +152,12 @@ class Sanity_Check_Test(unittest.TestCase):
|
||||
self.assertEqual('308 PERMANENT REDIRECT', studies1.status)
|
||||
for header in studies1.headers:
|
||||
if header[0] == 'Location':
|
||||
self.assertEqual('http://localhost/user_studies/', header[1])
|
||||
self.assertIn('user_studies', header[1])
|
||||
studies2 = self.app.get(f'/user_studies/')
|
||||
self.assertEqual('302 FOUND', studies2.status)
|
||||
for header in studies2.headers:
|
||||
if header[0] == 'Location':
|
||||
self.assertEqual('http://localhost/', header[1])
|
||||
self.assertNotIn('user_studies', header[1])
|
||||
|
||||
def test_long_study_name(self):
|
||||
title = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla egestas quam id ullamcorper facilisis. Praesent ultricies urna malesuada velit ultricies efficitur. Nam eu eleifend libero. Mauris ac erat augue. Curabitur ac fringilla tellus. Morbi sem quam, consectetur sit amet eros non, semper congue metus. Sed sollicitudin augue eu justo fermentum volutpat at sit amet metus. Vestibulum hendrerit pharetra ante. Sed porttitor diam nibh, quis elementum est placerat sit amet. Phasellus magna libero, porta quis euismod et, commodo eu nisl. Quisque consectetur sagittis interdum. Nullam congue consectetur elementum. In hac habitasse platea dictumst. Duis placerat iaculis odio, ac faucibus felis vehicula nec. Praesent cursus id turpis ac maximus.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user