Added Markdown editor and Javascript code refactoring
This commit is contained in:
@@ -7,34 +7,17 @@
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
|
||||
<div class="form-tabs">
|
||||
<ul class="form-tabs-nav">
|
||||
<li class="form-tab form-tab-selected">
|
||||
<i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
|
||||
</li>
|
||||
<li class="form-tab">
|
||||
<a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="write-area">
|
||||
<?= $this->form->textarea(
|
||||
'description',
|
||||
$values,
|
||||
$errors,
|
||||
array(
|
||||
'autofocus',
|
||||
'placeholder="'.t('Leave a description').'"',
|
||||
'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"'
|
||||
),
|
||||
'task-show-description-textarea'
|
||||
) ?>
|
||||
</div>
|
||||
<div class="preview-area">
|
||||
<div class="markdown"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
|
||||
<?= $this->form->textarea(
|
||||
'description',
|
||||
$values,
|
||||
$errors,
|
||||
array(
|
||||
'autofocus',
|
||||
'placeholder="'.t('Leave a description').'"',
|
||||
'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"'
|
||||
),
|
||||
'markdown-editor'
|
||||
) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
|
||||
|
||||
Reference in New Issue
Block a user