6
6
*/
7
7
8
8
/************************************************************************/
9
- /* ajaxCRUD.class.php v8.92 */
9
+ /* ajaxCRUD.class.php v8.93 */
10
10
/* =========================== */
11
11
/* Copyright (c) 2013 by Loud Canvas Media (arts@loudcanvas.com) */
12
12
/* http://www.ajaxcrud.com by http://www.loudcanvas.com */
@@ -740,7 +740,7 @@ function setFileUpload($field_name, $destination_folder, $relative_folder = "",
740
740
}
741
741
742
742
//the filenames that are saved are not editable
743
- $ this ->disallowEdit ($ field_name );
743
+ // $this->disallowEdit($field_name);
744
744
745
745
//have to add the row via POST now
746
746
$ this ->ajax_add = false ;
@@ -1643,13 +1643,13 @@ function showTable(){
1643
1643
}
1644
1644
1645
1645
//don't allow uneditable fields (which usually includes the primary key) to be editable
1646
- if ( !$ canRowBeUpdated || ( ($ this ->fieldInArray ($ field , $ this ->uneditable_fields ) && (!is_numeric ($ found_category_index ))) ) ){
1646
+ if ( !$ canRowBeUpdated || $ this -> fieldInArray ( $ field , $ this -> file_uploads ) || ( ($ this ->fieldInArray ($ field , $ this ->uneditable_fields ) && (!is_numeric ($ found_category_index ))) ) ){
1647
1647
1648
1648
$ table_html .= "<td> " ;
1649
1649
1650
1650
$ key = array_search ($ field , $ this ->display_fields );
1651
1651
1652
- if ($ this ->fieldInArray ($ field , $ this ->file_uploads )){
1652
+ if ($ this ->fieldInArray ($ field , $ this ->file_uploads ) && ! $ this -> fieldInArray ( $ field , $ this -> uneditable_fields ) ){
1653
1653
1654
1654
//a file exists for this field
1655
1655
$ file_dest = "" ;
@@ -1663,8 +1663,7 @@ function showTable(){
1663
1663
$ table_html .= $ this ->showUploadForm ($ field , $ file_dest , $ id );
1664
1664
$ table_html .= "</div> \n" ;
1665
1665
}
1666
-
1667
- if ($ cell_data == '' ){
1666
+ else {
1668
1667
$ table_html .= "<span id='text_ " . $ field . $ id . "'><a style= \"font-size: 9px; \" href= \"javascript: \" onClick= \"document.getElementById('file_ $ field$ id').style.display = ''; document.getElementById('text_ $ field$ id').style.display = 'none'; \">Add File</a></span> \n" ;
1669
1668
1670
1669
$ table_html .= "<div id='file_ " . $ field . $ id . "' style='display:none;'> \n" ;
0 commit comments