<div class="row">

    <form class="form-horizontal span12">


        <fieldset>

            <legend>Wine Details</legend>
            <br/>

            <div class="row">
                <div class="span9">

                    <div class="control-group">
                        <label for="wineId" class="control-label">Id:</label>

                        <div class="controls">
                            <input id="wineId" name="id" type="text" value="<%= id === null ? '' : id %>" class="span1"
                                   disabled/>
                        </div>
                    </div>

                    <div class="control-group">
                        <label for="name" class="control-label">Name:</label>

                        <div class="controls">
                            <input type="text" id="name" name="name" value="<%= name %>"/>
                            <span class="help-inline"></span>
                        </div>
                    </div>

                    <div class="control-group">
                        <label for="grapes" class="control-label">Grapes:</label>

                        <div class="controls">
                            <input type="text" id="grapes" name="grapes" value="<%= grapes %>"/>
                            <span class="help-inline"></span>
                        </div>
                    </div>

                    <div class="control-group">
                        <label for="country" class="control-label">Country:</label>

                        <div class="controls">
                            <input type="text" id="country" name="country" value="<%= country %>"/>
                            <span class="help-inline"></span>
                        </div>
                    </div>

                    <div class="control-group">
                        <label for="region" class="control-label">Region:</label>

                        <div class="controls">
                            <input type="text" id="region" name="region" value="<%= region %>"/>
                        </div>
                    </div>

                    <div class="control-group">
                        <label for="year" class="control-label">Year:</label>

                        <div class="controls">
                            <select class="span1" id="year" name="year" value="<%= year %>">
                                <option
                                <%= year == 2012?'selected':'' %>>2012</option>
                                <option
                                <%= year == 2011?'selected':'' %>>2011</option>
                                <option
                                <%= year == 2010?'selected':'' %>>2010</option>
                                <option
                                <%= year == 2009?'selected':'' %>>2009</option>
                                <option
                                <%= year == 2008?'selected':'' %>>2008</option>
                                <option
                                <%= year == 2007?'selected':'' %>>2007</option>
                            </select>
                        </div>
                    </div>

                    <div class="control-group">
                        <label for="description" class="control-label">Notes:</label>

                        <div class="controls">
                            <textarea id="description" name="description" class="span6" rows="6"><%= description
                                %></textarea>
                        </div>
                    </div>

                </div>

                <div class="span3">
                    <div class="well">
                        <p><img id="picture" width="180" src="<%= picture === null ? 'pics/generic.jpg' : 'pics/' + picture %>"/></p>

                        <p>To change the picture, drag a new picture from your file system onto the box above.</p>
                    </div>
                </div>

            </div>

        </fieldset>

        <div class="form-actions">
            <a href="#" class="btn btn-primary save">Save</a>
            <a href="#" class="btn delete">Delete</a>
        </div>

    </form>

</div>

<div class="row status-bar">
    <div class="span12">
        <div class="alert alert-success" style="display: none">
            <b>Success!</b> Wine saved successfully
        </div>
    </div>
</div>


