⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

A few questions.



eviance

eviance
  • profile picture
  • Member

Posted 21 August 2017 - 06:44 AM

Hi all

 

At the beginning sorry for my English

 

My first question is about duplication, I created a button on the form but every time I load a page it duplicates all the records

$crud->add_action('Duplicate', '', 'duplicate','fa fa-magic',array($this,'duplicate'));

In the same controller function

 function duplicate($primary_key, $row)
    {
        $query = $this->db->get_where('tbl_shortpick', array('id' => $primary_key));
        if ($query->num_rows() > 0)
        {
            $res = $query->result();
            $row = $res[0];
        }


        $null= '';
        $dataos = date('Y-m-d H:i:s');

        $userId = 'DUBLICATE';


        $data = array(
            'ctn' => $row->ctn,
            'nrzamd' => $row->nrzamd,
            'item' => $null,
            'ile' => $null,
            'status' => $row->status,
            'przyczyna' => $row->przyczyna,
            'dataAdd' => $row->dataAdd,
            'createdBy' => $userId,
            'createdDtm' => $dataos
        );

        $this->db->insert('tbl_shortpick', $data);


    }

The next question is about the bootstrapv3 skin

 

Using the flexigrid theme the window scales to the edges of the page, bootstrapv3 is it possible to behave like the theme mentioned earlier?

 

Regards
Luke

 

 

 


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 21 August 2017 - 07:49 AM

Well, to my understanding, both the themes are designed differently..

Flexgrid have its own CSS / Bootstrap v3 has its own CSS

and ther aint any restrictions that you need to adhere to the given layout itself. If you need to update the layout, you surely can go ahead in the themes page, adhere / alter the new layout in the list php / CSS files wherever required.
 

Happy GCing :)