From: <var...@us...> - 2009-03-26 09:32:33
|
Revision: 6708 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6708&view=rev Author: vargenau Date: 2009-03-26 09:32:21 +0000 (Thu, 26 Mar 2009) Log Message: ----------- Use fieldset; use classes "error" and "feedback" Modified Paths: -------------- trunk/lib/plugin/WikiAdminMarkup.php Modified: trunk/lib/plugin/WikiAdminMarkup.php =================================================================== --- trunk/lib/plugin/WikiAdminMarkup.php 2009-03-26 08:52:28 UTC (rev 6707) +++ trunk/lib/plugin/WikiAdminMarkup.php 2009-03-26 09:32:21 UTC (rev 6708) @@ -60,6 +60,7 @@ } function chmarkupPages(&$dbi, &$request, $pages, $newmarkup) { + $result = HTML::div(); $ul = HTML::ul(); $count = 0; foreach ($pages as $name) { @@ -68,7 +69,8 @@ $markup = $current->get('markup'); if ( !$markup or $newmarkup != $markup ) { if (!mayAccessPage('change', $name)) { - $ul->pushContent(HTML::li(fmt("Access denied to change page '%s'.", + $result->setAttr('class', 'error'); + $result->pushContent(HTML::p(fmt("Access denied to change page '%s'.", WikiLink($name)))); } else { $version = $current->getVersion(); @@ -95,10 +97,14 @@ } if ($count) { $dbi->touch(); - return HTML($ul, HTML::p(fmt("%s pages have been permanently changed.", - $count))); + $result->setAttr('class', 'feedback'); + $result->pushContent(HTML::p(fmt("%s pages have been permanently changed:", $count))); + $result->pushContent($ul); + return $result; } else { - return HTML($ul, HTML::p(fmt("No pages changed."))); + $result->setAttr('class', 'error'); + $result->pushContent(HTML::p("No pages changed.")); + return $result; } } @@ -148,7 +154,7 @@ $pagelist = new PageList_Selectable($args['info'], $args['exclude'], $args); $pagelist->addPageList($pages); - $header = HTML::div(); + $header = HTML::fieldset(); if ($next_action == 'verify') { $button_label = _("Yes"); $header->pushContent( @@ -158,17 +164,17 @@ } else { $button_label = _("Change markup type"); - $header->pushContent(HTML::p(_("Select the pages to change the markup type:"))); + $header->pushContent(HTML::legend(_("Select the pages to change the markup type"))); $header = $this->chmarkupForm($header, $post_args); } $buttons = HTML::p(Button('submit:admin_markup[button]', $button_label, 'wikiadmin'), Button('submit:admin_markup[cancel]', _("Cancel"), 'button')); + $header->pushContent($buttons); return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), $header, - $buttons, $pagelist->getContent(), HiddenInputs($request->getArgs(), false, @@ -184,7 +190,6 @@ $header->pushContent(' '._("to").': '); $header->pushContent(HTML::input(array('name' => 'admin_markup[markup]', 'value' => $post_args['markup']))); - $header->pushContent(HTML::p()); return $header; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |