<%@ include file="/common/taglibs.jsp" %>
<head>
    <title><fmt:message key="title.admin.migration"/></title>
    <meta name="menu" content="admin"/>
    <script type="text/javascript" src="/scripts/com/hedgehoglab/fixx/controller/MigrationController.js?<fmt:message key="webapp.version"/>"></script>
</head>
<c:set var="panelContent">
    <div class="Pane">
        <s:form method="post" action="migration" id="migration">
            <div class="">
            <span class="Field HugeField ClearedField">
        		<label for="type">System to import from</label>
        		<select name="type" id="type">
                    <option value="1"><fmt:message key="label.migration.system.mantis"/></option>
                    <option value="2"><fmt:message key="label.migration.system.bugzilla"/></option>
                    <option value="3"><fmt:message key="label.migration.system.basecamp"/></option>
                    <option value="4"><fmt:message key="label.migration.system.fogbugz"/></option>
                </select>
        	</span>
	        	<div id="iBugTrackers">
                    <div class="feedback notification Cleared">
                         <ul>
                             <li><fmt:message key="text.import.mysqldriver"/></li>
                         </ul>
                   </div>
                    <span class="Field MediumField"><s:textfield key="driver" label="%{getText('label.migration.driver')}"
	                                                              required="true" theme="xhtml"
	                                                              value="com.mysql.jdbc.Driver"/></span>
	                <span class="Field MediumField Cleared"><s:textfield key="url" id="url"
	                                                                         label="%{getText('label.migration.url')}"
	                                                                         required="true" theme="xhtml"
	                                                                         value="jdbc:mysql://localhost/mantis?autoReconnect=true"/></span>
	                <span class="Field Cleared"><s:textfield key="username"
	                                                              label="%{getText('label.migration.username')}"
	                                                              required="true" theme="xhtml" value="root"/></span>
	                <span class="Field"><s:password key="password"
	                                                              label="%{getText('label.migration.password')}"
	                                                              required="true" theme="xhtml"/></span>
	           </div>
	           <div id="iBasecamp" class="hide">
                   <div class="feedback notification Cleared">
                         <ul>
                             <li><fmt:message key="help.migration.basecamp"/></li>
                         </ul>
                   </div>
                   <span class="Field MediumField Cleared"><s:textfield key="url"
	                   label="%{getText('label.migration.basecamp.url')}"
	                   required="true" theme="xhtml" value="http://"/></span>
	                <span class="Field Cleared"><s:textfield key="username"
		                   label="%{getText('label.migration.username')}"
		                   required="true" theme="xhtml" /></span>
					<span class="Field"><s:password key="password"
					                   label="%{getText('label.migration.password')}"
					                   required="true" theme="xhtml"/></span>
		       </div>
                <div id="iFogbugz" class="hide">
                   <div class="feedback notification Cleared">
                         <ul>
                             <li><fmt:message key="help.migration.fogbugz"/></li>
                         </ul>
                   </div>
                   <span class="Field MediumField Cleared"><s:textfield key="url"
	                   label="%{getText('label.migration.fogbugz.url')}"
	                   required="true" theme="xhtml" value="http://"/></span>
	                <span class="Field Cleared"><s:textfield key="username"
		                   label="%{getText('label.migration.username')}"
		                   required="true" theme="xhtml" /></span>
					<span class="Field"><s:password key="password"
					                   label="%{getText('label.migration.password')}"
					                   required="true" theme="xhtml"/></span>
		       </div>
					           
            </div>
            <div class="Actions">
	            <ul>
	                <li><input type="button" value="Import my data" id="btnMigration"/></li>
	            </ul>
	        </div>
        </s:form>
    </div>
</c:set>


<div class="rightPanel">
    <div class="PropertyPane">
        
    </div>
</div>

<div class="fullContent">
    <c:import url="/WEB-INF/pages/includes/administration/menu/default.jsp">
        <c:param name="pageName" value="Migration"/>
        <c:param name="content" value="${panelContent}"/>
    </c:import>
</div>


<div id="dlgMigration" class="hide" style="background: white; width: 350px; height: 200px; border: 5px solid #67A7E3;">
    <div style="text-align:center; padding: 3em;"><img src="${ctx}/images/ajax-loader.gif"><br/><br/><br/><h3 style="font-size:2em;"><fmt:message key="help.migration.popup"/></h3></div>
</div>
