當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。