<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<page xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
      xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
      xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">

  <!-- Import the macros that define CForms template elements -->
  <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
  <h4 class="samplesGroup">Inline editing</h4>
  <title>Inline editing</title>
  <script type="text/javascript">
      dojo.addOnLoad(function(){cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.highlight.red});
  </script>
  <content>
    <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">
      <p>The fields below show the various features of in-place editing. "In place" means that inputs are rendered as normal text, and become editable once you click on them.
	  </p>
	  <table width="100%" border="1">
		<tbody>
		  <tr>
			<td>
		      Your name:<br/>
		      <small>An inplace input with no initial value. The displayed text is
			         the input's hint</small>
			</td>
			<td>
			  <ft:widget id="name" fi:type="inplace"/>
			</td>
		  </tr>
		  <tr>
			<td>
		      Your occupation:<br/>
		      <small>An inplace input with an initial value.</small>
			</td>
			<td>
			  <ft:widget id="occupation" fi:type="inplace"/>
			</td>
		  </tr>
		  <tr>
			<td>
		      Comments:<br/>
		      <small>An multiline inplace input.</small>
			</td>
			<td>
			  <ft:widget id="comments" fi:type="inplace-area"/>
			</td>
		  </tr>
		</tbody>
	  </table>
	  <br/>
	  <ft:widget id="check"/>
      <ft:widget id="ok"/>
      <br/>
      <a href="./do-inplace.flow">Restart this sample</a> -  <a href="./">Back to Forms samples</a>

    </ft:form-template>
  </content>
</page>
