Merge pull request #1094 from Jennydmz/BUG-3860
Bug 3860 New Feature. Add options "Capitalize Phrase" and "Title Case" to "Text transform to".
This commit is contained in:
@@ -1113,6 +1113,19 @@ class XmlForm_Field_Text extends XmlForm_Field_SimpleText
|
||||
if ($this->strTo === 'LOWER') {
|
||||
$value = strtolower( $value );
|
||||
}
|
||||
if ($this->strTo === 'TITLE') {
|
||||
$value = strtolower( $value );
|
||||
$value = ucwords( $value );
|
||||
}
|
||||
if ($this->strTo === 'PHRASE') {
|
||||
//$value = strtolower( $value );
|
||||
|
||||
$title = explode(" ",$value);
|
||||
|
||||
$title[0] = ucwords( $title[0] );
|
||||
|
||||
$value = implode(" ", $title);
|
||||
}
|
||||
//if ($this->strTo==='CAPITALIZE') $value = strtocapitalize($value);
|
||||
$onkeypress = G::replaceDataField( $this->onkeypress, $owner->values );
|
||||
if ($this->replaceTags == 1) {
|
||||
@@ -1285,6 +1298,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek
|
||||
if ($this->strTo === 'LOWER') {
|
||||
$value = strtolower( $value );
|
||||
}
|
||||
|
||||
//if ($this->strTo==='CAPITALIZE') $value = strtocapitalize($value);
|
||||
$onkeypress = G::replaceDataField( $this->onkeypress, $owner->values );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user