Sha256: 77c4f32b3690f65d70a1661e986c2352dda98c4721caa0397afcd7a615d7f44a

Contents?: true

Size: 1.03 KB

Versions: 19

Compression:

Stored size: 1.03 KB

Contents

<!--
Used inside a form to specify where to redirect after successful submission. This works by inserting a hidden field called `after_submit` which is used by Hobo if present to perform a redirect after the form submission.

### Usage

Use the `stay-here` attribute to remain on the current page:

    <form>
      <after-submit stay-here/>
      ...
    </form>

Use the `uri` option to specify a redirect location:

    <form>
      <after-submit uri="/admin"/>
      ...
    </form>

Use the `go-back` option to return to the page in `session[:previous_uri]`:

    <form>
      <after-submit go-back/>
      ...
    </form>

Note that `session[:previous_uri]` isn't automatically populated. To
automatically populate it, add to application_controller.rb:

    after_filter HoboRapid::PreviousUriFilter

-->
<def tag="after-submit" attrs="uri, stay-here, go-back"><%
  uri = "stay-here" if stay_here
  uri = session[:previous_uri] if go_back
  -%>
  <input type="hidden" value="&params[:after_submit] || uri" name="after_submit" if="&uri"/>
</def>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
hobo_rapid-2.2.6 taglibs/inputs/after_submit.dryml
hobo_rapid-2.2.5 taglibs/inputs/after_submit.dryml
hobo_rapid-2.2.4 taglibs/inputs/after_submit.dryml
hobo_rapid-2.2.3 taglibs/inputs/after_submit.dryml
hobo_rapid-2.2.2 taglibs/inputs/after_submit.dryml
hobo_rapid-2.2.1 taglibs/inputs/after_submit.dryml
hobo_rapid-2.2.0 taglibs/inputs/after_submit.dryml
hobo_rapid-2.1.2 taglibs/inputs/after_submit.dryml
hobo_rapid-2.1.1 taglibs/inputs/after_submit.dryml
hobo_rapid-2.1.0 taglibs/inputs/after_submit.dryml
hobo_rapid-2.1.0.pre4 taglibs/inputs/after_submit.dryml
hobo_rapid-2.1.0.pre3 taglibs/inputs/after_submit.dryml
hobo_rapid-2.1.0.pre2 taglibs/inputs/after_submit.dryml
hobo_rapid-2.1.0.pre1 taglibs/inputs/after_submit.dryml
hobo_rapid-2.0.1 taglibs/inputs/after_submit.dryml
hobo_rapid-2.0.0 taglibs/inputs/after_submit.dryml
hobo_rapid-2.0.0.pre10 taglibs/inputs/after_submit.dryml
hobo_rapid-2.0.0.pre9 taglibs/inputs/after_submit.dryml
hobo_rapid-2.0.0.pre8 taglibs/inputs/after_submit.dryml