⚠ In case you've missed it we are migrating 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 forum is read-only and soon will be archived. ⚠


Kobus

Member Since 07 Oct 2012
Offline Last Active Sep 02 2015 09:36 PM
-----

Topics I've Started

Bootstrap CSS modification

23 August 2015 - 08:03 PM

Hi all,

 

I have purchased the Bootstrap theme, and decided to make some CSS modifications to it.

 

Since it is a purchased component, I do not know what the rules are with contributing my changes, or even if I can contribute them?

 

See screenshot for this modification. I still need to work a bit on the edit/add screens, therefore only posted the list screen.

 

Attached File  film_management.png   62.01K   643 downloads

 

Kind regards,

 

Kobus


Where clauses on relation table in list view?

22 October 2014 - 03:02 PM

Hi all,

 

Hope you guys can help me.

 

I have two tables that need to be linked: 'user' and 'dealer'. The relation table is 'user_dealer'.

I found using $crud->set_relation_n_n() works well for edit and add screens to restrict which records are edited and added, like this:

$crud->set_relation_n_n('Dealers', 'user_dealer', 'dealer', 'user_id', 'dealer_id', 'dealer', null, array('id' => $this->session->userdata('dealer_id')));

But for some reason, this does not work for the LIST grid.

I tried $crud->where() but this does not work, as it does not have the column from the relation table there.

 

Can anybody help, please? I also posted this on Stack Overflow, so hope I get this resolved soon.

 

Thanks,

 

Kobus

 


Conditional delete/deactivate?

31 August 2014 - 05:43 PM

Hi all,

 

Just a quick question, hoping someone has done this before:

 

1. I have a table called "security_questions" which contains like 20 or so security questions that users can choose when they register on my side.

2. I have used Grocery CRUD for admins to manage the questions.

3. When users choose their security questions on signup, a separate table "user_security_questions" is populated with their question ID and their respective answers.

4. I want to be able to prevent deletion/deactivation of an item that is in use by any user.

 

Is there a quick way to do this? Anybody done similar things before? I am thinking a callback "before delete" and then check if the ID is in use, then return false if so, but perhaps there is something better, such as not showing the delete icon in the first place in list view?

 

The alternative to finding a way to delete the item in the "user_security_question" at the time of delete via a callback is not ideal, because in the event of there being only one security question, the user's security question will be deleted.

 

Any ideas will be appreciated!

 

Kind regards,

 

Kobus