Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/language_files_edit.tpl.php
Строк: 91
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <script type="text/javascript">
    $(document).ready(function() {
        $("input[name='submit-add']").click(function() {
            var key        = $("input[name='key']").val();
            var value    = $("input[name='value']").val();
            
            if (key == '' || value == '') {
                alert('Translation key and/or value not entered!');
                return;
            }
            
            var tCODE = '<div class="required">';
            var tCODE = tCODE + '<label for="trans_' + key + '">' + key + '</label>';
            var tCODE = tCODE + '<input name="' + key + '" type="text" id="trans_' + key + '" class="extra" value="' + value + '" />';
            var tCODE = tCODE + '</div>';
            
            var tDIV  = document.createElement('div');
            $(tDIV).html(tCODE);
            $("#translation-post").after(tDIV);
            $(".none").hide();
            
            $("input[name='key']").val('');
            $("input[name='value']").val('');
        });
    });
    </script>
    <div id="container" class="clearfix">
        <div id="page">
            <?php echo $this->fetch('main_menu'); ?>
            <div class="content clearfix">
                <?php echo $this->fetch('language_files_menu'); ?>
                <?php if ($this->file): ?>
                <form id="language-file-edit-form" method="post" action="<?php echo ADMIN_URL?>/index.php?q=language/files/edit&amp;id=<?php echo $this->file['file_id']; ?>">
                    <fieldset>
                        <legend>Add Translation</legend>
                        <div class="required">
                            <input name="key" type="text" class="medium" />
                            <input name="value" type="text" class="extra" />
                            <input name="submit-add" type="button" id="submit-add" class="button butDef" value=" Add " />
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Language File Translation</legend>
                        <div id="translation-post" style="display: none;"></div>
                        <?php if ($this->file['file']): foreach ($this->file['file'] as $key => $value): ?>
                        <div class="required">
                            <label for="trans_<?php echo $key,'">',$key?></label>
                            <input name="<?php echo $key?>" type="text" id="trans_<?php echo $key?>" class="extra" value="<?php echo e($value); ?>" />
                        </div>
                        <?php endforeach; else: ?>
                        <div class="none">This language file contains no translations!</div>
                        <?php endif; ?>
                    </fieldset>
                    <div class="submit">
                        <input name="submit-edit" type="submit" id="submit-edit" class="button butDef" value=" Update " />
                    </div>
                </form>
                <?php else: ?>
                <div class="none">Invalid language file! Are you sure this language file exists!?</div>
                <?php endif; ?>
            </div>
        </div>
    </div>
Онлайн: 1
Реклама