Skip to content

Commit

Permalink
fix: text inputs CSS
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Nov 18, 2021
1 parent f99c534 commit cd7a232
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
10 changes: 9 additions & 1 deletion inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2255,7 +2255,15 @@ public function showAddTargetForm() {

echo '<tr>';
echo '<td width="15%"><strong>'.__('Name').' <span style="color:red;">*</span></strong></td>';
echo '<td width="40%"><input type="text" name="name" style="width:100%;" value="" required="required"/></td>';
echo '<td width="40%">';
echo Html::input('name', [
'id' => 'name',
'autofocus' => '',
'value' => $this->fields['name'],
'required' => 'required',
]);
echo '</td>';

echo '<td width="15%"><strong>'._n('Type', 'Types', 1).' <span style="color:red;">*</span></strong></td>';
echo '<td width="30%">';
$targetTypes = [];
Expand Down
16 changes: 14 additions & 2 deletions inc/targetchange.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,13 @@ public function showForm($ID, $options = []) {
echo '<tr>';
echo '<td width="15%"><strong>' . __('Name') . ' <span style="color:red;">*</span></strong></td>';
// TODO: remive the fixed width
echo '<td width="85%"><input type="text" name="name" style="width:704px;" value="' . $this->fields['name'] . '" /></td>';
echo '<td>';
echo Html::input('name', [
'id' => 'name',
'autofocus' => '',
'value' => $this->fields['name'],
]);
echo '</td>';
echo '</tr>';
echo '</table>';

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

echo '<tr>';
echo '<td><strong>' . __('Change title', 'formcreator') . ' <span style="color:red;">*</span></strong></td>';
echo '<td colspan="3"><input type="text" name="target_name" style="width:704px;" value="' . $this->fields['target_name'] . '"></td>';
echo '<td colspan="3">';
echo Html::input('target_name', [
'id' => 'target_name',
'autofocus' => '',
'value' => $this->fields['target_name'],
]);
echo '</td>';
echo '</tr>';

echo '<tr>';
Expand Down
16 changes: 14 additions & 2 deletions inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,13 @@ public function showForm($ID, $options = []) {
echo '<tr>';
echo '<td width="15%"><strong>' . __('Name') . ' <span style="color:red;">*</span></strong></td>';
// TODO: remive the fixed width
echo '<td width="85%"><input type="text" name="name" style="width:100%;" value="' . $this->fields['name'] . '" /></td>';
echo '<td>';
echo Html::input('name', [
'id' => 'name',
'autofocus' => '',
'value' => $this->fields['name'],
]);
echo '</td>';
echo '</tr>';
echo '</table>';

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

echo '<tr>';
echo '<td><strong>' . __('Ticket title', 'formcreator') . ' <span style="color:red;">*</span></strong></td>';
echo '<td colspan="3"><input type="text" name="target_name" style="width:100%;" value="' . $this->fields['target_name'] . '"/></td>';
echo '<td colspan="3">';
echo Html::input('target_name', [
'id' => 'target_name',
'autofocus' => '',
'value' => $this->fields['target_name'],
]);
echo '</td>';
echo '</tr>';

echo '<tr>';
Expand Down

0 comments on commit cd7a232

Please sign in to comment.