Comments (9)
Sweet, thanks. That got the close working. I might put all the changes into a pull request later but not sure how you want to handle bootstrap 4/5 compatibility for older projects. For any other users coming across this, the fixes so far are:
- Find+replace the following in all code:
find | replace |
---|---|
data-toggle | data-bs-toggle |
data-target | data-bs-target |
data-dismiss | data-bs-dismiss |
- At the bottom of Users.cshtml and Roles.cshtml are two large inline scripts that define some table actions. At the top of that script block in Users.cshtml add
var userModal = new bootstrap.Modal(document.getElementById('userModal'));
var editModal = new bootstrap.Modal(document.getElementById('editModal'));
var pwdModal = new bootstrap.Modal(document.getElementById('pwdModal'));
- Search down for references to
.modal()
. Replace them with either.show()
or.hide()
on the objects you just created above. E.g.userModal.show();
in theNew
button - Repeat in Roles.cshtml for the two modal types there
The only remaining issue seems to be that claims are showing as undefined in the edit dialogue (e.g. the initial Name claim), but show fine in the table.
from identitymanagerui.
Someone asked to see the changes fully apply so I've extracted out an example template here: https://github.com/GSGBen/IdentityManagerUI-NetCore6-Template.
from identitymanagerui.
And the fix for that is changing value.Key
to value.key
and value.Value
to value.value
in Users.cshtml.
from identitymanagerui.
Just in case somebody prefers this one over your new Blazor Project. The Undefined issue happens as well on Role Claims. Same solution as for User Claims.
Changing value.Key
to value.key
and value.Value
to value.value
in Roles.cshtml.
from identitymanagerui.
It might be related to Bootstrap version, the new web template is probably using Bootstrap 5 versus Bootstrap 4 in this project.
Update: It looks like the attributes data-toggle
& data-target
need to be changed to data-bs-toggle
& data-bs-target
.
from identitymanagerui.
Still no luck after that unfortunately. Testing further it seems that $('#userModal').modal({ backdrop: 'static' });
works to show the modal in asp .net core 5 (Bootstrap 4) but doesn't work in asp.net core 6 (bootstrap 5).
from identitymanagerui.
Looks like I can get it to show with
var userModal = new bootstrap.Modal(document.getElementById('userModal'));
userModal.toggle();
The submit button works to submit, but neither it or the X button close the modal.
from identitymanagerui.
Yeah, looks like you need data-bs-dismiss
instead of data-dismiss
, see Migrating to v5 for required changes.
from identitymanagerui.
Thanks for outlining these changes, I've linked to this issue in README.
from identitymanagerui.
Related Issues (16)
- Create Regional-Groups in a Role, how to attach a claims to a roles HOT 6
- Upgrade to .Net5.0 HOT 1
- ASP core 6 update build help HOT 1
- Login Audits / has tenant HOT 1
- edit btn not work HOT 2
- Users.cshtml has ajax error and doesn't load any data HOT 3
- Edit User modal form will not load when a role contains a space HOT 2
- Modals don't open HOT 1
- Add-Migration generates duplicated foreign keys for Users and Roles related tables HOT 3
- Question Circular References HOT 2
- NuGet package HOT 4
- Helper for a mix of claim and role checks HOT 2
- .Net Core 6 & universal HOT 2
- Cross verify which pages are missing authorization through reflection HOT 2
- Apparent missing _Layout and associated files HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identitymanagerui.