89 lines
4.5 KiB
Smarty
Executable File
89 lines
4.5 KiB
Smarty
Executable File
{**
|
|
* Copyright since 2007 PrestaShop SA and Contributors
|
|
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
|
* that is bundled with this package in the file LICENSE.md.
|
|
* It is also available through the world-wide-web at this URL:
|
|
* https://opensource.org/licenses/AFL-3.0
|
|
* If you did not receive a copy of the license and are unable to
|
|
* obtain it through the world-wide-web, please send an email
|
|
* to license@prestashop.com so we can send you a copy immediately.
|
|
*
|
|
* @author PrestaShop SA <contact@prestashop.com>
|
|
* @copyright Since 2007 PrestaShop SA and Contributors
|
|
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
|
*}
|
|
{extends file='customer/page.tpl'}
|
|
|
|
{block name='page_title'}
|
|
{l s='thob - Manual Body Measurements' mod='thobbodymeasurements'}
|
|
{/block}
|
|
|
|
{block name='page_content'}
|
|
<div class="bg-white-400 shadow-md">
|
|
<section class=" h-34 p-10 flex flex-col">
|
|
{if isset($selectedForm)}
|
|
<h2 class="text-lg font-bold">{l s='Form:' mod='thobbodymeasurements'} {$selectedForm.label_form}</h2>
|
|
<form action="#" method="post" class="flex flex-col items-center justify-center ">
|
|
{foreach from=$selectedForm.attributes item=attribute}
|
|
<section class="flex flex-row p-4">
|
|
<div class=" flex flex-row gap-4">
|
|
<div class="w-24 lg:pr-4 text-end mt-2">
|
|
<label for="{$attribute.id}" class="text-base font-semibold mt-1 ">{$attribute.name}:</label>
|
|
</div>
|
|
<div class="lg:w-[500px]">
|
|
<input
|
|
type="text"
|
|
id="{$attribute.id}"
|
|
name="{$attribute.id}"
|
|
class=" lg:w-[450px] p-2"
|
|
pattern="[0-9]+"
|
|
title="Please enter a positive number"
|
|
required
|
|
{if isset($customerMeasurements) && isset($customerMeasurements[$attribute.id])}
|
|
value="{$customerMeasurements[$attribute.id]}"
|
|
{else}
|
|
placeholder="Enter measurement"
|
|
{/if}
|
|
/>
|
|
</div>
|
|
<div class="mt-1 w-24 mt-2 text-start ">
|
|
{$attribute.unit}
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="selected_form_id" id="selected_form_id" class="form-control" value="{$selectedForm.id_form}">
|
|
<input type="hidden" name="selected_form_label" id="selected_form_label" class="form-control" value="{$selectedForm.label_form}">
|
|
</section>
|
|
{/foreach}
|
|
|
|
<div class="lg:pr-11">
|
|
<button name="measurements_submit_form" type="submit" class=" hover:text-white hover:no-underline px-6 py-2 bg-blue-950 disabled:bg-gray-700 text-white text-base font-light">{l s='Save Measurements' mod='thobbodymeasurements'}</button>
|
|
</div>
|
|
</form>
|
|
{else}
|
|
<form action="#" method="post" class="form-horizontal mx-auto">
|
|
<div class="flex lg:flex-row flex-col gap-4 justify-center">
|
|
<label for="form_select" class="form-control-label col-md-3 font-medium text-lg mt-1 ">{l s='Select a Form:' mod='thobbodymeasurements'}</label>
|
|
<div class="">
|
|
<select name="form_select" id="form_select" class="form-control p-2 form-control-select w-[220px] h-[40px] rounded">
|
|
{foreach from=$currentForms item=form}
|
|
<option value="{$form.id_form}">{$form.label_form}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="lg:pl-32 p-4">
|
|
<div class=" hover:text-white hover:no-underline px-6 py-2 bg-blue-950 disabled:bg-gray-700 text-white text-base font-light w-32">
|
|
<button type="submit" class="">{l s='Select Form' mod='thobbodymeasurements'}</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{/if}
|
|
</section>
|
|
</div>
|
|
{/block}
|