MDL-82996 customfield_number: Show 'Display format' label as header
Display format now has its own section and we maintain the conditional display of fields depending on the value selected in the Field type of the Number field settings section.
This commit is contained in:
@@ -76,9 +76,8 @@ class field_controller extends \core_customfield\field_controller {
|
||||
$mform->setType('configdata[decimalplaces]', PARAM_INT);
|
||||
|
||||
// Display format settings.
|
||||
// TODO: Change this after MDL-85825 fixed.
|
||||
$randelname = 'str_display_format';
|
||||
$mform->addGroup([], $randelname, html_writer::tag('h4', get_string('headerdisplaysettings', 'customfield_number')));
|
||||
$mform->addElement('header', 'displayformatheader', get_string('headerdisplaysettings', 'customfield_number'));
|
||||
$mform->setExpanded('displayformatheader');
|
||||
|
||||
// Display template.
|
||||
$mform->addElement('text', 'configdata[display]', get_string('display', 'customfield_number'),
|
||||
|
||||
@@ -71,7 +71,6 @@ class nofactivities extends provider_base {
|
||||
$mform->hideIf('configdata[activitytypes]', 'configdata[fieldtype]', 'ne', get_class($this));
|
||||
$mform->hideIf('configdata[decimalplaces]', 'configdata[fieldtype]', 'eq', get_class($this));
|
||||
$mform->hideIf('configdata[display]', 'configdata[fieldtype]', 'eq', get_class($this));
|
||||
$mform->hideIf('str_display_format', 'configdata[fieldtype]', 'eq', get_class($this));
|
||||
$mform->hideIf('configdata[defaultvalue]', 'configdata[fieldtype]', 'eq', get_class($this));
|
||||
$mform->hideIf('configdata[minimumvalue]', 'configdata[fieldtype]', 'eq', get_class($this));
|
||||
$mform->hideIf('configdata[maximumvalue]', 'configdata[fieldtype]', 'eq', get_class($this));
|
||||
|
||||
@@ -112,7 +112,7 @@ Feature: Managers can manage course custom fields number
|
||||
And I should not see "Minimum value"
|
||||
And I should not see "Maximum value"
|
||||
And I should not see "Decimal places"
|
||||
And I should not see "Display format"
|
||||
And I should see "Display format"
|
||||
And I should not see "Display template"
|
||||
And I should see "Display when zero"
|
||||
And I should not see "Display when empty"
|
||||
|
||||
Reference in New Issue
Block a user