{require-css "controlpanel"} {require-css "acleditor"} {require-txt "controlpanel"}

{tr "_acleditor.cpcategory"}

{tr "_acleditor.description"}
{foreach $acllist} {if $userdata} {endif} {endforeach}
{$userdata}
{if $forumdata}{$forumdata}{endif} {$actiondata} {$grantdata} {$actions}
{if $acleditorAddLink} {tr "_acleditor.add"}{endif}
{if $acleditorEditor}

{tr "_acleditor.edit rule"}

{tr "_acleditor.select group"} {tr "_acleditor.or"} {tr "_acleditor.select user"}
{tr "_acleditor.select forum"} {tr "_acleditor.or"} {tr "_acleditor.select thread"}
{tr "_acleditor.select action"} {tr "_acleditor.and"} {tr "_acleditor.set grant"}
{=beginjs} var NumericIDs = new Array({$acleditorNumericIDs}); var SpecificIDs = new Array({$acleditorSpecificIDs}); function OnActionChanged() {{ var sel_id = getel("ActionID").value; // Select numeric/option grant fields var is_numeric = false; for (var index in NumericIDs) if (NumericIDs[index] == sel_id) is_numeric = true; toggleVisId("GrantNum", is_numeric); toggleVisId("GrantCheck", !is_numeric); // Show/hide forum fields var is_specific = false; for (var index in SpecificIDs) if (SpecificIDs[index] == sel_id) is_specific = true; toggleVisId("SpecificRow1", is_specific); toggleVisId("SpecificRow2", is_specific); toggleEnabledId("ActionID0", false); } OnActionChanged(); function OnGrantChanged() {{ var sel_id = getel("GrantCheckCtl").value; getel("GrantCheckCtl").className = sel_id == 1 ? "allowed" : "denied"; } //OnGrantChanged(); //setTimeout("OnGrantChanged();", 1000); window.onload = OnGrantChanged; function OnIDsChanged() {{ // Enable only one of both group/user fields toggleEnabledId("UserID", getel("GroupID").value == 0); toggleEnabledId("GroupID", getel("UserID").value == 0); // Enable only one of both forum/thread fields toggleEnabledId("ThreadID", getel("ForumID").value == 0); toggleEnabledId("ForumID", getel("ThreadID").value == 0); } OnIDsChanged(); {=endjs}
{tr "_acleditor.enable rule~"}
{if $acleditorMayRemove} {endif}
{endif}{-- $acleditorEditor}

{tr "_acleditor.annotations"}

{tr "_acleditor.annotation_1"}
{tr "_acleditor.annotation_2"}
{tr "_acleditor.annotation_docs"}
{set $ShadowBottomOffset 0} {include "_shadow_bottom.html"}