Current Path : /var/www/alh/admin/view/template/e_wallet/ |
Current File : /var/www/alh/admin/view/template/e_wallet/e_wallet_form.twig |
{{ header }}{{ column_left }} <div id="content"> <div class="page-header"> <div class="container-fluid"> <div class="pull-right"> <button type="submit" form="form-option" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button> <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div> <h1>{{ heading_title }}</h1> <ul class="breadcrumb"> {% for breadcrumb in breadcrumbs %} <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li> {% endfor %} </ul> </div> </div> <div class="container-fluid"> {% if error_warning %} <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }} <button type="button" class="close" data-dismiss="alert">×</button> </div> {% endif %} {% if error %} <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error }} <button type="button" class="close" data-dismiss="alert">×</button> </div> {% endif %} <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><i class="fa fa-pencil"></i>{{ text_form }}</h3> </div> <div class="panel-body"> <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-option" class="form-horizontal"> <div class="form-group"> <label class="col-sm-2 control-label" for="input-customer_id">{{ entry_customer_id }}</label> <div class="col-sm-10"> <input type="text" name="customer" value="{{ customer }}" id="input-customer" class="form-control" /> <input type="hidden" name="customer_id" value="{{ customer_id }}" /> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-amount">{{ entry_amount }}</label> <div class="col-sm-10"> <input type="number" name="amount" value="{{ amount }}" class="form-control" /> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-description">{{ entry_description }}</label> <div class="col-sm-10"> <textarea name="description" class="form-control">{{ description }}</textarea> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-amount">{{ n_customer }}</label> <div class="col-sm-10"> <input type="checkbox" name="notify_customer" class="form-control" /> <small class="mute"><p>{{ notify_note }}</p></small> </div> </div> </form> </div> </div> </div> </div> <script type="text/javascript"> $('input[name=\'customer\']').autocomplete({ 'source': function(request, response) { $.ajax({ url: 'index.php?route=e_wallet/e_wallet/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request), dataType: 'json', success: function(json) { response($.map(json, function(item) { return { label: item['name'] +' - '+item['email'], value: item['customer_id'] } })); } }); }, 'select': function(item) { $('input[name=\'customer\']').val(item['label']); $('input[name=\'customer_id\']').val(item['value']); } }); </script> {{ footer }}