UI changes.

1.10.x
Julio Montoya 10 years ago
parent b0068c8f16
commit a36aeeb736
  1. 2
      main/auth/inscription.php
  2. 2
      main/auth/lostPassword.php
  3. 2
      main/auth/profile.php
  4. 21
      main/inc/lib/formvalidator/FormValidator.class.php

@ -365,7 +365,7 @@ if (api_get_setting('allow_terms_conditions') == 'true') {
}
}
$form->addElement('button', 'submit', get_lang('RegisterUser'), array('class' => 'btn btn-primary btn-large'));
$form->addButtonCreate(get_lang('RegisterUser'));
if ($form->validate()) {
$values = $form->getSubmitValues(1);

@ -84,7 +84,7 @@ if (isset($_GET['reset']) && isset($_GET['id'])) {
$form = new FormValidator('lost_password');
$form->addElement('header', $tool_name);
$form->addElement('text', 'user', array(get_lang('LoginOrEmailAddress'), get_lang('EnterEmailUserAndWellSendYouPassword')), array('size'=>'40'));
$form->addElement('style_submit_button', 'submit', get_lang('Send'),'class="btn"');
$form->addButtonSend(get_lang('Send'));
// Setting the rules
$form->addRule('user', get_lang('ThisFieldIsRequired'), 'required');

@ -287,7 +287,7 @@ if (api_get_setting('profile', 'apikeys') == 'true') {
}
// SUBMIT
if (is_profile_editable()) {
$form->addElement('style_submit_button', 'apply_change', get_lang('SaveSettings'), 'class="save"');
$form->addButtonUpdate(get_lang('SaveSettings'), 'apply_change');
} else {
$form->freeze();
}

@ -238,27 +238,36 @@ EOT;
/**
* @param string $label
*/
public function addButtonCreate($label)
public function addButtonCreate($label, $name = 'submit')
{
$this->addButton('submit', $label, 'plus', 'primary');
$this->addButton($name, $label, 'plus', 'primary');
}
/**
* Shortcut to create/add button
* @param string $label
*/
public function addButtonUpdate($label)
public function addButtonUpdate($label, $name = 'submit')
{
return $this->addButton('submit', $label, 'pencil', 'primary');
return $this->addButton($name, $label, 'pencil', 'primary');
}
/**
* Shortcut to delete button
* @param string $label
*/
public function addButtonDelete($label)
public function addButtonDelete($label, $name = 'submit')
{
return $this->addButton('submit', $label, 'trash', 'danger');
return $this->addButton($name, $label, 'trash', 'danger');
}
/**
* Shortcut to "send" button
* @param string $label
*/
public function addButtonSend($label, $name = 'submit')
{
return $this->addButton($name, $label, 'paper-plane', 'primary');
}
/**

Loading…
Cancel
Save