mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 20:51:53 +02:00
e_form 'selected' bug, newspost various markup fixes
This commit is contained in:
parent
8df9b45984
commit
6a70db6ca4
@ -9,9 +9,9 @@
|
||||
* News Administration
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/newspost.php,v $
|
||||
* $Revision: 1.37 $
|
||||
* $Date: 2009-05-08 21:50:19 $
|
||||
* $Author: e107steved $
|
||||
* $Revision: 1.38 $
|
||||
* $Date: 2009-05-10 17:31:50 $
|
||||
* $Author: secretr $
|
||||
*/
|
||||
require_once("../class2.php");
|
||||
|
||||
@ -498,7 +498,7 @@ class admin_newspost
|
||||
$temp['news_newdateheader'] = intval($_POST['news_newdateheader']);
|
||||
$temp['news_unstemplate'] = intval($_POST['news_unstemplate']);
|
||||
$temp['news_editauthor'] = intval($_POST['news_editauthor']);
|
||||
|
||||
|
||||
if ($admin_log->logArrayDiffs($temp, $pref, 'NEWS_06'))
|
||||
{
|
||||
save_prefs(); // Only save if changes
|
||||
@ -985,10 +985,8 @@ class admin_newspost
|
||||
<tr>
|
||||
<td class='label'>".NWSLAN_15.":</td>
|
||||
<td class='control'>
|
||||
".
|
||||
$frm->radio('news_allow_comments', 0, $_POST['news_allow_comments'])."".$frm->label(LAN_ENABLED, 'news_allow_comments', 1)." ".
|
||||
$frm->radio('news_allow_comments', 1, $_POST['news_allow_comments'])."".$frm->label(LAN_DISABLED, 'news_allow_comments', 1)
|
||||
."
|
||||
".$frm->radio('news_allow_comments', 0, $_POST['news_allow_comments'])."".$frm->label(LAN_ENABLED, 'news_allow_comments', 0)."
|
||||
".$frm->radio('news_allow_comments', 1, $_POST['news_allow_comments'])."".$frm->label(LAN_DISABLED, 'news_allow_comments', 1)."
|
||||
<div class='field-help'>
|
||||
".NWSLAN_18."
|
||||
</div>
|
||||
@ -1644,14 +1642,25 @@ class admin_newspost
|
||||
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."?maint' id='core-newspost-maintenance-form'>
|
||||
<div style='text-align:center'>
|
||||
<table class='fborder' style='".ADMIN_WIDTH."'>
|
||||
|
||||
<tr><td class='forumheader3'>".LAN_NEWS_56."</td><td style='text-align:center' class='forumheader3'>";
|
||||
$text .= "<input class='button' type='submit' name='news_comments_recalc' value='".LAN_NEWS_57."' /></td></tr>";
|
||||
|
||||
$text .= "</table></div>
|
||||
</form>";
|
||||
<fieldset id='core-newspost-maintenance'>
|
||||
<legend class='e-hideme'>".LAN_NEWS_59."</legend>
|
||||
<table class='adminform' cellpadding='0' cellspacing='0'>
|
||||
<colgroup span='2'>
|
||||
<col class='col-label'>
|
||||
<col class='col-control'>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='label'>".LAN_NEWS_56."</td>
|
||||
<td class='control'>
|
||||
".$frm->admin_button('news_comments_recalc', LAN_NEWS_57, 'update')."
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
||||
";
|
||||
|
||||
$emessage = &eMessage::getInstance();
|
||||
$e107->ns->tablerender(LAN_NEWS_59, $emessage->render().$text);
|
||||
|
@ -9,8 +9,8 @@
|
||||
* Form Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
|
||||
* $Revision: 1.23 $
|
||||
* $Date: 2009-01-28 14:57:27 $
|
||||
* $Revision: 1.24 $
|
||||
* $Date: 2009-05-10 17:31:51 $
|
||||
* $Author: secretr $
|
||||
*
|
||||
*/
|
||||
@ -65,6 +65,10 @@ class e_form
|
||||
var $_tabindex_counter = 0;
|
||||
var $_tabindex_enabled = true;
|
||||
var $_cached_attributes = array();
|
||||
|
||||
/**
|
||||
* @var user_class
|
||||
*/
|
||||
var $_uc;
|
||||
|
||||
function e_form($enable_tabindex = false)
|
||||
@ -251,7 +255,7 @@ class e_form
|
||||
{
|
||||
if($classnum == e_UC_BLANK)
|
||||
return $this->option(' ', '');
|
||||
|
||||
|
||||
$tmp = explode(',', $current_value);
|
||||
if($nest_level == 0)
|
||||
{
|
||||
@ -279,8 +283,8 @@ class e_form
|
||||
function option($option_name, $value, $selected = false, $options = array())
|
||||
{
|
||||
if(false === $value) $value = '';
|
||||
$options['selected'] = $selected; //comes as separate argument just for convenience
|
||||
$options = $this->format_options('option', '', $options);
|
||||
$options['selected'] = $selected; //comes as separate argument just for convenience
|
||||
return "<option value='{$value}'".$this->get_attributes($options).">{$option_name}</option>";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user