1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-16 16:13:20 +01:00
invoiceninja/resources/views/proposals/templates/edit.blade.php

94 lines
2.5 KiB
PHP
Raw Normal View History

2018-01-31 12:51:18 +01:00
@extends('header')
@section('head')
@parent
2018-02-05 20:04:49 +01:00
@include('proposals.grapesjs_header')
2018-01-31 12:51:18 +01:00
@stop
@section('content')
2018-02-01 07:47:17 +01:00
{!! Former::open($url)
->method($method)
->id('mainForm')
->rules([
2018-02-04 17:42:13 +01:00
'name' => 'required',
2018-02-01 07:47:17 +01:00
]) !!}
2018-01-31 12:51:18 +01:00
2018-02-01 10:24:53 +01:00
@if ($template)
{!! Former::populate($template) !!}
@endif
<span style="display:none">
{!! Former::text('public_id') !!}
2018-02-04 20:34:38 +01:00
{!! Former::text('html') !!}
{!! Former::text('css') !!}
2018-02-01 10:24:53 +01:00
</span>
2018-01-31 12:51:18 +01:00
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-6">
2018-02-04 17:42:13 +01:00
{!! Former::text('name') !!}
2018-01-31 12:51:18 +01:00
2018-02-04 17:42:13 +01:00
<!--
2018-02-04 20:34:38 +01:00
{!! Former::select('proposal_template_id')->addOption('', '')
2018-01-31 12:51:18 +01:00
->label(trans('texts.template'))
->addGroupClass('template-select') !!}
2018-02-04 17:42:13 +01:00
-->
</div>
<div class="col-md-6">
{!! Former::textarea('private_notes') !!}
2018-01-31 12:51:18 +01:00
</div>
</div>
</div>
</div>
</div>
</div>
<center class="buttons">
{!! Button::normal(trans('texts.cancel'))
->appendIcon(Icon::create('remove-circle'))
->asLinkTo(HTMLUtils::previousUrl('/proposals')) !!}
{!! Button::success(trans("texts.save"))
->withAttributes(array('id' => 'saveButton', 'onclick' => 'onSaveClick()'))
->appendIcon(Icon::create('floppy-disk')) !!}
</center>
{!! Former::close() !!}
<div id="gjs"></div>
<script type="text/javascript">
var templates = {!! $templates !!};
var templateMap = {};
2018-02-04 17:42:13 +01:00
function onSaveClick() {
2018-02-04 20:34:38 +01:00
$('#html').val(grapesjsEditor.getHtml());
$('#css').val(grapesjsEditor.getCss());
2018-02-04 17:42:13 +01:00
$('#mainForm').submit();
}
2018-01-31 12:51:18 +01:00
$(function() {
2018-02-04 17:42:13 +01:00
/*
2018-01-31 12:51:18 +01:00
var $proposal_templateSelect = $('select#template_id');
for (var i = 0; i < templates.length; i++) {
var template = templates[i];
templateMap[template.public_id] = template;
$templateSelect.append(new Option(template.name, template.public_id));
}
@include('partials/entity_combobox', ['entityType' => ENTITY_PROPOSAL_TEMPLATE])
2018-02-04 17:42:13 +01:00
*/
2018-02-04 22:03:26 +01:00
})
2018-01-31 12:51:18 +01:00
</script>
2018-02-04 22:03:26 +01:00
@include('proposals.grapesjs', ['entity' => $template])
2018-01-31 12:51:18 +01:00
@stop