<div class='page-header'>
	<h1><tmpl_var name="list_head_txt"></h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>


        
            <div class="form-group">
                <label for="name" class="col-sm-3 control-label">{tmpl_var name='name_txt'}</label>
                <div class="col-sm-9"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" /></div></div>
			<div class="form-group">
                <label for="type" class="col-sm-3 control-label">{tmpl_var name='type_txt'}</label>
                <div class="col-sm-9"><select name="type" id="type" class="form-control">
                    {tmpl_var name='type'}
                </select></div>
            </div>
			<div class="form-group">
                <label for="snippet" class="col-sm-3 control-label">{tmpl_var name='snippet_txt'}</label>
                <div class="col-sm-9"><textarea class="form-control" name="snippet" id="snippet" rows='10' cols='50' style="width:400px;">{tmpl_var name='snippet'}</textarea></div><span class="nginx"> &nbsp; {tmpl_var name='variables_txt'}: </span><a href="javascript:void(0);" class="addPlaceholder nginx">{DOCROOT}</a><span class="nginx">, </span><a href="javascript:void(0);" class="addPlaceholder nginx">{FASTCGIPASS}</a>
            </div>
			<div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='customer_viewable_txt'}</label>
                <div class="col-sm-9">
                    {tmpl_var name='customer_viewable'}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                <div class="col-sm-9">
                    {tmpl_var name='active'}
                </div>
            </div>
        
            
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
            
        <div class="clear"><div class="right">
            <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/directive_snippets_edit.php');">{tmpl_var name='btn_save_txt'}</button>
            <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/directive_snippets_list.php">{tmpl_var name='btn_cancel_txt'}</button>
        </div></div>
<script language="JavaScript" type="text/javascript">
		
    if(jQuery('#type').val() == 'nginx'){
        jQuery('.nginx:hidden').show();
    } else {
        jQuery('.nginx:visible').hide();
    }
	
	if (jQuery('#type').val() != 'nginx' && jQuery('#type').val() != 'apache') {
		jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide();
	}else {
		jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show();
	}
    
    jQuery('#type').change(function(){
		if (jQuery(this).val() != 'nginx' && jQuery(this).val() != 'apache') {
			jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide();
		} else {
			jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show();
		}
        if(jQuery(this).val() == 'nginx'){
            jQuery('.nginx:hidden').show();
        } else {
            jQuery('.nginx:visible').hide();
        }
    });
			
</script>