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
                    <?php 
}
?>
                </table>
                <span class="b-hint">This page only can be accessed if the logged user belongs to one or more of selected groups. See more on <?php 
echo anchor('manage-groups', 'Groups manager');
?>
 interface.</span>
            </fieldset>
        </div>
        <br/>
        <?php 
\Meta\Core\Form::submit(t('Save'));
?>
        <?php 
\Meta\Core\Form::close();
?>
    </div>
</div>
<script>
    checkMenu = function(){ $('#showonmenu').is(':checked') ? $('.menu-props').show() : $('.menu-props').hide(); }
    $(function() { $('#showonmenu').click(checkMenu); checkMenu(); });
    
    checkPerms = function(){ $('#checkperms').is(':checked') ? $('.permissions').show() : $('.permissions').hide(); }
    $(function() { $('#checkperms').click(checkPerms); checkPerms(); });
</script>

<div style="float: left; width: 68%;">
  <h3 class="ui-widget-header">Added page objects <?php 
echo helpIcon(t('Click on object do edit their properties'));
?>