Skip to content

Commit

Permalink
form upload bug fixes #63
Browse files Browse the repository at this point in the history
bump version to 5.9.3
  • Loading branch information
mkucej committed Sep 15, 2021
1 parent d8dde4c commit 829c8ee
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions app/views/external.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public function results(
$el->type('checkbox');
$el->inline(true);
$el->label($project['project']);
$el->name('projects[]');
$el->name("projects[{$project['id']}]");
$el->value($project['id']);
$project_checks .= $el->render();

Expand Down Expand Up @@ -337,7 +337,7 @@ public function results(

$el->id("tag-checkbox-$i-$j");
$el->type('checkbox');
$el->name("tags[]");
$el->name("tags[{$j}]");
$el->value($tag_id);
$el->label($tag);
$el->inline(true);
Expand Down
22 changes: 11 additions & 11 deletions app/views/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public function uid(array $projects, array $tags) {
$el->type('checkbox');
$el->inline(true);
$el->label($project['project']);
$el->name('projects[]');
$el->name("projects[{$project['id']}]");
$el->value($project['id']);
$project_checks .= $el->render();

Expand Down Expand Up @@ -504,7 +504,7 @@ public function manual(array $projects, array $tags) {
$el->id('new-author-last');
$el->addClass("input-typeahead");
$el->groupClass('col');
$el->name('author_last_name[]');
$el->name('author_last_name[0]');
$el->label($this->lang->t9n('Last name'));
$el->source(IL_BASE_URL . "index.php/filter/author");
$new_last_name = $el->render();
Expand All @@ -516,7 +516,7 @@ public function manual(array $projects, array $tags) {

$el->id('new-author-first');
$el->groupClass('col');
$el->name('author_first_name[]');
$el->name('author_first_name[0]');
$el->label($this->lang->t9n('First name'));
$new_first_name = $el->render();

Expand Down Expand Up @@ -550,7 +550,7 @@ public function manual(array $projects, array $tags) {
$el->id('new-editor-last');
$el->addClass("input-typeahead");
$el->groupClass('col');
$el->name('editor_last_name[]');
$el->name('editor_last_name[0]');
$el->label($this->lang->t9n('Last name'));
$el->source(IL_BASE_URL . "index.php/filter/editor");
$new_last_name = $el->render();
Expand All @@ -562,7 +562,7 @@ public function manual(array $projects, array $tags) {

$el->id('new-editor-first');
$el->groupClass('col');
$el->name('editor_first_name[]');
$el->name('editor_first_name[0]');
$el->label($this->lang->t9n('First name'));
$new_first_name = $el->render();

Expand Down Expand Up @@ -594,7 +594,7 @@ public function manual(array $projects, array $tags) {
$el = $this->di->get('Select');

$el->groupClass('col-sm-3');
$el->name('uid_types[]');
$el->name('uid_types[0]');
$el->id('new-uid-type');
$el->label($this->lang->t9n('UID type'));
$el->option('', '');
Expand All @@ -611,7 +611,7 @@ public function manual(array $projects, array $tags) {

$el->id('new-uid');
$el->groupClass('col-sm-9');
$el->name('uids[]');
$el->name('uids[0]');
$el->label('UID');
$uid_html .= $el->render();

Expand Down Expand Up @@ -863,7 +863,7 @@ public function manual(array $projects, array $tags) {
$el->type('checkbox');
$el->inline(true);
$el->label($project['project']);
$el->name('projects[]');
$el->name("projects[{$project['id']}]");
$el->value($project['id']);
$project_checks .= $el->render();

Expand Down Expand Up @@ -928,7 +928,7 @@ public function manual(array $projects, array $tags) {

$el->id('tag-checkbox-' . $i);
$el->type('checkbox');
$el->name("tags[]");
$el->name("tags[{$i}]");
$el->value($tag_id);
$el->label($tag);
$el->inline(true);
Expand Down Expand Up @@ -1162,7 +1162,7 @@ public function file(array $projects, array $tags) {
$el->type('checkbox');
$el->inline(true);
$el->label($project['project']);
$el->name('projects[]');
$el->name("projects[{$project['id']}]");
$el->value($project['id']);
$project_checks .= $el->render();

Expand Down Expand Up @@ -1395,7 +1395,7 @@ public function text(array $projects, array $tags) {
$el->type('checkbox');
$el->inline(true);
$el->label($project['project']);
$el->name('projects[]');
$el->name("projects[{$project['id']}]");
$el->value($project['id']);
$project_checks .= $el->render();

Expand Down
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/*
* I, Librarian version.
*/
define('IL_VERSION', '5.9.2');
define('IL_VERSION', '5.9.3');

/*
* Define paths.
Expand Down
8 changes: 4 additions & 4 deletions public/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -2901,14 +2901,14 @@ class EditMainView extends View {
});
}
_selectAuthor(typeahead) {
if ($(typeahead).attr('name') === 'author_last_name[]') {
let $first = $(typeahead).closest('.form-row').find('input[name="author_first_name\\[\\]"]');
if ($(typeahead).is("[name^='author_last_name']")) {
let $first = $(typeahead).closest('.form-row').find('input[name^="author_first_name"]');
let names = $(typeahead).val().split(',');
$(typeahead).val($.trim(names[0] || ''));
$first.val($.trim(names[1] || ''));
}
if ($(typeahead).attr('name') === 'editor_last_name[]') {
let $first = $(typeahead).closest('.form-row').find('input[name="editor_first_name\\[\\]"]');
if ($(typeahead).is("[name^='editor_last_name']")) {
let $first = $(typeahead).closest('.form-row').find('input[name^="editor_first_name"]');
let names = $(typeahead).val().split(',');
$(typeahead).val($.trim(names[0] || ''));
$first.val($.trim(names[1] || ''));
Expand Down
2 changes: 1 addition & 1 deletion public/js/script.min.js

Large diffs are not rendered by default.

0 comments on commit 829c8ee

Please sign in to comment.