ElixirVault/www/system-brs-core/cms/cmsPermissions/tmpl/permissionEdit.twig

118 lines
5.7 KiB
Twig

<div>
<h2 class="title">
{% if PPR.id %}{{ dt.gM("Edit permission data") }}{% else %}{{ dt.gM("Add new permission") }}{% endif %}
{# TITLE INFO #}
<ul class="dx record-info">
{% if dt.chkP('SYS_SHOW_TABLE_IDS') %}<li>{{ dt.gM("ID") }}:&nbsp;<span>{% if PPR.id %}{{PPR.id}}{% else %}-{% endif %}</span></li>{% endif %}
<li>{{ dt.gM("Created") }}:&nbsp;<span>{% if PPR.p_created %}{{PPR.p_created}}{% else %}-{% endif %}</span></li>
<li>{{ dt.gM("Modified") }}:&nbsp;<span>{% if PPR.p_modified %}{{PPR.p_modified}}{% else %}-{% endif %}</span></li>
</ul>
<input type="hidden" value="{% if PPR.id %}{{PPR.id}}{% endif %}" id="id" name="id" />
</h2>
{# BASE DATA #}
<ul id="pbase" class="dx col1 sbox p20">
<li>
<label for="p_name">{{ dt.gM("Permission name") }}:</label>
<div class="validate">
<input id="p_name" name="p_name" type="text" class="long" value="{% if PPR.p_name %}{{PPR.p_name}}{% endif %}"/>
</div>
</li><li>
<label for="p_description">{{ dt.gM("Permission description") }}:</label>
<div class="validate">
<textarea id="p_description" name="p_description" class="long">{% if PPR.p_description %}{{PPR.p_description}}{% endif %}</textarea>
</div>
</li>{#<li>
<label for="p_type_id">{{ dt.gM("Permission type") }}:</label>
<div class="validate long">
<select class="chz" id="p_type_id" name="p_type_id">
<option value="">{{ dt.gM("-- Select --") }}</option>
{% if PT %}
{% for v in PT %}
{% if v.title %}
<option {% if PPR.p_type_id and PPR.p_type_id == v.id %} selected="selected" {% endif %} value="{{v.id}}">{{v.title}}</option>
{% endif %}
{% endfor %}
{% endif %}
</select>
</div>
</li>#}
</ul>
{# SETTINGS DATA CHECKBOXES #}
<div id="psettings" class="show sbox noskip">
<h3><a>{{ dt.gM("Permission settings") }}</a></h3>
<div style="display:none;">
<ul class="dx sbox pblocks">
<li>
<input id="p_blocked" name="p_blocked" type="hidden" class="chk-value" value="{% if PPR.p_blocked %}1{% endif %}"/>
<label>{{ dt.gM("Permission blocked") }}:</label>
<p>{{ dt.gM("Indicates whether permission has been disabled or not") }}</p>
</li>
{#<li>
<input id="p_autolink" name="p_autolink" type="hidden" class="chk-value" value="{% if PPR.p_autolink %}1{% endif %}"/>
<label>{{ dt.gM("Autolink permission") }}:</label>
<p>{{ dt.gM("Auto links self on new company") }}</p>
</li>
<li>
<input id="p_hidden" name="p_hidden" type="hidden" class="chk-value" value="{% if PPR.p_hidden %}1{% endif %}"/>
<label>{{ dt.gM("Hidden permission") }}:</label>
<p>{{ dt.gM("Permission is hidden from management") }}</p>
</li>#}
<li>
<input id="p_type_id" name="p_type_id" type="hidden" class="chk-value" value="{% if PPR.p_type_id %}1{% endif %}"/>
<label>{{ dt.gM("Permission in pub") }}:</label>
<p>{{ dt.gM("Permission is enabled for public use") }}</p>
</li>
</ul>
</div>
</div>
{# PERMISSION GROUP DATA #}
<div id="groups" class="show sbox noskip oh">
<h3><a>{{ dt.gM("Permission groups") }}</a></h3>
<div style="display:none;">
<div class="pp-search">
<label for="grpp-search">{{ dt.gM("Search in groups:") }}</label>
<div>
<input type="text" name="grpp-search" id="grpp-search" class="skip long" />
<a class="clf op60" style="display:none;" href="javascript:;"></a>
</div>
<span class="pp-close"></span>
</div>
<div class="ncheckbox">
{# CHECK ALL BUTTON #}
<div class="ckh_all inline">
<label>{{ dt.gM("Check all:") }}</label>
<div class="chk no-sbox-sel"><div></div></div>
</div>
<div class="only_sel inline">
<label>{{ dt.gM("Show selected:") }}</label>
<div class="chk no-sbox-sel"><div></div></div>
</div>
<br><br><br>
{% if GROUPS and GROUPS|length > 0 %}
<ul class="dx pblocks">
{% for pp in GROUPS %}
<li>
<div id="g{{pp.id}}" name="g{{pp.id}}" class="chk{% if pp.sel %} chked{% endif %}"><div></div></div>
<label for="g{{pp.id}}">{{pp.group_name}}</label>
<p>{{pp.group_description}}</p>
</li>
{% endfor %}
<li class="dummy noresults" style="display:none;">{{ dt.gM("No results found, please change the search and try again") }}</li>
<li class="dummy"></li>
<li class="dummy"></li>
<li class="dummy"></li>
<li class="dummy"></li>
<li class="dummy"></li>
</ul>
{% endif %}
</div>
<div class="clear"></div>
</div>
<br/>
</div>
</div>
<br/>