<%@ page language="java" buffer="64kb" %>

<%@ taglib uri="struts-html"     prefix="html"  %>
<%@ taglib uri="struts-bean"     prefix="bean"  %>
<%@ taglib uri="struts-logic"    prefix="logic" %>
<%@ taglib uri="vkc-taglib"      prefix="vkc"   %>
<%@ page import="org.apache.struts.Globals" %>
<vkc:init/>

<table width="100%" align="left" cellpadding="2" cellspacing="0" border="0">
  <bean:define id="form" name="form" type="vkc.administration.form.SystemDefaultsForm"/>
  
  <html:hidden property="selectedContext"/>

  <tr color="#FFFFFF" bgcolor="#c0c0c0">
    <td align="center">&nbsp;<b><vkc:message key="vkc.administration.systemdefaults.defaultlanguages.choose"/></b>&nbsp;</td>
  </tr>

  <tr>
    <td width="100%">
	  <logic:notEmpty name="form" property="languages">
      <table width="100%" cellspacing="1" cellpadding="3" border="0" class="tableLineColor">
        <tr>  
          <td class="headerUnselected" nowrap="nowrap" align="center">&nbsp;</td>
          <td class="headerUnselected" nowrap="nowrap" align="center"><b><vkc:message key="vkc.string.number"/></b></td>
          <td class="headerUnselected" nowrap="nowrap" align="left" width="33%"><b><vkc:message key="vkc.administration.systemdefaults.defaultlanguages.name"/></b></td>
          <td class="headerUnselected" nowrap="nowrap" align="left" width="33%"><b><vkc:message key="vkc.administration.systemdefaults.defaultlanguages.shortname"/></b></td>
          <td class="headerUnselected" nowrap="nowrap" align="left" width="33%"><b><vkc:message key="vkc.administration.systemdefaults.defaultlanguages.isocode"/></b></td>
        </tr>
        <logic:iterate id="language" name="form" property="languages" indexId="index" type="vkc.db.entities.VKCLanguage">
        <tr> 
          <td class="columnSelected" align="center"><html:radio name="form" property="selectedId" value='<%=language.getLanguageId().toString()%>'/></td>
          <td class="columnSelected" align="center">&nbsp;<%=index.intValue() + 1%>&nbsp;</td>
          <td class="columnSelected" align="left" width="33%"><vkc:message name="language" property="name_key"/></td>
          <td class="columnSelected" align="left" width="33%"><vkc:write name="language" property="shortName"/></td>
          <td class="columnSelected" align="left" width="33%"><vkc:write name="language" property="isoCode"/></td>
        </tr> 
        </logic:iterate>
      </table>
	  </logic:notEmpty>
	
	  <logic:empty name="form" property="languages">
      <table width="100%" cellspacing="1" cellpadding="3" border="0">
	    <tr><td colspan="2"><vkc:message key="vkc.administration.systemdefaults.defaultlanguage.nolanguages"/></td></tr>
      </table>
	  </logic:empty>
    </td>
  </tr>

  <vkc:hline bottomSpace="5" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <tr>
    <td align="center" nowrap>
      <vkc:button property="action.save.defaultlanguage" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.save"/></vkc:button>
    </td>
  </tr>
</table>