Webgui code improvements and fixes
This commit is contained in:
1 parent
dacf32b401
commit
5fe9a52f15
14 files changed
+205
-311
No files matched your search
+18
-13
@@ -112,10 +112,6 @@ if ($res = $sth->fetch(PDO::FETCH_NUM)) {
|
||||
$sth->execute([$user->id, $rowspp]);
|
||||
}
|
||||
|
||||
$currsym = $pdo->query("SELECT valstr FROM settings WHERE userid=0 AND sno=4")->fetchColumn();
|
||||
$maximgx = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=20")->fetchColumn();
|
||||
$maximgy = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=21")->fetchColumn();
|
||||
|
||||
?>
|
||||
<form method="post" action="<?=$g_scriptname?>">
|
||||
<h2><?=_('for current user')?></h2>
|
||||
@@ -133,16 +129,22 @@ for ($i = 1; $i <= 6; $i++) {
|
||||
}
|
||||
|
||||
form_create_select('datefmt', _('Date format'), $opt_datefmt, $datefmt);
|
||||
?>
|
||||
<div class="mb-3">
|
||||
form_create_numeric('rowspp', _('Number of rows per page'), $rowspp, 5, 100, 1);
|
||||
|
||||
/* <div class="mb-3">
|
||||
<label for="rowspp" class="form-label"><?=_('Number of rows per page')?></label>
|
||||
<input type="text" class="form-control" id="rowspp" name="rowspp" maxlength="3" value=<?=$rowspp?>>
|
||||
</div>
|
||||
<?php
|
||||
</div> */
|
||||
|
||||
// limit global settings for captain only
|
||||
if ($user->role == 'captain'):
|
||||
?>
|
||||
<h2><?=_('global for all users')?></h2>
|
||||
if ($user->role == 'captain') {
|
||||
echo '<h2>', _('global for all users'), "</h2>\n";
|
||||
|
||||
$currsym = $pdo->query("SELECT valstr FROM settings WHERE userid=0 AND sno=4")->fetchColumn();
|
||||
$maximgx = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=20")->fetchColumn();
|
||||
$maximgy = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=21")->fetchColumn();
|
||||
|
||||
/*
|
||||
<div class="mb-3">
|
||||
<label for="currsym" class="form-label"><?=_('Currency symbol')?></label>
|
||||
<input type="text" class="form-control" id="currsym" name="currsym" maxlength="3" value=<?=$currsym?>>
|
||||
@@ -155,8 +157,11 @@ if ($user->role == 'captain'):
|
||||
<label for="maximgy" class="form-label"><?=_('Maximal image height')?></label>
|
||||
<input type="text" class="form-control" id="maximgy" name="maximgy" maxlength="4" value=<?=$maximgy?>>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
*/
|
||||
form_create_text('currsym', _('Currency symbol'), 3, $currsym);
|
||||
form_create_numeric('maximgx', _('Maximal image width'), $maximgy, 200, 4096, 1);
|
||||
form_create_numeric('maximgy', _('Maximal image height'), $maximgy, 200, 4096, 1);
|
||||
}
|
||||
?>
|
||||
<div class="container-fluid px-0 my-3">
|
||||
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
|
||||
|
||||
Reference in new issue
Block a user