Version 2.1 #41

Merged
danieljsummers merged 123 commits from version-2.1 into main 2024-03-27 00:13:28 +00:00
Showing only changes of commit b85cae2241 - Show all commits

View File

@ -55,8 +55,7 @@ let chapterEdit (model: EditChapterModel) app = [
] ]
] ]
div [ _class "row" ] [ div [ _class "row" ] [
let hasLoc = model.LocationName <> "" let hasLoc, attrs = if model.LocationName = "" then false, [ _disabled ] else true, []
let attrs = if hasLoc then [] else [ _disabled ]
div [ _class "col-12 col-md-4 col-lg-3 offset-lg-1 mb-3 align-self-end" ] [ div [ _class "col-12 col-md-4 col-lg-3 offset-lg-1 mb-3 align-self-end" ] [
checkboxSwitch [ _onclick "Admin.checkChapterLocation()" ] "has_location" "Associate Location" hasLoc [] checkboxSwitch [ _onclick "Admin.checkChapterLocation()" ] "has_location" "Associate Location" hasLoc []
] ]
@ -91,11 +90,7 @@ let chapterEdit (model: EditChapterModel) app = [
div [ _class "col" ] [ div [ _class "col" ] [
let cancelLink = relUrl app $"admin/post/{model.PostId}/chapters" let cancelLink = relUrl app $"admin/post/{model.PostId}/chapters"
if model.Index < 0 then if model.Index < 0 then
div [ _class "form-check form-switch mb-3" ] [ checkboxSwitch [ _checked ] (nameof model.AddAnother) "Add Another New Chapter" true []
input [ _type "checkbox"; _id "add_another"; _name "AddAnother"; _class "form-check-input"
_value "true"; _checked ]
label [ _for "add_another" ] [ raw "Add Another New Chapter" ]
]
else else
input [ _type "hidden"; _name "AddAnother"; _value "false" ] input [ _type "hidden"; _name "AddAnother"; _value "false" ]
saveButton; raw " &nbsp; " saveButton; raw " &nbsp; "