Commit 6f72aedb authored by Manuel Faux's avatar Manuel Faux

MVC: added textbox field

parent e6af8121
......@@ -63,6 +63,8 @@ allownew : allow new items (for list) if applicable
<select {% if size|default(false) %}size="{{size}}"{% endif %} id="{{ id }}" class="{{style|default('selectpicker')}}" data-width="{{width|default("348px")}}"></select>
{% elseif type == "password" %}
<input type="password" class="form-control" size="{{size|default("50")}}" id="{{ id }}" >
{% elseif type == "textbox" %}
<textarea rows="{{height|default("5")}}" id="{{ id }}"></textarea>
{% elseif type == "info" %}
<span id="{{ id }}" ></span>
{% endif %}
......
......@@ -40,7 +40,7 @@
function getFormData(parent) {
var data = {};
$( "#"+parent+" input,#"+parent+" select" ).each(function( index ) {
$( "#"+parent+" input,#"+parent+" select,#"+parent+" textarea" ).each(function( index ) {
if ($(this).prop('id') == undefined) {
// we need an id.
return;
......@@ -96,7 +96,7 @@ function getFormData(parent) {
* @param data named array structure
*/
function setFormData(parent,data) {
$( "#"+parent+" input,#"+parent+" select,#"+parent+" span" ).each(function( index ) {
$( "#"+parent+" input,#"+parent+" select,#"+parent+" span,#"+parent+" textarea" ).each(function( index ) {
if ($(this).prop('id') == undefined) {
// we need an id.
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment