add MarkItUp editor for textareas with markup support
This commit is contained in:
parent
b11436b913
commit
7e7f9edff3
64 changed files with 1353 additions and 176 deletions
|
|
@ -89,3 +89,11 @@
|
|||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#description").markItUp(mySettings);
|
||||
$("#rules").markItUp(mySettings);
|
||||
$("#wonText").markItUp(mySettings);
|
||||
$("#lostText").markItUp(mySettings);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -39,23 +39,23 @@
|
|||
|
||||
<section>
|
||||
<h1><i class="fa fa-envelope fa-fw"></i><?=_('Description')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['description'])?></p>
|
||||
<p><?=$t->t($quest['description'])?></p>
|
||||
<?php if(!empty($quest['rules'])) : ?>
|
||||
<h1><i class="fa fa-exclamation-triangle fa-fw"></i><?=_('Rules')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['rules'])?></p>
|
||||
<p><?=$t->t($quest['rules'])?></p>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
|
||||
<?php if(!empty($quest['won_text'])) : ?>
|
||||
<section>
|
||||
<h1><i class="fa fa-thumbs-up fa-fw"></i><?=_('Won Quest')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['won_text'])?></p>
|
||||
<p><?=$t->t($quest['won_text'])?></p>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
<?php if(!empty($quest['lost_text'])) : ?>
|
||||
<section>
|
||||
<h1><i class="fa fa-thumbs-down fa-fw"></i><?=_('Lost Quest')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['lost_text'])?></p>
|
||||
<p><?=$t->t($quest['lost_text'])?></p>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,15 @@
|
|||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title><?=(isset($title)) ? $title : \nre\configs\AppConfig::$app['name']?></title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="robots" content="noindex,follow">
|
||||
<title><?=(isset($title)) ? $title : \nre\configs\AppConfig::$app['name']?></title>
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
|
||||
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="<?=$linker->link(array('markitup','skins','markitup','style.css'))?>" media="all" />
|
||||
<link rel="stylesheet" type="text/css" href="<?=$linker->link(array('markitup','sets','textile','style.css'))?>" media="all" />
|
||||
<link rel="stylesheet" type="text/css" href="<?=$linker->link(array('css','desktop.css'))?>" media="all" />
|
||||
<link rel="stylesheet" type="text/css" href="<?=$linker->link(array('css','ol.css'))?>" media="all" />
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
||||
|
|
@ -37,12 +42,9 @@
|
|||
<script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="<?=$linker->link(array('js','misc.js'))?>"></script>
|
||||
<script type="text/javascript" src="<?=$linker->link(array('js','notification.js'))?>"></script>
|
||||
<script type="text/javascript" src="<?=$linker->link(array('js','dnd.js'))?>"></script>
|
||||
<meta name="description" content="">
|
||||
<meta name="robots" content="noindex,follow">
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||
<script type="text/javascript" src="<?=$linker->link(array('markitup','jquery.markitup.js'))?>"></script>
|
||||
<script type="text/javascript" src="<?=$linker->link(array('markitup','sets','textile','set.js'))?>"></script>
|
||||
<script type="text/javascript" src="<?=$linker->link(array('js','scripts.js'))?>"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -13,15 +13,25 @@
|
|||
<ul class="admnql">
|
||||
<?php foreach($questgrouptexts as &$text) : ?>
|
||||
<li class="cf">
|
||||
<textarea name="questgrouptexts[<?=$text['id']?>]"><?=$text['text']?></textarea><br />
|
||||
<textarea id="questgrouptexts-<?=$text['id']?>" name="questgrouptexts[<?=$text['id']?>]"><?=$text['text']?></textarea><br />
|
||||
<input id="deletes[<?=$text['id']?>]" type="checkbox" name="deletes[<?=$text['id']?>]" />
|
||||
<label for="deletes[<?=$text['id']?>]"><?=_('delete')?></label>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#questgrouptexts-<?=$text['id']?>").markItUp(mySettings);
|
||||
});
|
||||
</script>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li class="cf">
|
||||
<textarea name="questgrouptexts[]" placeholder="<?=_('New Questgroup text')?>"></textarea>
|
||||
<textarea id="questgrouptexts-new" name="questgrouptexts[]" placeholder="<?=_('New Questgroup text')?>"></textarea>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#questgrouptexts-new").markItUp(mySettings);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<?php if(count($texts) > 0): ?>
|
||||
<div class="qtextbox">
|
||||
<?php foreach($texts as &$text) : ?>
|
||||
<p class="qtext"><?=\hhu\z\Utils::t($text['text'])?></p>
|
||||
<p class="qtext"><?=$t->t($text['text'])?></p>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php if(!is_null($questgroup['picture'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?=$moodpic?>
|
||||
|
|
@ -10,108 +10,115 @@
|
|||
<h1><?=_('Edit Quest')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'media':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture invalid');
|
||||
}
|
||||
break;
|
||||
case 'title':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Title contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Title already exists');
|
||||
break;
|
||||
default: echo _('Title invalid');
|
||||
}
|
||||
break;
|
||||
case 'xps':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('XPs not set'), $value);
|
||||
break;
|
||||
case 'regex': echo _('XPs contain illegal characters');
|
||||
break;
|
||||
default: echo _('XPs invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'media':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture invalid');
|
||||
}
|
||||
break;
|
||||
case 'title':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Title contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Title already exists');
|
||||
break;
|
||||
default: echo _('Title invalid');
|
||||
}
|
||||
break;
|
||||
case 'xps':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('XPs not set'), $value);
|
||||
break;
|
||||
case 'regex': echo _('XPs contain illegal characters');
|
||||
break;
|
||||
default: echo _('XPs invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<?php if(!is_null($media)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>"><img style="width:10em; display:block;" src="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>" /></a>
|
||||
<?php endif ?>
|
||||
<legend><?=_('Picture')?></legend>
|
||||
<input type="file" name="media" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<p><?=_('Allowed file types')?>:</p>
|
||||
<ul>
|
||||
<?php foreach($mimetypes as &$mimetype) : ?>
|
||||
<li><?=sprintf(_('%s-files'), strtoupper(explode('/',$mimetype['mimetype'])[1]))?> <?php if($mimetype['size'] > 0) : ?>(<?=_('max.')?> <?=round($mimetype['size']/(1024*1024),2)?> MiB)<?php endif ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input id="title" type="text" name="title" value="<?=$title?>" placeholder="<?=_('Title')?>" maxlength="<?=$validationSettings['title']['maxlength']?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="xps"><?=_('XPs')?>:</label>
|
||||
<input id="xps" type="number" name="xps" placeholder="<?=_('XPs')?>" title="<?=_('XPs')?>" pattern="<?=substr($validationSettings['xps']['regex'],1,strrpos($validationSettings['xps']['regex'],$validationSettings['xps']['regex'][0])-1)?>" value="<?=$xps?>" <?=(array_key_exists('xps', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="questtype"><?=('Questtype')?>:</label>
|
||||
<select id="questtype" name="questtype">
|
||||
<?php foreach($questtypes as &$questtype) : ?>
|
||||
<option value="<?=$questtype['url']?>" <?php if($questtype['selected']) : ?>selected="selected"<?php endif ?>>
|
||||
<?php switch($questtype['classname']) {
|
||||
case null: echo _('Questtype Empty');
|
||||
break;
|
||||
case 'bossfight': echo _('Questtype bossfight');
|
||||
break;
|
||||
case 'choiceinput': echo _('Questtype choiceinput');
|
||||
break;
|
||||
case 'crossword': echo _('Questtype crossword');
|
||||
break;
|
||||
case 'dragndrop': echo _('Questtype dragndrop');
|
||||
break;
|
||||
case 'multiplechoice': echo _('Questtype multiplechoice');
|
||||
break;
|
||||
case 'submit': echo _('Questtype submit');
|
||||
break;
|
||||
case 'textinput': echo _('Questtype textinput');
|
||||
break;
|
||||
} ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="entrytext"><?=('Entry text')?>:</label><br />
|
||||
<textarea name="entrytext" placeholder="<?=_('Entry text')?>" style="width:100%; height:10em;"><?=$entryText?></textarea><br />
|
||||
<label for="task"><?=_('Task')?>:</label><br />
|
||||
<textarea name="task" placeholder="<?=('Task')?>" style="width:100%; height:10em;"><?=$task?></textarea><br />
|
||||
<label for="wrongtext"><?=('Wrong text')?>:</label><br />
|
||||
<textarea name="wrongtext" placeholder="<?=_('Wrong text')?>" style="width:100%; height:10em;"><?=$wrongText?></textarea><br />
|
||||
</fieldset>
|
||||
<?php if(!is_null($quest['type']['classname'])) : ?>
|
||||
<input type="submit" name="edit-task" value="<?=_('edit task')?>" />
|
||||
<?php endif ?>
|
||||
<input type="submit" name="edit" value="<?=_('save')?>" />
|
||||
<fieldset>
|
||||
<?php if(!is_null($media)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>"><img style="width:10em; display:block;" src="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>" /></a>
|
||||
<?php endif ?>
|
||||
<legend><?=_('Picture')?></legend>
|
||||
<input type="file" name="media" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<p><?=_('Allowed file types')?>:</p>
|
||||
<ul>
|
||||
<?php foreach($mimetypes as &$mimetype) : ?>
|
||||
<li><?=sprintf(_('%s-files'), strtoupper(explode('/',$mimetype['mimetype'])[1]))?> <?php if($mimetype['size'] > 0) : ?>(<?=_('max.')?> <?=round($mimetype['size']/(1024*1024),2)?> MiB)<?php endif ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input id="title" type="text" name="title" value="<?=$title?>" placeholder="<?=_('Title')?>" maxlength="<?=$validationSettings['title']['maxlength']?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="xps"><?=_('XPs')?>:</label>
|
||||
<input id="xps" type="number" name="xps" placeholder="<?=_('XPs')?>" title="<?=_('XPs')?>" pattern="<?=substr($validationSettings['xps']['regex'],1,strrpos($validationSettings['xps']['regex'],$validationSettings['xps']['regex'][0])-1)?>" value="<?=$xps?>" <?=(array_key_exists('xps', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="questtype"><?=('Questtype')?>:</label>
|
||||
<select id="questtype" name="questtype">
|
||||
<?php foreach($questtypes as &$questtype) : ?>
|
||||
<option value="<?=$questtype['url']?>" <?php if($questtype['selected']) : ?>selected="selected"<?php endif ?>>
|
||||
<?php switch($questtype['classname']) {
|
||||
case null: echo _('Questtype Empty');
|
||||
break;
|
||||
case 'bossfight': echo _('Questtype bossfight');
|
||||
break;
|
||||
case 'choiceinput': echo _('Questtype choiceinput');
|
||||
break;
|
||||
case 'crossword': echo _('Questtype crossword');
|
||||
break;
|
||||
case 'dragndrop': echo _('Questtype dragndrop');
|
||||
break;
|
||||
case 'multiplechoice': echo _('Questtype multiplechoice');
|
||||
break;
|
||||
case 'submit': echo _('Questtype submit');
|
||||
break;
|
||||
case 'textinput': echo _('Questtype textinput');
|
||||
break;
|
||||
} ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="entrytext"><?=('Entry text')?>:</label><br />
|
||||
<textarea id="entrytext" name="entrytext" placeholder="<?=_('Entry text')?>"><?=$entryText?></textarea><br />
|
||||
<label for="task"><?=_('Task')?>:</label><br />
|
||||
<textarea id="task" name="task" placeholder="<?=('Task')?>"><?=$task?></textarea><br />
|
||||
<label for="wrongtext"><?=('Wrong text')?>:</label><br />
|
||||
<textarea id="wrongtext" name="wrongtext" placeholder="<?=_('Wrong text')?>"><?=$wrongText?></textarea><br />
|
||||
</fieldset>
|
||||
<?php if(!is_null($quest['type']['classname'])) : ?>
|
||||
<input type="submit" name="edit-task" value="<?=_('edit task')?>" />
|
||||
<?php endif ?>
|
||||
<input type="submit" name="edit" value="<?=_('save')?>" />
|
||||
</form>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#entrytext").markItUp(mySettings);
|
||||
$("#task").markItUp(mySettings);
|
||||
$("#wrongtext").markItUp(mySettings);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php if(!is_null($questgroup['picture'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?=$moodpic?>
|
||||
|
|
@ -9,58 +9,71 @@
|
|||
|
||||
<h1><?=_('Edit Quest texts')?></h1>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<?php foreach($questtexttypes as &$type) : ?>
|
||||
<fieldset>
|
||||
<legend><?=$type['type']?></legend>
|
||||
<?php if(array_key_exists($type['url'], $validations)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validations[$type['url']] as $textId => &$validation) : ?>
|
||||
<?php if($validation !== true) : ?>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'media':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<ul class="admnql">
|
||||
<?php foreach($type['texts'] as &$text) : ?>
|
||||
<li class="cf">
|
||||
<?php if(array_key_exists('media', $text)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$text['media']['url']))?>"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$text['media']['url']))?>" /></a><br />
|
||||
<?php endif ?>
|
||||
<input type="file" name="media[<?=$type['url']?>][<?=$text['id']?>]" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<textarea name="questtexts[<?=$type['url']?>][<?=$text['id']?>]"><?=$text['text']?></textarea><br />
|
||||
<input id="deletes[<?=$type['url']?>][<?=$text['id']?>]" type="checkbox" name="deletes[<?=$type['url']?>][<?=$text['id']?>]" />
|
||||
<label for="deletes[<?=$type['url']?>][<?=$text['id']?>]"><?=_('delete')?></label>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li class="cf">
|
||||
<input type="file" name="media[<?=$type['url']?>][new]" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<textarea name="questtexts[<?=$type['url']?>][new]" placeholder="<?=_('New Questgroup text')?>"></textarea>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<?php endforeach ?>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
<?php foreach($questtexttypes as &$type) : ?>
|
||||
<fieldset>
|
||||
<legend><?=$type['type']?></legend>
|
||||
<?php if(array_key_exists($type['url'], $validations) && $validations[$type['url']] !== true) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validations[$type['url']] as $textId => &$validation) : ?>
|
||||
<?php if($validation !== true) : ?>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'media':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<ul class="admnql">
|
||||
<?php foreach($type['texts'] as &$text) : ?>
|
||||
<li class="cf">
|
||||
<?php if(array_key_exists('media', $text)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$text['media']['url']))?>"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$text['media']['url']))?>" /></a><br />
|
||||
<?php else : ?>
|
||||
<i class="placeholder fa fa-picture-o fa-4x"></i><br />
|
||||
<?php endif ?>
|
||||
<input type="file" name="media[<?=$type['url']?>][<?=$text['id']?>]" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<textarea id="questtexts-<?=$type['url']?>-<?=$text['id']?>" name="questtexts[<?=$type['url']?>][<?=$text['id']?>]"><?=$text['text']?></textarea><br />
|
||||
<input id="deletes[<?=$type['url']?>][<?=$text['id']?>]" type="checkbox" name="deletes[<?=$type['url']?>][<?=$text['id']?>]" />
|
||||
<label for="deletes[<?=$type['url']?>][<?=$text['id']?>]"><?=_('delete text')?></label>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#questtexts-<?=$type['url']?>-<?=$text['id']?>").markItUp(mySettings);
|
||||
});
|
||||
</script>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li class="cf">
|
||||
<i class="placeholder fa fa-picture-o fa-4x"></i><br />
|
||||
<input type="file" name="media[<?=$type['url']?>][new]" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<textarea id="questtexts-<?=$type['url']?>-new" name="questtexts[<?=$type['url']?>][new]" placeholder="<?=_('New Questgroup text')?>"></textarea>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#questtexts-<?=$type['url']?>-new").markItUp(mySettings);
|
||||
});
|
||||
</script>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<?php endforeach ?>
|
||||
<input type="submit" name="edit" value="<?=_('save')?>" />
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<?php $mediaShown = true; ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>" /></a>
|
||||
<?php endif ?>
|
||||
<?=\hhu\z\Utils::t($questtext['text'])?>
|
||||
<?=$t->t($questtext['text'])?>
|
||||
</p>
|
||||
<?php if(count($questtext['relatedQuestsgroups']) > 0 || !empty($questtext['abort_text'])) : ?>
|
||||
<ul>
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
<?php elseif($queststatus == 'unsolved') : ?>
|
||||
<div class="error">
|
||||
<p class="fwb"><i class="fa fa-times-circle fa-fw"></i><?=_('unsolved')?></p>
|
||||
<p><small><?=\hhu\z\Utils::t($quest['wrong_text'])?></small></p>
|
||||
<p><small><?=$t->t($quest['wrong_text'])?></small></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
<?php if(array_key_exists('media', $questtext)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$questtext['media']['url']))?>"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questtext['media']['url']))?>" /></a>
|
||||
<?php endif ?>
|
||||
<?=\hhu\z\Utils::t($questtext['text'])?>
|
||||
<?=$t->t($questtext['text'])?>
|
||||
</p>
|
||||
<?php if(count($questtext['relatedQuestsgroups']) > 0 || !empty($questtext['abort_text'])) : ?>
|
||||
<ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue