mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Fixed the javascript for hide the dinamic macros with this property setted. TICKET #1545
This commit is contained in:
parent
98de5e7401
commit
a79af4c68c
@ -630,7 +630,23 @@ function add_macro_field(macro, row_model_id) {
|
|||||||
// Change the text box id and value
|
// 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('id','text-'+macro_macro);
|
||||||
$('#'+row_id).children().eq(1).children().attr('name',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().attr('type','password');
|
||||||
}
|
}
|
||||||
$('#'+row_id).children().eq(1).children().val(macro_value);
|
$('#'+row_id).children().eq(1).children().val(macro_value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user