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


PHP HTML::legend方法代码示例

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


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

示例1: showNotify

 function showNotify(&$request, $messages, $page, $pagelist, $verified)
 {
     $isNecessary = !$this->contains($pagelist, $page);
     $form = HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), HiddenInputs(array('verify' => 1)), HiddenInputs($request->getArgs(), false, array('verify')), $messages, HTML::p(_("Your current watchlist: "), $this->showWatchList($pagelist)));
     if ($isNecessary) {
         $form->pushContent(HTML::p(_("New watchlist: "), $this->showWatchList($this->addpagelist($page, $pagelist))), HTML::p(sprintf(_("Do you %s want to add this page \"%s\" to your WatchList?"), $verified ? _("really") : "", $page)), HTML::p(Button('submit:add', _("Yes")), HTML::Raw(' '), Button('submit:cancel', _("Cancel"))));
     } else {
         $form->pushContent(HTML::p(fmt("The page %s is already watched!", $page)), HTML::p(Button('submit:edit', _("Edit")), HTML::Raw(' '), Button('submit:cancel', _("Cancel"))));
     }
     $fieldset = HTML::fieldset(HTML::legend("Watch Page"), $form);
     return $fieldset;
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:12,代码来源:WatchPage.php

示例2: wiki_before_content

 function wiki_before_content()
 {
     $wiki_page = $this->request->get('wiki_page');
     $group_id = $this->request->get('group_id');
     $item_dao =& $this->_getItemDao();
     $docman_references = HTML();
     // Add js part for toogling referencers section.
     $js_code = '
         function toggle_documents(id) {
             Element.toggle(id);
             toggle_image(id);
         }
         function toggle_image(id) {
             var img_element = $(\'img_\' + id);
             if (img_element.src.indexOf(\'' . util_get_image_theme("ic/toggle_plus.png") . '\') != -1) {
                 img_element.src = \'' . util_get_image_theme("ic/toggle_minus.png") . '\';
                 img_element.title = \'' . $GLOBALS['Language']->getText('plugin_docman', 'docman_wiki_hide_referencers') . '\';
             } else {
                 img_element.src = \'' . util_get_image_theme("ic/toggle_plus.png") . '\';
                 img_element.title = \'' . $GLOBALS['Language']->getText('plugin_docman', 'docman_wiki_open_referencers') . '\';
             }
         }
             ';
     $docman_references->pushContent(HTML::script(array('type' => 'text/javascript'), $js_code));
     if ($item_dao->isWikiPageReferenced($wiki_page, $group_id)) {
         $docman_item_id = $item_dao->getItemIdByWikiPageAndGroupId($wiki_page, $group_id);
         if ($this->referrerIsDocument()) {
             $referrer_id = $this->getReferrerId($this->getReferrer());
         }
         if (isset($docman_item_id) && $docman_item_id) {
             $content = HTML();
             $script = HTML::script(array('type' => 'text/javascript'), "toggle_documents('documents');");
             $user =& $this->getUser();
             $dpm =& Docman_PermissionsManager::instance($group_id);
             // Wiki page could have many references in docman.
             if (is_array($docman_item_id)) {
                 $icon = HTML::img(array('id' => 'img_documents', 'src' => util_get_image_theme("ic/toggle_minus.png"), 'title' => $GLOBALS['Language']->getText('plugin_docman', 'docman_wiki_open_referencers')));
                 $linked_icon = HTML::a(array('href' => "#", 'onclick' => "javascript:toggle_documents('documents'); return false;"), $icon);
                 // creating the title of the section regarding number of referencing documents and from where we arrived to this wiki page.
                 if (count($docman_item_id) > 1) {
                     $title = "";
                     if (isset($referrer_id) && $referrer_id) {
                         $title = HTML::strong($GLOBALS['Language']->getText('plugin_docman', 'breadcrumbs_location') . " ");
                     } else {
                         $title = HTML::strong($GLOBALS['Language']->getText('plugin_docman', 'docman_wiki_breadcrumbs_locations') . " ");
                     }
                 } else {
                     if (count($docman_item_id) == 1) {
                         $title = HTML::strong($GLOBALS['Language']->getText('plugin_docman', 'breadcrumbs_location') . " ");
                     } else {
                         $title = "";
                     }
                 }
                 //create Full legend of the section
                 $legend = HTML::legend(array('class' => 'docman_md_frame'), count($docman_item_id) > 1 ? $linked_icon : "", $title, isset($referrer_id) && $referrer_id ? HTML($this->showReferrerPath($referrer_id, $group_id)) : "");
                 $details = HTML();
                 // create section body.
                 if (isset($referrer_id) && $referrer_id) {
                     if (count($docman_item_id) > 2) {
                         $details->pushContent(HTML::H3($GLOBALS['Language']->getText('plugin_docman', 'docman_wiki_other_locations') . " "));
                     } else {
                         if (count($docman_item_id) == 2) {
                             $details->pushContent(HTML::H3($GLOBALS['Language']->getText('plugin_docman', 'docman_wiki_other_location') . " "));
                         }
                     }
                 }
                 // create Referencing documents linked paths.
                 foreach ($docman_item_id as $index => $value) {
                     $details->pushContent($this->getDocumentPath($value, $group_id, isset($referrer_id) && $referrer_id ? $referrer_id : null));
                 }
                 $content->pushContent(HTML::div(array('id' => 'documents'), $details));
                 if (count($docman_item_id) == 1) {
                     $id = array_pop($docman_item_id);
                     $docman_references->pushContent(HTML::strong($GLOBALS['Language']->getText('plugin_docman', 'breadcrumbs_location') . " "));
                     $docman_references->pushContent(HTML($this->getDocumentPath($id, $group_id)));
                     $docman_references->pushContent(HTML::br());
                 } else {
                     $docman_references->pushContent(HTML::br());
                     $docman_references->pushContent(HTML::fieldset(array('class' => 'docman_md_frame'), $legend, $content, $script));
                 }
             } else {
                 if ($dpm->userCanAccess($user, $docman_item_id)) {
                     $docman_references->pushContent(HTML::strong($GLOBALS['Language']->getText('plugin_docman', 'breadcrumbs_location') . " "));
                     $docman_references->pushContent(HTML($this->getDocumentPath($docman_item_id, $group_id)));
                     //$docman_references->pushContent(HTML::br());
                 }
             }
         }
     }
     // Write documents paths on wiki view.
     // TODO: find another way to return a value.
     // Codendi_Request->params should not be public
     $this->request->params['html'] = $docman_references;
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:94,代码来源:Docman_WikiController.class.php

示例3:

<?php

HTML::title(array('title' => $L->g('General settings'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('Site information'), 'class' => 'first-child'));
HTML::formInputText(array('name' => 'title', 'label' => $L->g('Site title'), 'value' => $Site->title(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-name-your-site')));
HTML::formInputText(array('name' => 'slogan', 'label' => $L->g('Site slogan'), 'value' => $Site->slogan(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-add-a-catchy-phrase')));
HTML::formInputText(array('name' => 'description', 'label' => $L->g('Site description'), 'value' => $Site->description(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-site-description-to-provide')));
HTML::formInputText(array('name' => 'footer', 'label' => $L->g('Footer text'), 'value' => $Site->footer(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-small-text-on-the-bottom')));
HTML::legend(array('value' => $L->g('Social networks links')));
HTML::formInputText(array('name' => 'twitter', 'label' => 'Twitter', 'value' => $Site->twitter(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'facebook', 'label' => 'Facebook', 'value' => $Site->facebook(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'googlePlus', 'label' => 'Google+', 'value' => $Site->googlePlus(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'instagram', 'label' => 'Instagram', 'value' => $Site->instagram(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'github', 'label' => 'Github', 'value' => $Site->github(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
		<div class="uk-form-controls">
		<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
		</div>
	</div>';
HTML::formClose();
开发者ID:vorons,项目名称:bludit,代码行数:23,代码来源:settings-general.php

示例4: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     if ($request->getArg('action') != 'browse') {
         if (!$request->getArg('action') == _("PhpWikiAdministration/Chown")) {
             return $this->disabled("(action != 'browse')");
         }
     }
     $args = $this->getArgs($argstr, $request);
     $this->_args = $args;
     if (empty($args['user'])) {
         $args['user'] = $request->_user->UserName();
     }
     /*if (!empty($args['exclude']))
           $exclude = explodePageList($args['exclude']);
       else
       $exclude = false;*/
     $this->preSelectS($args, $request);
     $p = $request->getArg('p');
     if (!$p) {
         $p = $this->_list;
     }
     $post_args = $request->getArg('admin_chown');
     if (!$request->isPost() and empty($post_args['user'])) {
         $post_args['user'] = $args['user'];
     }
     $next_action = 'select';
     $pages = array();
     if ($p && !$request->isPost()) {
         $pages = $p;
     }
     if ($p && $request->isPost() && !empty($post_args['chown']) && empty($post_args['cancel'])) {
         // without individual PagePermissions:
         if (!ENABLE_PAGEPERM and !$request->_user->isAdmin()) {
             $request->_notAuthorized(WIKIAUTH_ADMIN);
             $this->disabled("! user->isAdmin");
         }
         // DONE: error message if not allowed.
         if ($post_args['action'] == 'verify') {
             // Real action
             return $this->chownPages($dbi, $request, array_keys($p), trim($post_args['user']));
         }
         if ($post_args['action'] == 'select') {
             if (!empty($post_args['user'])) {
                 $next_action = 'verify';
             }
             foreach ($p as $name => $c) {
                 $pages[$name] = 1;
             }
         }
     }
     if ($next_action == 'select' and empty($pages)) {
         // List all pages to select from.
         $pages = $this->collectPages($pages, $dbi, $args['sortby'], $args['limit'], $args['exclude']);
     }
     /* // let the user decide which info
         if ($next_action == 'verify') {
            $args['info'] = "checkbox,pagename,owner,mtime";
        }
        */
     if ($next_action == 'select') {
         $pagelist = new PageList_Selectable($args['info'], $args['exclude'], $args);
     } else {
         $pagelist = new PageList_Unselectable($args['info'], $args['exclude'], $args);
     }
     $pagelist->addPageList($pages);
     $header = HTML::fieldset();
     if ($next_action == 'verify') {
         $button_label = _("Yes");
         $header->pushContent(HTML::p(HTML::strong(_("Are you sure you want to permanently change the owner of the selected pages?"))));
         $header = $this->chownForm($header, $post_args);
     } else {
         $button_label = _("Change owner of selected pages");
         $header->pushContent(HTML::legend(_("Select the pages to change the owner")));
         $header = $this->chownForm($header, $post_args);
     }
     $buttons = HTML::p(Button('submit:admin_chown[chown]', $button_label, 'wikiadmin'), Button('submit:admin_chown[cancel]', _("Cancel"), 'button'));
     $header->pushContent($buttons);
     return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), $header, $pagelist->getContent(), HiddenInputs($request->getArgs(), false, array('admin_chown')), HiddenInputs(array('admin_chown[action]' => $next_action)), ENABLE_PAGEPERM ? '' : HiddenInputs(array('require_authority_for_post' => WIKIAUTH_ADMIN)));
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:79,代码来源:WikiAdminChown.php

示例5:

<?php

HTML::title(array('title' => $L->g('Language and timezone'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('General'), 'class' => 'first-child'));
HTML::formSelect(array('name' => 'language', 'label' => $L->g('Language'), 'options' => $Language->getLanguageList(), 'selected' => $Site->language(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('select-your-sites-language')));
HTML::formSelect(array('name' => 'timezone', 'label' => $L->g('Timezone'), 'options' => Date::timezoneList(), 'selected' => $Site->timezone(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('select-a-timezone-for-a-correct')));
HTML::formInputText(array('name' => 'locale', 'label' => $L->g('Locale'), 'value' => $Site->locale(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-use-this-field-to-define-a-set-off')));
HTML::legend(array('value' => $L->g('Date and time formats')));
HTML::formInputText(array('name' => 'dateFormat', 'label' => $L->g('Date format'), 'value' => $Site->dateFormat(), 'class' => 'uk-width-1-2 uk-form-medium'));
echo '<div class="uk-form-row">
		<div class="uk-form-controls">
		<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
		</div>
	</div>';
HTML::formClose();
?>

<script>

$(document).ready(function() {

	$("#jslanguage").change(function () {
		var locale = $("#jslanguage option:selected").val();
		$("#jslocale").attr("value",locale);
	});

});

</script>
开发者ID:clstrfcuk,项目名称:bludit,代码行数:31,代码来源:settings-regional.php

示例6: array

    HTML::formSelect(array('name' => 'role', 'label' => $L->g('Role'), 'options' => array('editor' => $L->g('Editor'), 'admin' => $L->g('Administrator')), 'selected' => $_User->role(), 'tip' => ''));
}
HTML::formInputText(array('name' => 'email', 'label' => $L->g('Email'), 'value' => $_User->email(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('email-will-not-be-publicly-displayed')));
HTML::legend(array('value' => 'Social networks'));
HTML::formInputText(array('name' => 'twitterUsername', 'label' => 'Twitter username', 'value' => $_User->twitterUsername(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'facebookUsername', 'label' => 'Facebook username', 'value' => $_User->facebookUsername(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'googleUsername', 'label' => 'Google username', 'value' => $_User->googleUsername(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'instagramUsername', 'label' => 'Instagram username', 'value' => $_User->instagramUsername(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
		<div class="uk-form-controls">
		<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
		<a href="' . HTML_PATH_ADMIN_ROOT . 'users" class="uk-button">' . $L->g('Cancel') . '</a>
		</div>
	</div>';
if ($Login->role() === 'admin' && $_User->username() != 'admin') {
    HTML::legend(array('value' => $L->g('Delete')));
    echo '<div class="uk-form-row">
		<div class="uk-form-controls">
		<button type="submit" id="jsdelete-user-associate" class="delete-button" name="delete-user-associate"><i class="uk-icon-ban"></i> ' . $L->g('Delete the user and associate its posts to admin user') . '</button>
		<button type="submit" id="jsdelete-user-all" class="delete-button" name="delete-user-all"><i class="uk-icon-ban"></i> ' . $L->g('Delete the user and all its posts') . '</button>
		</div>
	</div>';
}
HTML::formClose();
echo '</div>';
echo '<div class="uk-width-3-10" style="margin-top: 50px; text-align: center;">';
HTML::profileUploader($_User->username());
echo '</div>';
echo '</div>';
?>
开发者ID:bayramlielxan,项目名称:bludit,代码行数:30,代码来源:edit-user.php

示例7: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     if ($request->getArg('action') != 'browse') {
         if ($request->getArg('action') != _("PhpWikiAdministration/SetAcl")) {
             return $this->disabled("(action != 'browse')");
         }
     }
     if (!ENABLE_PAGEPERM) {
         return $this->disabled("ENABLE_PAGEPERM = false");
     }
     $args = $this->getArgs($argstr, $request);
     $this->_args = $args;
     $this->preSelectS($args, $request);
     $p = $request->getArg('p');
     $post_args = $request->getArg('admin_setacl');
     $next_action = 'select';
     $pages = array();
     if ($p && !$request->isPost()) {
         $pages = $p;
     } elseif ($this->_list) {
         $pages = $this->_list;
     }
     $header = HTML::fieldset();
     if ($p && $request->isPost() && !empty($post_args['acl']) && empty($post_args['cancel'])) {
         // without individual PagePermissions:
         if (!ENABLE_PAGEPERM and !$request->_user->isAdmin()) {
             $request->_notAuthorized(WIKIAUTH_ADMIN);
             $this->disabled("! user->isAdmin");
         }
         if ($post_args['action'] == 'verify') {
             // Real action
             return $this->setaclPages($request, array_keys($p), $request->getArg('acl'));
         }
         if ($post_args['action'] == 'select') {
             if (!empty($post_args['acl'])) {
                 $next_action = 'verify';
             }
             foreach ($p as $name => $c) {
                 $pages[$name] = 1;
             }
         }
     }
     if ($next_action == 'select' and empty($pages)) {
         // List all pages to select from.
         $pages = $this->collectPages($pages, $dbi, $args['sortby'], $args['limit'], $args['exclude']);
     }
     if ($next_action == 'verify') {
         $args['info'] = "checkbox,pagename,perm,mtime,owner,author";
     }
     $pagelist = new PageList_Selectable($args['info'], $args['exclude'], array('types' => array('perm' => new _PageList_Column_perm('perm', _("Permission")), 'acl' => new _PageList_Column_acl('acl', _("ACL")))));
     $pagelist->addPageList($pages);
     if ($next_action == 'verify') {
         $button_label = _("Yes");
         $header = $this->setaclForm($header, $post_args, $pages);
         $header->pushContent(HTML::p(HTML::strong(_("Are you sure you want to permanently change access rights to the selected files?"))));
     } else {
         $button_label = _("Change Access Rights");
         $header = $this->setaclForm($header, $post_args, $pages);
         $header->pushContent(HTML::legend(_("Select the pages where to change access rights")));
     }
     $buttons = HTML::p(Button('submit:admin_setacl[acl]', $button_label, 'wikiadmin'), Button('submit:admin_setacl[cancel]', _("Cancel"), 'button'));
     $header->pushContent($buttons);
     return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), $header, $pagelist->getContent(), HiddenInputs($request->getArgs(), false, array('admin_setacl')), HiddenInputs(array('admin_setacl[action]' => $next_action)), ENABLE_PAGEPERM ? '' : HiddenInputs(array('require_authority_for_post' => WIKIAUTH_ADMIN)));
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:64,代码来源:WikiAdminSetAcl.php

示例8: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     // no action=replace support yet
     if ($request->getArg('action') != 'browse') {
         return $this->disabled("(action != 'browse')");
     }
     $args = $this->getArgs($argstr, $request);
     $this->_args = $args;
     //TODO: support p from <!plugin-list !>
     $this->preSelectS($args, $request);
     $p = $request->getArg('p');
     if (!$p) {
         $p = $this->_list;
     }
     $post_args = $request->getArg('admin_replace');
     $next_action = 'select';
     $pages = array();
     if ($p && !$request->isPost()) {
         $pages = $p;
     }
     if ($p && $request->isPost() && empty($post_args['cancel'])) {
         // without individual PagePermissions:
         if (!ENABLE_PAGEPERM and !$request->_user->isAdmin()) {
             $request->_notAuthorized(WIKIAUTH_ADMIN);
             $this->disabled("! user->isAdmin");
         }
         if ($post_args['action'] == 'verify' and !empty($post_args['from'])) {
             // Real action
             return $this->searchReplacePages($dbi, $request, array_keys($p), $post_args['from'], $post_args['to']);
         }
         if ($post_args['action'] == 'select') {
             if (!empty($post_args['from'])) {
                 $next_action = 'verify';
             }
             foreach ($p as $name => $c) {
                 $pages[$name] = 1;
             }
         }
     }
     if ($next_action == 'select' and empty($pages)) {
         // List all pages to select from.
         //TODO: check for permissions and list only the allowed
         $pages = $this->collectPages($pages, $dbi, $args['sortby'], $args['limit'], $args['exclude']);
     }
     if ($next_action == 'verify') {
         $args['info'] = "checkbox,pagename";
     } else {
         $args['info'] = "checkbox,pagename,hi_content,mtime,author";
     }
     $pagelist = new PageList_Selectable($args['info'], $args['exclude'], array_merge($args, array('types' => array('hi_content' => new _PageList_Column_content('rev:hi_content', _("Content"))))));
     $pagelist->addPageList($pages);
     $header = HTML::fieldset();
     if (empty($post_args['from'])) {
         $header->pushContent(HTML::p(HTML::em(_("Warning: The search string cannot be empty!"))));
     }
     if ($next_action == 'verify') {
         $button_label = _("Yes");
         $header->pushContent(HTML::p(HTML::strong(_("Are you sure you want to permanently replace text in the selected files?"))));
         $this->replaceForm($header, $post_args);
     } else {
         $button_label = _("Search & Replace");
         $this->replaceForm($header, $post_args);
         $header->pushContent(HTML::legend(_("Select the pages to search and replace")));
     }
     $buttons = HTML::p(Button('submit:admin_replace[replace]', $button_label, 'wikiadmin'), Button('submit:admin_replace[cancel]', _("Cancel"), 'button'));
     $header->pushContent($buttons);
     return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), $header, $pagelist->getContent(), HiddenInputs($request->getArgs(), false, array('admin_replace')), HiddenInputs(array('admin_replace[action]' => $next_action)), ENABLE_PAGEPERM ? '' : HiddenInputs(array('require_authority_for_post' => WIKIAUTH_ADMIN)));
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:68,代码来源:WikiAdminSearchReplace.php

示例9:

<?php

HTML::title(array('title' => $L->g('General settings'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('Site information'), 'class' => 'first-child'));
HTML::formInputText(array('name' => 'title', 'label' => $L->g('Site title'), 'value' => $Site->title(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-name-your-site')));
HTML::formInputText(array('name' => 'slogan', 'label' => $L->g('Site slogan'), 'value' => $Site->slogan(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-add-a-catchy-phrase')));
HTML::formInputText(array('name' => 'description', 'label' => $L->g('Site description'), 'value' => $Site->description(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-site-description-to-provide')));
HTML::formInputText(array('name' => 'footer', 'label' => $L->g('Footer text'), 'value' => $Site->footer(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-small-text-on-the-bottom')));
echo '<div class="uk-form-row">
		<div class="uk-form-controls">
		<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
		</div>
	</div>';
HTML::formClose();
开发者ID:clstrfcuk,项目名称:bludit,代码行数:17,代码来源:settings-general.php

示例10: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     if ($request->getArg('action') != 'browse') {
         if (!$request->getArg('action') == _("PhpWikiAdministration/SetExternal")) {
             return $this->disabled("(action != 'browse')");
         }
     }
     $args = $this->getArgs($argstr, $request);
     $this->_args = $args;
     $this->preSelectS($args, $request);
     $p = $request->getArg('p');
     if (!$p) {
         $p = $this->_list;
     }
     $post_args = $request->getArg('admin_external');
     if (!$request->isPost() and empty($post_args['external'])) {
         $post_args['external'] = $args['external'];
     }
     $pages = array();
     if ($p && !$request->isPost()) {
         $pages = $p;
     }
     if ($p && $request->isPost() && !empty($post_args['button']) && empty($post_args['cancel'])) {
         // without individual PagePermissions:
         if (!ENABLE_PAGEPERM and !$request->_user->isAdmin()) {
             $request->_notAuthorized(WIKIAUTH_ADMIN);
             $this->disabled("! user->isAdmin");
         }
         // Real action
         return $this->setExternalPages($dbi, $request, array_keys($p));
     }
     $pages = $this->collectPages($pages, $dbi, $args['sortby'], $args['limit'], $args['exclude']);
     $pagelist = new PageList_Selectable($args['info'], $args['exclude'], $args);
     $pagelist->addPageList($pages);
     $header = HTML::fieldset();
     $button_label = _("Set pages to external");
     $header->pushContent(HTML::legend(_("Select the pages to set as external")));
     $buttons = HTML::p(Button('submit:admin_external[button]', $button_label, 'wikiadmin'), Button('submit:admin_external[cancel]', _("Cancel"), 'button'));
     $header->pushContent($buttons);
     return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), $header, $pagelist->getContent(), HiddenInputs($request->getArgs(), false, array('admin_external')), ENABLE_PAGEPERM ? '' : HiddenInputs(array('require_authority_for_post' => WIKIAUTH_ADMIN)));
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:41,代码来源:WikiAdminSetExternal.php

示例11:

<?php

HTML::title(array('title' => $L->g('Change password'), 'icon' => 'key'));
HTML::formOpen(array('id' => 'edit-user-profile-form', 'class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
// Hidden field username
HTML::formInputHidden(array('name' => 'username', 'value' => $_user['username']));
HTML::legend(array('value' => $L->g('New password')));
HTML::formInputText(array('name' => 'usernameDisable', 'label' => $L->g('Username'), 'value' => $_user['username'], 'class' => 'uk-width-1-2 uk-form-medium', 'disabled' => true, 'tip' => ''));
HTML::formInputPassword(array('name' => 'new_password', 'label' => $L->g('New password'), 'value' => '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputPassword(array('name' => 'confirm_password', 'label' => $L->g('Confirm password'), 'value' => '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
		<div class="uk-form-controls">
		<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
		<a href="' . HTML_PATH_ADMIN_ROOT . 'edit-user/' . $_user['username'] . '" class="uk-button">' . $L->g('Cancel') . '</a>
		</div>
	</div>';
HTML::formClose();
开发者ID:rayblo,项目名称:bludit,代码行数:19,代码来源:user-password.php

示例12: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     if ($request->getArg('action') != 'browse') {
         if ($request->getArg('action') != _("PhpWikiAdministration/SetAclSimple")) {
             return $this->disabled("(action != 'browse')");
         }
     }
     if (!ENABLE_PAGEPERM) {
         return $this->disabled("ENABLE_PAGEPERM = false");
     }
     $args = $this->getArgs($argstr, $request);
     $this->_args = $args;
     $this->preSelectS($args, $request);
     $p = $request->getArg('p');
     $post_args = $request->getArg('admin_setacl');
     $pages = array();
     if ($p && !$request->isPost()) {
         $pages = $p;
     } elseif ($this->_list) {
         $pages = $this->_list;
     }
     $header = HTML::fieldset();
     if ($p && $request->isPost() && (!empty($post_args['aclliberal']) || !empty($post_args['aclrestricted']))) {
         // without individual PagePermissions:
         if (!ENABLE_PAGEPERM and !$request->_user->isAdmin()) {
             $request->_notAuthorized(WIKIAUTH_ADMIN);
             $this->disabled("! user->isAdmin");
         }
         if (!empty($post_args['aclliberal'])) {
             return $this->setaclPages($request, array_keys($p), $this->liberalPerms());
         } else {
             if (!empty($post_args['aclrestricted'])) {
                 return $this->setaclPages($request, array_keys($p), $this->restrictedPerms());
             }
         }
     }
     if (empty($pages)) {
         // List all pages to select from.
         $pages = $this->collectPages($pages, $dbi, $args['sortby'], $args['limit'], $args['exclude']);
     }
     $pagelist = new PageList_Selectable($args['info'], $args['exclude'], array('types' => array('acl' => new _PageList_Column_acl('acl', _("ACL")))));
     $pagelist->addPageList($pages);
     $button_label_liberal = _("Set Liberal Access Rights");
     $button_label_restrictive = _("Set Restrictive Access Rights");
     $header = $this->setaclForm($header, $pages);
     $header->pushContent(HTML::legend(_("Select the pages where to change access rights")));
     $buttons = HTML::p(Button('submit:admin_setacl[aclliberal]', $button_label_liberal, 'wikiadmin'), Button('submit:admin_setacl[aclrestricted]', $button_label_restrictive, 'wikiadmin'));
     $header->pushContent($buttons);
     return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), $header, $pagelist->getContent(), HiddenInputs($request->getArgs(), false, array('admin_setacl')), ENABLE_PAGEPERM ? '' : HiddenInputs(array('require_authority_for_post' => WIKIAUTH_ADMIN)));
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:50,代码来源:WikiAdminSetAclSimple.php

示例13: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     if ($request->getArg('action') != 'browse') {
         if ($request->getArg('action') != _("PhpWikiAdministration/Remove")) {
             return $this->disabled("(action != 'browse')");
         }
     }
     $args = $this->getArgs($argstr, $request);
     if (!is_numeric($args['min_age'])) {
         $args['min_age'] = -1;
     }
     $this->_args =& $args;
     /*if (!empty($args['exclude']))
           $exclude = explodePageList($args['exclude']);
       else
       $exclude = false;*/
     $this->preSelectS($args, $request);
     $p = $request->getArg('p');
     if (!$p) {
         $p = $this->_list;
     }
     $post_args = $request->getArg('admin_remove');
     $next_action = 'select';
     $pages = array();
     if ($p && $request->isPost() && !empty($post_args['remove']) && empty($post_args['cancel'])) {
         // check individual PagePermissions
         if (!ENABLE_PAGEPERM and !$request->_user->isAdmin()) {
             $request->_notAuthorized(WIKIAUTH_ADMIN);
             $this->disabled("! user->isAdmin");
         }
         if ($post_args['action'] == 'verify') {
             // Real delete.
             return $this->removePages($request, array_keys($p));
         }
         if ($post_args['action'] == 'select') {
             $next_action = 'verify';
             foreach ($p as $name => $c) {
                 $name = str_replace(array('%5B', '%5D'), array('[', ']'), $name);
                 $pages[$name] = $c;
             }
         }
     } elseif ($p && is_array($p) && !$request->isPost()) {
         // from WikiAdminSelect
         $next_action = 'verify';
         foreach ($p as $name => $c) {
             $name = str_replace(array('%5B', '%5D'), array('[', ']'), $name);
             $pages[$name] = $c;
         }
         $request->setArg('p', false);
     }
     if ($next_action == 'select') {
         // List all pages to select from.
         $pages = $this->collectPages($pages, $dbi, $args['sortby'], $args['limit'], $args['exclude']);
     }
     $pagelist = new PageList_Selectable($args['info'], $args['exclude'], array('types' => array('remove' => new _PageList_Column_remove('remove', _("Remove")))));
     $pagelist->addPageList($pages);
     $header = HTML::fieldset();
     if ($next_action == 'verify') {
         $button_label = _("Yes");
         $header->pushContent(HTML::p(HTML::strong(_("Are you sure you want to permanently remove the selected files?"))));
     } else {
         $button_label = _("Remove selected pages");
         $header->pushContent(HTML::legend(_("Select the files to remove")));
         if ($args['min_age'] > 0) {
             $header->pushContent(fmt("Also pages which have been deleted at least %s days.", $args['min_age']));
         }
         if ($args['max_age'] > 0) {
             $header->pushContent(" ", fmt("Pages which have been deleted at least %s days are already checked.", $args['max_age']));
         }
     }
     $buttons = HTML::p(Button('submit:admin_remove[remove]', $button_label, 'wikiadmin'), Button('submit:admin_remove[cancel]', _("Cancel"), 'button'));
     $header->pushContent($buttons);
     // TODO: quick select by regex javascript?
     return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), $header, $pagelist->getContent(), HiddenInputs($request->getArgs(), false, array('admin_remove')), HiddenInputs(array('admin_remove[action]' => $next_action, 'require_authority_for_post' => WIKIAUTH_ADMIN)));
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:75,代码来源:WikiAdminRemove.php

示例14:

<?php

HTML::title(array('title' => $L->g('Change password'), 'icon' => 'key'));
HTML::formOpen(array('id' => 'edit-user-profile-form', 'class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
// Hidden field username
HTML::formInputHidden(array('name' => 'username', 'value' => $_user['username']));
HTML::legend(array('value' => $L->g('New password'), 'class' => 'first-child'));
HTML::formInputText(array('name' => 'usernameDisable', 'label' => $L->g('Username'), 'value' => $_user['username'], 'class' => 'uk-width-1-2 uk-form-medium', 'disabled' => true, 'tip' => ''));
HTML::formInputPassword(array('name' => 'new_password', 'label' => $L->g('New password'), 'value' => '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputPassword(array('name' => 'confirm_password', 'label' => $L->g('Confirm password'), 'value' => '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
		<div class="uk-form-controls">
		<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
		<a href="' . HTML_PATH_ADMIN_ROOT . 'edit-user/' . $_user['username'] . '" class="uk-button">' . $L->g('Cancel') . '</a>
		</div>
	</div>';
HTML::formClose();
开发者ID:vorons,项目名称:bludit,代码行数:19,代码来源:user-password.php

示例15: array

<?php

HTML::title(array('title' => $L->g('Advanced settings'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('General'), 'class' => 'first-child'));
HTML::formSelect(array('name' => 'postsperpage', 'label' => $L->g('Posts per page'), 'options' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8'), 'selected' => $Site->postsPerPage(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('number-of-posts-to-show-per-page')));
HTML::formSelect(array('name' => 'homepage', 'label' => $L->g('Default home page'), 'options' => $_homePageList, 'selected' => $Site->homepage(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'url', 'label' => $L->g('Site URL'), 'value' => $Site->url(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('the-url-of-your-site')));
HTML::legend(array('value' => $L->g('Command Line Mode')));
HTML::formSelect(array('name' => 'cliMode', 'label' => $L->g('Cli Mode'), 'options' => array('true' => $L->g('Enabled'), 'false' => $L->g('Disabled')), 'selected' => $Site->cliMode(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('enable-the-command-line-mode-if-you-add-edit')));
HTML::legend(array('value' => $L->g('Email account settings')));
HTML::formInputText(array('name' => 'emailFrom', 'label' => $L->g('Sender email'), 'value' => $Site->emailFrom(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('Emails will be sent from this address')));
HTML::legend(array('value' => $L->g('URL Filters')));
HTML::formInputText(array('name' => 'uriPost', 'label' => $L->g('Posts'), 'value' => $Site->uriFilters('post'), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'uriPage', 'label' => $L->g('Pages'), 'value' => $Site->uriFilters('page'), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'uriTag', 'label' => $L->g('Tags'), 'value' => $Site->uriFilters('tag'), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
        <div class="uk-form-controls">
        <button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
        </div>
    </div>';
HTML::formClose();
开发者ID:clstrfcuk,项目名称:bludit,代码行数:23,代码来源:settings-advanced.php


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