Modal Base: Info Societe

See "img upload" in sidebar snet/molecules for variants, or go to info panel and look for it in "references" (@snet-img-upload)

Refer to modal frame found in view tab for complete structure without content.

A modal's default size is 640px

Modifier classes for modals

  • modal-sm: 480px
  • modal-md: 720px (mainly used for modals containing images)
  • modal-lg: 896px
  • modal-xl: 1120px

Content loading

A modal with a content loading component behaves as follows:

  • It has a second body element with the -isLoading class that is hidden by default, and shown only when ...
  • ... the -contentLoading modifier is applied to the modal element ...
  • ... which in turn hides the regular modal body element which into which the content is injected
<div class="sds-modal modal fade -bodySecondary06" id="" aria-hidden="true" tabindex="-1">
    <div class="sds-modal__dialog modal-dialog modal-lg modal-dialog-centered">
        <div class="sds-modal__content modal-content">

            <div class="sds-modal__header modal-header">

                <h5 class="sds-modal__title modal-title">Données société</h5>

                <button type="button" class="sds-iconBtn -iconBtnBase -iconBtnSecondary -ghost sds-modal__close" data-dismiss="modal" aria-label="Close">

                    <span class="sds-icon sds-icon-close"></span>

                </button>

            </div>

            <div class="sds-modal__body modal-body">

                <div class="sds-box -insetLg">
                    <form class="row row-md align-items-center">
                        <div class="col-auto">
                            <div class="sds-imgUpload">
                                <div class="sds-imgUpload__content">

                                    <input type="file" id="imgUpload" class="sr-only">

                                    <div class="sds-imgUpload__iconWrapper">
                                        <span class="sds-iconCircle -secondary10 sds-imgUpload__icon" aria-hidden="true">

                                            <span class="sds-icon sds-icon-photo"></span>

                                        </span>

                                        <div class="sds-imgUpload__progress">
                                            <div class="sds-circularProgress">
                                                <svg viewBox="0 0 36 36" class="">

                                                    <path class="sds-circularProgress__shape" stroke-dasharray="50, 100" d="M18 2.0845
						  a 15.9155 15.9155 0 0 1 0 31.831
						  a 15.9155 15.9155 0 0 1 0 -31.831" />
                                                </svg>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="sds-stackXxs">
                                        <div class="sds-imgUpload__title h3">

                                            <label for="imgUpload" class="sds-imgUpload__label stretched-link">Ajouter logo</label>

                                        </div>
                                        <div class="sds-imgUpload__meta sds-textHelper">(max 2MB)</div>
                                    </div>
                                </div>

                                <button type="button" class="sds-iconBtn -iconBtnBase -iconBtnPrimary sds-imgUpload__reset">

                                    <span class="sds-icon sds-icon-trash"></span>

                                    <div class="sr-only">Delete uploaded image</div>

                                </button>

                            </div>
                        </div>
                        <div class="col sds-stackLg">
                            <div class="form-group">
                                <label for="" class="sds-label -form">
                                    Nom de la société

                                </label>
                                <div class="sds-input">
                                    <input id="" class="sds-input form-control" type="text" placeholder="Nom de la société" value="Epicerie luxembourgeoise SARL" disabled>

                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="sds-label -form">
                                    Nom affichage

                                </label>
                                <div class="sds-input">
                                    <input id="" class="sds-input form-control" type="text" placeholder="Nom affichage" value="Epicerie du coin">

                                </div>
                            </div>
                        </div>
                    </form>
                </div>

            </div>

            <div class="sds-modal__footer modal-footer">

                <div class="sds-btnGroup">
                    <button type="button" class="sds-btn -btnCta -btnCtaSecondary -btnBig">

                        <span class="sds-btn__text">Annuler</span>

                    </button>
                    <button type="button" class="sds-btn -btnCta -btnCtaPrimary -btnBig">

                        <span class="sds-btn__text">Sauvegarder</span>

                    </button>
                </div>

            </div>

        </div>
    </div>
</div>
{% extends "@snet-modal-base-frame" %}
{% block header %}
	<h5 class="{{ namespace }}modal__title modal-title">{{ title }}</h5>
{% endblock %}
{% block body %}
	<div class="{{ namespace }}box -insetLg">
		<form class="row row-md align-items-center">
			<div class="col-auto">
				{% render "@snet-img-upload" %}
			</div>
			<div class="col {{ namespace }}stackLg">
				{% render "@form-group",{
					disabledState: true,
					labelText: "Nom de la société",
					placeholder: "Nom de la société",
					value: "Epicerie luxembourgeoise SARL"
				},true %}
				{% render "@form-group",{
					labelText: "Nom affichage",
					placeholder: "Nom affichage",
					value: "Epicerie du coin"
				},true %}
			</div>
		</form>
	</div>
{% endblock %}
{% block footer %}
	<div class="{{ namespace }}btnGroup">
		{% render "@btn-cta-secondary--big",{
			text: "Annuler",
			attrs: imgTextBtnModalAttrs
		},true %}
		{% render "@btn-cta-primary--big",{
			text: "Sauvegarder",
			attrs: imgTextBtnModalAttrs
		},true %}
	</div>
{% endblock %}