diogo Posted April 3, 2013 Share Posted April 3, 2013 This message also irritates you? I did a small change on the file ProcessUser.js to get rid of it. This simply checks and disables the box with javascript. edit: something went wrong, and ths is not working. i will investigate why $(document).ready(function() { if($("#Inputfield_id").val() == 40) { // guest user // hide fields that aren't necessary ehre $("#wrap_Inputfield_pass").hide(); $("#wrap_Inputfield_email").hide(); $("#wrap_Inputfield_roles input").attr('disabled', 'disabled'); //$("#wrap_submit_save").remove(); } // Check and disable the 'guest' role checkbox $("#Inputfield_roles_37").prop({ checked: true, disabled: true }); }); edit: Ok, solved. Apparently disabling the box prevents it's value to be saved also. I went around it like this: $(document).ready(function() { if($("#Inputfield_id").val() == 40) { // guest user // hide fields that aren't necessary ehre $("#wrap_Inputfield_pass").hide(); $("#wrap_Inputfield_email").hide(); $("#wrap_Inputfield_roles input").attr('disabled', 'disabled'); //$("#wrap_submit_save").remove(); } // Check and disable the 'guest' role checkbox $("#Inputfield_roles_37") .prop({ checked: true }) .css({ opacity: 0.5 }) .click(function(){ return false; }); }); Link to comment Share on other sites More sharing options...
Soma Posted April 3, 2013 Share Posted April 3, 2013 This does work: $("#Inputfield_roles_37").prop({ checked: "checked", disabled: "disabled" }); 1 Link to comment Share on other sites More sharing options...
diogo Posted April 3, 2013 Author Share Posted April 3, 2013 Soma, doesn't work with me. Did you try saving? Link to comment Share on other sites More sharing options...
Soma Posted April 3, 2013 Share Posted April 3, 2013 Yes it does if you remove the disabled... Link to comment Share on other sites More sharing options...
diogo Posted April 3, 2013 Author Share Posted April 3, 2013 Ya, that also works with me Link to comment Share on other sites More sharing options...
ryan Posted April 4, 2013 Share Posted April 4, 2013 When/where are you guys seeing the 'guest role required' message? Just wondering if this is something that should be fixed in the core ProcessUser module? I guess I haven't noticed this before. Link to comment Share on other sites More sharing options...
apeisa Posted April 4, 2013 Share Posted April 4, 2013 Create new user and leave "guest" role unchecked. Just tried in 2.3 and it does throw the error msg. Link to comment Share on other sites More sharing options...
diogo Posted April 4, 2013 Author Share Posted April 4, 2013 I don't think it should be fixed in the module. The behavior is correct and it's good that guest is on the list so it's absence doesn't confuse people. Because I consider this a small annoyance, IMO the best place to fix it is javascript. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now