Пример #1
0
 function getOptionsForm()
 {
     $descriptions = array('exact' => WT_I18N::translate('Match the exact text, even if it occurs in the middle of a word.'), 'words' => WT_I18N::translate('Match the exact text, unless it occurs in the middle of a word.'), 'wildcards' => WT_I18N::translate('Use a “?” to match a single character, use “*” to match zero or more characters.'), 'regex' => WT_I18N::translate('Regular expressions are an advanced pattern matching technique.') . '<br>' . WT_I18N::translate('See %s for more information.', '<a href="http://php.net/manual/regexp.reference.php" target="_blank">php.net/manual/regexp.reference.php</a>'));
     return '<tr><th>' . WT_I18N::translate('Search text/pattern') . '</th>' . '<td>' . '<input name="search" size="40" value="' . WT_Filter::escapeHtml($this->search) . '" onchange="this.form.submit();"></td></tr>' . '<tr><th>' . WT_I18N::translate('Replacement text') . '</th>' . '<td>' . '<input name="replace" size="40" value="' . WT_Filter::escapeHtml($this->replace) . '" onchange="this.form.submit();"></td></tr>' . '<tr><th>' . WT_I18N::translate('Search method') . '</th>' . '<td><select name="method" onchange="this.form.submit();">' . '<option value="exact"' . ($this->method == 'exact' ? ' selected="selected"' : '') . '>' . WT_I18N::translate('Exact text') . '</option>' . '<option value="words"' . ($this->method == 'words' ? ' selected="selected"' : '') . '>' . WT_I18N::translate('Whole words only') . '</option>' . '<option value="wildcards"' . ($this->method == 'wildcards' ? ' selected="selected"' : '') . '>' . WT_I18N::translate('Wildcards') . '</option>' . '<option value="regex"' . ($this->method == 'regex' ? ' selected="selected"' : '') . '>' . WT_I18N::translate('Regular expression') . '</option>' . '</select><br><em>' . $descriptions[$this->method] . '</em>' . $this->error . '</td></tr>' . '<tr><th>' . WT_I18N::translate('Case insensitive') . '</th>' . '<td>' . '<input type="checkbox" name="case" value="i" ' . ($this->case == 'i' ? 'checked="checked"' : '') . '" onchange="this.form.submit();">' . '<br><em>' . WT_I18N::translate('Tick this box to match both upper and lower case letters.') . '</em></td></tr>' . parent::getOptionsForm();
 }
Пример #2
0
 function getOptionsForm()
 {
     return parent::getOptionsForm() . '<tr valign="top"><th>' . WT_I18N::translate('Surname option') . '</th>' . '<td class="optionbox"><select name="surname" onchange="reset_reload();"><option value="replace"' . ($this->surname == 'replace' ? ' selected="selected"' : '') . '">' . WT_I18N::translate('Wife’s surname replaced by husband’s surname') . '</option><option value="add"' . ($this->surname == 'add' ? ' selected="selected"' : '') . '">' . WT_I18N::translate('Wife’s maiden surname becomes new given name') . '</option></select></td></tr>';
 }