Commit 22172cfb authored by TheCrowsJoker's avatar TheCrowsJoker Committed by Robert Lyon
Browse files

Updates the styling of the plugin settings fields - Bug #1465107

behatnotneeded

Change-Id: I4a41de2cc085c9f161391f9555211f11314b78b0
parent a51c604c
......@@ -55,7 +55,6 @@ $form = call_static_method($classname, 'get_config_options');
$form['plugintype'] = $plugintype;
$form['pluginname'] = $pluginname;
$form['name'] = 'pluginconfig';
$form['class'] = 'panel panel-body';
$form['pluginconfigform'] = true;
$form['jsform'] = true;
$form['successcallback'] = 'pluginconfig_submit';
......
......@@ -1097,6 +1097,7 @@ class ArtefactTypeComment extends ArtefactType {
return array(
'name' => 'commentconfig',
'elements' => $elements,
'class' => 'panel panel-body',
'renderer' => 'div'
);
}
......
......@@ -76,11 +76,10 @@ class PluginBlocktypeFolder extends PluginBlocktype {
$elements['foldersettings'] = array(
'type' => 'fieldset',
'legend' => get_string('foldersettings', 'blocktype.file/folder'),
'collapsible' => false,
'elements' => array(
'sortorder' => array(
'type' => 'select',
'labelhtml' => get_string('defaultsortorder', 'blocktype.file/folder'),
'title' => get_string('defaultsortorder', 'blocktype.file/folder'),
'defaultvalue' => get_config_plugin('blocktype', 'folder', 'sortorder'),
'options' => array(
'asc' => get_string('ascending'),
......@@ -102,6 +101,7 @@ class PluginBlocktypeFolder extends PluginBlocktype {
),
);
return array(
'class' => 'panel panel-body',
'elements' => $elements,
);
}
......
......@@ -481,6 +481,7 @@ class PluginBlocktypeGallery extends PluginBlocktype {
'legend' => get_string('pbsettings', 'blocktype.file/gallery'),
'collapsible' => true,
'collapsed' => true,
'class' => 'last',
'elements' => array(
'pbapikey' => array(
'type' => 'text',
......
......@@ -203,8 +203,9 @@ class PluginBlocktypeInternalmedia extends PluginBlocktype {
);
return array(
'class' => 'panel panel-body',
'elements' => $options,
'renderer' => 'table'
'renderer' => 'div'
);
}
......
......@@ -1468,7 +1468,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
'elements' => array(
'defaultquotadescription' => array(
'type' => 'html',
'value' => '<tr><td colspan="2">' . get_string('defaultquotadescription', 'artefact.file') . '</td></tr>'
'value' => get_string('defaultquotadescription', 'artefact.file')
),
'defaultquota' => array(
'title' => get_string('defaultquota', 'artefact.file'),
......@@ -1537,7 +1537,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
'legend' => get_string('defaultgroupquota', 'artefact.file'),
'elements' => array(
'defaultgroupquotadescription' => array(
'value' => '<tr><td colspan="2">' . get_string('defaultgroupquotadescription', 'artefact.file') . '</td></tr>'
'value' => get_string('defaultgroupquotadescription', 'artefact.file')
),
'defaultgroupquota' => array(
'title' => get_string('defaultgroupquota', 'artefact.file'),
......@@ -1563,7 +1563,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
'legend' => get_string('uploadagreement', 'artefact.file'),
'elements' => array(
'uploadagreementdescription' => array(
'value' => '<tr><td colspan="2">' . get_string('uploadagreementdescription', 'artefact.file') . '</td></tr>'
'value' => get_string('uploadagreementdescription', 'artefact.file')
),
'uploadagreement' => array(
'title' => get_string('requireagreement', 'artefact.file'),
......@@ -1703,6 +1703,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
'legend' => get_string('Comments', 'artefact.comment'),
'elements' => array(
'commentdefault' => array(
'class' => 'stacked',
'type' => 'checkboxes',
'title' => get_string('artefactdefaultpermissions', 'artefact.comment'),
'description' => get_string('artefactdefaultpermissionsdescription', 'artefact.comment'),
......@@ -1717,6 +1718,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
$elements['folderdownloadzip'] = array(
'type' => 'fieldset',
'class' => 'last',
'legend' => get_string('zipdownloadheading', 'artefact.file'),
'elements' => array(
'folderdownloadkeepzipfor' => array(
......@@ -1737,7 +1739,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
return array(
'elements' => $elements,
'renderer' => 'table'
'renderer' => 'div'
);
}
......
......@@ -610,11 +610,13 @@ class ArtefactTypeProfile extends ArtefactType {
}
$form = array(
'class' => 'panel panel-body',
'elements' => array(
'mandatory' => array(
'title' => get_string('mandatoryfields', 'artefact.internal'),
'description' => get_string('mandatoryfieldsdescription', 'artefact.internal'),
'help' => true,
'class' => 'stacked',
'type' => 'checkboxes',
'elements' => $mandatoryfields,
'options' => $allmandatory, // Only the keys are used by validateoptions
......@@ -624,6 +626,7 @@ class ArtefactTypeProfile extends ArtefactType {
'title' => get_string('searchablefields', 'artefact.internal'),
'description' => get_string('searchablefieldsdescription', 'artefact.internal'),
'help' => true,
'class' => 'stacked',
'type' => 'checkboxes',
'elements' => $searchablefields,
'options' => $allsearchable, // Only the keys are used by validateoptions
......
......@@ -325,8 +325,9 @@ class PluginAuthSaml extends PluginAuth {
);
return array(
'class' => 'panel panel-body',
'elements' => $elements,
'renderer' => 'table'
'renderer' => 'div'
);
}
......
......@@ -152,6 +152,7 @@ class PluginBlocktypeText extends SystemBlocktype {
$convertibleblocksnumber = 0;
}
return array(
'class' => 'panel panel-body',
'elements' => array(
'convertdescription' => array(
'value' => get_string('convertdescriptionfeatures', 'blocktype.text') . ' ' . get_string('convertdescription', 'blocktype.text',
......
......@@ -83,18 +83,17 @@ class PluginBlocktypeWall extends SystemBlocktype {
'type' => 'fieldset',
'legend' => get_string('postsizelimit', 'blocktype.wall'),
'elements' => array(
'postsizelimitdescription' => array(
'value' => get_string('postsizelimitdescription', 'blocktype.wall')
),
'defaultpostsizelimit' => array(
'title' => get_string('postsizelimitmaxcharacters', 'blocktype.wall'),
'type' => 'text',
'defaultvalue' => get_config_plugin('blocktype', 'wall', 'defaultpostsizelimit'),
'rules' => array( 'maxlength' => 6 )
'rules' => array( 'maxlength' => 6 ),
'description' => get_string('postsizelimitdescription', 'blocktype.wall')
)
),
);
return array(
'class' => 'panel panel-body',
'elements' => $elements,
);
......
......@@ -555,16 +555,18 @@ EOF;
$postdelay = (int) get_config_plugin('interaction', 'forum', 'postdelay');
return array(
'class' => 'panel panel-body',
'elements' => array(
'postdelay' => array(
'title' => get_string('postdelay', 'interaction.forum'),
'description' => get_string('postdelaydescription', 'interaction.forum'),
'type' => 'text',
'class' => '',
'rules' => array('integer' => true, 'minvalue' => 0, 'maxvalue' => 10000000),
'defaultvalue' => $postdelay,
),
),
'renderer' => 'table'
'renderer' => 'div'
);
}
......
......@@ -179,6 +179,7 @@ class PluginSearchElasticsearch extends PluginSearch {
}
$config = array(
'class' => 'panel panel-body',
'elements' => array(
'enablednotice' => array(
'type' => 'html',
......@@ -288,6 +289,7 @@ class PluginSearchElasticsearch extends PluginSearch {
$config['elements']['artefacttypes'] = array(
'type' => 'checkboxes',
'class' => 'stacked',
'title' => get_string('artefacttypelegend', 'search.elasticsearch'),
'description' => get_string('artefacttypedescription', 'search.elasticsearch'),
'elements' => $types_checkbox,
......@@ -297,6 +299,7 @@ class PluginSearchElasticsearch extends PluginSearch {
'type' => 'textarea',
'rows' => 10,
'cols' => 100,
'class' => 'in-modal',
'title' => get_string('artefacttypemaplegend', 'search.elasticsearch'),
'description' => get_string('artefacttypemapdescription', 'search.elasticsearch'),
'defaultvalue' => implode("\n", $artefacttypesmap_array),
......@@ -339,11 +342,13 @@ class PluginSearchElasticsearch extends PluginSearch {
$resetelements['allreset'] = array(
'title' => get_string('resetallindexes', 'search.elasticsearch'),
'type' => 'submit',
'class' => 'btn-default',
'defaultvalue' => get_string('reset', 'search.elasticsearch'),
);
$config['elements']['resetindex'] = array(
'type' => 'fieldset',
'class' => 'last',
'legend' => get_string('resetlegend', 'search.elasticsearch'),
'elements' => $resetelements,
'collapsible' => true
......
......@@ -39,6 +39,7 @@ class PluginSearchInternal extends PluginSearch {
public static function get_config_options() {
return array(
'class' => 'panel panel-body',
'elements' => array(
'exactusersearch' => array(
'title' => get_string('exactusersearch', 'search.internal'),
......
......@@ -10,7 +10,7 @@
{if $notinstalled}
<ul class="notinstalled list-group" id="{$plugintype}.notinstalled">
<li class="list-group-item list-group-item-heading mb0 list-group-item-warning">
<li class="list-group-item list-group-item-heading mb0 list-group-item-warning">
<h3 class="list-group-item-heading h4">{str tag='notinstalledplugins'}</h3>
</li>
......@@ -27,7 +27,7 @@
</ul>
{/if}
<ul class="list-group" id="{$plugintype}.installed">
<li class="list-group-item list-group-item-heading mb0">
<h3 class="list-group-item-heading h4">{str tag='installedplugins'}</h3>
......@@ -42,29 +42,31 @@
{/if}
{if $data.config}
{if !$data.activateform} <div class="btn-group btn-group-top"> {/if}
<a class="btn btn-default pull-left" href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}">
<a class="btn btn-default pull-left" title="{str tag='configfor'} {$plugintype} {$plugin}" href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}">
<span class="icon icon-cog icon-lg"></span>
<span class="accessible-hidden sr-only ">{str tag='configfor'} {$plugintype} {$plugin}</span>
</a>
{/if}
{if $data.config || $data.activateform}
{if $data.config || $data.activateform}
</div>
{/if}
</div>
{if $data.types}
<ul>
{foreach from=$data.types key='type' item='config'}
<li>
{$type}
{if $config}
<a class="btn btn-link btn-sm" href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}&amp;type={$type}">
({str tag='config'})
{if $config}
<!-- <div class="btn-group btn-group-top"> -->
<a class="btn btn-default btn-xs btn-group" title="{str tag='configfor'} {$plugintype} {$plugin}" href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}&amp;type={$type}">
<span class="icon icon-cog icon-lg"></span>
<span class="accessible-hidden sr-only">{str tag='configfor'} {$plugintype} {$plugin}</span>
</a>
</a>
<!-- </div> -->
{/if}
</li>
{/foreach}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment