Ejemplo n.º 1
0
    echo Responsive_Markup::field_textarea('shape_path', array('value' => '', 'class' => 'form-control', 'id' => 'shape_path', 'desc' => __('Cordinates', WPGMP_TEXT_DOMAIN), 'placeholder' => __('Cordinates', WPGMP_TEXT_DOMAIN)));
    echo '</div></div>';
    echo Responsive_Markup::field_message('shape_message', array('value' => __('Draw or click on a shape to apply properties.', WPGMP_TEXT_DOMAIN), 'class' => 'alert alert-default'));
    echo '';
    echo '<h4 class="alert alert-info">' . __('Shape onclick Event', WPGMP_TEXT_DOMAIN) . '</h4>';
    $shape_events = array('click' => 'click', 'dblclick' => 'dblclick', 'mouseover' => 'mouseover', 'mouseout' => 'mouseout');
    echo "<div class='row hiderow'><div class='col-md-12'>";
    echo Responsive_Markup::field_text('shape_click_url', array('value' => '', 'class' => 'form-control', 'id' => 'shape_click_url', 'desc' => __('Redirect URL', WPGMP_TEXT_DOMAIN), 'placeholder' => __('Redirect url on click.', WPGMP_TEXT_DOMAIN)));
    echo "</div></div><div class='row hiderow'><div class='col-md-12'>";
    echo Responsive_Markup::field_textarea('shape_click_message', array('value' => '', 'class' => 'form-control', 'id' => 'shape_click_message', 'desc' => __('Message on click.', WPGMP_TEXT_DOMAIN), 'placeholder' => __('Message to display on click.', WPGMP_TEXT_DOMAIN)));
    echo '</div></div>';
    echo Responsive_Markup::field_submit('wpgmp_save_drawing', array('value' => __('Save Drawing', WPGMP_TEXT_DOMAIN)));
    echo '</div></div>';
    echo Responsive_Markup::field_hidden('shapes_values', array('value' => ''));
    echo Responsive_Markup::field_hidden('map_id', array('value' => $_GET['map_id']));
    echo Responsive_Markup::field_hidden('operation', array('value' => 'save'));
    echo $form->get_form_footer();
    echo $form->get_footer();
}
function wpgmp_generate_map($map)
{
    // Fetch map information.
    $modelFactory = new FactoryModelWPGMP();
    $category_obj = $modelFactory->create_object('group_map');
    $categories = $category_obj->fetch();
    $all_categories = array();
    $all_categories_name = array();
    $route_obj = $modelFactory->create_object('route');
    $all_routes = $route_obj->fetch();
    if (!empty($categories)) {
        foreach ($categories as $category) {
 /**
  * Image picker element.
  * @param  string $name  No use.
  * @param  array  $atts  Attributes for custom html.
  * @return html       Image Picker.
  */
 public static function field_image_picker($name, $atts)
 {
     $html = Responsive_Markup::field_image('selected_image', array('lable' => 'Choose marker Image', 'src' => $atts['src'], 'width' => '32', 'class' => 'noclass selected_image col-md-1', 'height' => '37', 'required' => $atts['required']));
     $html .= Responsive_Markup::field_anchor('choose_image', array('value' => __('Choose Marker Image', WPGMP_TEXT_DOMAIN), 'href' => 'javascript:void(0);', 'class' => 'btn btn-info choose_image col-md-3 ', 'data' => array('target' => $name)));
     $html .= Responsive_Markup::field_anchor('remove_image', array('value' => __('Remove Marker Image', WPGMP_TEXT_DOMAIN), 'before' => '<div class="col-md-3">', 'after' => '</div>', 'href' => 'javascript:void(0);', 'class' => 'btn btn-danger remove_image col-md-3 col-md-offset-1', 'data' => array('target' => $name)));
     $html .= Responsive_Markup::field_hidden('group_marker', array('value' => $atts['src'], 'id' => $name, 'name' => $name));
     return $html;
 }