PointRetrait : c'est OK pour la modification sur le premier onglet "Généralités"
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
.etroit {
|
||||
width: 80px !important;
|
||||
}
|
||||
|
||||
.large {
|
||||
width: 250px !important;
|
||||
}
|
||||
|
||||
.custom-map-control-button {
|
||||
appearance: button;
|
||||
background-color: #fff;
|
||||
border: 0;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3);
|
||||
cursor: pointer;
|
||||
margin: 10px;
|
||||
padding: 0 0.5em;
|
||||
height: 40px;
|
||||
font: 400 18px Roboto, Arial, sans-serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
.custom-map-control-button:hover {
|
||||
background: #ebebeb;
|
||||
}
|
||||
|
||||
.locationMap {
|
||||
height:600px;
|
||||
width:100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.city-remove {
|
||||
height: 30px !important;
|
||||
}
|
||||
|
||||
.pin {
|
||||
height: 25px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.legende {
|
||||
margin-top: 25px;
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -1,47 +1,3 @@
|
||||
<style>
|
||||
.etroit { width: 80px !important; }
|
||||
.large { width: 250px !important; }
|
||||
|
||||
.custom-map-control-button {
|
||||
appearance: button;
|
||||
background-color: #fff;
|
||||
border: 0;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3);
|
||||
cursor: pointer;
|
||||
margin: 10px;
|
||||
padding: 0 0.5em;
|
||||
height: 40px;
|
||||
font: 400 18px Roboto, Arial, sans-serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
.custom-map-control-button:hover {
|
||||
background: #ebebeb;
|
||||
}
|
||||
|
||||
.locationMap {
|
||||
height:600px;
|
||||
width:100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.city-remove {
|
||||
height: 30px !important;
|
||||
}
|
||||
|
||||
.pin {
|
||||
height: 25px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.legende {
|
||||
margin-top: 25px;
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
{form name='pdr-place-main-update'}
|
||||
<div class="form-container">
|
||||
|
||||
@@ -66,85 +22,171 @@
|
||||
<input type="hidden" name="{$name}" value="{$place_id}"/>
|
||||
{/form_field}
|
||||
|
||||
<div class="row form-inline">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{form_field form=$form field="title"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d='pointretrait'}
|
||||
</label>
|
||||
<input type="text" id="{$label_attr.for}" class="form-control large" name="{$name}" value="{$TITLE}" {if $required}required{/if} /> 
|
||||
</div>
|
||||
{form_error form=$form field="title"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
<div class="row">
|
||||
<div class="col-md-3 form-inline">
|
||||
{form_field form=$form field="title"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d='pointretrait'}
|
||||
</label>
|
||||
<input type="text" id="{$label_attr.for}" class="form-control large" name="{$name}" value="{$TITLE}" {if $required}required{/if} /> 
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{form_field form=$form field="active"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
</label>
|
||||
|
||||
<div class="make-switch switch-small toggle-active" data-id="{$ID}" data-on="success"
|
||||
data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>"
|
||||
data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="link" {if $ACTIVE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
<input type="hidden" id="{$label_attr.for}" name="{$name}" value="{$ACTIVE}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{form_field form=$form field="price"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="{$PRICE}" {if $required}required{/if} /> €
|
||||
</div>
|
||||
{form_error form=$form field="price"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{form_field form=$form field="minimum_amount"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="{$MINIMUM_AMOUNT}" {if $required}required{/if} /> €
|
||||
</div>
|
||||
{form_error form=$form field="minimum_amount"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{form_field form=$form field="latitude"}
|
||||
<input type="hidden" value="{$LATITUDE}" id="{$label_attr.for}" name="{$name}">
|
||||
{/form_field}
|
||||
{form_field form=$form field="longitude"}
|
||||
<input type="hidden" value="{$LONGITUDE}" id="{$label_attr.for}" name="{$name}">
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
{form_error form=$form field="title"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBb07YA_unrh5w821I1xHxbeYb5KCF_WaM&callback=initMap&libraries=&v=weekly" async></script>
|
||||
<div id="map" class="locationMap"></div>
|
||||
<div class="col-md-2">
|
||||
{form_field form=$form field="active"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
</label>
|
||||
|
||||
<div class="make-switch switch-small toggle-active" data-id="{$ID}" data-on="success"
|
||||
data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>"
|
||||
data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="link" {if $ACTIVE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
<input type="hidden" id="{$label_attr.for}" name="{$name}" value="{$ACTIVE}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{form_field form=$form field="price"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="{$PRICE}" {if $required}required{/if} /> €
|
||||
</div>
|
||||
{form_error form=$form field="price"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{form_field form=$form field="minimum_amount"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="{$MINIMUM_AMOUNT}" {if $required}required{/if} /> €
|
||||
</div>
|
||||
{form_error form=$form field="minimum_amount"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
{form_field form=$form field="latitude"}
|
||||
<input type="hidden" value="{$LATITUDE}" id="{$label_attr.for}" name="{$name}">
|
||||
{/form_field}
|
||||
{form_field form=$form field="longitude"}
|
||||
<input type="hidden" value="{$LONGITUDE}" id="{$label_attr.for}" name="{$name}">
|
||||
{/form_field}
|
||||
</div>
|
||||
<input type="hidden" value="{$LATITUDE}" id="origin-latitude" name="origin-latitude">
|
||||
<input type="hidden" value="{$LONGITUDE}" id="origin-longitude" name="origin-longitude">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
{form_field form=$form field="address1"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<div class="control-input">
|
||||
<input type="text" id="{$label_attr.for}" class="form-control" name="{$name}" value="{$ADDRESS1}" maxlength="100" {if $required}required{/if} />
|
||||
</div>
|
||||
</div>
|
||||
{form_error form=$form field="address1"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
{form_field form=$form field="address2"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<div class="control-input">
|
||||
<input type="text" id="{$label_attr.for}" class="form-control" name="{$name}" value="{$ADDRESS2}" maxlength="100" {if $required}required{/if} />
|
||||
</div>
|
||||
</div>
|
||||
{form_error form=$form field="address2"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
{form_field form=$form field="zipcode"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<div class="control-input">
|
||||
<input type="text" id="{$label_attr.for}" class="form-control" name="{$name}" value="{$ZIPCODE}" maxlength="10" {if $required}required{/if} />
|
||||
</div>
|
||||
</div>
|
||||
{form_error form=$form field="zipcode"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{form_field form=$form field="city"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<div class="control-input">
|
||||
<input type="text" id="{$label_attr.for}" class="form-control" name="{$name}" value="{$CITY}" maxlength="100" {if $required}required{/if} />
|
||||
</div>
|
||||
</div>
|
||||
{form_error form=$form field="city"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
{form_field form=$form field="access_comment"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<div class="control-input">
|
||||
<textarea id="{$label_attr.for}" name="{$name}" maxlength="400" class="form-control">{if $form_error}{$value}{/if}{$ACCESS_COMMENT}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{form_error form=$form field="access_comment"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBb07YA_unrh5w821I1xHxbeYb5KCF_WaM&callback=initMap&libraries=&v=weekly" async></script>
|
||||
<div id="map" class="locationMap"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script>
|
||||
|
||||
let map;
|
||||
let map, marker;
|
||||
|
||||
|
||||
function initMap() {
|
||||
var opt = {
|
||||
@@ -19,14 +20,21 @@
|
||||
};
|
||||
|
||||
displayPlace();
|
||||
|
||||
google.maps.event.addListener(marker, 'dragend', function(evt) {
|
||||
$("#latitude").val(evt.latLng.lat());
|
||||
$("#longitude").val(evt.latLng.lng());
|
||||
});
|
||||
}
|
||||
|
||||
function displayPlace() {
|
||||
var marker = new google.maps.Marker({
|
||||
marker = new google.maps.Marker({
|
||||
position: new google.maps.LatLng($("#latitude").val(), $("#longitude").val()),
|
||||
map: map,
|
||||
draggable: true,
|
||||
title: $(document.getElementById("title")).val()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@@ -30,10 +30,10 @@ mais{extends file="admin-layout.tpl"}
|
||||
<tr>
|
||||
<th>{intl l="Place" d='pointretrait'}</th>
|
||||
<th class="col-md-1">{intl l="Active" d='pointretrait'}</th>
|
||||
<th>{intl l="Address" d='pointretrait'}</th>
|
||||
<th>{intl l="Withdrawal days" d='pointretrait'}</th>
|
||||
<th>{intl l="Withdrawal price" d='pointretrait'}</th>
|
||||
<th>{intl l="Minimum amount" d='pointretrait'}</th>
|
||||
<th>{intl l="Withdrawal days" d='pointretrait'}</th>
|
||||
<th>{intl l="Location set" d='pointretrait'}</th>
|
||||
<th class="col-md-1"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -49,10 +49,10 @@ mais{extends file="admin-layout.tpl"}
|
||||
<input type="checkbox" class="link" {if $ACTIVE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>{$ADDRESS1}<br>{$ZIPCODE} {$CITY}</td>
|
||||
<td>{$DELIVERY_DAYS}{if $DELIVERY_DAYS eq ''}<i>{intl l="There is no schedule for this place" d='pointretrait'}</i>{/if}</td>
|
||||
<td>{$PRICE} €</td>
|
||||
<td>{$MINIMUM_AMOUNT} €</td>
|
||||
<td>{$DELIVERY_DAYS}{if $DELIVERY_DAYS eq ''}<i>{intl l="There is no schedule for this place" d='pointretrait'}</i>{/if}</td>
|
||||
<td>{if $LATITUDE != ''}Oui{else}Non{/if}</td>
|
||||
<td class="actions">
|
||||
<div class="btn-group" role="group">
|
||||
<a class="btn btn-info btn-responsive" title="{intl l='Edit this place'}" href="{url path='/admin/module/PointRetrait/edit' place_id=$ID}">
|
||||
|
||||
Reference in New Issue
Block a user