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

@@ -211,9 +211,9 @@ class Opalestate_Property_MetaBox {
],
],
[
'name' => esc_html__( 'Address', 'opalestate-pro' ),
'id' => $prefix . 'address',
'type' => 'textarea_small',
'name' => esc_html__( 'Address', 'opalestate-pro' ),
'id' => $prefix . 'address',
'type' => 'textarea_small',
],
[
'id' => "{$prefix}video",
@@ -289,37 +289,25 @@ class Opalestate_Property_MetaBox {
'id' => $prefix . 'builtyear',
'type' => 'text',
'description' => esc_html__( 'Enter built year', 'opalestate-pro' ),
'before_row' => '<div class="row-group-features group-has-three group-property-info clearfix"><h3>' . ( is_admin() ? "" : esc_html__( 'Property Information', 'opalestate-pro' ) ) . '</h3>',
'before_row' => '<div class="row-group-features group-has-three group-property-info clearfix"><h3>' . ( is_admin() ? "" : esc_html__( 'Property Information',
'opalestate-pro' ) ) . '</h3>',
],
[
'name' => esc_html__( 'Parking', 'opalestate-pro' ),
'id' => $prefix . 'parking',
'type' => 'text',
'attributes' => [
'type' => 'number',
'min' => 0,
],
'description' => esc_html__( 'Enter number of Parking', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Bedrooms', 'opalestate-pro' ),
'id' => $prefix . 'bedrooms',
'type' => 'text',
'attributes' => [
'type' => 'number',
'min' => 0,
],
'description' => esc_html__( 'Enter number of bedrooms', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Bathrooms', 'opalestate-pro' ),
'id' => $prefix . 'bathrooms',
'type' => 'text',
'attributes' => [
'type' => 'number',
'min' => 0,
],
'description' => esc_html__( 'Enter number of bathrooms', 'opalestate-pro' ),
],
[
@@ -344,33 +332,20 @@ class Opalestate_Property_MetaBox {
'name' => esc_html__( 'Living Rooms', 'opalestate-pro' ),
'id' => "{$prefix}livingrooms",
'type' => 'text',
'attributes' => [
'type' => 'number',
'min' => 0,
],
'description' => esc_html__( 'Enter Number of Living Rooms', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Kitchens', 'opalestate-pro' ),
'id' => "{$prefix}kitchens",
'type' => 'text',
'attributes' => [
'type' => 'number',
'min' => 0,
],
'description' => esc_html__( 'Enter Number of Kitchens', 'opalestate-pro' ),
],
[
'name' => esc_html__( 'Rooms', 'opalestate-pro' ),
'id' => "{$prefix}amountrooms",
'type' => 'text',
'attributes' => [
'type' => 'number',
'min' => 0,
],
'description' => esc_html__( 'Enter Number of Amount Rooms', 'opalestate-pro' ),
'after_row' => '</div>',
'after_row' => '</div>',
],
];

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>',
],