Skip to content

Commit

Permalink
fix(form_language): positionning and header
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Mar 21, 2022
1 parent 53122e5 commit 97124c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ html, body {
.plugin_formcreator_filter_translations {
position: absolute;
right: 3%;
top: 10px;
// top: 10px;

input {
padding-left: 20px !important;
Expand Down
12 changes: 6 additions & 6 deletions inc/form_language.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,18 +303,20 @@ public function showTranslationEntry($input) : void {
public function showTranslations($options = []) {
$form = PluginFormcreatorCommon::getForm();
$form->getFromDB($this->fields[PluginFormcreatorForm::getForeignKeyField()]);
$this->showFormHeader($options);
$this->initForm($this->getID());
echo '<div data-itemtype="PluginFormcreatorForm_Language" data-id="' . $this->getID() . '">';
echo '<div>';
echo '<span>';
echo '<button'
. ' name="new_override"'
. ' class="vsubmit"'
. ' value="<i class=\'fas fa-plus\'></i>&nbsp;' . __('New translation', 'formcreator') . '"'
.' onclick="' . 'plugin_formcreator.newTranslation(' . $this->getID() . ')'
. '"><i class=\'fas fa-plus\'></i>&nbsp;' . __('New translation', 'formcreator') . '</button>';
echo '</div>';
echo '<div class="plugin_formcreator_filter_translations">';
echo '</span>';
echo '<span class="plugin_formcreator_filter_translations">';
echo '<input type="text" placeholder="'.__("Filter list", 'formcreator').'">';
echo '</div>';
echo '</span>';

$translations = $form->getTranslations($this->fields['name']);
if (count($translations) < 1) {
Expand All @@ -324,8 +326,6 @@ public function showTranslations($options = []) {

$options['formtitle'] = false;
$options['formoptions'] = 'onsubmit="' . Html::getConfirmationOnActionScript(__('Do you want to delete the selected items?', 'formcreator')) . '"';
$this->showFormHeader($options);
$this->initForm($this->getID());
$rand = mt_rand();

if (count($translations) > 15) {
Expand Down

0 comments on commit 97124c4

Please sign in to comment.