if (is_root() || is_admin()) { $items = array('0' => txt('no'), '1' => txt('yes')); $form->radio('ftp_new_public', txt('ftp_form_public'), txt('ftp_form_public_desc'), $items, $ftp->get_is_public()); } else { $form->input('hidden', 'ftp_new_public', '', '', '0'); } echo $form->render(); echo $layout->end('column'); echo $layout->column('50%'); $form->title(txt('ftp_authentication'), '', ICONS . 'system_info/key_icon.png'); $form->condition('not_null', true, txt('form_empty_field') . 'Host'); $form->input('text', 'ftp_new_host', 'Host/IP', txt('dsc_ftp_host'), $ftp->get_host()); $form->condition('not_null', true, txt('form_empty_field') . 'Login'); $form->input('text', 'ftp_new_login', 'Login', txt('dsc_ftp_login'), $ftp->get_login()); $form->condition('not_null', true, txt('form_empty_field') . txt('password')); $form->input('password', 'ftp_new_pass', txt('password'), txt('dsc_ftp_pass'), $ftp->get_password()); $form->input('text', 'ftp_new_port', 'Port', txt('dsc_ftp_port'), $ftp->get_port()); $form->status(); $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\tphpos.windowRefresh('" . WIN_ID . "', 'section:list,action:delete,delete_id:" . $ftp->get_id() . "');\t\n\t\t\t}\n\t\t\t});\t"; $form->button(txt('delete'), $delete_action, 'cancel'); $form->submit('', txt('btn_update'), 'edit_add'); //$form->button('', 'button', 'edit_add'); echo $form->render(); echo $layout->end('column'); echo $layout->clr(); echo $form->form_end(); } else { echo $layout->access_denied(); } } else { winreload(WIN_ID, array('section' => 'list'));