Commit c17d90ae authored by Liam's avatar Liam Committed by Rebecca Blundell

Bug #1765276: Changed all input-group-btns to input-group-append, fixed collapsibles

behatnotneeded

Change-Id: Ia0905c5ece7eb750f37d05d6a28211318ab8351b
parent 25f81777
......@@ -106,7 +106,7 @@ $suspendform = pieform(array(
'suspend' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-secondary input-group-btn no-label',
'class' => 'btn-secondary input-group-append no-label',
'value' => get_string('Suspend', 'admin'),
)
)
......@@ -136,7 +136,7 @@ if (count($options) > 1) {
'changeauth' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-secondary input-group-btn',
'class' => 'btn-secondary input-group-append',
'value' => get_string('changeauthmethod', 'admin')
)
)
......@@ -167,7 +167,7 @@ if (is_using_probation()) {
'setprobation' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-secondary input-group-btn no-label',
'class' => 'btn-secondary input-group-append no-label',
'confirm' => get_string('probationbulkconfirm', 'admin'),
'value' => get_string('probationbulkset', 'admin'),
)
......
......@@ -711,7 +711,7 @@ else {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary input-group-btn',
'class' => 'btn-primary input-group-append',
'value' => get_string('search'),
)
),
......
......@@ -94,7 +94,7 @@ if (get_config('allowgroupcategories')
$searchfield = array(
'type' => 'submit',
'class' => 'btn-primary input-group-btn no-label button',
'class' => 'btn-primary input-group-append no-label button',
'value' => get_string('search')
);
......
......@@ -146,7 +146,7 @@ $searchform = pieform(array(
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary no-label input-group-btn',
'class' => 'btn-primary no-label input-group-append',
'value' => get_string('search')
)
)
......
......@@ -1576,7 +1576,7 @@ function group_view_submission_form($groupid) {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary input-group-btn ',
'class' => 'btn-primary input-group-append ',
'value' => get_string('submit')
),
),
......
......@@ -4426,7 +4426,7 @@ class View {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary input-group-btn no-label',
'class' => 'btn-primary input-group-append no-label',
'value' => get_string('search')
)
)
......@@ -7537,7 +7537,7 @@ function view_group_submission_form($view, $tutorgroupdata, $returnto=null) {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary input-group-btn',
'class' => 'btn-primary input-group-append',
'value' => get_string('submit')
)
),
......
......@@ -4667,7 +4667,7 @@ function language_select_form() {
'changelang' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-secondary input-group-btn',
'class' => 'btn-secondary input-group-append',
'value' => get_string('change'),
)
)
......
......@@ -209,7 +209,7 @@ class PluginSearchElasticsearch extends PluginSearch {
),
'submit' => array(
'type' => 'button',
'class' => 'btn-secondary input-group-btn',
'class' => 'btn-secondary input-group-append',
'usebuttontag' => true,
'value' => '<span class="icon icon-search icon-lg" role="presentation" aria-hidden="true"></span><span class="sr-only">'. get_string('go') . '</span>',
)
......
......@@ -244,7 +244,7 @@ abstract class PluginSearch extends Plugin implements IPluginSearch {
),
'submit' => array(
'type' => 'button',
'class' => 'btn-secondary input-group-btn',
'class' => 'btn-secondary input-group-append',
'usebuttontag' => true,
'value' => '<span class="icon icon-search icon-lg" role="presentation" aria-hidden="true"></span><span class="sr-only">'. get_string('go') . '</span>',
)
......
......@@ -56,7 +56,7 @@ $form = pieform(array(
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary input-group-btn',
'class' => 'btn-primary input-group-append',
'value' => '<span class="icon icon-filter left" role="presentation" aria-hidden="true"></span>' . get_string('filter'),
),
),
......
......@@ -14,7 +14,7 @@
<option value="{$blog->id}"> {$blog->title} </option>
{/foreach}
</select>
<span class="input-group-btn">
<span class="input-group-append">
<a class="btn btn-secondary btnshortcut">
<span class="icon icon-plus text-success left" role="presentation" aria-hidden="true"></span> {str tag='shortcutadd' section='artefact.blog'}
</a>
......
......@@ -7,7 +7,7 @@
<select id="blogselect_{$blockid}" class="select form-control">{foreach from=$blogs item=blog}<option value="{$blog->id}"> {$blog->title} </option>{/foreach}</select>
</span>
<input class="select" type="hidden" value="{$tagselect}">
<span class="input-group-btn">
<span class="input-group-append">
<a class="btn btnshortcut btn-secondary">
<span class="icon icon-plus text-success left" role="presentation" aria-hidden="true"></span>
{str tag='shortcutadd' section='artefact.blog'}
......
......@@ -70,7 +70,7 @@
{if $post->files}
<div class="has-attachment card card-secondary collapsible" id="postfiles_{$post->id}">
<h5 class="card-header">
<h5 class="card-header has-link">
<a class="text-left collapsed" data-toggle="collapse" href="#attach_{$post->id}" aria-expanded="false">
<span class="icon left icon-paperclip" role="presentation" aria-hidden="true"></span>
<span class="text-small"> {str tag=attachedfiles section=artefact.blog} </span>
......
......@@ -4,7 +4,7 @@
{$form|safe}
</div>
<div id="results" class="section card card-secondary">
<h2 class="card-heading" id="resultsheading">{str tag="Results"}</h2>
<h2 class="card-header" id="resultsheading">{str tag="Results"}</h2>
{if $results}
<div class="table-responsive">
<table id="searchresults" class="table table-striped fullwidth listing">
......
......@@ -259,6 +259,7 @@
}
.duplicateemail-filter {
margin-top: 10px;
justify-content: flex-start;
}
}
......@@ -665,3 +666,18 @@ a[type="submit"],
.card-header a[type="button"] {
-webkit-appearance: none;
}
// Used when you really only need flex on an item
.flexbox {
display: flex;
}
// Add space when there are 2 selects next to each other
.select {
+ .select {
margin-left: 5px;
}
+ .submit:not(.input-group-append) {
margin-left: 5px;
}
}
......@@ -159,7 +159,7 @@ h4.list-group-item-heading {
@extend .list-group-item-warning;
}
&.published {
background: scale-color($card-bg, $lightness: 50%);
background: scale-color($card-heading-bg, $lightness: 50%);
}
&.flush {
padding: 10px 0;
......
......@@ -119,4 +119,7 @@
}
}
}
.collapsible-group {
max-width: 100%;
}
}
......@@ -167,9 +167,11 @@ textarea.resizable {
padding: 0;
border-bottom: 0 none;
align-items: flex-start;
display: inline-block;
}
&.form-inline-align-bottom .form-group{
vertical-align: bottom;
align-self: flex-end;
}
&.form-short {
select, input:not(.submit) {
......@@ -183,6 +185,7 @@ textarea.resizable {
.form-inline-align-bottom a {
vertical-align: bottom;
align-self: flex-end;
}
.form-control.file {
......
......@@ -59,7 +59,7 @@
flex: 0 1 auto;
}
}
.pieform .input-group-btn {
.pieform .input-group-append {
font-size: inherit;
width: inherit;
float:left;
......
......@@ -32,7 +32,7 @@
}
&.collapsed {
background-color: $card-bg;
background-color: $card-heading-bg;
color: $theme-text-color;
padding: 10px 15px;
&.outer-link {
......@@ -79,3 +79,29 @@
h2.card-header {
font-size: $font-size-lg;
}
.card {
&.collapsible:not(.card-block) {
.card-header {
border: 0;
a {
border: $card-border-width solid $card-border;
border-bottom-width: 0;
}
}
&.last {
.card-header {
a.collapsed {
border-bottom-width: $card-border-width;
}
}
}
&.has-attachment {
.card-header {
a {
border-width: 0;
}
}
}
}
}
......@@ -50,7 +50,7 @@
width: auto;
}
}
.input-group-btn {
.input-group-append {
display: block !important;
float: left;
border-top-left-radius: 0;
......
......@@ -37,7 +37,7 @@
<div class="searchform text input-group">
<label class="sr-only" for="query">{str tag='usersearch' section='admin'}</label>
<input placeholder="{str tag='usersearch' section='admin'}" class="text form-control" type="text" name="query" id="query"{if $search->query} value="{$search->query}"{/if}>
<div class="input-group-btn button">
<div class="input-group-append button">
<button id="query-button" class="btn-search btn btn-primary " type="submit">
{str tag="search"}
</button>
......@@ -62,7 +62,7 @@
<div id="results" class="card card-secondary view-container">
<h2 class="card-heading" id="resultsheading">{str tag="Results"}</h2>
<h2 class="card-header" id="resultsheading">{str tag="Results"}</h2>
{if $results}
<table id="searchresults" class="tablerenderer fullwidth table">
<thead>
......
......@@ -29,7 +29,7 @@
</select>
</span>
</span>
</fieldset>
</div>
<div class="no-label text-inline form-group">
......@@ -39,7 +39,7 @@
<div class="searchform text input-group">
<label class="sr-only" for="query">{str tag='usersearch' section='admin'}</label>
<input placeholder="{str tag='usersearch' section='admin'}" class="text form-control" type="text" name="query" id="query"{if $search->query} value="{$search->query}"{/if}>
<div class="input-group-btn button">
<div class="input-group-append button">
<button id="query-button" class="btn-search btn btn-primary " type="submit">
{str tag="search"}
</button>
......@@ -50,7 +50,7 @@
</form>
<div class="card card-secondary view-container" id="results">
<h2 class="card-heading" id="resultsheading">{str tag="Results"}</h2>
<h2 class="card-header" id="resultsheading">{str tag="Results"}</h2>
{if $results}
<table id="searchresults" class="tablerenderer table fullwidth">
<thead>
......
......@@ -59,21 +59,21 @@
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li class="dropdown-item">
<li class="">
<form class="form-as-button float-left" action="{$WWWROOT}admin/users/institutionusers.php" method="post">
<button class="submit btn btn-link" type="submit" name="editmembers" value="{str tag="editmembers" section="admin"}">
{str tag="editmembers" section="admin"}
</button>
</form>
</li>
<li class="dropdown-item">
<li class="">
<form class="form-as-button float-left" action="{$WWWROOT}admin/users/institutionstaff.php" method="post">
<button class="submit btn btn-link" type="submit" name="editstaff" value="{str tag="editstaff" section="admin"}">
{str tag="editstaff" section="admin"}
</button>
</form>
</li>
<li class="dropdown-item">
<li class="">
<form class="form-as-button float-left" action="{$WWWROOT}admin/users/institutionadmins.php" method="post">
<button class="submit btn btn-link" type="submit" name="editadmins" value="{str tag="editadmins" section="admin"}">
{str tag="editadmins" section="admin"}
......
......@@ -30,7 +30,7 @@
<div class="usersearchform text input-group">
<label class="sr-only" for="query">{str tag='Search' section='admin'}: </label>
<input placeholder="{str tag='Search' section='admin'}" class="text form-control" type="text" name="query" id="query"{if $search->query} value="{$search->query}"{/if}>
<div class="input-group-btn button">
<div class="input-group-append button">
<button id="query-button" class="btn-search btn btn-primary " type="submit">
{str tag='Search' section='admin'}
</button>
......
<div>
<div class="flexbox">
{if $form}
<div class="col-md-6">
{$form|safe}
......
......@@ -12,7 +12,7 @@
</label>
<input type="text" class="text form-control" id="artefactchooser-searchfield" name="search" value="{$.request.search}" tabindex="42">
<input type="hidden" name="s" value="1">
<span class="input-group-btn">
<span class="input-group-append">
<button class="submit btn btn-primary" type="submit" id="artefactchooser-searchsubmit" name="action_acsearch_id_{$blockinstance}" tabindex="42">
{str tag=search}
</button>
......
......@@ -3,7 +3,7 @@
<form id="selfsearch" class="selfsearch input-group" method="post" action="{$WWWROOT}selfsearch.php">
<label for="sidebar-search" class="sr-only">{str tag="selfsearch"}</label>
<input id="sidebar-search" type="text" name="query" class="form-control float-left" placeholder="{str tag='selfsearch'}">
<span class="input-group-btn">
<span class="input-group-append">
<button type="submit" class="btn btn-primary"><span class="icon icon-search" role="presentation" aria-hidden="true"></span><span class="sr-only">{str tag="go"}</span></button>
</span>
</form>
......
{foreach from=$sitefonts item=font}
<div class="{cycle values='r0,r1'} listrow list-group-item">
<div class="{cycle values='r0,r1'} listrow list-group-item flexbox">
<div class="col-md-10" style="font-family:'{$font.title|escape_css_string}';font-size:{$size}pt;line-height:{$size}pt;padding:3px 0;">
<h2 class="title">{$font.title}</h2>
{if $preview == 10}
......@@ -63,4 +63,4 @@
</ul>
<div class="clearfix"></div>
</div>
{/foreach}
\ No newline at end of file
{/foreach}
......@@ -8,7 +8,7 @@
<input type="text" name="viewquery" id="viewquery" class="query form-control text" value="{$views->query}">
</div>
<div class="form-group input-group-btn">
<div class="form-group input-group-append">
<button class="query-button btn btn-primary" type="submit">{str tag="Search" section="view"}</button>
</div>
</fieldset>
......
......@@ -76,7 +76,7 @@ $searchform['elements']['inputgroup']['elements']['query'] = array(
$searchform['elements']['inputgroup']['elements']['submit'] = array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary input-group-btn',
'class' => 'btn-primary input-group-append',
'value' => get_string('search'),
);
......
......@@ -59,7 +59,7 @@ $filterform = pieform(array(
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary input-group-btn',
'class' => 'btn-primary input-group-append',
'value' => '<span class="icon icon-filter left" role="presentation" aria-hidden="true"></span> ' . get_string('filter')
)
),
......
......@@ -209,7 +209,7 @@ if (!empty($loggedinid) && $loggedinid != $userid) {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-sm btn-primary input-group-btn',
'class' => 'btn-sm btn-primary input-group-append',
'value' => '<span class="icon icon-paper-plane left" role="presentation" aria-hidden="true"></span>' . get_string('sendinvitation', 'group'),
)
)
......@@ -250,7 +250,7 @@ if (!empty($loggedinid) && $loggedinid != $userid) {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-sm btn-primary input-group-btn',
'class' => 'btn-sm btn-primary input-group-append',
'value' => '<span class="icon icon-plus left" role="presentation" aria-hidden="true"></span>' . get_string('add'),
)
)
......
......@@ -120,7 +120,7 @@ $searchform = pieform(array(
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-primary input-group-btn no-label button',
'class' => 'btn-primary input-group-append no-label button',
'value' => get_string('search'),
)
),
......
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