User management with native gui and further improvements
This commit is contained in:
@@ -57,6 +57,7 @@ switch ($submit = form_get_action()) {
|
||||
// WIP New standalone document
|
||||
// debug $g_message->Add(print_r($_FILES, true));
|
||||
// check for possible errors
|
||||
// TODO use "noscale" option for images
|
||||
if (!isset($_FILES['files']['error']) || is_array($_FILES['files']['error'])) {
|
||||
$g_error->Add(_("Invalid file upload parameters."));
|
||||
$action = ACT_ADD;
|
||||
@@ -434,7 +435,7 @@ echo '<h2>', _('Add Document'), "</h2>\n";
|
||||
<label for="files" class="form-label"><?=_('Document')?></label>
|
||||
<input class="form-control" type="file" id="files" name="files" onchange="preview()">
|
||||
<img id="frame" src="" class="img-fluid">
|
||||
<button type="button" class="btn btn-secondary" onclick="clearimg();return false;"><?=_('Clear selection')?></button>
|
||||
<button type="button" class="btn btn-secondary mt-2" onclick="clearimg();return false;"><?=_('Clear selection')?></button>
|
||||
<script>
|
||||
function preview() {
|
||||
var images = ["image/png", "image/jpeg", "image/svg+xml"];
|
||||
@@ -451,6 +452,9 @@ echo '<h2>', _('Add Document'), "</h2>\n";
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<?php
|
||||
form_create_check('noscale', _('Do not scale image'), FALSE);
|
||||
?>
|
||||
<div class="container-fluid px-0 my-3">
|
||||
<button type="submit" name="submit[insert]" class="btn btn-primary"><?=_('Save')?></button>
|
||||
<a href="<?=$g_scriptname?>" class="btn btn-secondary"><?=_('Back')?></a>
|
||||
|
||||
Reference in New Issue
Block a user