Sha256: 475d06006231dbb11c8a93c92573f1199261a0d2da66d816d630f7aae4876aed

Contents?: true

Size: 872 Bytes

Versions: 5

Compression:

Stored size: 872 Bytes

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 `go-back` option to return to the page in `session[:previous_uri]`:

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

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

    <form>
      <after-submit uri="/admin"/>
      ...
    </form>
-->
<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

5 entries across 5 versions & 1 rubygems

Version Path
hobo_rapid-1.4.0.pre6 taglibs/inputs/after_submit.dryml
hobo_rapid-1.4.0.pre5 taglibs/inputs/after_submit.dryml
hobo_rapid-1.4.0.pre4 taglibs/inputs/after_submit.dryml
hobo_rapid-1.4.0.pre3 taglibs/inputs/after_submit.dryml
hobo_rapid-1.4.0.pre2 taglibs/inputs/after_submit.dryml