Bladeren bron

- hackpoint: correctif state pas pris en compte

idleman 5 jaren geleden
bovenliggende
commit
dd1b0ec98d
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 2 1
      plugin/hackpoint/action.php
  2. 1 1
      plugin/hackpoint/page.sheet.sketch.php

+ 2 - 1
plugin/hackpoint/action.php

@@ -49,8 +49,9 @@ switch($_['action']){
 			if(!$myUser->can('hackpoint','edit')) throw new Exception("Permissions insuffisantes",403);
 			require_once(__DIR__.SLASH.'Sketch.class.php');
 			$item = Sketch::getById($_['id']);
+
 			if(isset($_['label'])) $item->label = $_['label'];
-			if(isset($_['state'])) $item->state = $_['state'];
+			if(isset($_['state'])) $item->state = $_['state'] == 'true';
 			if(isset($_['comment']))  $item->comment = $_['comment'];
 			$item->save();
 		});

+ 1 - 1
plugin/hackpoint/page.sheet.sketch.php

@@ -60,7 +60,7 @@ if(!$sketch) throw new Exception("Sketch supprimé ou inexistant");
 								</label>
 							</div>
 							<div class="btn-group" role="group" aria-label="Save">
-								<div onclick="hackpoint_sketch_save();" class="btn btn-success"><i class="fas fa-check"></i></div>
+								<div onclick="" class="btn btn-success"><i class="fas fa-cogs"></i></div>
 							</div>
 						</div>
 					</div>