} $all_map[] = __('Select Map', WPGMP_TEXT_DOMAIN); foreach ($map_records as $key => $map_record) { $all_map[$map_record->map_id] = $map_record->map_title; } $form = new Responsive_Markup(); $form->set_form_method('get'); $form->add_element('hidden', 'page', array('value' => $_GET['page'])); $form->set_header(__('Choose Map for Drawing', WPGMP_TEXT_DOMAIN), $response, __('Choose Map for Drawing', WPGMP_TEXT_DOMAIN), 'wpgmp_manage_location'); $form->add_element('select', 'map_id', array('lable' => __('Select map', WPGMP_TEXT_DOMAIN), 'current' => $map_id, 'value' => $data['map_id'], 'desc' => __('Enter here the location title.', WPGMP_TEXT_DOMAIN), 'required' => true, 'options' => $all_map)); $form->render(); if (!empty($_GET['map_id'])) { $form = new Responsive_Markup(); $form->set_header(__('Draw Shapes', WPGMP_TEXT_DOMAIN), $response, __('Draw Shapes', WPGMP_TEXT_DOMAIN), 'wpgmp_manage_location'); echo $form->get_header(); echo $form->get_form_header(); echo "<div class='form-group'><div class='col-md-9'>"; // do_shortcode("[put_wpgm id=".$map_id."]",false); wpgmp_generate_map($selected_map[0]); echo "</div><div class='col-md-3'>"; echo '<h4 class="alert alert-info">' . __('Shape Properties', WPGMP_TEXT_DOMAIN) . '<i class="wpgmp-shape-delete hiderow dashicons-before dashicons-trash"></i></h4>'; echo "<div class='row hiderow'><div class='col-md-6'>"; echo Responsive_Markup::field_text('shape_stroke_color', array('value' => '#ff0000', 'class' => 'color {pickerClosable:true} form-control', 'id' => 'shape_stroke_color', 'desc' => __('Stroke Color', WPGMP_TEXT_DOMAIN), 'placeholder' => __('Stroke Color', WPGMP_TEXT_DOMAIN))); echo "</div><div class='col-md-6'>"; $stroke_opacity = array('1' => '1', '0.9' => '0.9', '0.8' => '0.8', '0.7' => '0.7', '0.6' => '0.6', '0.5' => '0.5', '0.4' => '0.4', '0.3' => '0.3', '0.2' => '0.2', '0.1' => '0.1'); echo Responsive_Markup::field_text('shape_fill_color', array('value' => '#ff0000', 'class' => 'color {pickerClosable:true} form-control', 'id' => 'shape_fill_color', 'desc' => __('Fill Color', WPGMP_TEXT_DOMAIN), 'placeholder' => __('Fill Color', WPGMP_TEXT_DOMAIN))); echo "</div></div><div class='row hiderow'><div class='col-md-6'>"; $stroke_weight = array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18', '19' => '19', '20' => '20'); echo Responsive_Markup::field_select('shape_stroke_weight', array('current' => (isset($data['shape_stroke_weight']) and !empty($data['shape_stroke_weight'])) ? sanitize_text_field(wp_unslash($data['shape_stroke_weight'])) : '', 'desc' => __('Stroke Weight', WPGMP_TEXT_DOMAIN), 'options' => $stroke_weight, 'class' => 'form-control-select')); echo "</div><div class='col-md-6'>"; echo Responsive_Markup::field_select('shape_stroke_opacity', array('current' => (isset($data['shape_stroke_opacity']) and !empty($data['route_stroke_opacity'])) ? sanitize_text_field(wp_unslash($data['route_stroke_opacity'])) : '', 'desc' => __('Stroke Opacity', WPGMP_TEXT_DOMAIN), 'options' => $stroke_opacity, 'class' => 'form-control-select'));