I have a custom module that replaces the default RolesBasedAuthorizationService with almost identical code, except that, when my custom module is enabled, it will pull roles from a service instead of from the user. Enabling the service involves filling out information in Settings and checking a box.
Since the roles are replaced when using my custom module (and the functionality is enabled), I want to hide the roles on the Edit User page. Following Understanding placement info, I can successfully hide the Roles list using the following in my custom module's placement.info:
<Match ContentType="User">
<Place Parts_Roles_UserRoles_Edit="-" />
</Match>
However, that will hide the list whenever my module's feature is enabled. But the feature being enabled isn't all that has to happen for the feature to do its magic - the checkbox also has to be checked (which provides the ability to enter the required settings before turning on the service-based authorization). So, continuing with that same piece of documentation, I can create a wrapper and apply it like so:
<Match ContentType="User">
<Place Parts_Roles_UserRoles_Edit="Content:10;Wrapper=Wrapper_HideIfCondition" />
</Match>
This should allow me to wrap the roles list like so:
<div style="display: block">
@Model.Html
</div>
I'm currently using display: block to make sure the wrapper is being called; however, the roles list disappears - it appears that Orchard isn't finding the wrapper. The cshtml file exists at MyCurrentTheme\Views\Wrapper.HideIfCondition.cshtml - I was hoping to get it into the Module, but I'll wait on that until I get it working in the default way (in the theme).
So my current question is thus: What am I missing in order to get the wrapper to be found and used?