Skip to content
Permalink
Browse files

MDL-56725 mod_data: better field alignment

Labels containing only accesshide text should have the accesshide class
on the label, not the content so the label does not push the content
down.
  • Loading branch information...
damyon committed Nov 10, 2016
1 parent 398be7c commit 930ce60550cb2829150907279721cb13654422e1
Showing with 4 additions and 4 deletions.
  1. +2 −2 mod/data/field/multimenu/field.class.php
  2. +2 −2 mod/data/field/textarea/field.class.php
@@ -52,8 +52,8 @@ function display_add_field($recordid = 0, $formdata = null) {
$str = '<div title="'.s($this->field->description).'">';
$str .= '<input name="field_' . $this->field->id . '[xxx]" type="hidden" value="xxx"/>'; // hidden field - needed for empty selection
$str .= '<label for="field_' . $this->field->id . '">';
$str .= html_writer::span($this->field->name, 'accesshide');
$str .= '<label for="field_' . $this->field->id . '" class="accesshide">';
$str .= html_writer::span($this->field->name);
if ($this->field->required) {
$str .= '<div class="inline-req">';
$str .= html_writer::img($OUTPUT->pix_url('req'), get_string('requiredelement', 'form'),
@@ -61,8 +61,8 @@ function display_add_field($recordid = 0, $formdata = null) {
$text = '';
$format = 0;
$str = '<div title="' . s($this->field->description) . '">';
$str .= '<label for="field_' . $this->field->id . '">';
$str .= html_writer::span($this->field->name, "accesshide");
$str .= '<label for="field_' . $this->field->id . '" class="accesshide">';
$str .= html_writer::span($this->field->name);
if ($this->field->required) {
$image = html_writer::img($OUTPUT->pix_url('req'), get_string('requiredelement', 'form'),
array('class' => 'req', 'title' => get_string('requiredelement', 'form')));

0 comments on commit 930ce60

Please sign in to comment.
You can’t perform that action at this time.