1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 08:17:12 +02:00

Fix issue processwire/proceswire-issues#555 in ProcessProfile where 50% width Inputfield followed by submit button resulted in submit button in wrong position

This commit is contained in:
Ryan Cramer
2018-04-06 05:37:22 -04:00
parent c5c7ae4232
commit 6dc7a122a6

View File

@@ -3,7 +3,7 @@
/** /**
* ProcessWire Self Profile * ProcessWire Self Profile
* *
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer * ProcessWire 3.x, Copyright 2018 by Ryan Cramer
* https://processwire.com * https://processwire.com
* *
* *
@@ -109,6 +109,10 @@ class ProcessProfile extends Process implements ConfigurableModule, WirePageEdit
$form->attr('enctype', 'multipart/form-data'); $form->attr('enctype', 'multipart/form-data');
$form->attr('autocomplete', 'off'); $form->attr('autocomplete', 'off');
$form->addClass('InputfieldFormConfirm'); $form->addClass('InputfieldFormConfirm');
$fieldset = new InputfieldWrapper();
$this->wire($fieldset);
$form->add($fieldset);
// is password required to change some Inputfields? // is password required to change some Inputfields?
$passRequired = false; $passRequired = false;
@@ -126,7 +130,7 @@ class ProcessProfile extends Process implements ConfigurableModule, WirePageEdit
$f->attr('value', $user->name); $f->attr('value', $user->name);
$f->attr('pattern', '^[-_a-z0-9]+$'); $f->attr('pattern', '^[-_a-z0-9]+$');
$f->required = true; $f->required = true;
$form->add($f); $fieldset->add($f);
$f->setTrackChanges(true); $f->setTrackChanges(true);
$passRequiredInputfields[] = $f; $passRequiredInputfields[] = $f;
} }
@@ -166,7 +170,7 @@ class ProcessProfile extends Process implements ConfigurableModule, WirePageEdit
} }
} }
$form->add($inputfield); $fieldset->add($inputfield);
} }
/** @var InputfieldHidden $f */ /** @var InputfieldHidden $f */
@@ -176,7 +180,7 @@ class ProcessProfile extends Process implements ConfigurableModule, WirePageEdit
$f->attr('name', 'id'); $f->attr('name', 'id');
$f->attr('value', $user->id); $f->attr('value', $user->id);
$f->addClass('InputfieldAllowAjaxUpload'); $f->addClass('InputfieldAllowAjaxUpload');
$form->add($f); $fieldset->add($f);
/** @var InputfieldSubmit $field */ /** @var InputfieldSubmit $field */
$field = $this->modules->get('InputfieldSubmit'); $field = $this->modules->get('InputfieldSubmit');
@@ -383,8 +387,6 @@ class ProcessProfile extends Process implements ConfigurableModule, WirePageEdit
return false; return false;
} }
/** /**
* Module configuration * Module configuration
* *