Exemplo n.º 1
0
     $form->input('text', 'cloud_new_desc', txt('desc'), txt('dsc_cloud_desc'), $cloud->get_desc());
     if (is_root() || is_admin()) {
         $items = array('1' => txt('yes'), '0' => txt('no'));
         $form->radio('cloud_new_public', txt('public'), txt('dsc_cloud_public'), $items, $cloud->get_is_public());
     } else {
         $form->input('hidden', 'cloud_new_public', '', '', 0);
     }
     echo $form->render();
     include MY_APP_DIR . 'views/cloud_help_google.php';
     echo $layout->end('column');
     echo $layout->column('50%');
     switch ($cloud_type) {
         case 'google_drive':
             $form->title(txt('cloud_authentication'), '', ICONS . 'auth_key.png');
             $form->condition('not_null', true, txt('form_empty_field') . 'ClientID');
             $form->input('text', 'cloud_new_login', 'ClientID', txt('dsc_cloud_login'), $cloud->get_login());
             $form->condition('not_null', true, txt('form_empty_field') . 'Secret');
             $form->input('password', 'cloud_new_pass', 'Secret', txt('dsc_cloud_pass'), $cloud->get_password());
             $form->input('text', 'cloud_new_url', 'Redirect URL', txt('dsc_cloud_port'), $cloud->get_url());
             break;
     }
     $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:" . $cloud->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 {