|
|
@ -498,13 +498,14 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form( $form, &$form_state, $pe
|
|
|
|
return $form;
|
|
|
|
return $form;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function _fulcrm_shoppingcart_drupal_get_form_with_form_state( $form_id, $form_state ) {
|
|
|
|
function fulcrm_shoppingcart_buy_eventbookingtype_guest_form_submit( $form, &$form_state ) {
|
|
|
|
$args = func_get_args();
|
|
|
|
die( print_r( $form_state, 1 ) );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
array_shift( $args ); // Remove $form_id from the arguments.
|
|
|
|
function fulcrm_shoppingcart_buy_eventbookingtype_guest_form( $form, &$form_state, $person, $eventbookingtype, $product ) {
|
|
|
|
array_shift( $args ); // Remove $form_state from the arguments.
|
|
|
|
$form = fulcrm_shoppingcart_buy_eventbookingtype_form( $form, $form_state, $person, $eventbookingtype, $product );
|
|
|
|
$form_state[ 'build_info' ][ 'args' ] = $args;
|
|
|
|
$form[ 'actions' ][ 'submit' ][ '#submit' ] = array( 'fulcrm_shoppingcart_buy_eventbookingtype_guest_form_submit' );
|
|
|
|
return drupal_build_form( $form_id, $form_state );
|
|
|
|
return $form;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function fulcrm_shoppingcart_buy_eventbookingtype_login_form_submit( $form, &$form_state ) {
|
|
|
|
function fulcrm_shoppingcart_buy_eventbookingtype_login_form_submit( $form, &$form_state ) {
|
|
|
@ -515,7 +516,6 @@ function fulcrm_shoppingcart_buy_eventbookingtype_login_form_submit( $form, &$fo
|
|
|
|
function fulcrm_shoppingcart_buy_eventbookingtype_login_form( $form, &$form_state, $product_id ) {
|
|
|
|
function fulcrm_shoppingcart_buy_eventbookingtype_login_form( $form, &$form_state, $product_id ) {
|
|
|
|
$form = user_login( $form, $form_state );
|
|
|
|
$form = user_login( $form, $form_state );
|
|
|
|
$form_state[ 'fulcrm_shoppingcart' ][ 'redirect_buy_product_id' ] = $product_id;
|
|
|
|
$form_state[ 'fulcrm_shoppingcart' ][ 'redirect_buy_product_id' ] = $product_id;
|
|
|
|
//$form[ 'actions' ][ 'submit' ][ '#submit' ] = array( 'fulcrm_shoppingcart_buy_eventbookingtype_login_form_submit' );
|
|
|
|
|
|
|
|
return $form;
|
|
|
|
return $form;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -531,7 +531,7 @@ function fulcrm_shoppingcart_buy_eventbookingtype( $person, $eventbookingtype, $
|
|
|
|
if ( user_is_anonymous() ) {
|
|
|
|
if ( user_is_anonymous() ) {
|
|
|
|
$user_login_form = drupal_get_form( 'fulcrm_shoppingcart_buy_eventbookingtype_login_form', $product_id = $product[ 'id' ] );
|
|
|
|
$user_login_form = drupal_get_form( 'fulcrm_shoppingcart_buy_eventbookingtype_login_form', $product_id = $product[ 'id' ] );
|
|
|
|
|
|
|
|
|
|
|
|
$fulcrm_shoppingcart_buy_eventbookingtype_form = drupal_get_form( 'fulcrm_shoppingcart_buy_eventbookingtype_form', $person, $eventbookingtype, $product );
|
|
|
|
$fulcrm_shoppingcart_buy_eventbookingtype_form = drupal_get_form( 'fulcrm_shoppingcart_buy_eventbookingtype_guest_form', $person, $eventbookingtype, $product );
|
|
|
|
|
|
|
|
|
|
|
|
return theme( 'fulcrm_shoppingcart_buy_eventbookingtype', array( 'fulcrm_shoppingcart_buy_eventbookingtype_form' => $fulcrm_shoppingcart_buy_eventbookingtype_form, 'user_login_form' => $user_login_form ) );
|
|
|
|
return theme( 'fulcrm_shoppingcart_buy_eventbookingtype', array( 'fulcrm_shoppingcart_buy_eventbookingtype_form' => $fulcrm_shoppingcart_buy_eventbookingtype_form, 'user_login_form' => $user_login_form ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|