Merge branch '2.1.x'
This commit is contained in:
@@ -78,15 +78,16 @@ class modules_helper
|
||||
* @param string $key Key of select box
|
||||
* @param array $select_ary Array of select box options
|
||||
* @param array $selected_options Array of selected options
|
||||
* @param bool $multiple Whether multiple options should be selectable
|
||||
*
|
||||
* @return string HTML code of select box
|
||||
* @access public
|
||||
*/
|
||||
public function generate_select_box($key, $select_ary, $selected_options)
|
||||
public function generate_select_box($key, $select_ary, $selected_options, $multiple = false)
|
||||
{
|
||||
// Build options
|
||||
$options = '<select id="' . $key . '" name="' . $key;
|
||||
$options .= (sizeof($selected_options) > 1) ? '[]" multiple="multiple">' : '">';
|
||||
$options .= ($multiple) ? '[]" multiple="multiple">' : '">';
|
||||
foreach ($select_ary as $id => $option)
|
||||
{
|
||||
$options .= '<option value="' . $option['value'] . '"' . ((in_array($option['value'], $selected_options)) ? ' selected="selected"' : '') . (!empty($option['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $option['title'] . '</option>';
|
||||
@@ -114,11 +115,6 @@ class modules_helper
|
||||
{
|
||||
$selected_options = explode(',', $this->config[$key]);
|
||||
}
|
||||
// Add useless values to force multi drop down list
|
||||
$selected_options += array(
|
||||
'-1' => '',
|
||||
'-2' => '',
|
||||
);
|
||||
|
||||
// Build forum options
|
||||
foreach ($forum_list as $f_id => $f_row)
|
||||
@@ -130,7 +126,7 @@ class modules_helper
|
||||
);
|
||||
}
|
||||
|
||||
return $this->generate_select_box($key, $select_ary, $selected_options);
|
||||
return $this->generate_select_box($key, $select_ary, $selected_options, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,9 +32,14 @@ if (empty($lang) || !is_array($lang))
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters you may want to copy&paste:
|
||||
// ’ « » “ ” …
|
||||
//
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'DONATION' => 'Dons PayPal',
|
||||
'DONATION_TEXT' => 'est un groupe fournissant des services sans intention de faire du bénéfice. Vos dons sont les bienvenus, pour nous aider à couvrir les différents frais liés à notre serveur, notre nom de domaine, etc.',
|
||||
'DONATION_TEXT' => 'est un groupe fournissant des services sans intention de faire du bénéfice. Vos dons sont les bienvenus, pour nous aider à couvrir les différents frais liés à notre serveur, notre nom de domaine, etc..',
|
||||
'PAY_MSG' => 'Veuillez utiliser un point décimal (et non une virgule) comme séparateur, comme par exemple : 3.50',
|
||||
'PAY_ITEM' => 'Faire un don !', // paypal item
|
||||
|
||||
@@ -62,5 +67,7 @@ $lang = array_merge($lang, array(
|
||||
'ACP_PORTAL_PAYPAL_SETTINGS_EXP' => 'Ici vous personnalisez le bloc PayPal.',
|
||||
'PORTAL_PAY_ACC' => 'Compte PayPal à utiliser',
|
||||
'PORTAL_PAY_ACC_EXP' => 'Saisir l’email de votre compte PayPal, comme par exemple : prenom.nom@mail.fr.',
|
||||
'PORTAL_PAY_CUSTOM' => 'Ajouter le nom d’utilisateur pour le don PayPal',
|
||||
'PORTAL_PAY_CUSTOM' => 'Ajouter le nom d’utilisateur pour le don PayPal',
|
||||
'PORTAL_PAY_DEFAULT' => 'Devise par défaut',
|
||||
'PORTAL_PAY_DEFAULT_EXP' => 'Devise sélectionnée par défaut dans la liste des devises.'
|
||||
));
|
||||
|
||||
@@ -191,7 +191,7 @@ class attachments extends module_base
|
||||
|
||||
$selected = $this->get_selected_filetypes($module_id);
|
||||
|
||||
return $this->helper->generate_select_box($key, $extensions, $selected);
|
||||
return $this->helper->generate_select_box($key, $extensions, $selected, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -188,8 +188,8 @@ class calendar extends module_base
|
||||
// output our general calendar bits
|
||||
$down = $this->mini_cal_month - 1;
|
||||
$up = $this->mini_cal_month + 1;
|
||||
$prev_month = '<a href="' . $this->modules_helper->route('board3_portal_controller') . "?m$module_id=$down#minical$module_id" . '" rel="nofollow"><img src="' . $this->portal_root_path . 'styles/' . $this->user->style['style_path'] . '/theme/images/portal/cal_icon_left_arrow.png' . '" title="' . $this->user->lang['VIEW_PREVIOUS_MONTH'] . '" height="16" width="16" alt="<<" /></a>';
|
||||
$next_month = '<a href="' . $this->modules_helper->route('board3_portal_controller') . "?m$module_id=$up#minical$module_id" . '" rel="nofollow"><img src="' . $this->portal_root_path . 'styles/' . $this->user->style['style_path'] . '/theme/images/portal/cal_icon_right_arrow.png' . '" title="' . $this->user->lang['VIEW_NEXT_MONTH'] . '" height="16" width="16" alt=">>" /></a>';
|
||||
$prev_month = '<a href="' . $this->modules_helper->route('board3_portal_controller') . "?m$module_id=$down#minical$module_id" . '" rel="nofollow"><span class="portal-arrow-left-icon" title="' . $this->user->lang['VIEW_PREVIOUS_MONTH'] . '"></span></a>';
|
||||
$next_month = '<a href="' . $this->modules_helper->route('board3_portal_controller') . "?m$module_id=$up#minical$module_id" . '" rel="nofollow"><span class="portal-arrow-right-icon" title="' . $this->user->lang['VIEW_NEXT_MONTH'] . '"></span></a>';
|
||||
|
||||
$this->template->assign_block_vars('minical', array(
|
||||
'S_SUNDAY_FIRST' => ($this->config['board3_sunday_first_' . $module_id]) ? true : false,
|
||||
|
||||
|
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 744 B |
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 676 B |
@@ -63,6 +63,22 @@
|
||||
float: right;
|
||||
}
|
||||
|
||||
.portal-arrow-left-icon {
|
||||
background-image: url('../../all/theme/images/portal/cal_icon_left_arrow.png');
|
||||
padding-left: 16px;
|
||||
padding-top: 16px;
|
||||
float: left;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.portal-arrow-right-icon {
|
||||
background-image: url('../../all/theme/images/portal/cal_icon_right_arrow.png');
|
||||
padding-left: 16px;
|
||||
padding-top: 16px;
|
||||
float: right;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.portal-user-span {
|
||||
float: left;
|
||||
padding-left: 5px;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 744 B |
Binary file not shown.
|
Before Width: | Height: | Size: 676 B |
@@ -204,3 +204,19 @@
|
||||
padding-top: 16px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.portal-arrow-left-icon {
|
||||
background-image: url('../../all/theme/images/portal/cal_icon_left_arrow.png');
|
||||
padding-left: 16px;
|
||||
padding-top: 16px;
|
||||
float: left;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.portal-arrow-right-icon {
|
||||
background-image: url('../../all/theme/images/portal/cal_icon_right_arrow.png');
|
||||
padding-left: 16px;
|
||||
padding-top: 16px;
|
||||
float: right;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
@@ -93,16 +93,17 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
|
||||
'title' => 'three',
|
||||
),
|
||||
),
|
||||
array('one', 'two')),
|
||||
array('one', 'two'),
|
||||
true),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider data_generate_select_box
|
||||
*/
|
||||
public function test_generate_select_box($expected, $key, $select_ary, $selected_options)
|
||||
public function test_generate_select_box($expected, $key, $select_ary, $selected_options, $multiple = false)
|
||||
{
|
||||
$this->assertEquals($expected, $this->modules_helper->generate_select_box($key, $select_ary, $selected_options));
|
||||
$this->assertEquals($expected, $this->modules_helper->generate_select_box($key, $select_ary, $selected_options, $multiple));
|
||||
}
|
||||
|
||||
public function test_generate_forum_select()
|
||||
|
||||
Reference in New Issue
Block a user