Fix admin information fields

This commit is contained in:
Hoang Huu
2020-01-31 15:19:34 +07:00
parent 630f0dd573
commit e392e8d61a
5 changed files with 88 additions and 108 deletions

View File

@@ -242,44 +242,25 @@ class Opalestate_Property_MetaBox_Submission {
'id' => $prefix . 'builtyear',
'type' => 'text',
'description' => esc_html__( 'Enter built year', 'opalestate-pro' ),
'before_row' => '<div id="opalestate-submission-information" class="opalestate-tab-content"><div class="field-row-2">',
'before_row' => '<div id="opalestate-submission-information" class="opalestate-tab-content"><div class="field-row-2">',
],
[
'name' => esc_html__( 'Parking', 'opalestate-pro' ),
'id' => $prefix . 'parking',
'type' => 'text',
'attributes' => [
'type' => 'number',
'pattern' => '\d*',
],
'sanitization_cb' => 'absint',
'escape_cb' => 'absint',
'description' => esc_html__( 'Enter number of Parking', 'opalestate-pro' ),
'name' => esc_html__( 'Parking', 'opalestate-pro' ),
'id' => $prefix . 'parking',
'type' => 'text',
'description' => esc_html__( 'Enter number of Parking', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Bedrooms', 'opalestate-pro' ),
'id' => $prefix . 'bedrooms',
'type' => 'text',
'attributes' => [
'type' => 'number',
'pattern' => '\d*',
],
'sanitization_cb' => 'absint',
'escape_cb' => 'absint',
'description' => esc_html__( 'Enter number of bedrooms', 'opalestate-pro' ),
'name' => esc_html__( 'Bedrooms', 'opalestate-pro' ),
'id' => $prefix . 'bedrooms',
'type' => 'text',
'description' => esc_html__( 'Enter number of bedrooms', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Bathrooms', 'opalestate-pro' ),
'id' => $prefix . 'bathrooms',
'type' => 'text',
'attributes' => [
'type' => 'number',
'pattern' => '\d*',
],
'sanitization_cb' => 'absint',
'escape_cb' => 'absint',
'description' => esc_html__( 'Enter number of bathrooms', 'opalestate-pro' ),
'name' => esc_html__( 'Bathrooms', 'opalestate-pro' ),
'id' => $prefix . 'bathrooms',
'type' => 'text',
'description' => esc_html__( 'Enter number of bathrooms', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Plot Size', 'opalestate-pro' ),
@@ -288,16 +269,10 @@ class Opalestate_Property_MetaBox_Submission {
'description' => esc_html__( 'Enter size of Plot as 20x30, 20x30x40, 20x30x40x50', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Area Size', 'opalestate-pro' ),
'id' => $prefix . 'areasize',
'type' => 'text',
'attributes' => [
'type' => 'number',
'pattern' => '\d*',
],
'sanitization_cb' => 'absint',
'escape_cb' => 'absint',
'description' => esc_html__( 'Enter size of area in sqft', 'opalestate-pro' ),
'name' => esc_html__( 'Area Size', 'opalestate-pro' ),
'id' => $prefix . 'areasize',
'type' => 'text',
'description' => esc_html__( 'Enter size of area in sqft', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Orientation', 'opalestate-pro' ),
@@ -306,43 +281,25 @@ class Opalestate_Property_MetaBox_Submission {
'description' => esc_html__( 'Enter Orientation of property', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Living Rooms', 'opalestate-pro' ),
'id' => "{$prefix}livingrooms",
'type' => 'text',
'attributes' => [
'type' => 'number',
'pattern' => '\d*',
],
'sanitization_cb' => 'absint',
'escape_cb' => 'absint',
'description' => esc_html__( 'Enter Number of Living Rooms', 'opalestate-pro' ),
'name' => esc_html__( 'Living Rooms', 'opalestate-pro' ),
'id' => "{$prefix}livingrooms",
'type' => 'text',
'description' => esc_html__( 'Enter Number of Living Rooms', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Kitchens', 'opalestate-pro' ),
'id' => "{$prefix}kitchens",
'type' => 'text',
'attributes' => [
'type' => 'number',
'pattern' => '\d*',
],
'sanitization_cb' => 'absint',
'escape_cb' => 'absint',
'description' => esc_html__( 'Enter Number of Kitchens', 'opalestate-pro' ),
'name' => esc_html__( 'Kitchens', 'opalestate-pro' ),
'id' => "{$prefix}kitchens",
'type' => 'text',
'description' => esc_html__( 'Enter Number of Kitchens', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Rooms', 'opalestate-pro' ),
'id' => "{$prefix}amountrooms",
'type' => 'text',
'attributes' => [
'type' => 'number',
'pattern' => '\d*',
],
'sanitization_cb' => 'absint',
'escape_cb' => 'absint',
'description' => esc_html__( 'Enter Number of Amount Rooms', 'opalestate-pro' ),
'after_row' => '</div><hr><button type="button" class="submission-back-btn btn btn-primary">' . esc_html__( 'Previous Step',
'name' => esc_html__( 'Rooms', 'opalestate-pro' ),
'id' => "{$prefix}amountrooms",
'type' => 'text',
'description' => esc_html__( 'Enter Number of Amount Rooms', 'opalestate-pro' ),
'after_row' => '</div><hr><button type="button" class="submission-back-btn btn btn-primary">' . esc_html__( 'Previous Step',
'opalestate-pro' ) . '</button><button type="button" class="submission-next-btn btn btn-primary">' . esc_html__( 'Next Step', 'opalestate-pro' ) . '</button></div>',
],