Source

moviedemo / moviedemo / templates / sproxdemo / movies / edit.html

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include href="master.html" />
<head>
<style>
#menu_items {
  padding:0px 12px 0px 2px;
  list-style-type:None
  }
</style>
</head>
<body class="tundra">
  <div style="height:0px;"> &nbsp; </div>
  <h2> Edit Movie</h2>
  <form method="POST" action="./">
    <table>
    <tr><td>Title </td><td><input type="textfield" name="title" value="${values['title']}"/>${tmpl_context.form_errors.get('title')}</td></tr>
    <tr><td>Description</td><td> <textarea name="description">${values.get('description')}</textarea>${tmpl_context.form_errors.get('description')}</td></tr>
    <tr><td>Genre</td>
        <td>
          <select name="genre_id">
              <py:for each="genre in genres">
                <py:if test="values.get('genre_id') == unicode(genre.genre_id)">
                  <option value="$genre.genre_id" selected="selected">$genre.name</option>
                </py:if>
                <py:if test="values.get('genre_id')!= unicode(genre.genre_id)">
                  <option value="$genre.genre_id">$genre.name</option>
                </py:if>
              </py:for>
          </select>
        </td></tr>
    <tr><td>Directors</td>
        <td>
          <select multiple="true" name="directors">
              <py:for each="director in directors">
                $director.name
                <py:if test="unicode(director.director_id) in values['directors']">
                  <option value="$director.director_id" selected="selected">$director.name</option>
                </py:if>
                <py:if test="unicode(director.director_id) not in values['directors']">
                  <option value="$director.director_id">$director.name</option>
                </py:if>
              </py:for>
          </select>
        </td></tr>
    <tr><td>Release Date</td><td><input type="textfield" name="release_date" value="${values.get('release_date')}"/>${tmpl_context.form_errors.get('release_date')}</td></tr>
    </table><br/>
    <input type="hidden" name="_method" value="PUT"/>
    <input type="submit" value="update"/>
  </form>

</body>
</html>