Create organisation functionality
This commit is contained in:
58
templates/forms/organisation.html.twig
Normal file
58
templates/forms/organisation.html.twig
Normal file
@@ -0,0 +1,58 @@
|
||||
<form class="js-form" method="{{form.method | default('POST')}}" action="{{site.uri.public}}/{{form.action}}">
|
||||
{% include "forms/csrf.html.twig" %}
|
||||
<div class="js-form-alerts">
|
||||
</div>
|
||||
<div class="row">
|
||||
{% block organisation_form %}
|
||||
{% if 'name' not in form.fields.hidden %}
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label>{{translate("ORGANISATION.NAME")}}</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fas fa-edit fa-fw"></i></span>
|
||||
<input type="text" class="form-control" name="name" autocomplete="off" value="{{organisation.name}}" placeholder="{{translate("ORGANISATION.NAME.EXPLAIN")}}" {% if 'name' in form.fields.disabled %}disabled{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if 'slug' not in form.fields.hidden %}
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label>{{translate("SLUG")}}</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fas fa-tag fa-fw"></i></span>
|
||||
<input type="text" class="form-control" name="slug" autocomplete="off" value="{{organisation.slug}}" placeholder="{{translate("SLUG")}}" {% if 'slug' in form.fields.disabled %}disabled{% endif %} readonly>
|
||||
{% if 'slug' not in form.fields.disabled %}
|
||||
<span class="input-group-btn" data-toggle="buttons">
|
||||
<label class="btn btn-primary">
|
||||
<input type="checkbox" id="form-organisation-slug-override" autocomplete="off"> {{translate("OVERRIDE")}}
|
||||
</label>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if 'description' not in form.fields.hidden %}
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label for="input_description">{{translate("DESCRIPTION")}}</label>
|
||||
<textarea id="input_description" class="form-control" type="text" name="description" {% if 'description' in form.fields.disabled %}disabled{% endif %} rows=6>{{organisation.description}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-4">
|
||||
<button type="submit" class="btn btn-block btn-lg btn-success">{{form.submit_text}}</button>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-3 pull-right">
|
||||
<button type="button" class="btn btn-block btn-lg btn-link" data-dismiss="modal">{{translate("CANCEL")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- Include validation rules -->
|
||||
<script>
|
||||
{% include "pages/partials/page.js.twig" %}
|
||||
</script>
|
||||
7
templates/modals/organisation.html.twig
Normal file
7
templates/modals/organisation.html.twig
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends "modals/modal.html.twig" %}
|
||||
|
||||
{% block modal_title %}{{translate('ORGANISATION')}}{% endblock %}
|
||||
|
||||
{% block modal_body %}
|
||||
{% include "forms/organisation.html.twig" %}
|
||||
{% endblock %}
|
||||
@@ -26,6 +26,13 @@
|
||||
}
|
||||
%}
|
||||
</div>
|
||||
{% if checkAccess('create_organisation') %}
|
||||
<div class="box-footer">
|
||||
<button type="button" class="btn btn-success js-organisation-create">
|
||||
<i class="fas fa-plus-square"></i> {{translate("ORGANISATION.CREATE")}}
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user