Gantry

 view release on metacpan or  search on metacpan

lib/Gantry/Plugins/AjaxCRUD.pm  view on Meta::CPAN

    );

    $show_form = 1 if ( $results->has_invalid );
    $show_form = 1 if ( $results->has_missing );

    # Form has errors
    if ( $show_form ) {
        # order matters, get form data first...
        $your_self->stash->view->form( $form );

        # ... then overlay with results
        if ( $your_self->method eq 'POST' ) {
            $your_self->stash->view->form->results( $results );
        }
    
    }
    # Form looks good, make update
    else {
        
        # remove submit button param
        delete $params{submit};

lib/Gantry/Plugins/AutoCRUD.pm  view on Meta::CPAN

                row         => $row,
            }
        );
    }

    # Form has errors
    if ( $show_form ) {
        # order matters, get form data first...
        $self->stash->view->form( $form );

        # ... then overlay with results
        if ( $self->method eq 'POST' ) {
            $self->stash->view->form->results( $results );
        }
    }
    # Form looks good, make update
    else {
  
        # remove submit button param
        my $submit_add_another = delete $params{submit_add_another};
        delete $params{submit};

lib/Gantry/Plugins/CRUD.pm  view on Meta::CPAN

    }
    else {
        $show_form = 1;
    }

    # Form has errors
    if ( $show_form ) {
        # order matters, get form data first...
        $your_self->stash->view->form( $form );

        # ... then overlay with results
        if ( $your_self->method eq 'POST' ) {
            $your_self->stash->view->form->results( $results );
        }
    
    }
    # Form looks good, make update
    else {
        my $redirect;
        my $action =    $params{submit_add_another}
                        ? 'submit_add_another'



( run in 0.325 second using v1.01-cache-2.11-cpan-49f99fa48dc )