mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Fixed the javascript for hide the dinamic macros with this property setted. TICKET #1545
(cherry picked from commit 1fdcacf29f9c07cde34b84f46ca9ee12178fbf00)
This commit is contained in:
parent
08ef9071ee
commit
b0b57fdb2c
@ -630,7 +630,23 @@ function add_macro_field(macro, row_model_id) {
|
||||
// Change the text box id and value
|
||||
$('#'+row_id).children().eq(1).children().attr('id','text-'+macro_macro);
|
||||
$('#'+row_id).children().eq(1).children().attr('name',macro_macro);
|
||||
if (macro['hide']) {
|
||||
|
||||
macro_field_hide = false;
|
||||
if (typeof(macro['hide']) == "string") {
|
||||
if (macro['hide'].length == 0) {
|
||||
macro_field_hide = false;
|
||||
}
|
||||
else {
|
||||
if (parseInt(macro['hide'])) {
|
||||
macro_field_hide = true;
|
||||
}
|
||||
else {
|
||||
macro_field_hide = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (macro_field_hide) {
|
||||
$('#'+row_id).children().eq(1).children().attr('type','password');
|
||||
}
|
||||
$('#'+row_id).children().eq(1).children().val(macro_value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user