Commit 2bf58102 by Ari Agung Prasetiyo Committed by Ari Agung Prasetiyo

js autocomplete

1 parent 0d37fc4d
...@@ -2,23 +2,17 @@ ...@@ -2,23 +2,17 @@
css_class css_class|field.widget.css_class; css_class css_class|field.widget.css_class;
oid oid|field.oid; oid oid|field.oid;
style style|field.widget.style; style style|field.widget.style;
js js|field.widget.js" js js|field.widget.js|{}" tal:omit-tag="">
tal:omit-tag=""> <input type="text" name="${name}" value="${cstruct}" data-provide="typeahead" tal:attributes="class string: form-control ${css_class or ''};
<input type="text"
name="${name}"
value="${cstruct}"
data-provide="typeahead"
tal:attributes="class string: form-control ${css_class or ''};
style style; style style;
attributes|field.widget.attributes|{};" attributes|field.widget.attributes|{};" id="${oid}" />
id="${oid}"/> <script tal:condition="field.widget.values" type="text/javascript">
<script tal:condition="field.widget.values" type="text/javascript"> deform.addCallback(
deform.addCallback( '${field.oid}',
'${field.oid}', function (oid) {
function (oid) { $('#' + oid).typeahead(${ options });
$('#' + oid).typeahead(${options}); ${ structure: js }
${structure:js} }
} );
); </script>
</script>
</span> </span>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!