From 649d986a5d713f6ff46d1e18975c1c6b1bc8c574 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Tue, 25 Dec 2018 18:32:26 -0500 Subject: [PATCH] streamlined policy edit process --- app/Main.hs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 77a8d7c..16ea177 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -199,12 +199,10 @@ editPolicy p = if validatePWPolicy p else reqFail else reqFail where - edit l v t p = reqIf - (confirm $ l ++ " is " ++ show v ++ "\nchange?") - (do - v <- required $ prompt ("new " ++ l ++ ": ") reqInt - return $ set t v p) - (return p) + edit l v t p = do + v <- reqDefault + (prompt ("new " ++ l ++ " (default " ++ show v ++ "): ") reqInt) v + return $ set t v p special p = do reqIO $ putStrLn $ "special chars are currently " ++ (case p^.pwSpecial of