Revision 418

Date:
2014/02/17 00:12:56
Author:
ahitrov
Revision Log:
Type-component check. Unexistent components don't bring us to 500 for now
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/comps/contenido/components/object_form.msn

     
    65 65 </tr>
    66 66 </table>
    67 67 </td></tr>
    68 % if ($prop->{type} eq 'parent')
    69 % {
    68 % if ($prop->{type} eq 'parent') {
    70 69 <tr><td><& "/contenido/components/inputs/$prop->{type}.msn", prop => $prop, object=>$object, options=>$options, name => $name, check => ($object->$name || $prop->{default} || $sect_id ), id => $object->id() &></td></tr>
    71 % }
    72 % elsif( ( $prop->{type} ne 'flag' ) && ($prop->{type} ne 'checkbox') )
    73 % {
    70 % } elsif( ( $prop->{type} ne 'flag' ) && ($prop->{type} ne 'checkbox') ) {
    71 % if ( $m->comp_exists( "/contenido/components/inputs/$prop->{type}.msn" ) ) {
    74 72 <tr><td><& "/contenido/components/inputs/$prop->{type}.msn", prop => $prop, object=>$object, options => $options, name => $name, check => ($object->$name || $object->{$name}), id => ($object->id() || 0) &></td></tr>
    73 % } else {
    74 <tr><td style="color:red">Попытка вызвать компоненту неизвестного типа (<% Dumper $prop %>)</td></tr>
    75 % }
    75 76 % }
    76 77 % }
    77 78 <tr>