Index: trunk/extensions/SemanticForms/specials/SF_CreateForm.php |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | // Now cycle through the templates and fields, modifying each |
149 | 149 | // one per the query variables. |
150 | 150 | foreach ( $form_templates as $i => $ft ) { |
151 | | - foreach ( $ft->fields as $j => $field ) { |
| 151 | + foreach ( $ft->getFields() as $j => $field ) { |
152 | 152 | // handle the change in indexing if a new template was |
153 | 153 | // inserted before the end, or one was deleted |
154 | 154 | $old_i = $i; |
— | — | @@ -175,17 +175,17 @@ |
176 | 176 | } |
177 | 177 | |
178 | 178 | if ( $paramName == 'label' ) { |
179 | | - $field->template_field->label = $value; |
| 179 | + $field->template_field->setLabel( $value ); |
180 | 180 | } elseif ( $paramName == 'input type' ) { |
181 | 181 | $input_type = $wgRequest->getVal( "input_type_" . $old_i . "_" . $j ); |
182 | 182 | if ( $input_type == 'hidden' ) { |
183 | | - $field->template_field->input_type = $input_type; |
| 183 | + $field->template_field->setInputType( $input_type ); |
184 | 184 | $field->is_hidden = true; |
185 | 185 | } elseif ( substr( $input_type, 0, 1 ) == '.' ) { |
186 | 186 | // It's the default input type - |
187 | 187 | // don't do anything. |
188 | 188 | } else { |
189 | | - $field->template_field->input_type = $input_type; |
| 189 | + $field->template_field->setInputType( $input_type ); |
190 | 190 | } |
191 | 191 | } else { |
192 | 192 | if ( ! empty( $value ) ) { |
— | — | @@ -206,12 +206,12 @@ |
207 | 207 | $preview_page = $wgRequest->getCheck( 'wpPreview' ); |
208 | 208 | if ( $save_page || $preview_page ) { |
209 | 209 | // Validate form name |
210 | | - if ( $form->mFormName == "" ) { |
| 210 | + if ( $form->getFormName() == "" ) { |
211 | 211 | $form_name_error_str = wfMsg( 'sf_blank_error' ); |
212 | 212 | } else { |
213 | 213 | // Redirect to wiki interface |
214 | 214 | $wgOut->setArticleBodyOnly( true ); |
215 | | - $title = Title::makeTitleSafe( SF_NS_FORM, $form->mFormName ); |
| 215 | + $title = Title::makeTitleSafe( SF_NS_FORM, $form->getFormName() ); |
216 | 216 | $full_text = $form->createMarkup(); |
217 | 217 | $text = SFUtils::printRedirectForm( $title, $full_text, "", $save_page, $preview_page, false, false, false, null, null ); |
218 | 218 | $wgOut->addHTML( $text ); |
— | — | @@ -243,7 +243,7 @@ |
244 | 244 | $text .= $before_template_msg; |
245 | 245 | $select_body = ""; |
246 | 246 | foreach ( $form_templates as $i => $ft ) { |
247 | | - $select_body .= "\t" . Xml::element( 'option', array( 'value' => $i ), $ft->template_name ) . "\n"; |
| 247 | + $select_body .= "\t" . Xml::element( 'option', array( 'value' => $i ), $ft->getTemplateName() ) . "\n"; |
248 | 248 | } |
249 | 249 | $final_index = count( $form_templates ); |
250 | 250 | $at_end_msg = wfMsg( 'sf_createform_atend' ); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateClass.php |
— | — | @@ -84,9 +84,7 @@ |
85 | 85 | $is_list = $wgRequest->getCheck( "is_list_$i" ); |
86 | 86 | // create an SFTemplateField based on these |
87 | 87 | // values, and add it to the $fields array |
88 | | - $field = SFTemplateField::create( $field_name, $field_name ); |
89 | | - $field->semantic_property = $property_name; |
90 | | - $field->is_list = $is_list; |
| 88 | + $field = SFTemplateField::create( $field_name, $field_name, $property_name, $is_list ); |
91 | 89 | $fields[] = $field; |
92 | 90 | |
93 | 91 | // create the property, and make a job for it |