verifyPackage( 'contact' ); $gBitSystem->verifyPermission( 'p_contact_update' ); include_once CONTACT_PKG_INCLUDE_PATH . 'lookup_contact_inc.php'; if( empty( $gContent ) || !is_object( $gContent ) ) { $gContent = new Contact(); } if( !empty( $_REQUEST['xref_id'] ) ) { $gContent->loadXref( $_REQUEST['xref_id'] ); } $gContent->stepXref( $_REQUEST ); if(isset($_REQUEST["fSaveXref"])) { KernelTools::bit_redirect( $gContent->getDisplayUrl() ); } // formInfo might be set due to a error on submit if( empty( $xrefInfo ) ) { $xrefInfo = &$gContent->mInfo['xref_store']['data']; } if( empty( $xrefInfo['content_id'] ) ) { $xrefInfo = $_REQUEST; if ( isset($xrefInfo['edit']) ) { $xrefInfo['data'] = $xrefInfo['edit']; } } // Ensure simple text edit boxes for xref entries $gContent->mInfo['format_guid'] = 'text'; $gBitSmarty->assign( 'xrefInfo', $xrefInfo ); $gBitSmarty->assign( 'title', $gContent->mInfo['title'] ); $gBitSmarty->assign( 'xref_title', $gContent->mInfo['xref_title'] ); $gBitSmarty->assign( 'errors', $gContent->mErrors ); $gBitSystem->display( 'bitpackage:contact/edit_key_break.tpl', 'Edit: ' , [ 'display_mode' => 'edit' ]);