AnsweredAssumed Answered

PDM_IF write for "Update Members" button

Question asked by melis.yazici on Feb 14, 2017
Latest reply on Feb 14, 2017 by Grant Bruneau

Hi,

I want to put the condition for the "Update Members" button.
I just want the group administrators to do this.
I wrote the following code for detail_cnt.htmpl. But I can not run list_grpmem.hmtpl.
How do I update the Update Members button only for users with manager_flag = 1?


***detail_cnt.hmtpl
<PDM_IF "$args.id" != "">
<PDM_LIST PREFIX=list1 FACTORY=grpmem where="group = U'$args.id' AND member= U'$cst.id'" ESC_STYLE=JS2>
<PDM_IF "$list1.manager_flag" == "1">
//<PDM_MACRO name=button Caption="Edit[d]" Func="detailEdit()" hotkey_name="Edit[d]" ID="btn001">//
</PDM_IF>
</PDM_LIST>
</PDM_IF>
***

***list_grpmem.htmpl

<PDM_IF ????>
<SCRIPT LANGUAGE="JavaScript">
var rptName = new Array("", "");
var cfgCanEdit = true;
var autoRefreshWindows;
if( window.parent != null &&
typeof window.parent.updateMemOrGroup == "string" &&
typeof window.parent.updateMemOrGroupShowBool == "boolean" && window.parent.updateMemOrGroupShowBool &&
typeof window.parent.updateMemOrGroupButtonLabel == "string" &&
typeof window.parent.updateMemOrGroupMethod == "string" )
{
autoRefreshWindows = new Object();
cfgExtraButton = new Array(window.parent.updateMemOrGroupButtonLabel, window.parent.updateMemOrGroupMethod);
}
</SCRIPT>

</PDM_IF>

***

Thank you for your help
Regards
Ozge Ozturk

Outcomes