Subversion Repositories SmartDukaan

Rev

Rev 2424 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.1 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Edit $action.getId()</title>
<link type="text/css" href="../../jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../jquery/jqueryui/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../jquery/jqueryui/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../jquery/jqueryui/ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../jquery/jqueryui/ui/jquery.ui.autocomplete.js"></script>
<script>
$(document).ready(function() {
    //alert("document ready");
    $('#cancelbutton').click(function(e) {
        //alert("Cancel clicked");
        window.location.href = '/content/entity';
    });
});

$(function() {
    var availableBrands = [$action.getBrandString()]
    $("#brands").autocomplete({
        source: availableBrands
    });
});


</script>
<style>

* { font-family: Verdana; font-size: 96%; }
label { width: 10em; float: left; }
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
p { clear: both; }
.submit { margin-left: 12em; }
em { font-weight: bold; padding-right: 1em; vertical-align: top; }

</style>
</head>
#set ( $entity = $action.getEntity() )
<body>
<div>
<form name="f" id="editform" action="/content/entity/$action.getId()" method="post">
    <p/>
    <label for="entityid">Entity ID: </label>
    <span id="entityid"><strong><em>$action.getId()</em></strong></span>
    <p/>
    <label for="brands">Brand: </label>
    <input id="brands" name="brand" value="$entity.getBrand()"/>
    <p/>
    <label for="modelname">Model Name: </label>
    <input id="modelname" name="modelname" value="$entity.getModelName()"/>
    <p/>
    <label for="modelnumber">Model Number: </label>
    <input id="modelnumber" name="modelnumber" value="$entity.getModelNumber()"/>
    <p/>
    <label for="category">Category: </label>
    
    #set ( $inputcatid = $entity.getCategory().getID() )
    <select id="category" name="category" >
    #foreach( $catid in $leafcategories.keySet() )
        #set ($selected = "")
        #if ($catid == $inputcatid) #set ($selected = "selected='selected'") #end 

        <option value="$catid" $selected>$leafcategories.get($catid)</option>
    #end 
    </select>
    <p/>
<p/>
<input type="hidden" name="_method" value="put"/>

<input type="button" id="cancelbutton" name="cancel" value="Cancel"/>
<input type="submit" name="save" value="Save"/>
<input type="submit" name="slides" value="Save & Select Slides >>"/>
</form>
</div>
</body>
</html>