Commit 6ebe876c authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review

Merge "Bug 1855331: Adjusting lang chooser when logged out"

parents 960e10f8 448ab7c8
......@@ -113,6 +113,7 @@ function pieform_element_select(Pieform $form, $element) {
. $form->element_attributes($element)
. (!empty($element['multiple']) ? ' multiple="multiple"' : '')
. (!empty($element['allowother']) ? ' onChange="pieform_select_other(this);"' : '')
. ((empty($element['allowother']) && !empty($element['submitonchange'])) ? ' onChange="this.form.submit();"' : '')
. (!empty($element['width']) ? ' style="width: ' . $element['width'] . 'px;' : ' style="')
. (!empty($element['height']) ? ' height: ' . $element['height'] . 'px;"' : '"')
. ">\n";
......
......@@ -4679,6 +4679,8 @@ function language_select_form() {
'type' => 'select',
'title' => get_string('language') . ':',
'hiddenlabel' => true,
'submitonchange' => true,
'class' => 'submitonchange',
'options' => $languages,
'defaultvalue' => $SESSION->get('lang') ? $SESSION->get('lang') : 'default',
'rules' => array('required' => true),
......@@ -4686,7 +4688,7 @@ function language_select_form() {
'changelang' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-secondary input-group-append',
'class' => 'btn-secondary input-group-append submitonchange',
'value' => get_string('change'),
)
)
......
......@@ -30,6 +30,9 @@
border-bottom-left-radius: $border-radius;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
&.submitonchange {
@include border-right-radius($border-radius);
}
max-width: 100%;
&.text {
height: $input-height;
......@@ -50,6 +53,12 @@
}
}
}
.pieform-fieldset > .input-group-append.submitonchange {
& input[type="submit"],
& button[type="submit"] {
display: none !important;
}
}
label {
display: block;
}
......
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