Skip to content
Snippets Groups Projects
Commit dcbe4e35 authored by Jared Hancock's avatar Jared Hancock
Browse files

forms: Forbid adding deleted forms to topics, form management

parent b528df56
No related branches found
No related tags found
No related merge requests found
......@@ -387,7 +387,10 @@ foreach ($forms as $F) {
<strong><?php echo __('Add Custom Form'); ?></strong>:
<select name="form_id" id="newform">
<option value=""><?php echo '— '.__('Add a custom form') . ' —'; ?></option>
<?php foreach (DynamicForm::objects()->filter(array('type'=>'G')) as $F) { ?>
<?php foreach (DynamicForm::objects()
->filter(array('type'=>'G'))
->exclude(array('flags__hasbit' => DynamicForm::FLAG_DELETED))
as $F) { ?>
<option value="<?php echo $F->get('id'); ?>"
<?php if (in_array($F->id, $current_forms))
echo 'disabled="disabled"'; ?>
......
......@@ -29,9 +29,10 @@ foreach ($forms as $e) { ?>
$(this).parent().find('button').trigger('click');">
<option selected="selected" disabled="disabled"><?php
echo __('Add a form'); ?></option>
<?php foreach (DynamicForm::objects()->filter(array(
'type'=>'G')) as $f
) {
<?php foreach (DynamicForm::objects()
->filter(array('type'=>'G'))
->exclude(array('flags__hasbit' => DynamicForm::FLAG_DELETED))
as $f) {
if (in_array($f->get('id'), $current_list))
continue;
?><option value="<?php echo $f->get('id'); ?>"><?php
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment