shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

review_form.twig (7107B)


      1 {{ header }}{{ column_left }}
      2 <div id="content">
      3   <div class="page-header">
      4     <div class="container-fluid">
      5       <div class="pull-right">
      6         <button type="submit" form="form-review" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
      7         <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
      8       <h1>{{ heading_title }}</h1>
      9       <ul class="breadcrumb">
     10         {% for breadcrumb in breadcrumbs %}
     11         <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
     12         {% endfor %}
     13       </ul>
     14     </div>
     15   </div>
     16   <div class="container-fluid"> {% if error_warning %}
     17     <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
     18       <button type="button" class="close" data-dismiss="alert">&times;</button>
     19     </div>
     20     {% endif %}
     21     <div class="panel panel-default">
     22       <div class="panel-heading">
     23         <h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
     24       </div>
     25       <div class="panel-body">
     26         <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-review" class="form-horizontal">
     27           <div class="form-group required">
     28             <label class="col-sm-2 control-label" for="input-author">{{ entry_author }}</label>
     29             <div class="col-sm-10">
     30               <input type="text" name="author" value="{{ author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control" />
     31               {% if error_author %}
     32               <div class="text-danger">{{ error_author }}</div>
     33               {% endif %} </div>
     34           </div>
     35           <div class="form-group required">
     36             <label class="col-sm-2 control-label" for="input-product"><span data-toggle="tooltip" title="{{ help_product }}">{{ entry_product }}</span></label>
     37             <div class="col-sm-10">
     38               <input type="text" name="product" value="{{ product }}" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
     39               <input type="hidden" name="product_id" value="{{ product_id }}" />
     40               {% if error_product %}
     41               <div class="text-danger">{{ error_product }}</div>
     42               {% endif %} </div>
     43           </div>
     44           <div class="form-group required">
     45             <label class="col-sm-2 control-label" for="input-text">{{ entry_text }}</label>
     46             <div class="col-sm-10">
     47               <textarea name="text" cols="60" rows="8" placeholder="{{ entry_text }}" id="input-text" class="form-control">{{ text }}</textarea>
     48               {% if error_text %}
     49               <div class="text-danger">{{ error_text }}</div>
     50               {% endif %} </div>
     51           </div>
     52           <div class="form-group required">
     53             <label class="col-sm-2 control-label" for="input-name">{{ entry_rating }}</label>
     54             <div class="col-sm-10">
     55               <label class="radio-inline"> {% if rating == 1 %}
     56                 <input type="radio" name="rating" value="1" checked="checked" />
     57                 1
     58                 {% else %}
     59                 <input type="radio" name="rating" value="1" />
     60                 1
     61                 {% endif %} </label>
     62               <label class="radio-inline"> {% if rating == 2 %}
     63                 <input type="radio" name="rating" value="2" checked="checked" />
     64                 2
     65                 {% else %}
     66                 <input type="radio" name="rating" value="2" />
     67                 2
     68                 {% endif %} </label>
     69               <label class="radio-inline"> {% if rating == 3 %}
     70                 <input type="radio" name="rating" value="3" checked="checked" />
     71                 3
     72                 {% else %}
     73                 <input type="radio" name="rating" value="3" />
     74                 3
     75                 {% endif %} </label>
     76               <label class="radio-inline"> {% if rating == 4 %}
     77                 <input type="radio" name="rating" value="4" checked="checked" />
     78                 4
     79                 {% else %}
     80                 <input type="radio" name="rating" value="4" />
     81                 4
     82                 {% endif %} </label>
     83               <label class="radio-inline"> {% if rating == 5 %}
     84                 <input type="radio" name="rating" value="5" checked="checked" />
     85                 5
     86                 {% else %}
     87                 <input type="radio" name="rating" value="5" />
     88                 5
     89                 {% endif %} </label>
     90               {% if error_rating %}
     91               <div class="text-danger">{{ error_rating }}</div>
     92               {% endif %} </div>
     93           </div>
     94           <div class="form-group">
     95             <label class="col-sm-2 control-label" for="input-date-added">{{ entry_date_added }}</label>
     96             <div class="col-sm-3">
     97               <div class="input-group datetime">
     98                 <input type="text" name="date_added" value="{{ date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD HH:mm:ss" id="input-date-added" class="form-control" />
     99                 <span class="input-group-btn">
    100                 <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
    101                 </span> </div>
    102             </div>
    103           </div>
    104           <div class="form-group">
    105             <label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
    106             <div class="col-sm-10">
    107               <select name="status" id="input-status" class="form-control">
    108                 
    109                 {% if status %}
    110                 
    111                 <option value="1" selected="selected">{{ text_enabled }}</option>
    112                 <option value="0">{{ text_disabled }}</option>
    113                 
    114                 {% else %}
    115                 
    116                 <option value="1">{{ text_enabled }}</option>
    117                 <option value="0" selected="selected">{{ text_disabled }}</option>
    118                 
    119                 {% endif %}
    120               
    121               </select>
    122             </div>
    123           </div>
    124         </form>
    125       </div>
    126     </div>
    127   </div>
    128   <script type="text/javascript"><!--
    129 $('.datetime').datetimepicker({
    130 	language: '{{ datepicker }}',
    131 	pickDate: true,
    132 	pickTime: true
    133 });
    134 //--></script> 
    135   <script type="text/javascript"><!--
    136 $('input[name=\'product\']').autocomplete({
    137 	'source': function(request, response) {
    138 		$.ajax({
    139 			url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_name=' +  encodeURIComponent(request),
    140 			dataType: 'json',			
    141 			success: function(json) {
    142 				response($.map(json, function(item) {
    143 					return {
    144 						label: item['name'],
    145 						value: item['product_id']
    146 					}
    147 				}));
    148 			}
    149 		});
    150 	},
    151 	'select': function(item) {
    152 		$('input[name=\'product\']').val(item['label']);
    153 		$('input[name=\'product_id\']').val(item['value']);		
    154 	}	
    155 });
    156 //--></script></div>
    157 {{ footer }}