Commit 18bab028 authored by Jaque's avatar Jaque Committed by Kristina Hoeppner
Browse files

Bug #1482471: Add <legend> for the cell selector in the position block dialog

Add fieldset and legend to blocks

behatnotneeded

Change-Id: Iae4266b5261dbaef05586aca30c494580c1b991c
parent c44c2def
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -322,6 +322,7 @@ $string['closeconfiguration'] = 'Close configuration';
$string['removeblock1'] = 'Remove %s block (ID %s)';
$string['removethisblock1'] = 'Remove this block (ID %s)';
$string['blocktitle'] = 'Block title';
$string['celltitle'] = 'Cell';

$string['changemyviewlayout'] = 'Change my page layout';
$string['createcustomlayout'] = 'Create custom layout';
+22 −2
Original line number Diff line number Diff line
@@ -2,12 +2,29 @@
    display: none;
}

#addblock_blocklegend_container {
    border: 0;
    padding: 0;
    .pieform-fieldset legend {
        @extend body;
        padding-top: 0;
    }
}

#addblock_cellchooser_container {
    padding-top: 0;
}

.cell-chooser {

    .cell-row {
        min-width: 0;
        width: 150px;
        width: auto;
        overflow: hidden;
        display: flex;
        justify-content: space-between;
        padding: 5px 0;

        .cell {
            min-width: 0;
            float: left;
@@ -24,10 +41,13 @@
                overflow: hidden;
                min-width: 0;
            }
            &:last-of-type {
              margin-right: 0;
            }
        }

        .pseudolabel {
            @extend .sr-only;
        }

    }
}
+14 −6
Original line number Diff line number Diff line
@@ -163,13 +163,21 @@ $addform = pieform(array(
    'autofocus' => false,
    'class' => 'cell-radios',
    'elements' => array(
        'blocklegend' => array(
            'type' => 'fieldset',
            'elements' => array(
                'celltitle' => array(
                    'type' => 'markup',
                    'value'=> '<legend>' . get_string('celltitle', 'view') . '</legend>',
                ),
                'cellchooser' => array(
                    'type' => 'radio',
                    'class' => 'fullwidth',
            'title' => get_string('blockcell', 'view'),
                    'rowsize' => 2,
                    'options' => array('R1C1', 'R1C2', 'R2C1'),
                ),
            ),
        ),
        'position' => array(
            'type' => 'select',
            'title' => get_string('blockorder', 'view'),