Acceptance criteria
SpecialBlock.php
- The SpecialBlock page should accept an id URL parameter
- Corresponding data for that specific block should be fetched and all the form fields filled in
- A hidden input field should be added for the block ID (with the name id)
- Providing i.e. ?id=123 should be all that is needed to link to modification of the given block; You should not have to also specify the username in the URL.
- If both an id and username are provided, ignore the username
SpecialBlock.vue
- Pass the block ID to the Vue app like we do all other data
- Load the block with the block id into the form on the page
- A hidden input field should be added for the block ID (with the name id)
- Submitting the form updates the block, and clears the form
Background
Before, you could only place a single block on a user at a time. So the only information you need to edit a block is the username, since there can only be one block.
With multiblocks, we need a means to modify a specific block on a user. This is necessary for both deep linking in the Vue application, and also for no-JS users.
The no-JS form currently has everything it needs to edit a block, except something specifying the block we want to modify.