Advertisement
malkasun

addpage

Jun 28th, 2020
1,097
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 9.69 KB | None | 0 0
  1. <form id="items-add-form"  novalidate role="form" enctype="multipart/form-data" class="form multi-form page-form" action="<?php print_link("items/add?csrf_token=$csrf_token") ?>" method="post" >
  2.     <!--[main-form-start]-->
  3.     <div>
  4.         <table class="table table-striped table-sm" data-maxrow="100" data-minrow="1">
  5.             <thead>
  6.                 <tr>
  7.                     <th class="bg-light"><label for="product">Product</label></th>
  8.                     <th class="bg-light"><label for="qun">Qun</label></th>
  9.                     <th class="bg-light"><label for="unite_price">Unite Price</label></th>
  10.                     <th class="bg-light"><label for="sub_total">Sub Total</label></th>
  11.                    
  12.                     <th></th>
  13.                 </tr>
  14.             </thead>
  15.             <tbody>
  16.                 <?php
  17.                for( $row = 1; $row <= 1; $row++ ){
  18.                ?>
  19.                 <tr class="input-row">
  20.                    
  21.                     <td>
  22.                         <div id="ctrl-product-row<?php echo $row; ?>-holder" class="">
  23.                            
  24.                             <input id="ctrl-product-row<?php echo $row; ?>"  value="<?php  echo $this->set_field_value('product',"", $row); ?>" type="text" placeholder="Enter Product"  required="" name="row<?php echo $row ?>[product]"  class="form-control " />
  25.                                
  26.                                
  27.                                
  28.                                
  29.                             </div>
  30.                            
  31.                            
  32.                         </td>
  33.                        
  34.                        
  35.                         <td>
  36.                             <div id="ctrl-qun-row<?php echo $row; ?>-holder" class="">
  37.                                
  38.                                 <input id="ctrl-qun-row<?php echo $row; ?>"  value="<?php  echo $this->set_field_value('qun',"", $row); ?>" type="number" placeholder="Enter Qun" step="0.1"  required="" name="row<?php echo $row ?>[qun]"  class="form-control " />
  39.                                    
  40.                                    
  41.                                    
  42.                                    
  43.                                 </div>
  44.                                
  45.                                
  46.                             </td>
  47.                            
  48.                            
  49.                             <td>
  50.                                 <div id="ctrl-unite_price-row<?php echo $row; ?>-holder" class="">
  51.                                    
  52.                                     <input id="ctrl-unite_price-row<?php echo $row; ?>"  value="<?php  echo $this->set_field_value('unite_price',"", $row); ?>" type="number" placeholder="Enter Unite Price" step="0.1"  required="" name="row<?php echo $row ?>[unite_price]"  class="form-control " />
  53.                                        
  54.                                        
  55.                                        
  56.                                        
  57.                                     </div>
  58.                                    
  59.                                    
  60.                                 </td>
  61.                                
  62.                                
  63.                                 <td>
  64.                                     <div id="ctrl-sub_total-row<?php echo $row; ?>-holder" class="">
  65.                                        
  66.                                         <input id="ctrl-sub_total-row<?php echo $row; ?>"  value="<?php  echo $this->set_field_value('sub_total',"", $row); ?>" type="number" placeholder="Enter Sub Total" step="0.1"  required="" name="row<?php echo $row ?>[sub_total]"  class="form-control " />
  67.                                            
  68.                                            
  69.                                            
  70.                                            
  71.                                         </div>
  72.                                        
  73.                                        
  74.                                     </td>
  75.                                    
  76.                                    
  77.                                    
  78.                                     <th class="text-center">
  79.                                         <button type="button" class="close btn-remove-table-row">&times;</button>
  80.                                     </th>
  81.                                 </tr>
  82.                                 <?php
  83.                                }
  84.                                ?>
  85.                             </tbody>
  86.                             <tfoot>
  87.                                 <tr>
  88.                                     <th colspan="100" class="text-right">
  89.                                         <?php $template_id = "table-row-" . random_str(); ?>
  90.                                         <button type="button" data-template="#<?php echo $template_id ?>" class="btn btn-sm btn-light btn-add-table-row"><i class="fa fa-plus"></i></button>
  91.                                     </th>
  92.                                 </tr>
  93.                             </tfoot>
  94.                         </table>
  95.                        
  96.                     </div>
  97.                     <!--[main-form-end]-->
  98.                     <div class="form-group form-submit-btn-holder text-center mt-3">
  99.                         <div class="form-ajax-status"></div>
  100.                         <button class="btn btn-primary" type="submit">
  101.                             Submit
  102.                             <i class="fa fa-send"></i>
  103.                         </button>
  104.                     </div>
  105.                 </form>
  106.                 <!--[table row template]-->
  107.                 <template id="<?php echo $template_id ?>">
  108.                     <tr class="input-row">
  109.                         <?php $row = 1; ?>
  110.                        
  111.                         <td>
  112.                             <div id="ctrl-product-row<?php echo $row; ?>-holder" class="">
  113.                                
  114.                                 <input id="ctrl-product-row<?php echo $row; ?>"  value="<?php  echo $this->set_field_value('product',"", $row); ?>" type="text" placeholder="Enter Product"  required="" name="row<?php echo $row ?>[product]"  class="form-control " />
  115.                                    
  116.                                    
  117.                                    
  118.                                    
  119.                                 </div>
  120.                                
  121.                                
  122.                             </td>
  123.                            
  124.                            
  125.                             <td>
  126.                                 <div id="ctrl-qun-row<?php echo $row; ?>-holder" class="">
  127.                                    
  128.                                     <input id="ctrl-qun-row<?php echo $row; ?>"  value="<?php  echo $this->set_field_value('qun',"", $row); ?>" type="number" placeholder="Enter Qun" step="0.1"  required="" name="row<?php echo $row ?>[qun]"  class="form-control " />
  129.                                        
  130.                                        
  131.                                        
  132.                                        
  133.                                     </div>
  134.                                    
  135.                                    
  136.                                 </td>
  137.                                
  138.                                
  139.                                 <td>
  140.                                     <div id="ctrl-unite_price-row<?php echo $row; ?>-holder" class="">
  141.                                        
  142.                                         <input id="ctrl-unite_price-row<?php echo $row; ?>"  value="<?php  echo $this->set_field_value('unite_price',"", $row); ?>" type="number" placeholder="Enter Unite Price" step="0.1"  required="" name="row<?php echo $row ?>[unite_price]"  class="form-control " />
  143.                                            
  144.                                            
  145.                                            
  146.                                            
  147.                                         </div>
  148.                                        
  149.                                        
  150.                                     </td>
  151.                                    
  152.                                    
  153.                                     <td>
  154.                                         <div id="ctrl-sub_total-row<?php echo $row; ?>-holder" class="">
  155.                                            
  156.                                             <input id="ctrl-sub_total-row<?php echo $row; ?>"  value="<?php  echo $this->set_field_value('sub_total',"", $row); ?>" type="number" placeholder="Enter Sub Total" step="0.1"  required="" name="row<?php echo $row ?>[sub_total]"  class="form-control " />
  157.                                                
  158.                                                
  159.                                                
  160.                                                
  161.                                             </div>
  162.                                            
  163.                                            
  164.                                         </td>
  165.                                        
  166.                                        
  167.                                        
  168.                                         <th class="text-center">
  169.                                             <button type="button" class="close btn-remove-table-row">&times;</button>
  170.                                         </th>
  171.                                     </tr>
  172.                                 </template>
  173.                                 <!--[/table row template]-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement