mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
set form input values for posted form
This commit is contained in:
parent
ec80aad3e7
commit
f2f739c7e3
@ -13,6 +13,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% set form_params = app.request.session.get('_old_input') %}
|
||||
<section class="clearfix home-default">
|
||||
|
||||
{% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'new-create'} %}
|
||||
@ -75,7 +76,7 @@
|
||||
{% for field in form.fields.translations('name') %}
|
||||
{{ field.setAttributes({
|
||||
'class': 'd-block mt-3 w-100 border-0'
|
||||
}).render({'form': form})|raw }}
|
||||
}).setValue(form_params[field.field~"_"~field.getLocale()]).render({'form': form})|raw }}
|
||||
{% endfor %}
|
||||
</label>
|
||||
|
||||
@ -244,7 +245,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="field-group advs_desc">
|
||||
{% for field in form.fields.translations('advs_desc') %}
|
||||
{{ field.render({'form': form})|raw }}
|
||||
{{ field.setValue(form_params[field.field~"_"~field.getLocale()]).render({'form': form})|raw }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -784,7 +784,7 @@ class AdvsController extends PublicController
|
||||
if ($this->request->action == "update") {
|
||||
$error = $form->build($this->request->update_id)->validate()->getFormErrors()->getMessages();
|
||||
if (!empty($error)) {
|
||||
return $this->redirect->back();
|
||||
return $this->redirect->back()->withInput();
|
||||
}
|
||||
|
||||
/* Update Adv */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user