mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Fixes #977 - PM send to multiple users. Cleaned up some of the GUI for Bootstrap.
This commit is contained in:
parent
3bbda20886
commit
9708756548
@ -520,11 +520,14 @@ function nextprev_shortcode($parm = '')
|
||||
}
|
||||
|
||||
// Use NEW nextprev method
|
||||
$np_parm['template'] = "[PREV] [DROPDOWN] [NEXT]";
|
||||
$np_parm['template'] = "<span class='form-group form-inline'>[PREV] [DROPDOWN] [NEXT]<span>";
|
||||
$np_parms['prev'] = ' << ';
|
||||
$np_parms['next'] = ' >> ';
|
||||
$np_parms['np_class'] = 'tbox npbutton btn btn-default';
|
||||
$np_parms['dropdown_class'] = 'tbox npdropdown form-control';
|
||||
$caption = ''; // legacy has no caption.
|
||||
|
||||
|
||||
|
||||
if($cached_parms = getcachedvars('nextprev'))
|
||||
{
|
||||
@ -593,10 +596,12 @@ function nextprev_shortcode($parm = '')
|
||||
}
|
||||
$dropdown .= '</select>';
|
||||
$ret = $np_parm['template']; // Set default
|
||||
|
||||
if (isset($np_parms['template']) && $np_parms['template'])
|
||||
{
|
||||
$ret = $np_parms['template']; // Use override
|
||||
}
|
||||
|
||||
$ret = str_replace('[DROPDOWN]', $dropdown, $ret);
|
||||
$ret = str_replace('[PREV]', $prev, $ret);
|
||||
$ret = str_replace('[NEXT]', $next, $ret);
|
||||
|
@ -453,7 +453,7 @@ class user_class
|
||||
}
|
||||
|
||||
// Only return the select box if we've ended up with some options
|
||||
if ($text) $text = "\n<select class='tbox' name='{$fieldname}' id='{$fieldname}' {$extra_js}>\n".$text."</select>\n";
|
||||
if ($text) $text = "\n<select class='tbox form-control' name='{$fieldname}' id='{$fieldname}' {$extra_js}>\n".$text."</select>\n";
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
@ -164,14 +164,14 @@ class private_message
|
||||
'pm_size' => $pmsize
|
||||
);
|
||||
}
|
||||
|
||||
if(isset($vars['to_userclass']) || isset($vars['to_array']))
|
||||
{
|
||||
if(isset($vars['to_userclass']))
|
||||
{
|
||||
require_once(e_HANDLER.'userclass_class.php');
|
||||
$toclass = e107::getUserClass()->uc_get_classname($vars['pm_userclass']);
|
||||
$tolist = $this->get_users_inclass($vars['pm_userclass']);
|
||||
$ret .= LAN_PM_38.": {$vars['to_userclass']}<br />";
|
||||
$ret .= LAN_PM_38.": {$toclass}<br />";
|
||||
$class = TRUE;
|
||||
}
|
||||
else
|
||||
@ -213,6 +213,9 @@ class private_message
|
||||
{
|
||||
$info['pm_id'] = $pmid;
|
||||
e107::getEvent()->trigger('user_pm_sent', $info);
|
||||
|
||||
unset($info['pm_id']); // prevent it from being used on the next record.
|
||||
|
||||
if($class == FALSE)
|
||||
{
|
||||
$toclass .= $u['user_name'].', ';
|
||||
@ -226,6 +229,7 @@ class private_message
|
||||
else
|
||||
{
|
||||
$ret .= LAN_PM_39.": {$u['user_name']} <br />";
|
||||
e107::getMessage()->addDebug($sql->getLastErrorText());
|
||||
}
|
||||
}
|
||||
if ($addOutbox)
|
||||
|
@ -133,14 +133,17 @@ class pm_shortcodes extends e_shortcode
|
||||
|
||||
if(check_class($this->pmPrefs['opt_userclass']) && check_class($this->pmPrefs['multi_class']))
|
||||
{
|
||||
$ret = "<input type='checkbox' name='to_userclass' value='1' />".LAN_PM_4." ";
|
||||
require_once(e_HANDLER.'userclass_class.php');
|
||||
//$ret = "<input type='checkbox' name='to_userclass' value='1' />".LAN_PM_4." ";
|
||||
|
||||
$ret = "<div class='input-group'><span class='input-group-addon'>".e107::getForm()->checkbox('to_userclass',1,false, LAN_PM_4)."</span>";
|
||||
|
||||
$args = (ADMIN ? 'admin, classes' : 'classes, matchclass');
|
||||
if(check_class($this->pmPrefs['sendall_class']))
|
||||
{
|
||||
$args = 'member, '.$args;
|
||||
}
|
||||
$ret .= e107::getUserClass()->uc_dropdown('pm_userclass', '', $args);
|
||||
|
||||
$ret .= e107::getUserClass()->uc_dropdown('pm_userclass', '', $args)."</div>";
|
||||
if (strpos($ret,'option') === FALSE) $ret = '';
|
||||
}
|
||||
return $ret;
|
||||
@ -424,11 +427,15 @@ class pm_shortcodes extends e_shortcode
|
||||
{
|
||||
if(in_array($this->var['pm_from'], $this->pmBlocks))
|
||||
{
|
||||
return "<a href='".$this->url('action/unblock', 'id='.$this->var['pm_from'])."'><img src='".e_PLUGIN_ABS."pm/images/mail_unblock.png' title='".LAN_PM_51."' alt='".LAN_PM_51."' class='icon S16' /></a>";
|
||||
$icon = (deftrue('FONTAWESOME')) ? e107::getParser()->toGlyph('fa-user-times') : "<img src='".e_PLUGIN_ABS."pm/images/mail_unblock.png' alt='".LAN_PM_51."' class='icon S16' />";
|
||||
|
||||
return "<a class='btn btn-sm btn-default' href='".$this->url('action/unblock', 'id='.$this->var['pm_from'])."' title='".LAN_PM_51."'>".$icon."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "<a href='".$this->url('action/block', 'id='.$this->var['pm_from'])."'><img src='".e_PLUGIN_ABS."pm/images/mail_block.png' title='".LAN_PM_50."' alt='".LAN_PM_50."' class='icon S16' /></a>";
|
||||
$icon = (deftrue('FONTAWESOME')) ? e107::getParser()->toGlyph('fa-user-times') : "<img src='".e_PLUGIN_ABS."pm/images/mail_block.png' alt='".LAN_PM_50."' class='icon S16' />";
|
||||
|
||||
return "<a class='btn btn-sm btn-default' href='".$this->url('action/block', 'id='.$this->var['pm_from'])."' title='".LAN_PM_50."'>".$icon."</a>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -503,7 +510,7 @@ class pm_shortcodes extends e_shortcode
|
||||
if($pm_outbox['outbox']['filled'] < 100)
|
||||
{
|
||||
$link = $this->url('new');
|
||||
return "<a class='btn btn-mini' href='{$link}'>".PM_SEND_LINK."</a>";
|
||||
return "<a class='btn btn-mini btn-xs btn-default' href='{$link}'>".PM_SEND_LINK."</a>";
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
@ -67,14 +67,15 @@ $sc_style['PM_REPLY']['post'] = "</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$PM_SEND_PM = "<div style='text-align: center'>
|
||||
<table style='width:95%' class='table fborder'>
|
||||
$PM_SEND_PM = "<div id='pm-send-pm'>
|
||||
<table class='table fborder'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption'>".LAN_PM_1.": </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='forumheader3' style='width: 30%'>".LAN_PM_2.": </td>
|
||||
<td class='forumheader3' style='width: 70%; text-align:left'>{PM_FORM_TOUSER}<br />{PM_FORM_TOCLASS}</td>
|
||||
<td class='forumheader3' style='width: 70%; text-align:left'>{PM_FORM_TOUSER}<br />
|
||||
<div class='form-inline'>{PM_FORM_TOCLASS}</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='forumheader3'>".LAN_PM_5.": </td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user