~quam-plures-core/quam-plures/ui_part1

« back to all changes in this revision

Viewing changes to qp_inc/_core/ui/forms/_form.class.php

  • Committer: Tilman Blumenbach
  • Author(s): yabs at org
  • Date: 2010-08-16 20:42:16 UTC
  • mfrom: (7530.3.6 tidier-admin)
  • Revision ID: tilman@ax86.net-20100816204216-1lcf60lpzlhfhksi
Merged tidier-admin

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
                        $template = array(
178
178
                                'layout' => 'fieldset',
179
179
                                'formstart' => '<div>',// required before (no_)title_fmt for validation
180
 
                                'title_fmt' => '<span style="float:right">$global_icons$</span><h2>$title$</h2>'."\n",
181
 
                                'no_title_fmt' => '<span style="float:right">$global_icons$</span>'."\n",
 
180
                                'title_fmt' => '$global_icons$<h2>$title$</h2>'."\n",
 
181
                                'no_title_fmt' => '$global_icons$'."\n",
182
182
                                'fieldset_begin' => '<fieldset $fieldset_attribs$>'."\n"
183
183
                                                                                                                .'<legend $title_attribs$>$fieldset_title$</legend>'."\n",
184
184
                                'fieldset_end' => '</fieldset>'."\n",
266
266
                                        $this->formstart = '<table cellspacing="0" class="fform">'."\n";
267
267
                                        // Note: no thead in here until you can safely add a tbody to the rest of the content...
268
268
                                        $this->title_fmt = '<tr class="formtitle"><th colspan="2"><div class="results_title">'
269
 
                                                                                                                        .'<span class="right_icons">$global_icons$</span>'
 
269
                                                                                                                        .'$global_icons$'
270
270
                                                                                                                        .'$title$</div></th></tr>'."\n";
271
 
                                        $this->no_title_fmt = '<tr><th colspan="2"><span class="right_icons">$global_icons$</span></th></tr>'."\n";
 
271
                                        $this->no_title_fmt = '<tr><th colspan="2">$global_icons$</th></tr>'."\n";
272
272
                                        $this->fieldstart = '<tr$ID$>'."\n";
273
273
                                        $this->labelstart = '<td class="label">';
274
274
                                        $this->labelend = "</td>\n";
284
284
 
285
285
                                case 'fieldset':
286
286
                                        $this->formstart = '<div>';// required before (no_)title_fmt for validation
287
 
                                        $this->title_fmt = '<span style="float:right">$global_icons$</span><h2>$title$</h2>'."\n";
288
 
                                        $this->no_title_fmt = '<span style="float:right">$global_icons$</span>'."\n";
 
287
                                        $this->title_fmt = '$global_icons$<h2>$title$</h2>'."\n";
 
288
                                        $this->no_title_fmt = '$global_icons$'."\n";
289
289
                                        $this->fieldstart = '<fieldset$ID$>'."\n";
290
290
                                        $this->labelstart = '<div class="label">';
291
291
                                        $this->labelend = "</div>\n";
301
301
 
302
302
                                case 'chicago':         // Temporary dirty hack
303
303
                                        $this->formstart = '<div>';// required before (no_)title_fmt for validation
304
 
                                        $this->title_fmt = '<span style="float:right">$global_icons$</span><h2>$title$</h2>'."\n";
305
 
                                        $this->no_title_fmt = '<span style="float:right">$global_icons$</span>'."\n";
 
304
                                        $this->title_fmt = '$global_icons$<h2>$title$</h2>'."\n";
 
305
                                        $this->no_title_fmt = '$global_icons$'."\n";
306
306
                                        $this->fieldstart = '<fieldset$ID$>'."\n";
307
307
                                        $this->labelstart = '<div class="label">';
308
308
                                        $this->labelend = "</div>\n";
318
318
 
319
319
                                case 'linespan':
320
320
                                        $this->formstart = '';
321
 
                                        $this->title_fmt = '<span style="float:right">$global_icons$</span><h2>$title$</h2>'."\n";
322
 
                                        $this->no_title_fmt = '<span style="float:right">$global_icons$</span>&nbsp;'."\n";
 
321
                                        $this->title_fmt = '$global_icons$<h2>$title$</h2>'."\n";
 
322
                                        $this->no_title_fmt = '$global_icons$&nbsp;'."\n";
323
323
                                        $this->fieldstart = '<div class="tile"$ID$>';
324
324
                                        $this->labelstart = '<strong>';
325
325
                                        $this->labelend = "</strong>\n";
482
482
                {
483
483
                        $field_params['id'] = '';
484
484
                }
 
485
                else
 
486
                {
 
487
                        $field_params['id'] = ' id="'.$field_params['id'].'"';
 
488
                }
485
489
 
486
490
                switch( $this->layout )
487
491
                {
504
508
                                        unset( $field_params['legend_params'] );
505
509
                                }
506
510
 
507
 
                                $r = str_replace( '$fieldset_attribs$', get_field_attribs_as_string($field_params), $this->template['fieldset_begin'] );
508
 
                                // $r = '<fieldset'.get_field_attribs_as_string($field_params).'>'."\n";
509
 
 
510
 
                                $r = str_replace( '$fieldset_title$', $title, $r );
511
 
                                $r = str_replace( '$id$', $field_params['id'], $r );
512
 
                                $r = str_replace( '$class$', $field_params['class'], $r );
 
511
                                $r = str_replace( '$fieldset_title$', $title, $this->template['fieldset_begin'] );
 
512
 
 
513
                                if( $r = str_replace( '$ID$', $field_params['id'], $r ) )
 
514
                                {
 
515
                                        unset( $field_params['id'] );
 
516
                                }
 
517
                                if( $r = str_replace( '$class$', $field_params['class'], $r ) )
 
518
                                {
 
519
                                        unset( $field_params['class'] );
 
520
                                }
 
521
 
 
522
                                $r = str_replace( '$fieldset_attribs$', get_field_attribs_as_string($field_params), $r );
513
523
 
514
524
                                if( empty($legend_params) )
515
525
                                { // there are no legend_params, remove the placeholder