projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
15ceade
)
Attach Documents: fixed user interface to reset input fields only when needed. Fixes...
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Tue, 6 Oct 2020 11:35:15 +0000
(13:35 +0200)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Tue, 13 Oct 2020 17:23:38 +0000
(19:23 +0200)
admin/attachments.php
patch
|
blob
|
history
diff --git
a/admin/attachments.php
b/admin/attachments.php
index 7e6ba95545251f3ddb379ce47e46652369ab6897..5b5e8247511c359d923f3f85f8a61475dcb5f215 100644
(file)
--- a/
admin/attachments.php
+++ b/
admin/attachments.php
@@
-141,10
+141,10
@@
if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM')
$filename, $unique_name, $filesize, $filetype);
display_notification(_("Attachment has been updated."));
}
$filename, $unique_name, $filesize, $filetype);
display_notification(_("Attachment has been updated."));
}
+ reset_form();
}
refresh_pager('trans_tbl');
$Ajax->activate('_page_body');
}
refresh_pager('trans_tbl');
$Ajax->activate('_page_body');
- $Mode = 'RESET';
}
if ($Mode == 'Delete')
}
if ($Mode == 'Delete')
@@
-155,11
+155,15
@@
if ($Mode == 'Delete')
unlink($dir."/".$row['unique_name']);
delete_attachment($selected_id);
display_notification(_("Attachment has been deleted."));
unlink($dir."/".$row['unique_name']);
delete_attachment($selected_id);
display_notification(_("Attachment has been deleted."));
-
$Mode = 'RESET'
;
+
reset_form()
;
}
if ($Mode == 'RESET')
}
if ($Mode == 'RESET')
+ reset_form();
+
+function reset_form()
{
{
+ unset($_POST['trans_no']);
unset($_POST['description']);
$selected_id = -1;
}
unset($_POST['description']);
$selected_id = -1;
}
@@
-173,7
+177,7
@@
function viewing_controls()
start_row();
systypes_list_cells(_("Type:"), 'filterType', null, true);
if (list_updated('filterType'))
start_row();
systypes_list_cells(_("Type:"), 'filterType', null, true);
if (list_updated('filterType'))
-
$selected_id = -1
;
+
reset_form()
;
if(get_post('filterType') == ST_CUSTOMER ){
customer_list_cells(_("Select a customer: "), 'trans_no', null, false, true, true);
if(get_post('filterType') == ST_CUSTOMER ){
customer_list_cells(_("Select a customer: "), 'trans_no', null, false, true, true);