Index: trunk/extensions/PageSchemas/specials/PS_EditSchema.php |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | function updateFieldNum(field_num){ |
51 | 51 | fieldNum = field_num; |
52 | 52 | } |
| 53 | + |
53 | 54 | function addjQueryToCheckbox(){ |
54 | 55 | jQuery('.isListCheckbox').click(function() { |
55 | 56 | if (jQuery(this).is(":checked")) |
— | — | @@ -98,7 +99,7 @@ |
99 | 100 | $text .= '<p>Name of schema: <input type="text" name="s_name"/> </p> '; |
100 | 101 | $text .= '<p>Additional XML: |
101 | 102 | <textarea rows=4 style="width: 100%" name="ps_add_xml"></textarea> |
102 | | - </p> '; |
| 103 | + </p> '; |
103 | 104 | $text .= '<div id="templatesList">'; |
104 | 105 | $text .= '<div class="templateBox" >'; |
105 | 106 | $text .= '<fieldset style="background: #ddd;"><legend>Template</legend> '; |
— | — | @@ -245,6 +246,8 @@ |
246 | 247 | $categoryTitle = Title::newFromText( $category, NS_CATEGORY ); |
247 | 248 | $categoryArticle = new Article( $categoryTitle ); |
248 | 249 | $pageText = $categoryArticle->getContent(); |
| 250 | + $replaced_text = preg_replace('/<PageSchema>*<\/PageSchema>/', $Xmltext, $pageText ); |
| 251 | + wfDebugLog( 'myextension', 'Xmltext: ' . print_r( $replaced_text, true ) ); |
249 | 252 | $jobs = array(); |
250 | 253 | if( $wgRequest->getText('is_edit')=='true' ){ |
251 | 254 | //Do some preg-replace magic |
— | — | @@ -324,6 +327,7 @@ |
325 | 328 | } |
326 | 329 | } |
327 | 330 | $text_4 .= '<div id="fieldsList_'.$template_num.'">'; |
| 331 | + $list_values = false; |
328 | 332 | foreach ($template_xml->children() as $field_xml) { |
329 | 333 | if ( $field_xml->getName() == "Field" ){ |
330 | 334 | $fieldName = (string)$field_xml->attributes()->name; |