skala
Julio Montoya 12 years ago
parent 755708e31c
commit 69dcd217d8
  1. 12
      main/inc/lib/grade_model.lib.php

@ -105,8 +105,9 @@ class GradeModel extends Model {
$counter = $i;
$form->addElement('text', 'components['.$i.'][percentage]', null, array('class' => 'span1'));
$form->addElement('text', 'components['.$i.'][acronym]', null, array('class' => 'span1'));
$form->addElement('text', 'components['.$i.'][title]', null, array('class' => 'span2', 'placeholder' => get_lang('Title')));
$form->addElement('text', 'components['.$i.'][prefix]', null, array('class' => 'span2'));
$form->addElement('text', 'components['.$i.'][prefix]', null, array('class' => 'span1', 'placeholder' => get_lang('Prefix')));
$options = array(0=>0, 1 => 1, 2 => 2, 3=>3, 4=> 4, 5=> 5);
$form->addElement('select', 'components['.$i.'][count_elements]', null, $options);
@ -114,7 +115,7 @@ class GradeModel extends Model {
$options = array(0=>0, 1 => 1, 2 => 2, 3=>3, 4=> 4, 5=> 5);
$form->addElement('select', 'components['.$i.'][exclusions]', null, $options);
$form->addElement('text', 'components['.$i.'][title]', null, array('class' => 'span2'));
$form->addElement('hidden', 'components['.$i.'][id]');
@ -123,11 +124,10 @@ class GradeModel extends Model {
<p>
<label class="control-label">{label}</label>
<div class="controls">
<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->
{element} <!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --> % = ';
$template_acronym = '
<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->
<!-- BEGIN required -->
{element} {label} <!-- BEGIN error --><span class="form_error">{error}</span> <!-- END error -->';
$template_title =
@ -140,12 +140,12 @@ class GradeModel extends Model {
</a>
</div></p></div>';
$renderer->setElementTemplate($template_title, 'components['.$i.'][title]');
$renderer->setElementTemplate($template_acronym, 'components['.$i.'][title]');
$renderer->setElementTemplate($template_percentage , 'components['.$i.'][percentage]');
$renderer->setElementTemplate($template_acronym , 'components['.$i.'][acronym]');
$renderer->setElementTemplate($template_acronym , 'components['.$i.'][prefix]');
$renderer->setElementTemplate($template_acronym , 'components['.$i.'][exclusions]');
$renderer->setElementTemplate($template_title , 'components['.$i.'][exclusions]');
$renderer->setElementTemplate($template_acronym , 'components['.$i.'][count_elements]');
if ($i == 0) {

Loading…
Cancel
Save