|
|
@ -43,21 +43,22 @@ $form->addElement('header', '', $tool_name); |
|
|
|
$form->addElement('hidden', 'id', $group_id); |
|
|
|
$form->addElement('hidden', 'id', $group_id); |
|
|
|
|
|
|
|
|
|
|
|
// name |
|
|
|
// name |
|
|
|
$form->addElement('text', 'name', get_lang('Name')); |
|
|
|
$form->addElement('text', 'name', get_lang('Name'), array('size'=>60)); |
|
|
|
$form->applyFilter('name', 'html_filter'); |
|
|
|
$form->applyFilter('name', 'html_filter'); |
|
|
|
$form->applyFilter('name', 'trim'); |
|
|
|
$form->applyFilter('name', 'trim'); |
|
|
|
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required'); |
|
|
|
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required'); |
|
|
|
|
|
|
|
$form->addRule('name', '', 'maxlength',120); |
|
|
|
|
|
|
|
|
|
|
|
// Description |
|
|
|
// Description |
|
|
|
$form->addElement('text', 'description', get_lang('Description')); |
|
|
|
$form->addElement('textarea', 'description', get_lang('Description'), array('rows'=>8, 'cols'=>58)); |
|
|
|
$form->applyFilter('description', 'html_filter'); |
|
|
|
$form->applyFilter('description', 'html_filter'); |
|
|
|
$form->applyFilter('description', 'trim'); |
|
|
|
$form->applyFilter('description', 'trim'); |
|
|
|
|
|
|
|
$form->addRule('name', '', 'maxlength',255); |
|
|
|
|
|
|
|
|
|
|
|
// url |
|
|
|
// url |
|
|
|
$form->addElement('text', 'url', get_lang('URL')); |
|
|
|
$form->addElement('text', 'url', get_lang('URL'), array('size'=>35)); |
|
|
|
$form->applyFilter('url', 'html_filter'); |
|
|
|
$form->applyFilter('url', 'html_filter'); |
|
|
|
$form->applyFilter('url', 'trim'); |
|
|
|
$form->applyFilter('url', 'trim'); |
|
|
|
|
|
|
|
|
|
|
|
// Picture |
|
|
|
// Picture |
|
|
|
$form->addElement('file', 'picture', get_lang('AddPicture')); |
|
|
|
$form->addElement('file', 'picture', get_lang('AddPicture')); |
|
|
|
$allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif'); |
|
|
|
$allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif'); |
|
|
|