7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Editing a Member in DataObjectManager
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1418 Views |
-
Editing a Member in DataObjectManager

1 October 2009 at 6:24am
I use DataObjectManger to edit Members. This works well except for one thing. In the editor popup I see both the fields for setting/changing the password and the link that says "Change Password". Normally the password fields would not be visible until that link is clicked. This will be confusing to the end users of the system I am creating.
-
Re: Editing a Member in DataObjectManager

1 October 2009 at 11:48pm
I also run into this problem the other day. The reason is a js (ConfirmedPasswordField.js) that does not work since prototype and behaviour is blocked. I noticed like you that the password fields was visible and that I could not change a members password. To fix this I rewrote the script to have the same functionality as the original but using jQuery (see below).
Blocking the original script and calling my version in the DataObjectManager_Popup class constructor fixed this.
Requirements::block(SAPPHIRE_DIR . "/javascript/ConfirmedPasswordField.js");
Requirements::javascript('dataobject_manager/javascript/MyConfirmedPasswordField.js');I'm no js guru so I imagine this script could be optimized, but it works!
Save the following code to a file "MyConfirmedPasswordField.js"
(function($) {
$(document).ready(function(){
$(".showOnClickContainer").hide();
$("#Password input.hidden").val(false);
$(".confirmedpassword .showOnClick a").click(function(){
$(".showOnClickContainer").toggle();
var _v = $(".showOnClickContainer").css("display") == "block" ? true : false;
$("#Password input.hidden").val(_v);
});
});
})(jQuery);Maybe something for You to checkin, UncleCheese?
-
Re: Editing a Member in DataObjectManager

2 October 2009 at 1:27am
Perfect. Thank you. I was going to write something like that to get around this issue.
-
Re: Editing a Member in DataObjectManager

2 October 2009 at 11:28am
Thanks, I implemented that change and it does indeed work.
-
Re: Editing a Member in DataObjectManager

10 October 2009 at 9:41am
Uncle Cheese,
just a reminder, using the dataobjectmanager code from svn October 9th and the fix that I had put in that was working for the password fields is now not working again. I assume that you have not yet implemented your own fix for this?
I will put the fix from this thread back in and check it again after the next svn update I do.
-
Re: Editing a Member in DataObjectManager

21 December 2010 at 1:43pm
The fix works....in a way.
I put this code in, but when i click on the link it goes to the home page. For some reason the link isn't being written correctly. instead of the full URL like http://www.mysite.com/members/profile/edit/#
the url is just being written as http://www.mysite.com/#
have no clue, so if anyone has an idea, that would be great!
| 1418 Views | ||
|
Page:
1
|
Go to Top |


