Welcome Guest, Not a member yet? Register   Sign In
CodeExtinguisher v2.0 Release Candidate 12.3
#21

[eluser]andjules[/eluser]
note: maybe I'm missing something, but when I try to edit or add to the 'Example' set on your preview site, and try to 'add new' under the many-to-many control at the top, the revealed add form has a close button, but no submit button...
#22

[eluser]Majd Taby[/eluser]
andjules, yes, the close button closes that form....and the data gets inserted when you click submit on the big form (sorry if i'm not being clear)
#23

[eluser]andjules[/eluser]
I get it... yes, subforms can be confusing to the user whichever approach you choose (ajax add, or add-on-submit). If you stick with the current approach, then maybe the revealed form needs a "This value will be added when the form is submitted" label (Drupal uses something like this with file uploads)... However, Basecamp (which is a pretty good model... see 3rd screenshot on the page) handles this situation via an ajax-add with an "add this item" button followed with a red "I'm done adding items" (cancel) within the subform. Worth considering.
#24

[eluser]Majd Taby[/eluser]
that's a good idea...i'll think about it.
#25

[eluser]got 2 doodle[/eluser]
what issues have been fixed in 12.2, have you solved the problem where windows(xampp) users had a problem with image upload?

I have gone back to 11.2 for now.
#26

[eluser]abmcr[/eluser]
I have two question (excuse me ... i am beginner with CodeExtinguisher)

1) i have set in codex.php $config['codex_auto_generate_crud'] = false;
how i create my menu bar? navigator.php?

2) i have build a table
Code:
CREATE TABLE `related2` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(200) NOT NULL,
  `description` text NOT NULL,
  `example_id` int(11) NOT NULL,
  `foto` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
and in edit mode all field are displayed, but in overview no (see the image)
Code:
$config = array(
                    'db_table' => 'related2', //The name of the table associated with this controller
                    'form_setup' => $this->spyc->YAMLLOAD($this->codexadmin->getDefinitionFileName('esempio_form')),
                    'controller_name' => 'Esempio',
                    'primary_key' => 'id',
                    'display_fields'=>array('name','foto','example_id','description'),
                    'rules'=>$rules
                    );
        $this->setConfig($config);
and my yml file is
Code:
general_information:
    class: FieldSet
    params:
        form:
            name:
                class: TextBox
            example_id:
                class: TextBox
            description:
                class: TextArea
                attributes:
                    rows:5
                    cols:50
allegati:
    class: FieldSet
    params:
            form:
                 foto:
                      class: Image
                      params:
                             make_thumbnail: true
                             height:100
                             width:100
                             url_path: uploads/
                             upload_path: ./uploads/
Finally: where is the best way for generate a thumbnail and show it in overview mode?
#27

[eluser]Majd Taby[/eluser]
abmcr,
1) By default, codex will generate a menu item for each table in your database. If you don't want a table to be in your navigation, add it to the codex_exclude_tables configuration item. If you create your own controller (as opposed to the automated one), then you need to add the item manually in codex_navigation.

I'm going to fix this so that if you have your own controller created, it will keep the link updated.

2) if you want all the fields to be displayed in overview, remove this line: 'display_fields'=>array('name','foto','example_id','description'),

3) your 'foto' field is generating a thumbnail. If you add 'foto' to your display fields, then you will get a thumbnail in your overview.
#28

[eluser]abmcr[/eluser]
Thank you Jtaby: at the point 2 i not want all fields to be displayed, but three only: 'name’,’example_id’,’description
I have set in the controller
Code:
$config = array(
                    'db_table' => 'related2', //The name of the table associated with this controller
                    'form_setup' => $this->spyc->YAMLLOAD($this->codexadmin->getDefinitionFileName('esempio_form')),
                    'controller_name' => 'Esempio',
                    'primary_key' => 'id',
                    'display_fields'=>array('name','example_id','description'),
                    'rules'=>$rules
                    );
        $this->setConfig($config);
but in the Overview mode on ly name field are displayed (see the second img attached to previous post); when i edit the record all work fine... but i don't understaand because the field not appear..... :-(
#29

[eluser]Majd Taby[/eluser]
ok, you might have found a bug, let me check it out.
#30

[eluser]abmcr[/eluser]
do i post you my code?




Theme © iAndrew 2016 - Forum software by © MyBB