sst/storage_templates #3
@ -67,31 +67,6 @@
|
||||
var modal = bootstrap.Modal.getOrCreateInstance(addSubStorageModal);
|
||||
modal.show();
|
||||
{% endif %}
|
||||
new AutocompleteText('{{add_storage_form.responsible.id_for_label}}', '{{add_storage_form.responsible.id_for_label}}-ac-dropdown',
|
||||
function(search, autocomplete_obj) {
|
||||
api_search_user(search, function(results) {
|
||||
var usernames = new Array();
|
||||
console.log(results);
|
||||
for (var i = 0; i < results.results.length; i++) {
|
||||
usernames.push(results.results[i].username);
|
||||
}
|
||||
console.log(usernames);
|
||||
autocomplete_obj.show_results(usernames);
|
||||
}, function(){});
|
||||
});
|
||||
|
||||
new AutocompleteText('{{add_storage_form.template.id_for_label}}', '{{add_storage_form.template.id_for_label}}-ac-dropdown',
|
||||
function(search, autocomplete_obj) {
|
||||
api_search_storage_template(search, function(results) {
|
||||
var templates = new Array();
|
||||
console.log(results);
|
||||
for (var i = 0; i < results.results.length; i++) {
|
||||
templates.push(results.results[i].id);
|
||||
}
|
||||
console.log(templates);
|
||||
autocomplete_obj.show_results(templates);
|
||||
}, function(){});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock custom_scripts %}
|
||||
|
Loading…
Reference in New Issue
Block a user