mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 16:09:31 +03:00
factor out ;form; code
This commit is contained in:
parent
3a588a175e
commit
3236d1ef35
@ -2,6 +2,58 @@
|
||||
::
|
||||
/- *collections
|
||||
/+ time-to-id
|
||||
|%
|
||||
++ form-archive
|
||||
;form(onsubmit "return easy_form.submit(this)")
|
||||
;input(type "hidden", name "easy_form:mark", value "collections-action");
|
||||
;input(type "hidden", name "easy_form:tag", value "delete-topic");
|
||||
;input(type "hidden", name "easy_form:url_end", value "collections/:col/:top");
|
||||
;input(type "hidden", name "easy_form:confirm");
|
||||
::
|
||||
;input.red(type "submit", value "Archive this topic");
|
||||
==
|
||||
++ form-comment-edit
|
||||
|= [com=@da txt=tape]
|
||||
;form.edit-on(onsubmit "return easy_form.submit(this)")
|
||||
;input(type "hidden", name "easy_form:mark", value "collections-action");
|
||||
;input(type "hidden", name "easy_form:tag", value "comment");
|
||||
;input(type "hidden", name "easy_form:url_end", value "collections/:col/:top");
|
||||
::
|
||||
;input(type "hidden", name "com", value <com>);
|
||||
::
|
||||
;br;
|
||||
;textarea(name "wat"): {txt}
|
||||
;br;
|
||||
;input(type "submit");
|
||||
==
|
||||
++ form-comment-x
|
||||
|= com=@da
|
||||
;form.inline(onsubmit "return easy_form.submit(this)")
|
||||
;input(type "hidden", name "easy_form:mark", value "collections-action");
|
||||
;input(type "hidden", name "easy_form:tag", value "delete-comment");
|
||||
;input(type "hidden", name "easy_form:url_end", value "collections/:col/:top");
|
||||
;input(type "hidden", name "easy_form:confirm");
|
||||
::
|
||||
;input(type "hidden", name "com", value <com>);
|
||||
;input.red(type "submit", value "X");
|
||||
==
|
||||
++ form-comment-post
|
||||
;form(onsubmit "return easy_form.submit(this)")
|
||||
;input(type "hidden", name "easy_form:mark", value "collections-action");
|
||||
;input(type "hidden", name "easy_form:tag", value "comment");
|
||||
;input(type "hidden", name "easy_form:url_end", value "collections/:col/:top");
|
||||
::
|
||||
;input(type "hidden", name "com", value "~");
|
||||
::
|
||||
;br;
|
||||
;textarea(name "wat", placeholder "Enter comment");
|
||||
;br;
|
||||
;input(type "submit");
|
||||
==
|
||||
--
|
||||
::
|
||||
::::
|
||||
::
|
||||
|_ top=topicful
|
||||
::
|
||||
::
|
||||
@ -15,14 +67,8 @@
|
||||
::
|
||||
;hr;
|
||||
::
|
||||
;form(onsubmit "return easy_form.submit(this)")
|
||||
;input(type "hidden", name "easy_form:mark", value "collections-action");
|
||||
;input(type "hidden", name "easy_form:tag", value "delete-topic");
|
||||
;input(type "hidden", name "easy_form:url_end", value "collections/:col/:top");
|
||||
;input(type "hidden", name "easy_form:confirm");
|
||||
::
|
||||
;input.red(type "submit", value "Archive this topic");
|
||||
==
|
||||
;script@"/lib/js/easy-form.js";
|
||||
;+ form-archive
|
||||
::
|
||||
;hr;
|
||||
::
|
||||
@ -36,45 +82,14 @@
|
||||
;input.edit-toggle(type "checkbox", id "edit-{id}");
|
||||
;label(for "edit-{id}"): ✎
|
||||
;pre.edit-off: {txt}
|
||||
;form.edit-on(onsubmit "return easy_form.submit(this)")
|
||||
;input(type "hidden", name "easy_form:mark", value "collections-action");
|
||||
;input(type "hidden", name "easy_form:tag", value "comment");
|
||||
;input(type "hidden", name "easy_form:url_end", value "collections/:col/:top");
|
||||
::
|
||||
;input(type "hidden", name "com", value <wen>);
|
||||
::
|
||||
;br;
|
||||
;textarea(name "wat"): {txt}
|
||||
;br;
|
||||
;input(type "submit");
|
||||
==
|
||||
;div.edit-on: +{(form-comment-edit wen txt)}
|
||||
; ;{b -<who.com>}, at ;{a/"#{id}" -<wen>}
|
||||
::
|
||||
;form.inline(onsubmit "return easy_form.submit(this)")
|
||||
;input(type "hidden", name "easy_form:mark", value "collections-action");
|
||||
;input(type "hidden", name "easy_form:tag", value "delete-comment");
|
||||
;input(type "hidden", name "easy_form:url_end", value "collections/:col/:top");
|
||||
;input(type "hidden", name "easy_form:confirm");
|
||||
::
|
||||
;input(type "hidden", name "com", value <wen>);
|
||||
;input.red(type "submit", value "X");
|
||||
==
|
||||
;+ (form-comment-x wen)
|
||||
;hr;
|
||||
==
|
||||
;h2: Post comment:
|
||||
;script@"/lib/js/easy-form.js";
|
||||
;form(onsubmit "return easy_form.submit(this)")
|
||||
;input(type "hidden", name "easy_form:mark", value "collections-action");
|
||||
;input(type "hidden", name "easy_form:tag", value "comment");
|
||||
;input(type "hidden", name "easy_form:url_end", value "collections/:col/:top");
|
||||
::
|
||||
;input(type "hidden", name "com", value "~");
|
||||
::
|
||||
;br;
|
||||
;textarea(name "wat", placeholder "Enter comment");
|
||||
;br;
|
||||
;input(type "submit");
|
||||
==
|
||||
;+ form-comment-post
|
||||
==
|
||||
--
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user