Index: trunk/extensions/EducationProgram/actions/EPEditAction.php |
— | — | @@ -236,7 +236,8 @@ |
237 | 237 | $form->setSubmitText( wfMsg( 'educationprogram-org-submit' ) ); |
238 | 238 | $form->setSubmitTooltip( 'ep-form-save' ); |
239 | 239 | $form->setShowSummary( !$this->isNew() ); |
240 | | - |
| 240 | + $form->setShowMinorEdit( !$this->isNew() ); |
| 241 | + |
241 | 242 | $action = $this->isNew() ? 'add' : 'edit'; |
242 | 243 | $form->setWrapperLegend( $this->msg( $this->prefixMsg( 'legend-' . $action ) ) ); |
243 | 244 | |
Index: trunk/extensions/EducationProgram/includes/EPFailForm.php |
— | — | @@ -26,6 +26,13 @@ |
27 | 27 | * @var boolean |
28 | 28 | */ |
29 | 29 | protected $showSummary = true; |
| 30 | + |
| 31 | + /** |
| 32 | + * Should the minor edit checkbox be shown or not? |
| 33 | + * @since 0.1 |
| 34 | + * @var boolean |
| 35 | + */ |
| 36 | + protected $showMinorEdit = true; |
30 | 37 | |
31 | 38 | /** |
32 | 39 | * Wrap the form innards in an actual <form> element |
— | — | @@ -80,6 +87,17 @@ |
81 | 88 | } |
82 | 89 | |
83 | 90 | /** |
| 91 | + * Sets if the minor edit checkbox be shown or not. |
| 92 | + * |
| 93 | + * @since 0.1 |
| 94 | + * |
| 95 | + * @param boolean $showMinorEdit |
| 96 | + */ |
| 97 | + public function setShowMinorEdit( $showMinorEdit ) { |
| 98 | + $this->showMinorEdit = $showMinorEdit; |
| 99 | + } |
| 100 | + |
| 101 | + /** |
84 | 102 | * (non-PHPdoc) |
85 | 103 | * @see HTMLForm::getBody() |
86 | 104 | */ |
— | — | @@ -111,15 +129,17 @@ |
112 | 130 | ) . '<br />'; |
113 | 131 | } |
114 | 132 | |
115 | | - $attrs = Linker::tooltipAndAccesskeyAttribs( 'ep-minor' ); |
| 133 | + if ( $this->showMinorEdit ) { |
| 134 | + $attrs = Linker::tooltipAndAccesskeyAttribs( 'ep-minor' ); |
116 | 135 | |
117 | | - $html .= Xml::checkLabel( |
118 | | - wfMsg( 'ep-form-minor' ), |
119 | | - 'wpMinoredit', |
120 | | - 'wpMinoredit', |
121 | | - false, |
122 | | - $attrs |
123 | | - ) . '<br />'; |
| 136 | + $html .= Xml::checkLabel( |
| 137 | + wfMsg( 'ep-form-minor' ), |
| 138 | + 'wpMinoredit', |
| 139 | + 'wpMinoredit', |
| 140 | + false, |
| 141 | + $attrs |
| 142 | + ) . '<br />'; |
| 143 | + } |
124 | 144 | |
125 | 145 | return $html; |
126 | 146 | } |