当前位置: 首页>>代码示例>>PHP>>正文


PHP Pieform::get_form_tag方法代码示例

本文整理汇总了PHP中Pieform::get_form_tag方法的典型用法代码示例。如果您正苦于以下问题:PHP Pieform::get_form_tag方法的具体用法?PHP Pieform::get_form_tag怎么用?PHP Pieform::get_form_tag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pieform的用法示例。


在下文中一共展示了Pieform::get_form_tag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buttons_submit_unsuspend

suspendedlist.updateOnLoad();

addLoadEvent(function() {
    connect('usertype_type', 'onchange', function() {
        if (suspendedlist.type != \$('usertype_type').value) {
            suspendedlist.offset = 0;
            suspendedlist.type = \$('usertype_type').value;
            suspendedlist.doupdate();
        }
    });
});

EOF
);
$form = new Pieform(array('name' => 'buttons', 'renderer' => 'div', 'autofocus' => false, 'elements' => array('buttons' => array('type' => 'fieldset', 'class' => 'btn-group pull-right', 'isformgroup' => false, 'elements' => array('unsuspend' => array('class' => 'btn-default text-inline', 'type' => 'submit', 'isformgroup' => false, 'renderelementsonly' => true, 'name' => 'unsuspend', 'value' => get_string('unsuspendusers', 'admin')), 'unexpire' => array('class' => 'btn-default text-inline', 'type' => 'submit', 'isformgroup' => false, 'renderelementsonly' => true, 'name' => 'unexpire', 'value' => get_string('unexpireusers', 'admin')), 'delete' => array('class' => 'btn-default text-inline', 'type' => 'submit', 'isformgroup' => false, 'renderelementsonly' => true, 'confirm' => get_string('confirmdeleteusers', 'admin'), 'name' => 'delete', 'value' => get_string('deleteusers', 'admin')))))));
$smarty->assign('buttonformopen', $form->get_form_tag());
$smarty->assign('buttonform', $form->build(false));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/users/suspended.tpl');
function buttons_submit_unsuspend(Pieform $form, $values)
{
    global $SESSION;
    $ids = get_user_ids_from_post();
    foreach ($ids as $userid) {
        unsuspend_user($userid);
    }
    $SESSION->add_ok_msg(get_string('usersunsuspendedsuccessfully', 'admin'));
    redirect('/admin/users/suspended.php');
}
function buttons_submit_unexpire(Pieform $form, $values)
{
开发者ID:sarahjcotton,项目名称:mahara,代码行数:31,代码来源:suspended.php

示例2: AccessDeniedException

            // Just to be sure
            if ($iconartefact->get('artefacttype') == 'profileicon' && $iconartefact->get('owner') == $USER->get('id')) {
                // Remove the skin background and update the skin thumbs
                require_once get_config('libroot') . 'skin.php';
                Skin::remove_background($iconartefact->get('id'));
                $iconartefact->delete();
            } else {
                throw new AccessDeniedException();
            }
        }
        if (in_array($USER->get('profileicon'), $icons)) {
            $USER->profileicon = null;
            $USER->commit();
        }
        db_commit();
        $SESSION->add_ok_msg(get_string('filethingdeleted', 'artefact.file', get_string('nprofilepictures', 'artefact.file', count($icons))));
    } else {
        $SESSION->add_info_msg(get_string('profileiconsnoneselected', 'artefact.file'));
    }
    redirect('/artefact/file/profileicons.php');
}
$smarty = smarty(array('tablerenderer'), array(), array(), array('sideblocks' => array(array('name' => 'quota', 'weight' => -10, 'data' => array()))));
$smarty->assign('INLINEJAVASCRIPT', $IJS);
$smarty->assign('uploadform', $uploadform);
// This is a rare case where we don't actually care about the form, because
// it only contains submit buttons (which we can just write as HTML), and
// the buttons need to be inside the tablerenderer.
$smarty->assign('settingsformtag', $settingsform->get_form_tag());
$smarty->assign('imagemaxdimensions', array(get_config('imagemaxwidth'), get_config('imagemaxheight')));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('artefact:file:profileicons.tpl');
开发者ID:rboyatt,项目名称:mahara,代码行数:31,代码来源:profileicons.php


注:本文中的Pieform::get_form_tag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。