Skip to content

Commit f50f298

Browse files
committed
con le modifiche a questi tre file dovrebbe essere risolto il bug di non poter editare il Modello dentro al modulo Marche
1 parent bb98289 commit f50f298

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

modules/marche/add.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
<div class="row">
4646
<div class="col-md-4">
47-
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "name", "required": 1]}
47+
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "name", "required": 1, "value": "$name$" ]}
4848
</div>
4949
<div class="col-md-4">
5050
{[ "type": "text", "label": "<?php echo tr('Link produttore'); ?>", "name": "link", "value":"$link$"]}
@@ -74,4 +74,4 @@
7474
?>
7575
</div>
7676
</div>
77-
</form>
77+
</form>

modules/marche/edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<table class="table table-striped table-hover table-bordered">
8181
<thead>
8282
<tr>
83-
<th width="10%" class="text-center"><?php echo tr('Immagine'); ?></th>
83+
<!--<th width="10%" class="text-center"><?php echo tr('Immagine'); ?></th>-->
8484
<th width="25%" class="text-left"><?php echo tr('Nome'); ?></th>
8585
<th width="25%" class="text-left"><?php echo tr('Link produttore'); ?></th>
8686
<th width="10%" class="text-center"><?php echo tr('Articolo'); ?></th>

modules/marche/row-list.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@
1818
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1919
*/
2020

21+
//use Modules\Articoli\Articolo;
2122
use Modules\Articoli\Marca;
2223

2324
// Modelli (marche con parent = id_record)
2425
$modelli = Marca::where('parent', $id_record)->get();
26+
//$modelli = Marca::where('parent', '=', $id_record)->get();
2527

2628
foreach ($modelli as $modello) {
2729
echo '
2830
<tr>
29-
<td class="text-center">
31+
<!--<td class="text-center">
3032
'.(!empty($modello->immagine) ? '<img src="'.base_path().'/files/marche/'.$modello->immagine.'" class="img-thumbnail" style="max-height: 30px;">' : '<i class="fa fa-image text-muted"></i>').'
31-
</td>
33+
</td>-->
3234
<td>'.$modello->name.'</td>
3335
<td>'.(!empty($modello->link) ? '<a href="'.$modello->link.'" target="_blank">'.$modello->link.'</a>' : '').'</td>
3436
<td class="text-center">
@@ -43,8 +45,11 @@
4345
</td>
4446
<td class="text-center">
4547
<div class="btn-group">
46-
<a class="btn btn-xs btn-warning" data-href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$modello->id.'" data-toggle="tooltip" title="'.tr('Modifica').'">
48+
<!--<a class="btn btn-xs btn-warning" data-href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$modello->id.'" data-toggle="tooltip" title="'.tr('Modifica').'">
4749
<i class="fa fa-edit"></i>
50+
</a>-->
51+
<a class="btn btn-xs btn-warning" title="'.tr('Modifica').'" onclick="launch_modal(\''.tr('Modifica Modello').'\', \''.base_path().'/add.php?id_module='.$id_module.'&id_record='.$modello->id.'&id_original='.$id_record.'\');">
52+
<i class="fa fa-edit"></i>
4853
</a>
4954
<a class="btn btn-xs btn-danger ask" data-backto="record-edit" data-op="delete" data-id="'.$modello->id.'" data-toggle="tooltip" title="'.tr('Elimina').'">
5055
<i class="fa fa-trash"></i>

0 commit comments

Comments
 (0)