search

Home  >  Q&A  >  body text

The comments are too confusing, I want to correct a mistake here

There is a problem with the code when judging whether to check the submenu

<input type="checkbox" name="menu[{$vo.mid}]" lay-skin=" primary" title="{$vo.title}" {:isset($role['rights']) && $role['rights'] && in_array($vo.mid,$role['rights'])?' checked':''}>

This should change in_array($vo.mid,$role['rights']) to in_array($cvo.mid,$role['rights'])

Otherwise all will be checked

驱魔鮔驱魔鮔2114 days ago1299

reply all(2)I'll reply

  • 驱魔鮔

    驱魔鮔2019-02-15 21:45:13

    Okay, it will be solved later, I haven’t seen it yet

    reply
    0
  • Cancelreply