Skip to content

Commit

Permalink
Add id for login submit button (#1489676) - make it skin independent
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Mar 11, 2014
1 parent 1394025 commit b23f200
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
10 changes: 8 additions & 2 deletions program/include/rcmail_output_html.php
Expand Up @@ -1629,6 +1629,12 @@ protected function login_form($attrib)
$out .= $input_host->show();
}

if (rcube_utils::get_boolean($attrib['submit'])) {
$submit = new html_inputfield(array('type' => 'submit', 'id' => 'rcmloginsubmit',
'class' => 'button mainaction', 'value' => $this->app->gettext('login')));
$out .= html::p('formbuttons', $submit->show());
}

// surround html output with a form tag
if (empty($attrib['form'])) {
$out = $this->form_tag(array('name' => $form_name, 'method' => 'post'), $out);
Expand Down Expand Up @@ -1691,9 +1697,9 @@ protected function search_form($attrib)
// add form tag around text field
if (empty($attrib['form'])) {
$out = $this->form_tag(array(
'name' => "rcmqsearchform",
'name' => "rcmqsearchform",
'onsubmit' => self::JS_OBJECT_NAME . ".command('search'); return false",
'style' => "display:inline"),
'style' => "display:inline"),
$out);
}

Expand Down
4 changes: 4 additions & 0 deletions skins/classic/common.css
Expand Up @@ -882,6 +882,10 @@ font.bold
font-weight: bold;
}

.formbuttons
{
text-align: center;
}

/***** onclick menu list *****/

Expand Down
6 changes: 2 additions & 4 deletions skins/classic/templates/login.html
Expand Up @@ -16,11 +16,9 @@
<div class="boxcontent">

<roundcube:form name="form" method="post">
<roundcube:object name="loginform" form="form" />

<p style="text-align:center;"><input type="submit" class="button mainaction" value="<roundcube:label name='login' />" /></p>

<roundcube:object name="loginform" form="form" submit=true />
</form>

</div>
</div>

Expand Down
6 changes: 2 additions & 4 deletions skins/larry/templates/login.html
Expand Up @@ -12,11 +12,9 @@
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" />

<roundcube:form name="form" method="post">
<roundcube:object name="loginform" form="form" size="40" />

<p class="formbuttons"><input type="submit" class="button mainaction" value="<roundcube:label name='login' />" /></p>

<roundcube:object name="loginform" form="form" size="40" submit=true />
</form>

</div>

<div class="box-bottom">
Expand Down

0 comments on commit b23f200

Please sign in to comment.