Commit 20b02be8 authored by John Punzalan's avatar John Punzalan

Update entity form edit

parent 0ff9a819
......@@ -49,10 +49,11 @@ class Esi_Management_Entity_Form {
$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'] ) : '';
$employees = isset( $_POST['employees'] ) ? (int)sanitize_text_field( $_POST['employees'] ) : '';
$acquired_date = isset( $_POST['acquired_date'] ) ? sanitize_text_field( $_POST['acquired_date'] ) : '';
$acquired_amount = isset( $_POST['acquired_amount'] ) ? (int)sanitize_text_field( $_POST['acquired_amount'] ) : '';
$total_raised = isset( $_POST['total_raised'] ) ? (int)sanitize_text_field( $_POST['total_raised'] ) : '';
$latest_round_type = isset( $_POST['latest_round_type'] ) ? (int)sanitize_text_field( $_POST['latest_round_type'] ) : '';
$founded_date = isset( $_POST['founded-date'] ) ? sanitize_text_field( $_POST['founded-date'] ) : '';
$acquired_date = isset( $_POST['acquired-date'] ) ? sanitize_text_field( $_POST['acquired-date'] ) : '';
$acquired_amount = isset( $_POST['acquired-amount'] ) ? (int)sanitize_text_field( $_POST['acquired-amount'] ) : '';
$total_raised = isset( $_POST['total-raised'] ) ? (int)sanitize_text_field( $_POST['total-raised'] ) : '';
$latest_round_type = isset( $_POST['latest-round-type'] ) ? (int)sanitize_text_field( $_POST['latest-round-type'] ) : '';
if ($is_investor == "on") {
$is_investor = 1;
......@@ -88,6 +89,7 @@ class Esi_Management_Entity_Form {
'city' => $city,
'entity_type_id' => $entity_type_id,
'employees' => $employees,
'founded_in' => $founded_date,
'acquired_at' => $acquired_date,
'acquired_amount' => $acquired_amount,
'total_raised' => $total_raised,
......
......@@ -95,10 +95,10 @@ add_thickbox();
</tr>
<tr class="row-founded-date">
<th scope="row">
<label for="acquired-date"><?php _e( 'Founded In', 'esi' ); ?></label>
<label for="founded-date"><?php _e( 'Founded In', 'esi' ); ?></label>
</th>
<td>
<input type="date" name="founded-date" id="founded-date" class="regular-text" placeholder="<?php echo esc_attr( '', 'esi' ); ?>" value="<?php echo ($item)?esc_attr($item->founded_date):''; ?>" />
<input type="date" name="founded-date" id="founded-date" class="regular-text" placeholder="<?php echo esc_attr( '', 'esi' ); ?>" value="<?php echo ($item)?esc_attr($item->founded_in):''; ?>" />
</td>
</tr>
<tr class="row-employees">
......
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