1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Pls move _verifyPrivacyChoice to an DW Helper

Discussion in 'Closed Suggestions' started by ragtek, Oct 4, 2011.

  1. ragtek

    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

        protected function _verifyPrivacyChoice(&$choice$dw$fieldName)
              if (!
    in_array(strtolower($choice), array('everyone''members''followed''none')))
    $choice 'none';

    It would also be awsam to have a subtemplate with
                                    <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>
    ATM it's really a copy & paste process:p
    Just check the account_privacy template and count how often you use the same selectbox (with and without the showEveryone option)
    a legacy reborn likes this.
  2. ragtek

    ragtek Guest

    Next suggestion related to this:
    I'm planing to add a new "privacy type".
    For this, it would be great if:

    1. the new template would include an template hook
    2. the method would also include an event listener which passes the array, so we can add own elements without the need to owerwrite the method(if it's possible, don't know , have never tried to extend a datawriter helper)

    OR what about a helper method, with an list of all possible privacy types and an options param ( to be able to disable elements (like showEveryone)

Share This Page