Email fields read only

I want to create email field with read only depending from user role. I found that I can use forDetailView template or forEditView depending from role.

            'name' => 'email1',
            'studio' => 'false',
            'label' => 'LBL_EMAIL_ADDRESS',
          		'customCode' => '{if $readonly== "1"}
          		     {include file="include/SugarEmailAddress/templates/forDetailView.tpl"}
          		{else}
          		     {include file="include/SugarEmailAddress/templates/forEditView.tpl"}
          		{/if}',

But how to give parameters to templates? Or may be there is another way to do it?