Files
grzanieplus.pl/plugins/appWishesPlugin/modules/appWishesBackend/templates/responsiveConfigSuccess.php
2025-03-12 17:06:23 +01:00

247 lines
10 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<style type="text/css">
.radio-img label {
display: inline-block;
cursor: pointer;
padding: 0 !important;
width: 100px !important;
height: 60px !important;
margin: 1px 10px 10px 1px;
border: 2px solid #ececec;
text-align: center !important;
}
.radio-img label.video{
display: inline-block;
cursor: pointer;
padding: 0 !important;
width: 194px !important;
height: 60px !important;
margin: 1px 10px 10px 1px;
border: 2px solid #ececec;
text-align: center !important;
}
.radio-img label img{
max-width: 100%;
max-height: 100%;
}
.radio-img input[type=radio]{
display: none;
}
.radio-img input[type=radio]:checked + label{
border-color: #e10000;
border-width: 3px;
margin: 0px 9px 9px 0px;
}
.delete_img{
position: absolute;
top: -4px;
right: 3px;
background: #fff;
border-radius: 50%;
}
</style>
<?php
use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date', 'VisualEffect', 'stAdminGenerator');
$culture = $config->getCulture();
$route ='appWishesBackend/responsiveConfig';
echo st_get_admin_head(array('@appWishesPlugin', __('Świateczne dodatki do sklepu'), '/images/backend/main/icons/red/appWishesPlugin.png'), __('Konfiguracja'), array(
'shortcuts' => array(),
'culture' => isset($culture) ? $culture : null, 'route' => isset($route) ? $route : null)); ?>
<?php st_view_slot_start('application-menu') ?>
<?php st_include_component('appWishesBackend', 'listMenu') ?>
<?php st_view_slot_end() ?>
<?php st_include_partial('stAdminGenerator/message', array('i18n_catalogue' => 'appWishesBackend')); ?>
<?php echo form_tag('appWishesBackend/responsiveConfig?culture='.$config->getCulture(), array(
'id' => 'sf_admin_edit_form',
'name' => 'sf_admin_edit_form',
'multipart' => true,
'class' => 'admin_form'
)) ?>
<fieldset>
<div class="content">
<div class="row">
<?php echo st_admin_get_form_field('wishes[wishes_responsive_on]', __('Włącz baner'), 1, 'checkbox_tag', array('checked' => $config->get('wishes_responsive_on'))) ?>
<br class="st_clear_all">
</div>
<div class="form-row">
<label><?php echo __('Życzenia') ?></label>
<div class="content">
<?php echo textarea_tag("wishes[wishes_responsive_description]", $config->get('wishes_responsive_description', null, true), array('size' => '90x20', 'rich' => true, 'tinymce_options' => "width: 600, height: 250"))?>
<br class="st_clear_all">
</div>
</div>
<div class="form-row">
<label><?php echo __('Obrazek') ?></label>
<div class="content radio-img">
<?php $i = 1; ?>
<?php foreach ($images_array as $image): ?>
<div style="float:left; position: relative;">
<input id="responsive_<?php echo $i ?>" <?php if($image['active']==1) { echo "checked"; }; ?> type="radio" name="wishes[image_radio]" value="<?php echo $image['name']; ?>" class="image_radio">
<label for="responsive_<?php echo $i ?>"><img src="/uploads/wishes_picture/<?php echo $image['name']; ?>" /></label>
<?php if($image['name']!="responsive1.png" && $image['name']!="responsive2.png" && $image['name']!="responsive3.png" && $image['name']!="responsive4.png" && $image['name']!="responsive5.png" && $image['name']!="responsive6.png" && $image['name']!="responsive7.png" && $image['name']!="responsive8.png" && $image['name']!="responsive9.png" && $image['name']!="responsive10.png" && $image['name']!="responsive11.png" && $image['name']!="responsive12.png" && $image['name']!="responsive13.png" && $image['name']!="responsive14.png" && $image['name']!="responsive15.png") : ?>
<a class="delete_img" href="/backend.php/appWishesBackend/delete?name=<?php echo $image['name']; ?>" onclick="if (confirm('<?php echo __('Jesteś pewien?') ?>')) { f = document.createElement('form'); document.body.appendChild(f); f.method = 'POST'; f.action = this.href; f.submit(); };return false;"><img src="/images/backend/icons/delete.gif" title="delete" alt="delete"></a>
<?php endif; ?>
</div>
<?php $i++; ?>
<?php endforeach; ?>
<br class="st_clear_all">
</div>
</div>
<div class="form-row">
<label><?php echo __('Video') ?></label>
<div class="content radio-img">
<?php $i = 1; ?>
<?php foreach ($video_array as $video): ?>
<div style="float:left; position: relative;">
<input id="responsive_video_<?php echo $i ?>" <?php if($video['active']==1) { echo "checked"; }; ?> type="radio" name="wishes[video_radio]" value="<?php echo $video['name']; ?>" class="video_radio">
<label for="responsive_video_<?php echo $i ?>" class="video">
<video loop="" muted="" style="width: 194px; height: 60px;">
<source src="/uploads/wishes_picture/<?php echo $video['name']; ?>" type="video/mp4">
</video>
</label>
<?php if($video['name']!="christmas-video1.mp4" && $video['name']!="christmas-video2.mp4" && $video['name']!="christmas-video3.mp4" && $video['name']!="christmas-video4.mp4" && $video['name']!="christmas-video5.mp4" && $video['name']!="christmas-video6.mp4"): ?>
<a class="delete_img" href="/backend.php/appWishesBackend/deleteVideo?name=<?php echo $video['name']; ?>" onclick="if (confirm('<?php echo __('Jesteś pewien?') ?>')) { f = document.createElement('form'); document.body.appendChild(f); f.method = 'POST'; f.action = this.href; f.submit(); };return false;"><img src="/images/backend/icons/delete.gif" title="delete" alt="delete"></a>
<?php endif; ?>
</div>
<?php $i++; ?>
<?php endforeach; ?>
<br class="st_clear_all">
</div>
</div>
<div class="form-row">
<label><?php echo __('Dodaj obrazek / video (mp4)') ?> <a href="#" class="help" title="<?php echo htmlspecialchars(__('Zalecany rozmiar zdjęcia 470 × 288 px Zalecany rozmiar video 1290 x 400 px', null, 'appWishesBackend')) ?>"></a></label>
<div class="content">
<input type="file" value="" id="wishes_image" name="wishes[image]">
<br class="st_clear_all">
</div>
</div>
<div class="row">
<?php echo st_admin_get_form_field('wishes[wishes_responsive_music_on]', __('Włącz kolęde'), 1, 'checkbox_tag', array('checked' => $config->get('wishes_responsive_music_on'))) ?>
<br class="st_clear_all">
</div>
<div class="row">
<label><?php echo __('Wybierz kolęde') ?>:</label>
<div class="field">
<select style="float: left;" id="wishes_wishes_responsive_song_number" name="wishes[wishes_responsive_song_number]">
<option <?php if($config->get('wishes_responsive_song_number')=="1") : ?> selected="selected" <?php endif; ?> value="1">Mizerna Cicha</option>
<option <?php if($config->get('wishes_responsive_song_number')=="3") : ?> selected="selected" <?php endif; ?> value="3">Jezus Malusieńki</option>
<option <?php if($config->get('wishes_responsive_song_number')=="6") : ?> selected="selected" <?php endif; ?> value="6">Oj Maluski, Maluski</option>
</select>
<div id="song_1" class="cloud" style="float:left; margin: 2px;">
<!-- Mizerna cicha -->
<iframe width="100%" height="20" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/178863854&amp;color=ff5500&amp;inverse=false&amp;auto_play=false&amp;show_user=true"></iframe>
</div>
<div id="song_3" class="cloud" style="float:left; margin: 2px;">
<!-- Jezus malusienki -->
<iframe width="100%" height="20" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/178863856&amp;color=ff5500&amp;inverse=false&amp;auto_play=false&amp;show_user=true"></iframe>
</div>
<div id="song_6" class="cloud" style="float:left; margin: 2px;">
<!-- Oj Maluski, Maluski -->
<iframe width="100%" height="20" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/178863855&amp;color=ff5500&amp;inverse=false&amp;auto_play=false&amp;show_user=true"></iframe>
</div>
<div class="clr"></div>
</div>
</div>
</div>
</fieldset>
<div id="wishes_save">
<?php echo st_get_admin_actions_head() ?>
<?php echo st_get_admin_action('save', __('Zapisz', null, 'stAdminGeneratorPlugin')) ?>
<?php echo st_get_admin_actions_foot() ?>
</div>
</form>
<?php echo st_get_admin_foot() ?>
<script type="text/javascript">
jQuery(function($) {
$('#wishes_save').stickyBox();
});
</script>
<script type="text/javascript">
jQuery(function($) {
$(document).ready(function() {
$(".image_radio").change(function () {
$(".video_radio").each(function(i) {
this.checked = false;
});
});
$(".video_radio").change(function () {
$(".image_radio").each(function(i) {
this.checked = false;
});
});
checkvisible();
$('#wishes_wishes_responsive_song_number').on("change", function() {
checkvisible();
});
});
function checkvisible() {
$('.cloud').hide();
$('#song_'+$("#wishes_wishes_responsive_song_number").val()).show();
}
});
</script>