small fixes

This commit is contained in:
Roland Gruber 2013-08-20 18:56:52 +00:00
parent 1de6550360
commit 211c5a71e0
4 changed files with 21 additions and 3 deletions

View File

@ -505,6 +505,9 @@ function get_preg($argument, $regexp) {
case "digit": // Normal number
$pregexpr = '/^[[:digit:]]*$/';
break;
case "float": // float value
$pregexpr = '/^[[:digit:]]+(\\.[[:digit:]]+)?$/';
break;
case "UNC": // UNC Path, e.g. \\server\share\folder\...
$pregexpr = '/^((([\\\][\\\])|(%))([a-zA-Z0-9%\\.-])+)([\\\]([[:alnum:]%\\.\\$\\ \\_-])+)+$/u';
break;

View File

@ -426,6 +426,8 @@ class htmlInputField extends htmlElement {
protected $showCalendar = false;
/** calendar format */
protected $calendarFormat = '';
/** title attribute */
protected $title = null;
/**
* Constructor
@ -509,7 +511,11 @@ class htmlInputField extends htmlElement {
if ($this->onKeyPress != null) {
$onKeyPress = ' onkeypress="' . $this->onKeyPress . '"';
}
echo '<input type="' . $inputType . '"' . $class . $name . $id . $value . $maxLength . $size . $fieldTabIndex . $onKeyPress . $disabled . '>';
$title = '';
if (!empty($this->title)) {
$title = ' title="' . $this->title . '"';
}
echo '<input type="' . $inputType . '"' . $class . $name . $id . $value . $maxLength . $size . $fieldTabIndex . $onKeyPress . $title . $disabled . '>';
// autocompletion
if ($this->autocomplete) {
echo "<script type=\"text/javascript\">\n";
@ -676,6 +682,15 @@ class htmlInputField extends htmlElement {
$this->calendarFormat = $format;
}
/**
* Sets the title for the input field.
*
* @param String $title title value
*/
public function setTitle($title) {
$this->title = htmlspecialchars($title);
}
}
/**

View File

@ -397,7 +397,7 @@ class inetOrgPerson extends baseModule implements passwordService {
'name' => 'inetOrgPerson_description',
'description' => _('Description'),
'help' => 'description',
'example' => _('Temp, contract til December')
'example' => _('Temp, contract till December')
);
}
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideJobTitle')) {

View File

@ -251,7 +251,7 @@ class windowsUser extends baseModule implements passwordService {
'name' => 'windowsUser_description',
'description' => _('Description'),
'help' => 'description',
'example' => _('Temp, contract til December'),
'example' => _('Temp, contract till December'),
),
array(
'name' => 'windowsUser_streetAddress',