So now that we have the information displayed on our calendar correctly, we need to be able to actually
process it and that means we're going to have to put a form tag around the entire calendar, add a submit
button, create the necessary route and create a calendar post handler.
So let's get started doing that.
So I'm going to go over to my Idy and I'm looking at my admin reservation calendar page Dot Temple.
And right here, just before I arrange through the rooms, I'll put a form tag in form method equals
post action equals and I'll use the same Yooralla do for the calendar.
So I'll just copy this and paste it in here.
And that's all I need for my opening form tag and then I'll take the closing form tag and put that down
here just after the range closes.
And of course because it's a method equals post, we have to put in our hidden CSF token.
So let's put that in input type equals hidden.
Name equals six R.F. Underscore Tolkan, and the value is equal to dot CSR token from our template data.
OK, so we have that Alesco add a button to submit this after our range ends.
But before our closing tag for the form, we'll put an HRO just to make it look a little nicer.
Input type equals submit.
Class equals button button primary, and the value will be equal to save changes.
OK, so let's make sure that renders properly looks good.
There's our save button.
Let's go to our roots file wherever their roots find the display calendar link, which is right here.
I'll just duplicate that changes method to post and put the word post here and I'll create a function
that doesn't exist yet named admin post reservations calendar.
So I'll put that at the bottom of my handler's funk with the receiver of type pointer to repository.
The name I just copied, so I'll paste it in and it has two arguments, like all handlers W HTP response
writer and a pointer to a request.
And let's just make sure this works, log dot, print line works will stop our application, start our
application and just make sure that this everything is hooked up properly so we don't bang your head
against the wall for no reason whatsoever.
This display the page to make sure it's current and gave me a blank screen, but I should see the word
works and I do.
So that works perfectly.
OK, so that gets us started with this.
I'm going to give this a comment.
Handle's.
Post of reservation calendar.
OK, so that gets us started in the next lecture, will actually do something with the posted data and
there's a fair bit of code required to make this happen.
None of it's difficult, but we'll go through it one step at a time in the next lecture or two.