Commit 04682741 authored by John Punzalan's avatar John Punzalan

Update entity form edit

parent 07bcdec7
...@@ -15,6 +15,8 @@ class Esi_Management_Entity_Form { ...@@ -15,6 +15,8 @@ class Esi_Management_Entity_Form {
add_action( 'admin_init', array( $this, 'handle_form' ) ); add_action( 'admin_init', array( $this, 'handle_form' ) );
} }
/** /**
* Handle the new entity and edit form * Handle the new entity and edit form
* *
...@@ -34,6 +36,7 @@ class Esi_Management_Entity_Form { ...@@ -34,6 +36,7 @@ class Esi_Management_Entity_Form {
wp_die( __( 'Permission Denied!', 'esi' ) ); wp_die( __( 'Permission Denied!', 'esi' ) );
} }
$errors = array(); $errors = array();
$page_url = admin_url( 'admin.php?page=esi-management-entity' ); $page_url = admin_url( 'admin.php?page=esi-management-entity' );
$field_id = isset( $_POST['field_id'] ) ? intval( $_POST['field_id'] ) : 0; $field_id = isset( $_POST['field_id'] ) ? intval( $_POST['field_id'] ) : 0;
...@@ -45,11 +48,11 @@ class Esi_Management_Entity_Form { ...@@ -45,11 +48,11 @@ class Esi_Management_Entity_Form {
$city = isset( $_POST['city'] ) ? sanitize_text_field( $_POST['city'] ) : ''; $city = isset( $_POST['city'] ) ? sanitize_text_field( $_POST['city'] ) : '';
$is_investor = isset( $_POST['is_investor'] ) ? sanitize_text_field( $_POST['is_investor'] ) : ''; $is_investor = isset( $_POST['is_investor'] ) ? sanitize_text_field( $_POST['is_investor'] ) : '';
$entity_type_id = isset( $_POST['entity_type_id'] ) ? sanitize_text_field( $_POST['entity_type_id'] ) : ''; $entity_type_id = isset( $_POST['entity_type_id'] ) ? sanitize_text_field( $_POST['entity_type_id'] ) : '';
$employees = isset( $_POST['employees'] ) ? sanitize_text_field( $_POST['employees'] ) : ''; $employees = isset( $_POST['employees'] ) ? (int)sanitize_text_field( $_POST['employees'] ) : '';
$acquired_date = isset( $_POST['acquired_date'] ) ? sanitize_text_field( $_POST['acquired_date'] ) : ''; $acquired_date = isset( $_POST['acquired_date'] ) ? sanitize_text_field( $_POST['acquired_date'] ) : '';
$acquired_amount = isset( $_POST['acquired_amount'] ) ? sanitize_text_field( $_POST['acquired_amount'] ) : ''; $acquired_amount = isset( $_POST['acquired_amount'] ) ? (int)sanitize_text_field( $_POST['acquired_amount'] ) : '';
$total_raised = isset( $_POST['total_raised'] ) ? sanitize_text_field( $_POST['total_raised'] ) : ''; $total_raised = isset( $_POST['total_raised'] ) ? (int)sanitize_text_field( $_POST['total_raised'] ) : '';
$latest_round_type = isset( $_POST['latest_round_type'] ) ? sanitize_text_field( $_POST['latest_round_type'] ) : ''; $latest_round_type = isset( $_POST['latest_round_type'] ) ? (int)sanitize_text_field( $_POST['latest_round_type'] ) : '';
if ($is_investor == "on") { if ($is_investor == "on") {
$is_investor = 1; $is_investor = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment