Léim chuig an ábhar
Roghchlár
Teanga, Gaeilge faoi láthair
EnglishGaeilge简体中文Españolहिन्दीPortuguêsবাংলাРусский日本語廣東話Tiếng Việtالعربية

córas dearaidh rastrillo

Forbhreathnú ar gach a soláthraíonn an córas dearaidh. Téama: day. Teanga: Gaeilge.

Foirm

Gach rialtán, sna staideanna a chuireann fíorfhoirm iad. Suíonn gach ceann i rst-box stuáilte, mar sin é an riail a ghlacann na páirteanna seo leis.

Eilimintí comhéadain réamhthógtha, comhsheasmhacha, arna rindreáil ar an bhfreastalaí.

Tugann stór focal na creatlaí féin partials orthu seo: filleann ui.Templates() partials, agus tugann docs/site/templates.md an t-ainm sin orthu. D'athraigh an focal ar an leathanach seo; níor athraigh focal an chóid.

Tá na naisc anseo neamhghníomhach

Naisc neamhghníomhach; cuirtear foinse an tsampla ar fáil.

Tá gach sampla thíos ina fhráma féin.

Ábhar samplach i mBéarla. Blaoscanna samplacha aistrithe.

field

Lipéad, ionchur, leid roghnach, cabhair agus earráid. An rialtán ginearálta téacsúil, le ID follasach.

Lom

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="f_bare">Title</label>
<input rst-input type="text" id="f_bare" name="f_bare">
</div></form></section>

Le leid

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="f_hint">Slug <span rst-field-hint>(lowercase, no spaces)</span></label>
<input rst-input type="text" id="f_hint" name="f_hint">
</div></form></section>

Le cabhair faoin rialtán

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="f_help">Email</label>
<input rst-input type="email" id="f_help" name="f_help" autocomplete="email" aria-describedby="f_help-help">
<p rst-field-help id="f_help-help">We only use this to send you replies.</p>
</div></form></section>

Riachtanach

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="f_required">Full name</label>
<input rst-input type="text" id="f_required" name="f_required" required>
</div></form></section>

Le hearráid

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="f_error">Email</label>
<input rst-input type="email" id="f_error" name="f_error" value="grace@" aria-invalid="true" aria-describedby="f_error-error">
<p rst-field-error id="f_error-error" role="alert">That does not look like an email address.</p>
</div></form></section>

Gearr

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="f_short">Postcode</label>
<input rst-input="short" type="text" id="f_short" name="f_short" value="D02 XY45">
</div></form></section>

An príomhréimse

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="f_primary">Title</label>
<input rst-input="primary" type="text" id="f_primary" name="f_primary" value="Quarterly board meeting">
</div></form></section>

field-text

Ionchur téacs lipéadaithe amháin, aitheantóirí díorthaithe ó Name. Tá réalta an mharcóra riachtanaigh aria-hidden. Is í an aitreabúid required ar an ionchur an comhartha ríomhchláraithe.

Lom

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ft_bare">Title</label>
  <input rst-input id="ft_bare" name="ft_bare" type="text">
</div></form></section>

Le leid

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ft_hint">Headline</label>
  <input rst-input id="ft_hint" name="ft_hint" type="text" aria-describedby="ft_hint-hint">
  <small rst-field-hint id="ft_hint-hint">Shown in the list.</small>
</div></form></section>

Riachtanach

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ft_required">Display name <span rst-field-required aria-hidden="true">*</span></label>
  <input rst-input id="ft_required" name="ft_required" type="text" autocomplete="nickname" required>
</div></form></section>

Le hearráid

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ft_error">Title</label>
  <input rst-input id="ft_error" name="ft_error" type="text" value="Release notes" aria-invalid="true" aria-describedby="ft_error-error">
  <small rst-field-error id="ft_error-error">A post with that title already exists.</small>
</div></form></section>

An príomhréimse

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ft_primary">What is it?</label>
  <input rst-input="primary" id="ft_primary" name="ft_primary" type="text" value="Quarterly board meeting">
</div></form></section>

Cuir Primary leis an bpríomhréimse san fhoirm — teideal nó ainm, cuir i gcás — chun ionchur níos suntasaí a fháil.

field-textarea

Clúdach field-text timpeall ar textarea.

Lom

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ta_bare">Notes</label>
  <textarea rst-textarea id="ta_bare" name="ta_bare" rows="3"></textarea>
</div></form></section>

Le leid

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ta_hint">Bio</label>
  <textarea rst-textarea id="ta_hint" name="ta_hint" rows="3" aria-describedby="ta_hint-hint"></textarea>
  <small rst-field-hint id="ta_hint-hint">Shown on your profile.</small>
</div></form></section>

Le hearráid

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ta_error">Summary</label>
  <textarea rst-textarea id="ta_error" name="ta_error" rows="3" aria-invalid="true" aria-describedby="ta_error-error">…</textarea>
  <small rst-field-error id="ta_error-error">A summary needs at least twenty characters.</small>
</div></form></section>

Riachtanach

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field>
  <label rst-field-label for="ta_required">Reason for refund <span rst-field-required aria-hidden="true">*</span></label>
  <textarea rst-textarea id="ta_required" name="ta_required" rows="3" required></textarea>
</div></form></section>

field-select

Clúdach field timpeall ar rogha dhúchasach. Thar deich rogha cuireann an select an bosca teaglama inscagtha in select.js i bhfeidhm; is í an rogha dhúchasach fós a sheolann an fhoirm.

Trí rogha: select dúchasach

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="sel_few">Role</label>
<select rst-input id="sel_few" name="sel_few"><option value="Admin" selected>Admin</option><option value="Editor">Editor</option><option value="Member">Member</option></select>
</div></form></section>

Dhá rogha dhéag: an bosca teaglama inscagtha

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="sel_many">City</label>
<select rst-input id="sel_many" name="sel_many" data-rst-select data-rst-select-filter="Clóscríobh chun scagadh" data-rst-select-results="{n} toradh" data-rst-select-result-one="1 toradh" aria-describedby="sel_many-help"><option value="Dublin" selected>Dublin</option><option value="Lisbon">Lisbon</option><option value="Madrid">Madrid</option><option value="Berlin">Berlin</option><option value="Rome">Rome</option><option value="Athens">Athens</option><option value="Helsinki">Helsinki</option><option value="Reykjavík">Reykjavík</option><option value="Warsaw">Warsaw</option><option value="Zagreb">Zagreb</option><option value="Tallinn">Tallinn</option><option value="Valletta">Valletta</option></select>
<p rst-field-help id="sel_many-help">Start typing to filter.</p>
</div></form></section>

Thar deich rogha, cuireann an pháirt select.js i bhfeidhm. Faoi bhun deich gcinn ní chuireann: níl i gcuardach ar dhornán rudaí ach troscán, ní cabhair.

Dhá rogha dhéag, Plain — diúltaíodh don fheabhsú

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="sel_plain">City</label>
<select rst-input id="sel_plain" name="sel_plain"><option value="Dublin" selected>Dublin</option><option value="Lisbon">Lisbon</option><option value="Madrid">Madrid</option><option value="Berlin">Berlin</option><option value="Rome">Rome</option><option value="Athens">Athens</option><option value="Helsinki">Helsinki</option><option value="Reykjavík">Reykjavík</option><option value="Warsaw">Warsaw</option><option value="Zagreb">Zagreb</option><option value="Tallinn">Tallinn</option><option value="Valletta">Valletta</option></select>
</div></form></section>

Riachtanach, le hearráid

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="sel_error">Role</label>
<select rst-input id="sel_error" name="sel_error" required aria-invalid="true" aria-describedby="sel_error-error"><option value="Admin" selected>Admin</option><option value="Editor">Editor</option><option value="Member">Member</option></select>
<p rst-field-error id="sel_error-error" role="alert">Pick a role for this person.</p>
</div></form></section>

Scríofa de láimh, le optgroups

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-field><label rst-field-label for="sel_grouped">Region</label>
<select rst-input id="sel_grouped" name="sel_grouped" data-rst-select data-rst-select-filter="Clóscríobh chun scagadh" data-rst-select-results="{n} toradh" data-rst-select-result-one="1 toradh">
<optgroup label="Europe"><option value="dublin" selected>Dublin</option><option value="lisbon">Lisbon</option><option value="warsaw">Warsaw</option></optgroup>
<optgroup label="Americas"><option value="montreal">Montréal</option><option value="lima">Lima</option><option value="austin">Austin</option></optgroup>
<optgroup label="Asia"><option value="osaka">Osaka</option><option value="hanoi">Hanoi</option><option value="dhaka">Dhaka</option></optgroup>
<optgroup label="Africa"><option value="accra">Accra</option><option value="nairobi">Nairobi</option><option value="tunis">Tunis</option></optgroup>
</select>
</div></form></section>

Is liosta cothrom é Options anseo, mar sin is marcáil a scríobhann an feidhmchlár féin iad na roghanna grúpáilte. Léiríonn select.js na grúpaí seachas iad a chaitheamh amach; is féidir le rogha scríofa de láimh an feabhsú a dhiúltú ar fad le data-rst-select="false".

field-check

An t-aon mheicníocht scoránaithe: fíorthicbhosca a bhfuil cuma laisce air, an méarchlár agus an léitheoir scáileáin slán.

Air

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><label rst-switch><input type="checkbox" name="notify_on" checked><span rst-switch-track aria-hidden="true"></span> Email me about replies</label></form></section>

As

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><label rst-switch><input type="checkbox" name="notify_off"><span rst-switch-track aria-hidden="true"></span> Email me about mentions</label></form></section>

Díchumasaithe

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><label rst-switch><input type="checkbox" name="notify_disabled" disabled><span rst-switch-track aria-hidden="true"></span> Email me a weekly digest</label></form></section>

choice-field

Cártaí roghanna — an grúpa raidió nó ticbhosca is fearr linn. Fanann Title gearr; míníonn Desc.

Roghnaigh ceann amháin

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><fieldset rst-choice><legend>Plan</legend><div rst-choice-cards><label><input type="radio" name="plan" value="free"><span><span rst-choice-title>Free</span><span rst-choice-desc>One project, community support.</span></span></label><label><input type="radio" name="plan" value="pro" checked><span><span rst-choice-title>Pro</span><span rst-choice-desc>Unlimited projects and a support inbox.</span></span></label></div></fieldset></form></section>

Roghnaigh cibé cinn

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><fieldset rst-choice><legend>Send me</legend><div rst-choice-cards><label><input type="checkbox" name="digest" value="replies" checked><span><span rst-choice-title>Replies</span><span rst-choice-desc>As they happen.</span></span></label><label><input type="checkbox" name="digest" value="weekly"><span><span rst-choice-title>Weekly digest</span><span rst-choice-desc>Monday mornings.</span></span></label></div></fieldset></form></section>

form-foot

Ró deiridh foirme: aon chnaipe seolta príomha agus nasc cealaithe roghnach. Is ancaire é Cealaigh, mar is nascleanúint é foirm a fhágáil.

Sábháil agus cealaigh

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-form-foot>
  <button rst-btn="primary" type="submit">Save post</button>
  <a rst-btn href="/posts">Back to posts</a>
</div></form></section>

Cnaipe seolta amháin

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-form-foot>
  <button rst-btn="primary" type="submit">Send invitation</button>
</div></form></section>

Díomhaoin — an cnaipe sula dtarlaíonn aon rud

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-form-foot>
  <button rst-btn="primary" type="submit">Publish</button>
  <a rst-btn href="/posts">Back to posts</a>
</div></form></section>

Faigheann cnaipe a ATHRAÍONN rud éigin staid luchtaithe; ní fhaigheann cnaipe nach nochtann ach rud éigin — nochtadh, anuas-roghchlár, cluaisín, mar shampla — a leithéid. Cuireann rastrillo.js an riail sin i bhfeidhm ar gach cnaipe seolta i ngach foirm, gan aon rud le rogha isteach ann.

Ag obair — an rud a scríobhann rastrillo.js agus an fhoirm ag imeacht

Réamhamharc
<section rst-box><form rst-form method="post" action="#"><div rst-form-foot>
<button rst-btn="primary" type="submit" aria-busy="true" data-idle-label="Publish" disabled><span rst-spin aria-hidden="true"></span>Publishing…</button>
<a rst-btn href="/posts">Back to posts</a>
</div></form></section>

An cnaipe ar cliceáladh air amháin: coinníonn gach cnaipe seolta eile san fhoirm a ainm agus a luach, agus tá an fhoirm féin cosanta ar dhara seoladh. Diúltaíonn data-busy="false" don riail, ar an bhfoirm nó ar chnaipe amháin; cuireann data-busy-label téacs eile ina áit. Gan scripteanna, ní tharlaíonn aon cheann díobh seo agus seoltar an fhoirm díreach mar a seoladh riamh, agus mar sin fanann an idempotence faoi chúram an fhreastalaí.

confirm-form

Ró gnímh an leathanaigh deimhnithe. Faigheann gníomhartha millteacha a mbealach féin seachas dialóg, mar sin níl aon rud le scriptiú.

Millteach

Réamhamharc
<section rst-box><form rst-form-actions method="post" action="/posts/1/delete"><input type="hidden" name="csrf" value="tok-123"><input type="hidden" name="id" value="1"><a rst-btn="ghost" href="/posts/1">Cealaigh</a><button type="submit" rst-btn="danger">Delete this post</button></form></section>

Gnáthchás, foclaíocht chealaithe réamhshocraithe

Réamhamharc
<section rst-box><form rst-form-actions method="post" action="/posts/1/publish"><a rst-btn="ghost" href="/posts/1">Cealaigh</a><button type="submit" rst-btn="primary">Publish</button></form></section>

Gan CancelLabel, mar sin cuirtear an nasc cealaithe i bhfocail ón gcatalóg.