Skip to content

Commit cd7a232

Browse files
committed
fix: text inputs CSS
Signed-off-by: Thierry Bugier <[email protected]>
1 parent f99c534 commit cd7a232

File tree

3 files changed

+37
-5
lines changed

3 files changed

+37
-5
lines changed

inc/form.class.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,15 @@ public function showAddTargetForm() {
22552255

22562256
echo '<tr>';
22572257
echo '<td width="15%"><strong>'.__('Name').' <span style="color:red;">*</span></strong></td>';
2258-
echo '<td width="40%"><input type="text" name="name" style="width:100%;" value="" required="required"/></td>';
2258+
echo '<td width="40%">';
2259+
echo Html::input('name', [
2260+
'id' => 'name',
2261+
'autofocus' => '',
2262+
'value' => $this->fields['name'],
2263+
'required' => 'required',
2264+
]);
2265+
echo '</td>';
2266+
22592267
echo '<td width="15%"><strong>'._n('Type', 'Types', 1).' <span style="color:red;">*</span></strong></td>';
22602268
echo '<td width="30%">';
22612269
$targetTypes = [];

inc/targetchange.class.php

+14-2
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,13 @@ public function showForm($ID, $options = []) {
428428
echo '<tr>';
429429
echo '<td width="15%"><strong>' . __('Name') . ' <span style="color:red;">*</span></strong></td>';
430430
// TODO: remive the fixed width
431-
echo '<td width="85%"><input type="text" name="name" style="width:704px;" value="' . $this->fields['name'] . '" /></td>';
431+
echo '<td>';
432+
echo Html::input('name', [
433+
'id' => 'name',
434+
'autofocus' => '',
435+
'value' => $this->fields['name'],
436+
]);
437+
echo '</td>';
432438
echo '</tr>';
433439
echo '</table>';
434440

@@ -439,7 +445,13 @@ public function showForm($ID, $options = []) {
439445

440446
echo '<tr>';
441447
echo '<td><strong>' . __('Change title', 'formcreator') . ' <span style="color:red;">*</span></strong></td>';
442-
echo '<td colspan="3"><input type="text" name="target_name" style="width:704px;" value="' . $this->fields['target_name'] . '"></td>';
448+
echo '<td colspan="3">';
449+
echo Html::input('target_name', [
450+
'id' => 'target_name',
451+
'autofocus' => '',
452+
'value' => $this->fields['target_name'],
453+
]);
454+
echo '</td>';
443455
echo '</tr>';
444456

445457
echo '<tr>';

inc/targetticket.class.php

+14-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,13 @@ public function showForm($ID, $options = []) {
220220
echo '<tr>';
221221
echo '<td width="15%"><strong>' . __('Name') . ' <span style="color:red;">*</span></strong></td>';
222222
// TODO: remive the fixed width
223-
echo '<td width="85%"><input type="text" name="name" style="width:100%;" value="' . $this->fields['name'] . '" /></td>';
223+
echo '<td>';
224+
echo Html::input('name', [
225+
'id' => 'name',
226+
'autofocus' => '',
227+
'value' => $this->fields['name'],
228+
]);
229+
echo '</td>';
224230
echo '</tr>';
225231
echo '</table>';
226232

@@ -231,7 +237,13 @@ public function showForm($ID, $options = []) {
231237

232238
echo '<tr>';
233239
echo '<td><strong>' . __('Ticket title', 'formcreator') . ' <span style="color:red;">*</span></strong></td>';
234-
echo '<td colspan="3"><input type="text" name="target_name" style="width:100%;" value="' . $this->fields['target_name'] . '"/></td>';
240+
echo '<td colspan="3">';
241+
echo Html::input('target_name', [
242+
'id' => 'target_name',
243+
'autofocus' => '',
244+
'value' => $this->fields['target_name'],
245+
]);
246+
echo '</td>';
235247
echo '</tr>';
236248

237249
echo '<tr>';

0 commit comments

Comments
 (0)