{% include "@Components/button/button.twig" with {props: {
title: "Přidat novou adresu",
data: {
"modal-target": "add-address-modal"
},
icon: {
src: "@Images/svg/user.svg"
}
}
} %}
{% embed "@Components/modal/modal.twig" with {props: {
id: "add-address-modal",
size: "lg",
header: {
title: "Nová adresa"|trans
},
}} %}
{% block content %}
{% include "@Components/forms/address-form/address-form.twig" with {props: {
vars: {
action: "",
method: "POST",
multipart: false,
id: "address-form-add",
full_name: "address-form-add"
},
fields: {
address_name: {
vars: {
label: "Mé pojmenování adresy",
full_name: "address-name",
required: true
},
},
address_type: {
vars: {
name: "address-type",
label: "Typ adresy:",
options: [
{
title: "Družstvo",
value: "fellowship",
},
{
title: "Hodnota 2",
value: "value-2",
},
{
title: "Hodnota 3",
value: "value-3",
}
]
}
},
company: {
vars: {
label: "Firma",
full_name: "company",
required: true
},
},
street: {
vars: {
label: "Ulice",
full_name: "street",
required: true
},
},
zip_code: {
vars: {
label: "PSČ",
full_name: "zip_code",
required: true
},
},
city: {
vars: {
label: "Město",
full_name: "city",
required: true
},
},
state: {
vars: {
label: "Země",
full_name: "state",
required: true
},
},
contact_person: {
vars: {
label: "Kontaktní osoba",
full_name: "contact_person",
required: true
},
},
tel: {
vars: {
label: "Telefon",
full_name: "tel",
type: "tel",
required: true
},
},
email: {
vars: {
label: "Email",
full_name: "email",
type: "email",
required: true
},
},
note: {
vars: {
label: "Poznámka",
name: "note"
},
},
},
submit: {
vars: {
label: "Uložit adresu",
full_name: "address-submit"
}
},
_token: {
vars: {
value: "",
full_name: "address[_token]",
id: "address[_token]"
}
}
}} %}
{% endblock %}
{% endembed %}
<a class="btn u-posr u-cursor-pointer d-inline-flex gap-1 align-items-center justify-content-center flex-nowrap flex-shrink-0 --primary" href='#' data-modal-target="add-address-modal">
<span class="btn__title u-z-index-1">
Přidat novou adresu
</span>
<span class="btn__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#23846F" d="M19.5 22h-1.667v-4.202a2.467 2.467 0 0 0-2.464-2.465H8.631a2.467 2.467 0 0 0-2.464 2.465V22H4.5v-4.202a4.136 4.136 0 0 1 4.13-4.131h6.74a4.136 4.136 0 0 1 4.13 4.13V22ZM12 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10Zm0-8.333a3.333 3.333 0 1 0 0 6.666 3.333 3.333 0 0 0 0-6.666Z"/></svg> </span>
</span>
</a>
<div class="c-modal --size-lg --hidden" id="add-address-modal">
<div class="c-modal__dialog">
<div class="c-modal__content u-rounded-4">
<div class="c-modal__inner d-flex flex-column">
<header class="c-modal__header d-flex flex-column gap-1">
<h2 class="u-h3 c-modal__heading">Nová adresa</h2>
</header>
<div class="c-modal__body ">
<form class="base-form --validate f-address-add" id="address-form-add" action="" method="POST">
<div class="row">
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
Mé pojmenování adresy
</label>
<input class="f-base f-text__input" type="text" name=address-name required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-single-select d-flex flex-column gap-1 u-posr --native">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --active">
Typ adresy:
</label>
<div class="f-single-select__wrap">
<select class="f-single-select__select slim-select" name=address-type>
<option class="" value="fellowship"></option>
<option class="" value="value-2"></option>
<option class="" value="value-3"></option>
</select>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
Firma
</label>
<input class="f-base f-text__input" type="text" name=company required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
Ulice
</label>
<input class="f-base f-text__input" type="text" name=street required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
PSČ
</label>
<input class="f-base f-text__input" type="text" name=zip_code required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
Město
</label>
<input class="f-base f-text__input" type="text" name=city required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
Země
</label>
<input class="f-base f-text__input" type="text" name=state required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
Kontaktní osoba
</label>
<input class="f-base f-text__input" type="text" name=contact_person required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
Telefon
</label>
<input class="f-base f-text__input" type="tel" name=tel required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 mb-3">
<div class="f-text d-flex flex-column gap-1 u-posr">
<div class="f-text__wrap d-flex align-items-center u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md --required">
Email
</label>
<input class="f-base f-text__input" type="email" name=email required>
<span class="icon d-flex align-items-center justify-content-center --colored --danger f-text__invalid-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M8.026 15A7.034 7.034 0 0 1 1 7.974c.33-9.3 13.724-9.297 14.053 0A7.034 7.034 0 0 1 8.026 15Zm0-12.296c-6.964.221-6.963 10.319 0 10.54 6.964-.222 6.964-10.32 0-10.54Zm.879 1.756H7.148v4.392h1.757V4.46Zm0 5.27H7.148v1.757h1.757V9.73Z"/></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-12 mb-5">
<div class="f-textarea d-flex flex-column gap-1 u-posr">
<label class="f-label d-flex align-items-center mb-0 u-fz-md">
Poznámka
</label>
<div class="f-textarea__wrap d-flex align-items-center u-posr">
<textarea class="f-base f-textarea__input" name=note></textarea>
<span class="f-textarea__resize">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><g clip-path="url(#clip0_3554_63363)"><path fill="#15324F" fill-rule="evenodd" d="M1 13 13 1l-.707-.707-12 12L1 13Zm8 3 7-7-.707-.707-7 7L9 16Z" clip-rule="evenodd"/></g><defs><clipPath id="clip0_3554_63363"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg> </span>
</div>
<span class="f-error u-fz-sm gap-1 d-none">
<span class="f-error__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --colored --danger --sm">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24v112c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm-32 224a32 32 0 1 1 64 0 32 32 0 1 1-64 0z"/></svg> </span>
</span>
<span class="f-error__title"></span>
</span>
</div>
</div>
<div class="col-sm-6 offset-sm-6">
<button class="btn u-posr u-cursor-pointer d-inline-flex gap-1 align-items-center justify-content-center flex-nowrap flex-shrink-0 --primary address-submit --full-width w-100" type="submit" aria-label="Uložit adresu" name=address-submit>
<span class="btn__title u-z-index-1">
Uložit adresu
</span>
<span class="btn__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M16 2.362v11.614A2.026 2.026 0 0 1 13.976 16H2.024A2.026 2.026 0 0 1 0 13.976V2.024C0 .908.908 0 2.024 0h11.614L16 2.362ZM9.593 4.817H11V1.61H5v3.207h2.984v-2.29h1.609v2.29ZM2.024 14.39h11.952a.415.415 0 0 0 .414-.414V3.029L12.971 1.61h-.362v4.817H3.39V1.61H2.024a.415.415 0 0 0-.414.414v11.952c0 .228.186.414.414.414Zm8.268-1.78H3.44V11h6.852v1.61ZM8.119 10H3.44V8.39h4.679V10Z" clip-rule="evenodd"/></svg> </span>
</span>
</button>
</div>
</div>
</form>
</div>
<div class="c-modal__button-container">
<button class="btn u-posr u-cursor-pointer d-inline-flex gap-1 align-items-center justify-content-center flex-nowrap flex-shrink-0 --transparent --sm --icon-only c-modal__close c-modal__close-cross" aria-label="close modal">
<span class="btn__icon d-flex align-items-center justify-content-center">
<span class="icon d-flex align-items-center justify-content-center --lg">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#15324F" fill-rule="evenodd" d="M10.869 12 5.435 6.565l1.13-1.13L12 10.867l5.435-5.434 1.13 1.131L13.133 12l5.434 5.434-1.131 1.131L12 13.131l-5.434 5.434-1.131-1.13L10.869 12Z" clip-rule="evenodd"/></svg> </span>
</span>
</button>
</div>
</div>
</div>
</div>
</div>