Removed translation from config file
This commit is contained in:
parent
8257864829
commit
acfe72cb91
|
@ -110,7 +110,6 @@ return [
|
||||||
|
|
||||||
// Available T-Shirt sizes, set value to null if not available
|
// Available T-Shirt sizes, set value to null if not available
|
||||||
'tshirt_sizes' => [
|
'tshirt_sizes' => [
|
||||||
'' => _('Please select...'),
|
|
||||||
'S' => 'S',
|
'S' => 'S',
|
||||||
'S-G' => 'S Girl',
|
'S-G' => 'S Girl',
|
||||||
'M' => 'M',
|
'M' => 'M',
|
||||||
|
|
|
@ -244,7 +244,6 @@ function admin_active()
|
||||||
|
|
||||||
$shirt_statistics = [];
|
$shirt_statistics = [];
|
||||||
foreach (array_keys($tshirt_sizes) as $size) {
|
foreach (array_keys($tshirt_sizes) as $size) {
|
||||||
if (!empty($size)) {
|
|
||||||
$gc = DB::selectOne(
|
$gc = DB::selectOne(
|
||||||
'SELECT count(*) FROM `User` WHERE `Size`=? AND `Tshirt`=1',
|
'SELECT count(*) FROM `User` WHERE `Size`=? AND `Tshirt`=1',
|
||||||
[$size]
|
[$size]
|
||||||
|
@ -256,7 +255,6 @@ function admin_active()
|
||||||
'given' => (int)$gc
|
'given' => (int)$gc
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$shirtCount = User_tshirts_count();
|
$shirtCount = User_tshirts_count();
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,6 @@ function admin_user()
|
||||||
global $user, $privileges;
|
global $user, $privileges;
|
||||||
$tshirt_sizes = config('tshirt_sizes');
|
$tshirt_sizes = config('tshirt_sizes');
|
||||||
$request = request();
|
$request = request();
|
||||||
|
|
||||||
foreach ($tshirt_sizes as $key => $size) {
|
|
||||||
if (empty($size)) {
|
|
||||||
unset($tshirt_sizes[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$html = '';
|
$html = '';
|
||||||
|
|
||||||
if (!$request->has('id')) {
|
if (!$request->has('id')) {
|
||||||
|
@ -68,7 +61,7 @@ function admin_user()
|
||||||
}
|
}
|
||||||
$html .= " <tr><td>jabber</td><td>" . '<input size="40" name="ejabber" value="' . $user_source['jabber'] . '" class="form-control"></td></tr>' . "\n";
|
$html .= " <tr><td>jabber</td><td>" . '<input size="40" name="ejabber" value="' . $user_source['jabber'] . '" class="form-control"></td></tr>' . "\n";
|
||||||
$html .= ' <tr><td>Size</td><td>'
|
$html .= ' <tr><td>Size</td><td>'
|
||||||
. html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size']) . '</td></tr>' . "\n";
|
. html_select_key('size', 'eSize', $tshirt_sizes, $user_source['Size'], _('Please select...')) . '</td></tr>' . "\n";
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
'1' => _('Yes'),
|
'1' => _('Yes'),
|
||||||
|
|
|
@ -69,12 +69,6 @@ function guest_register()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($tshirt_sizes as $key => $size) {
|
|
||||||
if (empty($size)) {
|
|
||||||
unset($tshirt_sizes[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!in_array('register', $privileges) || (!isset($user) && !config('registration_enabled'))) {
|
if (!in_array('register', $privileges) || (!isset($user) && !config('registration_enabled'))) {
|
||||||
error(_('Registration is disabled.'));
|
error(_('Registration is disabled.'));
|
||||||
|
|
||||||
|
@ -334,7 +328,7 @@ function guest_register()
|
||||||
div('col-sm-6', [
|
div('col-sm-6', [
|
||||||
$enable_tshirt_size ? form_select('tshirt_size',
|
$enable_tshirt_size ? form_select('tshirt_size',
|
||||||
_('Shirt size') . ' ' . entry_required(),
|
_('Shirt size') . ' ' . entry_required(),
|
||||||
$tshirt_sizes, $tshirt_size) : ''
|
$tshirt_sizes, $tshirt_size, _('Please select...')) : ''
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
div('row', [
|
div('row', [
|
||||||
|
|
|
@ -224,12 +224,6 @@ function user_settings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($tshirt_sizes as $key => $size) {
|
|
||||||
if (empty($size)) {
|
|
||||||
unset($tshirt_sizes[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$user_source = $user;
|
$user_source = $user;
|
||||||
|
|
||||||
if ($request->has('submit')) {
|
if ($request->has('submit')) {
|
||||||
|
|
|
@ -367,11 +367,16 @@ function form_textarea($name, $label, $value, $disabled = false)
|
||||||
* @param string $label
|
* @param string $label
|
||||||
* @param string[] $values
|
* @param string[] $values
|
||||||
* @param string $selected
|
* @param string $selected
|
||||||
|
* @param string $selectText
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function form_select($name, $label, $values, $selected)
|
function form_select($name, $label, $values, $selected, $selectText = '')
|
||||||
{
|
{
|
||||||
return form_element($label, html_select_key('form_' . $name, $name, $values, $selected), 'form_' . $name);
|
return form_element(
|
||||||
|
$label,
|
||||||
|
html_select_key('form_' . $name, $name, $values, $selected, $selectText),
|
||||||
|
'form_' . $name
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -425,11 +430,15 @@ function html_options($name, $options, $selected = '')
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string[] $rows
|
* @param string[] $rows
|
||||||
* @param string $selected
|
* @param string $selected
|
||||||
|
* @param string $selectText
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function html_select_key($dom_id, $name, $rows, $selected)
|
function html_select_key($dom_id, $name, $rows, $selected, $selectText = '')
|
||||||
{
|
{
|
||||||
$html = '<select class="form-control" id="' . $dom_id . '" name="' . $name . '">';
|
$html = '<select class="form-control" id="' . $dom_id . '" name="' . $name . '">';
|
||||||
|
if (!empty($selectText)) {
|
||||||
|
$html .= '<option value="">' . $selectText . '</option>';
|
||||||
|
}
|
||||||
foreach ($rows as $key => $row) {
|
foreach ($rows as $key => $row) {
|
||||||
if (($key == $selected) || ($row === $selected)) {
|
if (($key == $selected) || ($row === $selected)) {
|
||||||
$html .= '<option value="' . $key . '" selected="selected">' . $row . '</option>';
|
$html .= '<option value="' . $key . '" selected="selected">' . $row . '</option>';
|
||||||
|
|
|
@ -66,7 +66,8 @@ function User_settings_view(
|
||||||
'tshirt_size',
|
'tshirt_size',
|
||||||
_('Shirt size'),
|
_('Shirt size'),
|
||||||
$tshirt_sizes,
|
$tshirt_sizes,
|
||||||
$user_source['Size']
|
$user_source['Size'],
|
||||||
|
_('Please select...')
|
||||||
) : '',
|
) : '',
|
||||||
form_info('', _('Please visit the angeltypes page to manage your angeltypes.')),
|
form_info('', _('Please visit the angeltypes page to manage your angeltypes.')),
|
||||||
form_submit('submit', _('Save'))
|
form_submit('submit', _('Save'))
|
||||||
|
|
Loading…
Reference in New Issue