Uploaded image for project: 'InvoicePlane'
  1. InvoicePlane
  2. IP-270

Improve "Select customer" field

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.4.0
    • Component/s: Clients / Users
    • Labels:
      None

      Description

      Suggestion from the user:

      <script type="text/javascript">
          $().ready(function () {
              $("[name='client_name']").select2({allowClear: true});
              $("#client_name").focus();
          });
      </script>
       
          <div class="form-group">
       
          <label for="client_name"><?php echo lang('client'); ?></label>
              <select name="client_name" id="client_name" class="input-sm form-control" autofocus>
                  <option></option>
                  <?php foreach ($clients as $client) { ?>
                      <option value="<?php echo $client->client_name; ?>"
                          <?php if ($client_name == $client->client_name) { ?>selected="selected"<?php } ?>
                      > <?php echo $client->client_name; ?>     </option>
       
                  <?php } ?>
              </select>
          </div>
      

      $this->load->model('clients/mdl_clients');   
       
          $data = array(
              'invoice_groups' => $this->mdl_invoice_groups->get()->result(),
              'tax_rates' => $this->mdl_tax_rates->get()->result(),
              'client_name' => $this->input->post('client_name')   ,
              'clients' => $this->mdl_clients->get()->result(),   //<--- add this line
          );
      

        Gliffy Diagrams

          Attachments

            Structure

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  kovah Kovah
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel