add a note about only writable drives being listed

This commit is contained in:
Joey Hess 2013-12-12 14:25:50 -04:00
parent e3fa0ebd03
commit 13f7e51724

View file

@ -213,7 +213,7 @@ getCombineRepositoryR newrepopath newrepouuid = do
selectDriveForm :: [RemovableDrive] -> Hamlet.Html -> MkMForm RemovableDrive selectDriveForm :: [RemovableDrive] -> Hamlet.Html -> MkMForm RemovableDrive
selectDriveForm drives = renderBootstrap $ RemovableDrive selectDriveForm drives = renderBootstrap $ RemovableDrive
<$> pure Nothing <$> pure Nothing
<*> areq (selectFieldList pairs) "Select drive:" Nothing <*> areq (selectFieldList pairs `withNote` onlywritable) "Select drive:" Nothing
<*> areq textField "Use this directory on the drive:" <*> areq textField "Use this directory on the drive:"
(Just $ T.pack gitAnnexAssistantDefaultDir) (Just $ T.pack gitAnnexAssistantDefaultDir)
where where
@ -227,6 +227,7 @@ selectDriveForm drives = renderBootstrap $ RemovableDrive
, T.concat ["(", T.pack sz] , T.concat ["(", T.pack sz]
, "free)" , "free)"
] ]
onlywritable = [whamlet|This list only includes drives you can write to.|]
removableDriveRepository :: RemovableDrive -> FilePath removableDriveRepository :: RemovableDrive -> FilePath
removableDriveRepository drive = removableDriveRepository drive =