break view form into multiple parts

This commit is contained in:
realaravinth
2021-12-18 20:53:10 +05:30
parent 708a157ee1
commit 7b0fe7c4b2
6 changed files with 71 additions and 68 deletions

View File

@@ -1,8 +1,27 @@
<. const URL: &str = crate::V1_API_ROUTES.captcha.create; .>
<. const READONLY: bool = true; .>
<. include!("./__form-top.html"); .>
<. let edit_url = crate::PAGES.panel.sitekey.get_edit_easy(&key) ;.>
<. include!("./__form-container-setup.html"); .>
<h1 class="form__title">Sitekey: <.= name .>
<a
target="_blank"
href="<.= crate::WIDGET_ROUTES.verification_widget .>/?sitekey=<.= &key.>"
>View deployment
<img class="sitekey-form__widget-link"
src="<.= crate::FILES.get("./static/cache/img/svg/external-link.svg").unwrap() .>"
alt="View widget deployment"
/>
</a>
<. if READONLY { .>
<. let edit_url = crate::PAGES.panel.sitekey.get_edit_easy(&key) ;.>
<. include!("./__edit-sitekey-icon.html"); .>
<. } .>
<. include!("./__delete-btn.html"); .>
<. include!("./__form-body.html"); .>
<. for (count, level) in levels.iter().enumerate() { .>
<. include!("./existing-level.html"); .>
<. include!("./existing-level.html"); .>
<. } .>
<./* synchronise with "./__form-bottom.html" Lines below should break form */.>
</form>