R
ragtek
Guest
The method can be used for several checks, where a user can set "view permissions" for his content.
If you would move it to the dw user helper (or an other helper) we could use it, instead of c&p
It would also be awsam to have a subtemplate with
ATM it's really a copy & paste process
Just check the account_privacy template and count how often you use the same selectbox (with and without the showEveryone option)
If you would move it to the dw user helper (or an other helper) we could use it, instead of c&p
PHP:
protected function _verifyPrivacyChoice(&$choice, $dw, $fieldName)
{
if (!in_array(strtolower($choice), array('everyone', 'members', 'followed', 'none')))
{
$choice = 'none';
}
return true;
}
It would also be awsam to have a subtemplate with
PHP:
<select name="{$name}" class="textCtrl autoSize" id="ctrl_allow_receive_news_feed">
<xen:if is="{$showEveryone}"> <option value="everyone" {xen:selected "{$selected} == 'everyone' "}>{xen:phrase all_visitors}</option></xen:if>
<option value="members" {xen:selected "$selected} == 'members' "}>{xen:phrase members_only}</option>
<option value="followed" {xen:selected "$selected} == 'followed' "}>{xen:phrase people_you_follow_only}</option>
</select>
ATM it's really a copy & paste process
Just check the account_privacy template and count how often you use the same selectbox (with and without the showEveryone option)
Upvote
1