<%--
    Document   : compoundUpdateConflict
    Created on : Aug 13, 2013, 12:56:00 PM
    Author     : Joos Kiener <Joos.Kiener@gmail.com>
--%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<jsp:include page="/WEB-INF/jsp/header.jsp"/>

<h3>Resolve Version Conflict</h3>
<p>The compound was edited concurrently by another User.
    Please resolve the conflict by setting the properties of the current version
    to the desired values.</p>
<div class="cssform">
    <h4>Conflicting Version</h4>
    <div>
        <label>Compound Name</label>
        <input type="text" readonly value="${conflictingVersion.getCompoundName()}"/>
    </div>
    <div>
        <label>CAS</label>
        <input type="text" readonly value="${conflictingVersion.getCas()}"/>
    </div>
    <div>
        <label>Description</label>
        <input type="text" readonly value="${conflictingVersion.getCompoundDescription()}"/>
    </div>
</div>
<form:form commandName="compound" class="cssform" method="post">
    <h4>Current Version</h4>
    <div>
        <label>Compound Name</label>
        <form:input path="compoundName" />
    </div>
    <div>
        <label>CAS</label>
        <form:input path="cas" />
    </div>
    <div>
        <label>Description</label>
        <form:input path="compoundDescription" />
    </div>
    <form:input path="id" hidden="true"/>
    <form:input path="version" hidden="true"/>
    <div class="buttons"><input id="saveButton" class="save" type="submit" value="Save Changes"/></div>
</form:form>
<jsp:include page="/WEB-INF/jsp/footer.jsp"/>