From ec2d37a5ddeecfabbaa01eaa69a5cef9eaa515ca Mon Sep 17 00:00:00 2001 From: Fernando Silva Date: Thu, 21 Apr 2016 12:52:33 +0100 Subject: [PATCH] Added option to set the number next events at once for all devices --- lib/orvfms/process_setup.php | 9 ++++++++- lib/orvfms/setup_page.php | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/orvfms/process_setup.php b/lib/orvfms/process_setup.php index 9ac124c..b1ba20a 100644 --- a/lib/orvfms/process_setup.php +++ b/lib/orvfms/process_setup.php @@ -15,7 +15,14 @@ function processSetup($mac,&$s20Table,$actionValue){ } } $nnext = (int) $_POST['numberOfNextEvents']; - $s20Table[$mac]['next'] = $nnext; + if(!isset($_POST['applyToAllAction'])){ + $s20Table[$mac]['next'] = $nnext; + } + else{ + foreach($s20Table as $macAux => $devAux){ + $s20Table[$macAux]['next'] = $nnext; + } + } writeDataFile($s20Table); $_SESSION['s20Table'] = $s20Table; diff --git a/lib/orvfms/setup_page.php b/lib/orvfms/setup_page.php index c07ae94..8f6b243 100755 --- a/lib/orvfms/setup_page.php +++ b/lib/orvfms/setup_page.php @@ -1,3 +1,7 @@ + + - +
+ +