Esempio n. 1
0
    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) {
            $all_categories[$category->group_map_id] = $category;
            $all_categories_name[$category->group_map_title] = $category;