<form action="" id="upfile" class="form">
<input type="hidden" name="fpath" id="fpath" value="{$sm.file}" />
<table>
<tr>
<td>{if $sm.mod_name=='common'}Common Template{else}Module Name: {$sm.mod_name}{/if}</td>
</tr>
<tr>
<td>File Name: {$sm.file}</td>
</tr>
{if !$sm.fmsg}
<tr>
<td>
Edit the contents:
</td>
</tr>
<tr>
<td>
<textarea cols="60" rows="30" name="efile" id="efile">{$sm.file_content}</textarea>
</td>
</tr>
<tr>
<td >
<input type="button" class="button" value="Save" onclick="update();"/>
<input type="button" class="button" value="Close" onclick="closeme();"/>
</td>
</tr>
{else}
{$sm.fmsg}
{/if}
</table>
</form>
{literal}
<script type="text/javascript">
function update(){
var url="##LBL_ADMIN_SITE_URL##index.php";
var fpath=$('#fpath').val();
var efile=$('#efile').val();
$.post(url,{"page":"module","choice":"update_files",ce:0,fpath:fpath,efile:efile},function(res){
});
}
function closeme(){
$('#edit_sec').html('Edit the file contents here.');
}
</script>
{/literal}