|
@@ -216,7 +216,14 @@ class CatForm extends FormValidator
|
|
} else {
|
|
} else {
|
|
$value = 100;
|
|
$value = 100;
|
|
}
|
|
}
|
|
- $this->addText('weight', array(get_lang('TotalWeight'), get_lang('TotalSumOfWeights')), true, array('value'=>$value, 'class'=>'span1','maxlength'=>'5'));
|
|
+ $this->addText('weight',
|
|
|
|
+ array(
|
|
|
|
+ get_lang('TotalWeight'),
|
|
|
|
+ get_lang('TotalSumOfWeights')
|
|
|
|
+ ),
|
|
|
|
+ true,
|
|
|
|
+ array('value' => $value, 'class' => 'span1', 'maxlength' => '5')
|
|
|
|
+ );
|
|
$this->addRule('weight', get_lang('ThisFieldIsRequired'), 'required');
|
|
$this->addRule('weight', get_lang('ThisFieldIsRequired'), 'required');
|
|
|
|
|
|
if (api_is_platform_admin() || api_is_drh()) {
|
|
if (api_is_platform_admin() || api_is_drh()) {
|
|
@@ -267,8 +274,8 @@ class CatForm extends FormValidator
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (isset($this->category_object) && $this->category_object->get_parent_id(
|
|
+ if (isset($this->category_object) &&
|
|
- ) == 0
|
|
+ $this->category_object->get_parent_id() == 0
|
|
) {
|
|
) {
|
|
$this->addText(
|
|
$this->addText(
|
|
'certif_min_score',
|
|
'certif_min_score',
|
|
@@ -301,8 +308,7 @@ class CatForm extends FormValidator
|
|
$this->addElement(
|
|
$this->addElement(
|
|
'textarea',
|
|
'textarea',
|
|
'description',
|
|
'description',
|
|
- get_lang('Description'),
|
|
+ get_lang('Description')
|
|
- array('class' => 'span3', 'cols' => '34')
|
|
|
|
);
|
|
);
|
|
|
|
|
|
if (isset($this->category_object) &&
|
|
if (isset($this->category_object) &&
|
|
@@ -365,20 +371,10 @@ class CatForm extends FormValidator
|
|
}
|
|
}
|
|
|
|
|
|
if ($this->form_type == self :: TYPE_ADD) {
|
|
if ($this->form_type == self :: TYPE_ADD) {
|
|
- $this->addElement(
|
|
+ $this->addButtonCreate(get_lang('AddCategory'));
|
|
- 'style_submit_button',
|
|
|
|
- null,
|
|
|
|
- get_lang('AddCategory'),
|
|
|
|
- 'class="save"'
|
|
|
|
- );
|
|
|
|
} else {
|
|
} else {
|
|
$this->addElement('hidden', 'editcat', intval($_GET['editcat']));
|
|
$this->addElement('hidden', 'editcat', intval($_GET['editcat']));
|
|
- $this->addElement(
|
|
+ $this->addButtonUpdate(get_lang('EditCategory'));
|
|
- 'style_submit_button',
|
|
|
|
- null,
|
|
|
|
- get_lang('EditCategory'),
|
|
|
|
- 'class="save"'
|
|
|
|
- );
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|