From b6f45d838b225e5c41206c758e34f704e745fd59 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 23 Feb 2013 05:17:03 -0800 Subject: [PATCH] Gui fixes. Restored cron pwd-generator button. --- e107_admin/cron.php | 12 ++++++++---- e107_admin/ugflag.php | 4 ++-- e107_handlers/form_handler.php | 10 ++++++---- e107_handlers/user_handler.php | 2 +- e107_plugins/faqs/admin_config.php | 20 ++++++++++++++++++-- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/e107_admin/cron.php b/e107_admin/cron.php index 1e9401552..070c5b6e8 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -101,9 +101,9 @@ class cron_admin_ui extends e_admin_ui $executeID = key($_POST['cron_execute']); $this->cronExecute($executeID); } - + - if (!vartrue(e107::getPref('e_cron_pwd'))) + if (!vartrue(e107::getPref('e_cron_pwd')) || varset($_POST['generate_pwd'])) { $pwd = $this->setCronPwd(); } @@ -354,13 +354,17 @@ class cron_admin_ui extends e_admin_ui } elseif (!$active) // show instructions { - $setpwd_message = LAN_CRON_15.":
".rtrim($_SERVER['DOCUMENT_ROOT'], '/').e_HTTP."cron.php ".$pref['e_cron_pwd']."
". LAN_CRON_16; + $setpwd_message = $frm->open("generate") + .LAN_CRON_15.":
".rtrim($_SERVER['DOCUMENT_ROOT'], '/').e_HTTP."cron.php ".$pref['e_cron_pwd'];
+				
+				$setpwd_message .= "
". LAN_CRON_16; if(e_DOMAIN && file_exists("/usr/local/cpanel/version")) { $setpwd_message .= "
Go to cPanel
"; } - + $setpwd_message .= $frm->admin_button('generate_pwd', 1, 'delete', 'Generate new cron password',array('class'=>'pull-right btn btn-small')); + $setpwd_message .= $frm->close(); $mes->add($setpwd_message, E_MESSAGE_INFO); } diff --git a/e107_admin/ugflag.php b/e107_admin/ugflag.php index f9b5fe48c..e99492977 100644 --- a/e107_admin/ugflag.php +++ b/e107_admin/ugflag.php @@ -103,8 +103,8 @@ $text .= " - ".$frm->bbarea('maintainance_text', vartrue($pref['maintainance_text']), 'maintenance', 'small')." -
".UGFLAN_6."
+ ".$frm->bbarea('maintainance_text', vartrue($pref['maintainance_text']), 'maintenance', 'small')." +
".UGFLAN_6."
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index a4c52e5b2..0818512df 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -805,7 +805,7 @@ class e_form // auto-height support if(!vartrue($options['noresize'])) { - $options['class'] = (isset($options['class']) && $options['class']) ? $options['class'].' e-autoheight' : 'tbox textarea e-autoheight'; + $options['class'] = (isset($options['class']) && $options['class']) ? $options['class'].' e-autoheight' : 'tbox span7 e-autoheight'; } $options = $this->format_options('textarea', $name, $options); @@ -836,8 +836,8 @@ class e_form case 'large': default: $rows = '15'; - $size = 'large'; - $height = "style='height:500px;width:1025px'"; // inline required for wysiwyg + $size = 'large span10'; + // $height = "style='height:500px;width:1025px'"; // inline required for wysiwyg break; } @@ -1273,7 +1273,9 @@ class e_form $btype = 'submit'; if(strpos($action, 'action') === 0) $btype = 'button'; $options = $this->format_options('admin_button', $name, $options); - $options['class'] = 'btn '.$action.' ';//shorthand + + $options['class'] = vartrue($options['class']); + $options['class'] .= ' btn '.$action.' ';//shorthand if(empty($label)) $label = $value; switch ($action) diff --git a/e107_handlers/user_handler.php b/e107_handlers/user_handler.php index 623ed6f02..b45cbf4df 100644 --- a/e107_handlers/user_handler.php +++ b/e107_handlers/user_handler.php @@ -1222,7 +1222,7 @@ class e_userperms $tp = e107::getParser(); $plg = e107::getPlugin(); - $allPlugins = $plg->getall(); + $allPlugins = $plg->getall(1); // Needs all for 'reading' and 'installed' for writing. foreach($allPlugins as $k=>$row2) { diff --git a/e107_plugins/faqs/admin_config.php b/e107_plugins/faqs/admin_config.php index 43881c581..1b3fc325c 100644 --- a/e107_plugins/faqs/admin_config.php +++ b/e107_plugins/faqs/admin_config.php @@ -77,14 +77,30 @@ class faq_cat_ui extends e_admin_ui 'faq_info_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE), 'faq_info_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readParms'=>'editable=1'), 'faq_info_about' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name - 'faq_info_parent' => array('title'=> LAN_CATEGORY, 'type' => 'text', 'width' => '5%'), + 'faq_info_parent' => array('title'=> LAN_CATEGORY, 'type' => 'dropdown', 'width' => '5%', 'writeParms'=>''), 'faq_info_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'width' => 'auto', 'data' => 'int', 'inline'=>true), - 'faq_info_order' => array('title'=> LAN_ORDER, 'type' => 'text', 'width' => '5%', 'thclass' => 'left' ), + 'faq_info_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'width' => '5%', 'thclass' => 'left' ), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center','readParms'=>'sort=1') ); + protected $categories = array(); + public function init() { + $sql = e107::getDb(); + + $this->categories[0] = "(Root)"; + + if($sql->select('faqs_info','*', 'faq_info_parent = 0 ORDER BY faq_info_title ASC')) + { + while ($row = $sql->fetch()) + { + $this->categories[$row['faq_info_id']] = $row['faq_info_title']; + } + } + + $this->fields['faq_info_parent']['writeParms'] = $this->categories; + /* if(e_AJAX_REQUEST) // ajax link sorting. {