Repository: openwisp/openwisp-controller (language: python)

Issue:
[bug] Popup never closes
When I create a new connection credentials successfully, the popup never closes it gets stuck on "Closing Popup..."
Steps to reproduce:

1. Go to a device configuration change page and switch to the connections tab.
2. Press `+` to create a new connection
3. Fill correct details to fill the credential
4. Hit save and notice while credentials are saved, popup remains open. 
[bug] Popup never closes
When I create a new connection credentials successfully, the popup never closes it gets stuck on "Closing Popup..."
Steps to reproduce:

1. Go to a device configuration change page and switch to the connections tab.
2. Press `+` to create a new connection
3. Fill correct details to fill the credential
4. Hit save and notice while credentials are saved, popup remains open. 


Discussion / hints:
I would like to work on this.
Hey @yashikajotwani12 ,

Feel free to pick it, no assignment or permission required! :smile:
Is this issue still open, can I work on this issue?
> Is this issue still open, can I work on this issue?

Hey @saieswar13, I am working on this, can you take another issue, thanks.
Before: 
![Recording 2022-02-15 at 18 20 25](https://user-images.githubusercontent.com/77020164/154065885-4f554d27-a8c0-447e-baff-ec04601f6794.gif)

After:
![Recording 2022-02-15 at 18 25 54](https://user-images.githubusercontent.com/77020164/154066689-08701ec9-8f2f-4b4b-b1f5-58b7ba91fddb.gif)

Hello! I have made changes in virtual env's file widget.js 
```
 // var name = windowname_to_id(win.name);
                var elem = $('#' + win.name);
```
so like how I should change it actually to make it work like this?

![Screenshot from 2022-02-15 18-43-43](https://user-images.githubusercontent.com/77020164/154069389-a14080da-14a9-461a-b20c-84a09f1cba2e.png)


Thank you @yashikajotwani12 for debugging this. This issue has been fixed in the [latest version of django-sortedm2m library](https://github.com/jazzband/django-sortedm2m/releases/tag/3.1.1). We only need to update the dependency version here. 
I would like to work on this.
Hey @yashikajotwani12 ,

Feel free to pick it, no assignment or permission required! :smile:
Is this issue still open, can I work on this issue?
> Is this issue still open, can I work on this issue?

Hey @saieswar13, I am working on this, can you take another issue, thanks.
Before: 
![Recording 2022-02-15 at 18 20 25](https://user-images.githubusercontent.com/77020164/154065885-4f554d27-a8c0-447e-baff-ec04601f6794.gif)

After:
![Recording 2022-02-15 at 18 25 54](https://user-images.githubusercontent.com/77020164/154066689-08701ec9-8f2f-4b4b-b1f5-58b7ba91fddb.gif)

Hello! I have made changes in virtual env's file widget.js 
```
 // var name = windowname_to_id(win.name);
                var elem = $('#' + win.name);
```
so like how I should change it actually to make it work like this?

![Screenshot from 2022-02-15 18-43-43](https://user-images.githubusercontent.com/77020164/154069389-a14080da-14a9-461a-b20c-84a09f1cba2e.png)


Thank you @yashikajotwani12 for debugging this. This issue has been fixed in the [latest version of django-sortedm2m library](https://github.com/jazzband/django-sortedm2m/releases/tag/3.1.1). We only need to update the dependency version here. 

Fix patch:
diff --git a/requirements.txt b/requirements.txt
index 4152867fc..fb99a4fa0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
-django-sortedm2m>=3.0.0,<3.1.0
+django-sortedm2m~=3.1.1
 django-reversion~=4.0.1
 django-x509 @ https://github.com/openwisp/django-x509/tarball/master
-django-taggit @ https://github.com/jazzband/django-taggit/tarball/d0833966d357ed1e1b9b1f40c39c1ed99affbf9b
+django-taggit~=2.1.0
 # TODO: change this when next point version of django-loci is released
 django-loci @ https://github.com/openwisp/django-loci/tarball/master
 django-flat-json-widget~=0.1.3
@@ -17,7 +17,7 @@ openwisp-notifications @ https://github.com/openwisp/openwisp-notifications/tarb
 openwisp-ipam @ https://github.com/openwisp/openwisp-ipam/tarball/master
 djangorestframework-gis~=0.18.0
 paramiko[ed25519]~=2.7.2
-scp>=0.13.0,<0.14.0
+scp~=0.14.2
 celery~=5.2.3
 django-cache-memoize~=0.1
 shortuuid~=1.0.1


Test patch:
diff --git a/requirements-test.txt b/requirements-test.txt
index 2a20b07a0..4b912a39e 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -1,12 +1,11 @@
 pytest~=6.0
-pytest-django>=3.8.0,<4.0.0
+pytest-django~=4.5.2
 pytest-asyncio~=0.14.0
 pytest-cov~=2.10.0
 openwisp-utils[qa] @ https://github.com/openwisp/openwisp-utils/tarball/master
-coverage<6.0
-redis>=3.4.1,<4.0.0
+redis~=4.1.2
 channels_redis~=3.2.0
 django_redis~=4.12
-mock-ssh-server>=0.8.0,<0.9.0
+mock-ssh-server~=0.9.1
 responses~=0.12.1
 selenium~=3.141.0