Index: trunk/extensions/SemanticForms/includes/SF_FormField.php |
— | — | @@ -164,17 +164,21 @@ |
165 | 165 | } |
166 | 166 | |
167 | 167 | $text .= "<fieldset><legend>Other parameters</legend>\n"; |
168 | | - $text .= "<div class=\"otherInputParams\">" . SFCreateForm::showInputTypeOptions( $cur_input_type, $field_form_text, $paramValues ) . "</div>"; |
| 168 | + $text .= Xml::tags( 'div', array( 'class' => 'otherInputParams' ), |
| 169 | + SFCreateForm::showInputTypeOptions( $cur_input_type, $field_form_text, $paramValues ) ) . "\n"; |
169 | 170 | $text .= "</fieldset>\n"; |
170 | | - $mandatory_checked_str = ( $this->is_mandatory ) ? "checked" : ""; |
171 | | - $mandatory_text = wfMsg( 'sf_createform_mandatory' ); |
172 | | - $restricted_checked_str = ( $this->is_restricted ) ? "checked" : ""; |
173 | | - $restricted_text = wfMsg( 'sf_createform_restricted' ); |
174 | 171 | $text .= <<<END |
175 | 172 | </p> |
176 | 173 | <p> |
177 | | - <input type="checkbox" name="mandatory_$field_form_text" value="mandatory" $mandatory_checked_str /> $mandatory_text |
178 | | - <input type="checkbox" name="restricted_$field_form_text" value="restricted" $restricted_checked_str /> $restricted_text</p> |
| 174 | + |
| 175 | +END; |
| 176 | + $mandatoryCheckboxAtrs = array( 'type' => 'checkbox', 'name' => "mandatory_$field_form_text", 'value' => 'mandatory' ); |
| 177 | + if ( $this->is_mandatory ) { $mandatoryCheckboxAtrs['checked'] = 'checked'; } |
| 178 | + $text .= "\t" . Xml::element( 'input', $mandatoryCheckboxAtrs, wfMsg( 'sf_createform_mandatory' ) ) . "\n"; |
| 179 | + $restrictedCheckboxAtrs = array( 'type' => 'checkbox', 'name' => "restricted_$field_form_text", 'value' => 'restricted' ); |
| 180 | + if ( $this->is_restricted ) { $restrictedCheckboxAtrs['checked'] = 'checked'; } |
| 181 | + $text .= "\t" . Xml::element( 'input', $restrictedCheckboxAtrs, wfMsg( 'sf_createform_restricted' ) ) . "\n"; |
| 182 | + $text .= <<<END |
179 | 183 | </div> |
180 | 184 | <hr> |
181 | 185 | |