Example #1
0
    /**
     * Show a simple confirmation form
     */
    public static function confirm($label)
    {
        if (is_post()) {
            if (isset($_POST['confirm_yes'])) {
                return true;
            } else {
                if (isset($_POST['confirm_no'])) {
                    return false;
                }
            }
        }
        ?>
        <?php 
        print_header();
        ?>
        <div id="confirm_form">
            <?php 
        \Meta\Core\Form::open();
        ?>
            <h2><?php 
        echo $label;
        ?>
</h2>
            <input type="submit" name="confirm_yes" value="Sim" />
            <input type="submit" name="confirm_no" value="Nao" />
            <?php 
        \Meta\Core\Form::close();
        ?>
        </div>
        <?php 
        print_footer();
        ?>
        <?php 
        exit;
    }
Example #2
0
?>
 (<a href="<?php 
echo url($page_name);
?>
" target="_new">open in new tab</a>)</h3> 

<style>
    .ui-widget-header { background:#CCC ; color:#636363; border: 1px solid; padding: 3px }
</style>
<div id="popup"></div>

<div id="form-info">
    <h3>Page settings</h3>
    <div>
        <?php 
\Meta\Core\Form::open();
?>
        <?php 
\Meta\Core\Form::input('name', array('label' => t('Path'), 'default_value' => $page_name));
?>
        <br/>
        <?php 
\Meta\Core\Form::input('label', array('label' => t('Title'), 'default_value' => $pageLabel));
?>
<br/>
        <?php 
\Meta\Core\Form::select('pageType', array('label' => 'Page type', 'options' => $pageTypes, 'value' => $pageType, 'required' => true));
?>
        <br/>
        <?php 
\Meta\Core\Form::checkbox('showonmenu', array('label' => t('Display on menu'), 'checked' => $pageShowOnMenu));