Index: trunk/extensions/EducationProgram/actions/EPEditAction.php |
— | — | @@ -78,6 +78,8 @@ |
79 | 79 | * @since 0.1 |
80 | 80 | */ |
81 | 81 | protected function showContent() { |
| 82 | + $out = $this->getOutput(); |
| 83 | + |
82 | 84 | $c = $this->getItemClass(); // Yeah, this is needed in PHP 5.3 >_> |
83 | 85 | |
84 | 86 | $data = $this->getNewData(); |
— | — | @@ -85,7 +87,7 @@ |
86 | 88 | $object = $c::selectRow( null, $data ); |
87 | 89 | |
88 | 90 | if ( $object !== false && $this->getRequest()->getText( 'redlink' ) === '1' ) { |
89 | | - $this->getOutput()->redirect( $this->getTitle()->getLocalURL() ); |
| 91 | + $out->redirect( $this->getTitle()->getLocalURL() ); |
90 | 92 | } |
91 | 93 | else { |
92 | 94 | if ( $object === false ) { |
— | — | @@ -101,8 +103,8 @@ |
102 | 104 | $this->showWarning( wfMessage( 'ep-' . strtolower( $this->getName() ) . '-exists-already' ) ); |
103 | 105 | } |
104 | 106 | |
105 | | - $this->getOutput()->setPageTitle( $this->getPageTitle() ); |
106 | | - $this->getOutput()->setSubtitle( $this->getDescription() ); |
| 107 | + $out->setPageTitle( $this->getPageTitle() ); |
| 108 | + $out->setSubtitle( $this->getDescription() ); |
107 | 109 | |
108 | 110 | $this->item = $object; |
109 | 111 | $this->showForm(); |
Index: trunk/extensions/EducationProgram/includes/EPFailForm.php |
— | — | @@ -47,5 +47,44 @@ |
48 | 48 | public function setQuery( array $query ) { |
49 | 49 | $this->query = $query; |
50 | 50 | } |
51 | | - |
| 51 | + |
| 52 | + function getBody() { |
| 53 | + $html = $this->displaySection( $this->mFieldTree ); |
| 54 | + |
| 55 | + $html .= '<br />'; |
| 56 | + |
| 57 | + $html .= Html::element( |
| 58 | + 'label', |
| 59 | + array( 'for' => 'wpSummary' ), |
| 60 | + wfMsg( 'ep-form-summary' ) |
| 61 | + ) . ' '; |
| 62 | + |
| 63 | + $attrs = array( |
| 64 | + 'id' => 'wpSummary', |
| 65 | + 'name' => 'wpSummary', |
| 66 | + 'size' => 60, |
| 67 | + 'maxlength' => 250, |
| 68 | + 'spellcheck' => true |
| 69 | + ); |
| 70 | + |
| 71 | + $attrs = array_merge( $attrs, Linker::tooltipAndAccesskeyAttribs( 'ep-summary' ) ); |
| 72 | + |
| 73 | + $html .= Html::element( |
| 74 | + 'input', |
| 75 | + $attrs |
| 76 | + ) . '<br />'; |
| 77 | + |
| 78 | + $attrs = Linker::tooltipAndAccesskeyAttribs( 'ep-minor' ); |
| 79 | + |
| 80 | + $html .= Xml::checkLabel( |
| 81 | + wfMsg( 'ep-form-minor' ), |
| 82 | + 'wpMinoredit', |
| 83 | + 'wpMinoredit', |
| 84 | + false, |
| 85 | + $attrs |
| 86 | + ) . '<br />'; |
| 87 | + |
| 88 | + return $html; |
| 89 | + } |
| 90 | + |
52 | 91 | } |
\ No newline at end of file |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -25,6 +25,8 @@ |
26 | 26 | 'ep-toplink' => 'My courses', |
27 | 27 | 'ep-org-course-delete-comment' => "Deleted institution $1 and all it's courses with comment $2", |
28 | 28 | 'ep-org-course-delete' => "Deleted institution $1 and all it's courses", |
| 29 | + 'ep-form-summary' => 'Summary:', |
| 30 | + 'ep-form-minor' => 'This is a minor edit', |
29 | 31 | |
30 | 32 | // Tabs |
31 | 33 | 'ep-tab-view' => 'Read', |
— | — | @@ -37,11 +39,15 @@ |
38 | 40 | 'tooltip-ep-form-save' => 'Save', |
39 | 41 | 'tooltip-ep-edit-institution' => 'Edit this institution', |
40 | 42 | 'tooltip-ep-edit-course' => 'Edit this course', |
| 43 | + 'tooltip-ep-summary' => 'Enter a short summary', |
| 44 | + 'tooltip-ep-minor' => 'Marks this as a minor edit', |
41 | 45 | |
42 | 46 | // Access keys |
43 | 47 | 'accesskey-ep-form-save' => 's', # do not translate or duplicate this message to other languages |
44 | 48 | 'accesskey-ep-edit-institution' => 'e', # do not translate or duplicate this message to other languages |
45 | 49 | 'accesskey-ep-edit-course' => 'e', # do not translate or duplicate this message to other languages |
| 50 | + 'accesskey-ep-summary' => 'b', # do not translate or duplicate this message to other languages |
| 51 | + 'accesskey-ep-minor' => 'i', # do not translate or duplicate this message to other languages |
46 | 52 | |
47 | 53 | // Navigation links |
48 | 54 | 'ep-nav-orgs' => 'Institution list', |