r43448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43447‎ | r43448 | r43449 >
Date:09:58, 13 November 2008
Author:jojo
Status:old
Tags:
Comment:
add disabling of buttons for empty collections for non-JS clients
Modified paths:
  • /trunk/extensions/Collection/Collection.templates.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.templates.php
@@ -63,7 +63,7 @@
6464 <?php foreach ($this->data['podpartners'] as $partner => $partnerData) { ?>
6565 <form action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Collection', 'post_zip/')) ?>" method="get">
6666 <input type="hidden" name="partner" value="<?php echo htmlspecialchars($partner) ?>"/>
67 - <input type="submit" value="<?php echo wfMsgHtml('coll-order_from_pp', htmlspecialchars($partnerData['name'])) ?>" class="order"/>
 67+ <input type="submit" value="<?php echo wfMsgHtml('coll-order_from_pp', htmlspecialchars($partnerData['name'])) ?>" class="order" <?php if (count($this->data['collection']['items']) == 0) { ?> disabled="disabled"<?php } ?> />
6868 <a href="<?php echo htmlspecialchars($partnerData['url']) ?>" target="_blank"><?php echo wfMsgHtml('coll-about_pp', htmlspecialchars($partnerData['name'])) ?>&nbsp;<img src="<?php echo htmlspecialchars($partnerData['logourl']) ?>" alt="<?php echo htmlspecialchars($partnerData['name']) ?>"/></a>
6969 </form>
7070 <?php } ?>
@@ -89,7 +89,7 @@
9090 <?php } ?>
9191 </select>
9292 <?php } ?>
93 - <input id="downloadButton" type="submit" value="<?php echo $buttonLabel ?>" />
 93+ <input id="downloadButton" type="submit" value="<?php echo $buttonLabel ?>"<?php if (count($this->data['collection']['items']) == 0) { ?> disabled="disabled"<?php } ?> />
9494 </form>
9595 </div>
9696
@@ -106,7 +106,7 @@
107107 <label for="communityCollType"><?php $this->msg('coll-community_collection_label') ?></label>
108108 <label for="communityCollTitle"><?php echo htmlspecialchars(Title::makeTitle($GLOBALS['wgCommunityCollectionNamespace'], wfMsgForContent('coll-collections'))->getPrefixedText() . '/') ?></label>
109109 <input id="communityCollTitle" type="text" name="ccollname" disabled="disabled"></input><br />
110 - <input id="saveButton" type="submit" value="<?php $this->msg('coll-save_collection') ?>"></input>
 110+ <input id="saveButton" type="submit" value="<?php $this->msg('coll-save_collection') ?>"<?php if (count($this->data['collection']['items']) == 0) { ?> disabled="disabled"<?php } ?>></input>
111111 </form>
112112
113113 <?php } else {

Status & tagging log