Update form && API

This commit is contained in:
Hoang Huu
2019-10-09 17:23:19 +07:00
parent 7b67843a52
commit a7f217d7a4
12 changed files with 576 additions and 56 deletions

View File

@@ -100,13 +100,27 @@ function opalestate_terms_multi_check( $terms ) {
$html = '<div class="opal-form-group">';
foreach ( $terms as $term ) {
$id = time() . '-' . $term->slug;
$html .= '<div class="group-item">';
$html .= '<input type="checkbox" class="form-control-checkbox" id="' . $id . '" name="types[' . $term->slug . ']" id="' . $id . '" value="' . $term->slug . '">';
$html .= ' <label for="' . $id . '">' . $term->name . '</label>';
$html .= '</div>';
}
$html .= '</div>';
return $html;
}
function opalestate_categories_multi_check( $terms ) {
$html = '<div class="opal-form-group">';
foreach ( $terms as $term ) {
$id = time() . '-' . $term->slug;
$html .= '<div class="group-item">';
$html .= '<input type="checkbox" class="form-control-checkbox" id="' . $id . '" name="cat[' . $term->slug . ']" id="' . $id . '" value="' . $term->slug . '">';
$html .= ' <label for="' . $id . '">' . $term->name . '</label>';
$html .= '</div>';
}
$html .= '</div>';