1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-11 10:34:00 +02:00

Fixed auth error view, rewrite modals

This commit is contained in:
Anton Baranov
2020-07-10 05:34:00 +03:00
parent ac0708ce01
commit 538e249aec
20 changed files with 364 additions and 305 deletions

9
.gitattributes vendored
View File

@@ -1,9 +0,0 @@
dist/ifm.php -diff
dist/ifm.min.php -diff
dist/* -diff
src/includes/ace.js -diff
src export-ignore
compiler.php export-ignore
.gitignore export-ignore
.gitattributes export-ignore

View File

@@ -10,7 +10,7 @@ chdir( realpath( dirname( __FILE__ ) ) );
// output files and common attrs // output files and common attrs
define( "IFM_CDN", false ); define( "IFM_CDN", false );
define( "IFM_VERSION", "<a href='https://github.com/misterunknown/ifm/tree/v2.6.1' target=_blank>v2.6.1</a>" ); define( "IFM_VERSION", "v2.6.2" );
define( "IFM_RELEASE_DIR", "dist/"); define( "IFM_RELEASE_DIR", "dist/");
define( "IFM_STANDALONE", "ifm.php" ); define( "IFM_STANDALONE", "ifm.php" );
define( "IFM_STANDALONE_GZ", "ifm.min.php" ); define( "IFM_STANDALONE_GZ", "ifm.min.php" );

View File

@@ -101,7 +101,7 @@
"toggle_nav": "Переключить вид", "toggle_nav": "Переключить вид",
"upload": "Загрузить", "upload": "Загрузить",
"upload_drop": "Перетащите файлы для загрузки", "upload_drop": "Перетащите файлы для загрузки",
"upload_file": "Загрузить файла", "upload_file": "Загрузить файл",
"upload_remote": "Удаленная загрузка", "upload_remote": "Удаленная загрузка",
"upload_remote_url": "Удаленная загрузка по URL", "upload_remote_url": "Удаленная загрузка по URL",
"username": "Имя пользователя", "username": "Имя пользователя",

View File

@@ -1394,9 +1394,11 @@ function IFM(params) {
if( newFooter.style.maxHeight == '80%' ) { if( newFooter.style.maxHeight == '80%' ) {
newFooter.style.maxHeight = '6em'; newFooter.style.maxHeight = '6em';
newFooter.style.overflow = 'hidden'; newFooter.style.overflow = 'hidden';
newFooter.hidden = true;
} else { } else {
newFooter.style.maxHeight = '80%'; newFooter.style.maxHeight = '80%';
newFooter.style.overflow = 'scroll'; newFooter.style.overflow = 'scroll';
newFooter.hidden = false;
} }
} }
}); });

View File

@@ -32,17 +32,16 @@ class IFMArchive {
if ($f != '.' && $f != '..') { if ($f != '.' && $f != '..') {
$filePath = $folder . '/' . $f; $filePath = $folder . '/' . $f;
if (file_exists($filePath) && is_readable($filePath)) if (file_exists($filePath) && is_readable($filePath))
if (is_file($filePath)) { if (is_file($filePath))
if (!is_callable($exclude_callback) || $exclude_callback($f)) if (!is_callable($exclude_callback) || $exclude_callback($f))
$archive->addFile( $filePath, substr( $filePath, $offset ) ); $archive->addFile( $filePath, substr( $filePath, $offset ) );
} elseif (is_dir($filePath)) { elseif (is_dir($filePath))
if (is_callable($exclude_callback)) if (is_callable($exclude_callback))
self::addFolder($archive, $filePath, $offset, $exclude_callback); self::addFolder($archive, $filePath, $offset, $exclude_callback);
else else
self::addFolder($archive, $filePath, $offset); self::addFolder($archive, $filePath, $offset);
} }
} }
}
closedir($handle); closedir($handle);
} }
@@ -56,7 +55,7 @@ class IFMArchive {
if (!is_array($src)) if (!is_array($src))
$src = array($src); $src = array($src);
//file_put_contents("debug.ifm.log", var_export(is_callable($exclude_callback), true)."\n"); file_put_contents("debug.ifm.log", var_export(is_callable($exclude_callback), true)."\n");
foreach ($src as $s) foreach ($src as $s)
if (is_dir($s)) if (is_dir($s))

View File

@@ -62,7 +62,7 @@ class IFM {
private $config = array(); private $config = array();
private $templates = array(); private $templates = array();
private $i18n = array(); private $i18n = array();
public $mode = ""; public $mode = "standalone";
public function __construct( $config=array() ) { public function __construct( $config=array() ) {
@@ -218,7 +218,7 @@ IFM_ASSETS
<title>IFM - improved file manager</title> <title>IFM - improved file manager</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">'; <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">';
$this->getCSS(); $this->getCSS();
print '</head><body>'; print '</head><body>';
} }
@@ -994,13 +994,16 @@ IFM_ASSETS
if( ! isset( $_SESSION['ifmauth'] ) || $_SESSION['ifmauth'] !== true ) { if( ! isset( $_SESSION['ifmauth'] ) || $_SESSION['ifmauth'] !== true ) {
$login_failed = false; $login_failed = false;
$login_message = "";
if( isset( $_POST["inputLogin"] ) && isset( $_POST["inputPassword"] ) ) { if( isset( $_POST["inputLogin"] ) && isset( $_POST["inputPassword"] ) ) {
if( $this->checkCredentials( $_POST["inputLogin"], $_POST["inputPassword"] ) ) { $state = $this->checkCredentials( $_POST["inputLogin"], $_POST["inputPassword"] );
if($state['status']) {
$_SESSION['ifmauth'] = true; $_SESSION['ifmauth'] = true;
} }
else { else {
$_SESSION['ifmauth'] = false; $_SESSION['ifmauth'] = false;
$login_failed = true; $login_failed = true;
$login_message = $state['message'];
} }
} }
@@ -1013,7 +1016,7 @@ IFM_ASSETS
else else
$this->jsonResponse( array( "status"=>"ERROR", "message"=>"not authenticated" ) ); $this->jsonResponse( array( "status"=>"ERROR", "message"=>"not authenticated" ) );
} else { } else {
$this->loginForm($login_failed); $this->loginForm($login_failed, $login_message);
} }
return false; return false;
} }
@@ -1023,6 +1026,7 @@ IFM_ASSETS
} }
private function checkCredentials( $user, $pass ) { private function checkCredentials( $user, $pass ) {
$authenticated = array("status" => false, "message" => "");
list( $src, $srcopt ) = explode( ";", $this->config['auth_source'], 2 ); list( $src, $srcopt ) = explode( ";", $this->config['auth_source'], 2 );
switch( $src ) { switch( $src ) {
case "inline": case "inline":
@@ -1035,12 +1039,11 @@ IFM_ASSETS
$htpasswd = new Htpasswd( $srcopt ); $htpasswd = new Htpasswd( $srcopt );
return $htpasswd->verify( $user, $pass ); return $htpasswd->verify( $user, $pass );
} else { } else {
trigger_error( "IFM: Fatal: Credential file does not exist or is not readable" ); // trigger_error( "IFM: Fatal: Credential file does not exist or is not readable" );
return false; return $authenticated;
} }
break; break;
case "ldap": case "ldap":
$authenticated = false;
$ldapopts = explode( ";", $srcopt ); $ldapopts = explode( ";", $srcopt );
if( count( $ldapopts ) === 3 ) { if( count( $ldapopts ) === 3 ) {
list( $ldap_server, $rootdn, $ufilter ) = explode( ";", $srcopt ); list( $ldap_server, $rootdn, $ufilter ) = explode( ";", $srcopt );
@@ -1050,8 +1053,8 @@ IFM_ASSETS
} }
$u = "uid=" . $user . "," . $rootdn; $u = "uid=" . $user . "," . $rootdn;
if( ! $ds = ldap_connect( $ldap_server ) ) { if( ! $ds = ldap_connect( $ldap_server ) ) {
trigger_error( "Could not reach the ldap server.", E_USER_ERROR ); $authenticated['status'] = false;
return false; $authenticated['message'] = "Could not reach the ldap server.";
} }
ldap_set_option( $ds, LDAP_OPT_PROTOCOL_VERSION, 3 ); ldap_set_option( $ds, LDAP_OPT_PROTOCOL_VERSION, 3 );
if( $ds ) { if( $ds ) {
@@ -1059,31 +1062,32 @@ IFM_ASSETS
if( $ldbind ) { if( $ldbind ) {
if( $ufilter ) { if( $ufilter ) {
if( ldap_count_entries( $ds, ldap_search( $ds, $rootdn, $ufilter ) ) > 0 ){ if( ldap_count_entries( $ds, ldap_search( $ds, $rootdn, $ufilter ) ) > 0 ){
$authenticated = true; $authenticated['status'] = true;
} else { } else {
trigger_error( "User not allowed.", E_USER_ERROR ); $authenticated['status'] = false;
$authenticated = false; $authenticated['message'] = "User not allowed.";
} }
} else { } else {
$authenticated = true; $authenticated['status'] = true;
} }
} else { } else {
trigger_error( ldap_error( $ds ), E_USER_ERROR ); $authenticated['status'] = false;
$authenticated = false; $authenticated['message'] = ldap_error( $ds );
} }
ldap_unbind( $ds ); ldap_unbind( $ds );
} else } else {
$authenticated = false; $authenticated['status'] = false;
}
return $authenticated; return $authenticated;
break; break;
} }
return false; return $authenticated;
} }
private function loginForm($loginFailed=false) { private function loginForm($loginFailed=false, $loginMessage) {
$err = ""; $err = "";
if( $loginFailed ) if( $loginFailed )
$err = '<div class="alert alert-primary" role="alert">'.$this->l['login_failed'].'</div>'; $err = '<div class="alert alert-danger" role="alert">'.$loginMessage.'</div>';
$this->getHTMLHeader(); $this->getHTMLHeader();
$html = str_replace( "{{error}}", $err, $this->templates['login'] ); $html = str_replace( "{{error}}", $err, $this->templates['login'] );
$html = str_replace( "{{i18n.username}}", $this->l['username'], $html ); $html = str_replace( "{{i18n.username}}", $this->l['username'], $html );

View File

@@ -100,8 +100,8 @@
<div class="container"> <div class="container">
<div class="card ifminfo"> <div class="card ifminfo">
<div class="card-body p-2"> <div class="card-body p-2">
<div style="float:left; padding-left: 10px;">{{i18n.footer}} IFM_VERSION</div> <div style="float:left; padding-left: 10px;">{{i18n.footer}} <a href='https://github.com/misterunknown/ifm/tree/IFM_VERSION' target=_blank>IFM_VERSION</a></div>
<a style="float:right; padding-right: 10px;" href="http://github.com/misterunknown/ifm">{{i18n.github}}</a> <a style="float:right; padding-right: 10px;" href="http://github.com/misterunknown/ifm" target="_blank">{{i18n.github}}</a>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -107,6 +107,7 @@ body {
<div class="text-center mb-4"> <div class="text-center mb-4">
<h1 class="h3 mb-3 font-weight-normal">IFM {{i18n.login}}</h1> <h1 class="h3 mb-3 font-weight-normal">IFM {{i18n.login}}</h1>
</div> </div>
{{error}}
<div class="form-label-group"> <div class="form-label-group">
<input type="text" name="inputLogin" id="inputLogin" class="form-control" placeholder="{{i18n.username}}" required="" autofocus=""> <input type="text" name="inputLogin" id="inputLogin" class="form-control" placeholder="{{i18n.username}}" required="" autofocus="">
<label for="inputLogin">{{i18n.username}}</label> <label for="inputLogin">{{i18n.username}}</label>
@@ -115,6 +116,8 @@ body {
<input type="password" name="inputPassword" id="inputPassword" class="form-control" placeholder="{{i18n.password}}" required=""> <input type="password" name="inputPassword" id="inputPassword" class="form-control" placeholder="{{i18n.password}}" required="">
<label for="inputPassword">{{i18n.password}}</label> <label for="inputPassword">{{i18n.password}}</label>
</div> </div>
<div class="alert alert-danger d-none" role="alert"></div>
<button class="btn btn-lg btn-primary btn-block" type="submit">{{i18n.login}}</button> <button class="btn btn-lg btn-primary btn-block" type="submit">{{i18n.login}}</button>
</form> </form>

View File

@@ -1,16 +1,31 @@
<form id="formAjaxRequest"> <form id="formAjaxRequest">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>URL</label><br> <div class="form-group">
<input class="form-control" type="text" id="ajaxurl" required><br> <label for="ajaxurl">URL</label>
<label>{{i18n.data}}</label><br> <input class="form-control" type="url" id="ajaxurl" required>
<textarea class="form-control" id="ajaxdata"></textarea><br> </div>
<label>{{i18n.method}}</label><br> <div class="form-group">
<input type="radio" name="arMethod" value="GET">GET</input><input type="radio" name="arMethod" value="POST" checked="checked">POST</input><br> <label for="ajaxdata">{{i18n.data}}</label>
<textarea class="form-control" id="ajaxdata"></textarea>
</div>
<div class="form-group">
<legend>{{i18n.method}}</legend>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="radioget" name="arMethod" value="GET">
<label class="form-check-label" for="radioget">GET</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="radiopost" name="arMethod" value="POST" checked="checked">
<label class="form-check-label" for="radiopost">POST</label>
</div>
</div>
<button type="button" class="btn btn-success" id="buttonRequest">{{i18n.request}}</button> <button type="button" class="btn btn-success" id="buttonRequest">{{i18n.request}}</button>
<button type="button" class="btn btn-secondary" id="buttonClose">{{i18n.cancel}}</button><br> <button type="button" class="btn btn-danger" id="buttonClose">{{i18n.cancel}}</button>
<label>{{i18n.response}}</label><br> <div class="form-group">
<label for="ajaxresponse">{{i18n.response}}</label>
<textarea class="form-control" id="ajaxresponse"></textarea> <textarea class="form-control" id="ajaxresponse"></textarea>
</div>
</fieldset> </fieldset>
</form>
</div> </div>
</form>

View File

@@ -1,13 +1,15 @@
<form id="formCopyMove"> <form id="formCopyMove">
<fieldset> <fieldset>
<div class="modal-body"> <div class="modal-body">
<label>{{i18n.select_destination}}:</label> <div class="form-group">
<label for="copyMoveTree">{{i18n.select_destination}}:</label>
<div id="copyMoveTree"><div class="text-center"><span class="icon icon-spin5 animate-spin"></span></div></div> <div id="copyMoveTree"><div class="text-center"><span class="icon icon-spin5 animate-spin"></span></div></div>
</div> </div>
</div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="copyButton">{{i18n.copy}}</button> <button type="button" class="btn btn-secondary" id="copyButton">{{i18n.copy}}</button>
<button type="button" class="btn btn-secondary" id="moveButton">{{i18n.move}}</button> <button type="button" class="btn btn-secondary" id="moveButton">{{i18n.move}}</button>
<button type="button" class="btn btn-secondary" id="cancelButton">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="cancelButton">{{i18n.cancel}}</button>
</div> </div>
</fieldset> </fieldset>
</form> </form>

View File

@@ -1,12 +1,14 @@
<form id="formCreateArchive"> <form id="formCreateArchive">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.archivename}}:</label> <div class="form-group">
<input class="form-control" type="text" name="archivename" value="" /> <label for="archivename">{{i18n.archivename}}:</label>
<input id="archivename" class="form-control" type="text" name="archivename" value="" />
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonSave">{{i18n.save}}</button> <button type="button" class="btn btn-success" id="buttonSave">{{i18n.save}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,12 +1,14 @@
<form id="formCreateDir"> <form id="formCreateDir">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.directoryname}}:</label> <div class="form-group">
<input class="form-control" type="text" name="dirname" value="" /> <label for="dirname">{{i18n.directoryname}}:</label>
<input class="form-control" id="dirname" type="text" name="dirname" value="" />
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonSave">{{i18n.save}}</button> <button type="button" class="btn btn-success" id="buttonSave">{{i18n.save}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,29 +1,37 @@
<form id="formExtractFile"> <form id="formExtractFile">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<div class="form-group">
<label>{{i18n.extract_filename}} {{filename}}:</label> <label>{{i18n.extract_filename}} {{filename}}:</label>
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><input type="radio" name="extractTargetLocation" value="./" checked="checked"></span> <div class="input-group-text">
<input type="radio" name="extractTargetLocation" value="./" checked="checked">
</div> </div>
<span class="form-control">./</span> </div>
<input class="form-control" type="text" placeholder="./" readonly>
</div> </div>
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><input type="radio" name="extractTargetLocation" value="./{{destination}}"></span> <div class="input-group-text">
<input type="radio" name="extractTargetLocation" value="./{{destination}}">
</div> </div>
<span class="form-control">./{{destination}}</span> </div>
<input class="form-control" type="text" placeholder="./{{destination}}" readonly>
</div> </div>
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><input type="radio" name="extractTargetLocation" value="custom"></span> <div class="input-group-text">
<input type="radio" name="extractTargetLocation" value="custom">
</div>
</div> </div>
<input id="extractCustomLocation" type="text" class="form-control" placeholder="custom location" value=""> <input id="extractCustomLocation" type="text" class="form-control" placeholder="custom location" value="">
</div> </div>
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonExtract">{{i18n.extract}}</button> <button type="button" class="btn btn-primary" id="buttonExtract">{{i18n.extract}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,15 +1,17 @@
<form id="formFile"> <form id="formFile">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.filename}}:</label> <div class="form-group">
<input type="text" class="form-control" name="filename" value="{{filename}}"><br> <label for="filename">{{i18n.filename}}:</label>
<div id="content" name="content"></div><br> <input type="text" class="form-control" name="filename" id="filename" value="{{filename}}">
</div>
<div class="form-group" id="content" name="content"></div>
<button type="button" class="btn btn-secondary" id="editoroptions">{{i18n.editor_options}}</button> <button type="button" class="btn btn-secondary" id="editoroptions">{{i18n.editor_options}}</button>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" id="buttonSave" class="btn btn-secondary">{{i18n.save}}</button> <button type="button" id="buttonSave" class="btn btn-primary">{{i18n.save}}</button>
<button type="button" id="buttonSaveNotClose" class="btn btn-secondary">{{i18n.save_wo_close}}</button> <button type="button" id="buttonSaveNotClose" class="btn btn-success">{{i18n.save_wo_close}}</button>
<button type="button" id="buttonClose" class="btn btn-secondary">{{i18n.close}}</button> <button type="button" id="buttonClose" class="btn btn-danger">{{i18n.close}}</button>
</div> </div>
</form> </form>

View File

@@ -1,27 +1,33 @@
<div> <form>
<div class="form-check p-0"> <div class="form-group">
<input type="checkbox" id="editor-wordwrap" <div class="form-check">
<input class="form-check-input" type="checkbox" id="editor-wordwrap"
{{#wordwrap}} {{#wordwrap}}
checked="checked" checked="checked"
{{/wordwrap}} {{/wordwrap}}
> >
<label class="form-check-label" for="editor-wordwrap">{{i18n.word_wrap}}</label> <label class="form-check-label" for="editor-wordwrap">{{i18n.word_wrap}}</label>
</div> </div>
<div class="form-check"> <div class="form-check">
<input class="form-check-input" type="checkbox" id="editor-softtabs" <input class="form-check-input" type="checkbox" id="editor-softtabs"
{{#softtabs}} {{#softtabs}}
checked="checked" checked="checked"
{{/softtabs}} {{/softtabs}}
> >
<label class="form-check-label" for="editor-softtabs">{{i18n.soft_tabs}}</label> <label class="form-check-label" for="editor-softtabs">{{i18n.soft_tabs}}</label>
</div> </div>
<div class="input-group"> </div>
<div class="input-group-prepend"><span class="input-group-text">{{i18n.tab_size}}</span></div><input class="form-control" type="text" size="2" id="editor-tabsize" title="{{i18n.tab_size}}" value="{{tabsize}}"></div> <div class="input-group">
{{#ace_includes}} <div class="input-group-prepend">
<select class="form-control selectpicker" data-toggle="dropdown" data-live-search="true" data-size="15" id="editor-syntax"> <span class="input-group-text" id="editor-tabsize-label">{{i18n.tab_size}}</span>
</div>
<input class="form-control" type="number" min="1" max="9" maxlength="1" id="editor-tabsize" title="{{i18n.tab_size}}" value="{{tabsize}}" aria-describedby="editor-tabsize-label">
</div>
{{#ace_includes}}
<select class="form-control selectpicker" data-toggle="dropdown" data-live-search="true" data-size="15" id="editor-syntax">
{{#modes}} {{#modes}}
<option value="ace/mode/{{.}}" {{{ace_mode_selected}}}>{{.}}</option> <option value="ace/mode/{{.}}" {{{ace_mode_selected}}}>{{.}}</option>
{{/modes}} {{/modes}}
</select> </select>
{{/ace_includes}} {{/ace_includes}}
</div> </form>

View File

@@ -1,16 +1,29 @@
<form id="formRemoteUpload"> <form id="formRemoteUpload">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.upload_remote_url}}</label><br> <div class="form-group">
<input class="form-control" type="text" id="url" name="url" required><br> <label for="url">{{i18n.upload_remote_url}}</label>
<label>{{i18n.filename}}</label> <input class="form-control" type="url" id="url" name="url" required>
<input class="form-control" type="text" id="filename" name="filename" required><br> </div>
<label>{{i18n.method}}</label> <div class="form-group">
<input type="radio" name="method" value="curl" checked="checked">cURL<input type="radio" name="method" value="file">file</input><br> <label for="filename">{{i18n.filename}}</label>
<input class="form-control" type="text" id="filename" name="filename" required>
</div>
<div class="form-group">
<legend>{{i18n.method}}</legend>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="radiocurl" name="method" value="curl" checked="checked">
<label class="form-check-label" for="radiocurl">cURL</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="radiofile" name="method" value="file">
<label class="form-check-label" for="radiofile">file</label>
</div>
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonUpload">{{i18n.upload}}</button> <button type="button" class="btn btn-primary" id="buttonUpload">{{i18n.upload}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,12 +1,14 @@
<form id="formRenameFile"> <form id="formRenameFile">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.rename_filename}} {{filename}}:</label> <div class="form-group">
<input class="form-control" type="text" name="newname" value="" /><br> <label for="newname">{{i18n.rename_filename}} {{filename}}:</label>
<input id="newname" class="form-control" type="text" name="newname" value="" />
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonRename">{{i18n.file_rename}}</button> <button type="button" class="btn btn-secondary" id="buttonRename">{{i18n.file_rename}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}} </button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}} </button>
</div> </div>
</form> </form>

View File

@@ -1,8 +1,10 @@
<form id="searchForm"> <form id="searchForm">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.search_pattern}}:</label> <div class="form-group">
<input type="text" class="form-control" id="searchPattern" name="pattern" autocomplete="off" value="{{lastSearch}}"><br> <label for="searchPattern">{{i18n.search_pattern}}:</label>
<input type="search" class="form-control" id="searchPattern" name="pattern" autocomplete="off" value="{{lastSearch}}">
</div>
<table id="searchResults" class="table"> <table id="searchResults" class="table">
</table> </table>
</fieldset> </fieldset>

View File

@@ -1,14 +1,20 @@
<form id="formUploadFile"> <form id="formUploadFile">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.upload_file}}</label><br> <div class="form-group">
<input class="form-control-file" type="file" name="files" multiple><br> <div class="custom-file">
<label>{{i18n.filename_new}}</label> <label class="custom-file-label" for="fileselect">{{i18n.upload_file}}</label>
<input class="form-control" type="text" name="newfilename"><br> <input class="custom-file-input" type="file" name="files" id="fileselect" multiple>
</div>
</div>
<div class="form-group">
<label for="filename">{{i18n.filename_new}}</label>
<input class="form-control" type="text" name="newfilename" id="filename">
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-secondary" id="buttonUpload">{{i18n.upload}}</button> <button class="btn btn-primary" id="buttonUpload">{{i18n.upload}}</button>
<button class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>