Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
maarchRM
Commits
a513b54a
Commit
a513b54a
authored
Jul 10, 2017
by
Prosper De Laure
Browse files
Bug correction on metadatas modification
parent
4aa09c6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/presentation/maarchRM/Presenter/recordsManagement/welcome.php
View file @
a513b54a
...
...
@@ -297,14 +297,14 @@ class welcome
$descriptionHtml
=
'<table">'
;
if
(
isset
(
$archive
->
descriptionObject
))
{
if
(
isset
(
$archivalProfile
->
archiveDescription
))
{
/*
if (isset($archivalProfile->archiveDescription)) {
foreach ($archivalProfile->archiveDescription as $archiveDescription) {
if (!array_key_exists($archiveDescription->fieldName, $archive->descriptionObject)) {
$archive
->
descriptionObject
->
{
$archiveDescription
->
fieldName
}
=
""
;
unset(
$archive->descriptionObject->{$archiveDescription->fieldName};
}
}
}
}
*/
//var_dump($archive->descriptionObject);
foreach
(
$archive
->
descriptionObject
as
$name
=>
$value
)
{
$label
=
$type
=
$archivalProfileField
=
null
;
if
(
$archivalProfile
)
{
...
...
src/presentation/maarchRM/Resources/locale/fr/recordsManagement/messages.po
View file @
a513b54a
...
...
@@ -853,8 +853,8 @@ msgstr "Archive modifée"
msgid "Add field"
msgstr "Ajouter un champ"
msgid "
A label is missing
."
msgstr "
Un libellé n'a pas été renseigné
"
msgid "
Metadatas are incomplete
."
msgstr "
Les metadonnées sont imcomplètes.
"
msgid "Label"
msgstr "Libellé"
...
...
src/presentation/maarchRM/Resources/view/dashboard/mainScreen/archiveInformation.html
View file @
a513b54a
...
...
@@ -26,9 +26,9 @@
<th
title=
"Name"
>
Name
</th>
<td
title=
'[?merge archive.archiveName ?]'
>
<?merge archive.archiveName ?>
</td>
</tr>
<tr
class=
"archive
Name
"
>
<tr
class=
"archive
Id
"
>
<th
title=
"Name"
>
Originator
</th>
<td
title=
'[?merge archive.
archive
Name ?]'
>
<?merge archive.originatorOrgName ?>
</td>
<td
title=
'[?merge archive.
originatorOrg
Name ?]'
>
<?merge archive.originatorOrgName ?>
</td>
</tr>
<tr
class=
"archiveId"
>
<th
title=
"Identifier"
>
Identifier
</th>
...
...
@@ -162,7 +162,7 @@
<input
id=
"inputOriginatorArchiveId"
name=
"originatorArchiveId"
type=
"text"
class=
"col-xs-12"
/>
<input
id=
"inputCustomField"
placeholder=
"Value"
type=
"text"
class=
"col-xs-12"
/>
<input
id=
"inputCustomLabel"
placeholder=
"Label"
type=
"text"
class=
"col-xs-12"
style=
"text-align: right"
/>
<span
id=
"customFieldError_txt"
>
A label is missing
.
</span>
<span
id=
"customFieldError_txt"
>
Metadatas are incomplete
.
</span>
</div>
<style
type=
"text/css"
>
...
...
@@ -321,36 +321,36 @@
var
customLabel
=
$
(
"
#inputCustomLabel
"
).
clone
();
customLabel
.
val
(
label
.
html
());
if
(
$
(
e
).
hasClass
(
'
archivalProfileField
'
))
{
customLabel
.
prop
(
"
disabled
"
,
true
);
}
customLabel
.
attr
(
'
name
'
,
label
.
attr
(
'
name
'
));
label
.
html
(
''
).
append
(
customLabel
);
var
customField
=
$
(
"
#inputCustomField
"
).
clone
();
customField
.
val
(
value
.
html
());
value
.
html
(
''
).
append
(
customField
);
});
console
.
log
(
$
(
'
#metadata
'
).
find
(
'
.archivalProfileField
'
));
$
(
'
#metadata
'
).
find
(
'
.archivalProfileField
'
).
find
(
'
th input
'
).
prop
(
'
disabled
'
,
true
);
},
saveMetadata
:
function
()
{
var
descriptionFields
=
{};
$
(
'
#metadata
'
).
find
(
'
tr
'
).
each
(
function
(
i
,
e
)
{
var
label
=
$
(
e
).
find
(
'
th > input
'
).
val
();
var
name
=
$
(
e
).
find
(
'
th > input
'
).
attr
(
'
name
'
);
var
value
=
$
(
e
).
find
(
'
td > input
'
).
val
();
if
(
label
!=
''
&&
value
!=
''
)
{
if
(
$
(
e
).
hasClass
(
'
archivalProfileField
'
))
{
descriptionFields
[
name
]
=
name
;
}
else
if
(
label
!=
''
&&
value
!=
''
)
{
descriptionFields
[
label
]
=
value
;
}
else
if
(
label
==
''
&&
value
!=
''
)
{
gritter
.
show
(
$
(
'
#customFieldError_txt
'
).
text
(),
false
);
descriptionFields
=
-
1
;
return
;
}
else
{
//
gritter.show($('#customFieldError_txt').text(), false);
//
descriptionFields = -1;
//
return;
}
});
if
(
descriptionFields
==
-
1
)
{
return
;
}
var
parameters
=
{
archiveId
:
ArchiveInformation
.
archiveId
,
originatorArchiveId
:
$
(
'
#archiveInformation
'
).
find
(
'
#inputOriginatorArchiveId
'
).
val
(),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment