<%
    use obfui::cmn;
    my ($s,$prj,$typehtml,$filename) = @_;
%>
<form method=post>
<input type=hidden name=havevals value=1>

<h2><%= __('Select mode to edit:') %></h2>
<p>
<script language=javascript>
<!--
function do_show_hide(labelelt,id_of_div)
{
    var e= document.getElementById(id_of_div);
    labelelt.innerHTML = e.style.display == 'none' ? '[Hide]' : '[Show]'; 
    e.style.display = e.style.display == 'none' ? 'block' : 'none';
}
-->
</script>
<%$ hstr('prj.listofmodes',__('List of special file-processing modes:')) %>
&nbsp;&nbsp;
<b><span id=show_hide_btn onclick="do_show_hide(this,'specialmodes')" 
    >[Show]</span></b>

<div id=specialmodes style='display: none'>
<%
    $forge->include('wgt-modelist',$prj,[
	    sort { $prj->{modes}->{$a}->{title} cmp
		$prj->{modes}->{$b}->{title} }
	    grep { !$prj->{modes}->{$_}->{filer_visible} }
	    keys %{$prj->{modes}}
	],'ul');
%>
</div>


<%$ hstr('prj.listofmodes',__('List of end-user file-processing modes:')) %>
<% 
    $forge->include('wgt-modelist',$prj, [
	    sort { $prj->{modes}->{$a}->{title} cmp 
		$prj->{modes}->{$b}->{title} } 
	    grep { $prj->{modes}->{$_}->{filer_visible} }
	    keys %{$prj->{modes}}
	],'ul');
%>


<% $forge->include('wgt-gobtn',__("Create new mode"),'modes.new',
	'class'=>'button-wide' ) %>

<p>

<% $forge->include('wgt-btns-ok-cancel') %>
</form>

