- Assigned to Chester_
- Status changed to Needs review
over 1 year ago 1:54pm 30 June 2023 - last update
over 1 year ago 2 pass Hi, I added a function that checks if we have the function enabled: Do not allow configuring the section. And depending on its status, closes access to the Reorder button.
- Status changed to Needs work
over 1 year ago 7:10pm 3 July 2023 - πΊπ¦Ukraine Panchuk Volyn, Lutsk
Hey @Chesterr
I've checked your path and have a few questions for you:
1) I think better to create a merge request, than a patch. Reviewing and merging your changes into the development branch is much easier with it.
2) The doc annotation is not correct. There is no need to describe function parameters. Please, check this article β for more details and examples.
/** * Implements hook_form_alter(). * * @param $form * @param FormStateInterface $form_state * @param $form_id * @return void */
3) Also, I'm not too fond of this piece of code:
// Check if the lock has 5 in array. if ($lock == 5) { // Add classes to the move_sections button and make it inactive. $form['actions']['move_sections']['#attributes']['class'] = [ 'inactive-button', 'button', 'use-ajax' ]; // Added alert text for inactive button. $form['actions']['move_sections']['#attributes']['title'] = t('You cannot reorder the sections, as the section has the option: Do not allow configuring the section'); // Set the inactive URL for the move_sections button. $form['actions']['move_sections']['#url'] = URL::fromUserInput('/internal:/#'); }
- You added custom CSS code, but I want to suggest using the core classes 'button' and 'is-disabled' for the button. It will be simpler than adding custom styles. Check this issue β for more details, if needed.
- There is no reason to keep the 'use-ajax' class for the link because we override and disable it.
- last update
over 1 year ago 2 pass - @chesterr opened merge request.
Hello @Panchuk,
I fixed the errors you pointed out and sent the MR.- Status changed to Needs review
over 1 year ago 1:07pm 17 July 2023 - last update
about 1 year ago 2 pass - last update
about 1 year ago 2 pass - last update
about 1 year ago 2 pass - Issue was unassigned.
- last update
about 1 year ago 2 pass -
Panchuk β
committed 712d62b0 on 8.x-1.x authored by
Chesterr β
Issue #3283984 by Chesterr, galileo25, Panchuk, ΓΈkse, swentel: Sections...
-
Panchuk β
committed 712d62b0 on 8.x-1.x authored by
Chesterr β
- Status changed to Fixed
about 1 year ago 8:42am 14 September 2023 - πΊπ¦Ukraine Panchuk Volyn, Lutsk
MR looks fine, merge it into the development branch.
BWT, needs to keep an eye on the parent issue since there could be conflicts. Automatically closed - issue fixed for 2 weeks with no activity.