Index: trunk/extensions/SemanticForms/includes/SF_FormEditPage.php |
— | — | @@ -0,0 +1,41 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Form Edit Page inheriting from EditPage |
| 5 | + * |
| 6 | + * @author Daniel Friesen |
| 7 | + */ |
| 8 | + |
| 9 | +class FormEditPage extends EditPage { |
| 10 | + |
| 11 | + protected $form; |
| 12 | + |
| 13 | + function __construct( $article, $form_name = '' ) { |
| 14 | + global $wgRequest; |
| 15 | + parent::__construct( $article ); |
| 16 | + wfLoadExtensionMessages('SemanticForms'); |
| 17 | + $this->action = 'formedit'; |
| 18 | + $form_name = $wgRequest->getText('form', $form_name); |
| 19 | + $this->form = Title::newFromText($form_name, SF_NS_FORM); |
| 20 | + } |
| 21 | + |
| 22 | + function setHeaders() { |
| 23 | + parent::setHeaders(); |
| 24 | + global $wgOut, $wgTitle; |
| 25 | + if( !$this->isConflict ) { |
| 26 | + $wgOut->setPageTitle( wfMsg( 'sf_editdata_title', |
| 27 | + $this->form->getText(), $wgTitle->getPrefixedText() ) ); |
| 28 | + } |
| 29 | + } |
| 30 | + |
| 31 | + protected function showTextbox1() { |
| 32 | + if( $this->isConflict ) { |
| 33 | + // Fallback to normal mode when showing an editconflict |
| 34 | + parent::showTextbox1(); |
| 35 | + return; |
| 36 | + } |
| 37 | + |
| 38 | + |
| 39 | + } |
| 40 | + |
| 41 | + |
| 42 | +} |
Property changes on: trunk/extensions/SemanticForms/includes/SF_FormEditPage.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 43 | + native |