|
49 | 49 | <div class="col-sm-10">
|
50 | 50 | <select class="form-control parent" name="parent_id" style="width: 100%;">
|
51 | 51 | <option selcted value="0">ROOT</option>
|
52 |
| - <?php foreach ($menus as $menu) : ?> |
| 52 | + <?php foreach ($menus as $menu) { ?> |
53 | 53 | <option <?= ($menu->id == old('parent_id')) ? 'selected' : '' ?> value="<?= $menu->id ?>"><?= $menu->title ?></option>
|
54 |
| - <?php endforeach ?> |
| 54 | + <?php } ?> |
55 | 55 | </select>
|
56 | 56 | <span class="help-block">
|
57 | 57 | <i class="fas fa-exclamation-triangle text-danger"></i> <?= lang('menu.warning_parent') ?>
|
58 | 58 | </span>
|
59 |
| - <?php if (session('error.parent_id')) : ?> |
| 59 | + <?php if (session('error.parent_id')) { ?> |
60 | 60 | <div class="invalid-feedback">
|
61 | 61 | <h6><?= session('error.parent_id') ?></h6>
|
62 | 62 | </div>
|
63 |
| - <?php endif ?> |
| 63 | + <?php } ?> |
64 | 64 | </div>
|
65 | 65 | </div>
|
66 | 66 | <div class="form-group row">
|
|
80 | 80 | <span class="input-group-text"><i class="fab fa-font-awesome-flag"></i></span>
|
81 | 81 | </div>
|
82 | 82 | <input type="text" name="icon" class="icon-picker form-control <?= session('error.icon') ? 'is-invalid' : '' ?>" value="<?= old('icon') ?>" placeholder="<?= lang('menu.place_icon') ?>" autocomplete="off">
|
83 |
| - <?php if (session('error.icon')) : ?> |
| 83 | + <?php if (session('error.icon')) { ?> |
84 | 84 | <div class="invalid-feedback">
|
85 | 85 | <h6><?= session('error.icon') ?></h6>
|
86 | 86 | </div>
|
87 |
| - <?php endif ?> |
| 87 | + <?php } ?> |
88 | 88 | </div>
|
89 | 89 | <span class="help-block">
|
90 | 90 | <i class="fa fa-info-circle text-info"></i> <?= lang('menu.info_icon') ?> <a href="http://fontawesome.io/icons" target="_blank">http://fontawesome.io/icons</a>
|
|
99 | 99 | <span class="input-group-text"><i class="fas fa-pencil-alt"></i></span>
|
100 | 100 | </div>
|
101 | 101 | <input type="text" name="title" class="form-control <?= session('error.title') ? 'is-invalid' : '' ?>" value="<?= old('title') ?>" placeholder="<?= lang('menu.place_title') ?>" autocomplete="off">
|
102 |
| - <?php if (session('error.title')) : ?> |
| 102 | + <?php if (session('error.title')) { ?> |
103 | 103 | <div class="invalid-feedback">
|
104 | 104 | <h6><?= session('error.title') ?></h6>
|
105 | 105 | </div>
|
106 |
| - <?php endif ?> |
| 106 | + <?php } ?> |
107 | 107 | </div>
|
108 | 108 | </div>
|
109 | 109 | </div>
|
|
115 | 115 | <span class="input-group-text"><i class="fas fa-link"></i></span>
|
116 | 116 | </div>
|
117 | 117 | <input type="text" name="route" class="form-control <?= session('error.route') ? 'is-invalid' : '' ?>" value="<?= old('route') ?>" placeholder="<?= lang('menu.place_route') ?>" autocomplete="off">
|
118 |
| - <?php if (session('error.route')) : ?> |
| 118 | + <?php if (session('error.route')) { ?> |
119 | 119 | <div class="invalid-feedback">
|
120 | 120 | <h6><?= session('error.route') ?></h6>
|
121 | 121 | </div>
|
122 |
| - <?php endif ?> |
| 122 | + <?php } ?> |
123 | 123 | </div>
|
124 | 124 | </div>
|
125 | 125 | </div>
|
126 | 126 | <div class="form-group row">
|
127 | 127 | <label class="col-sm-2 col-form-label"><?= lang('menu.role') ?></label>
|
128 | 128 | <div class="col-sm-10">
|
129 | 129 | <select multiple="multiple" class="form-control parent" name="groups_menu[]" data-placeholder="<?= lang('menu.select_role') ?>" style="width: 100%;">
|
130 |
| - <?php foreach ($roles as $role) : ?> |
| 130 | + <?php foreach ($roles as $role) { ?> |
131 | 131 | <option <?= in_array($role->id, old('groups_menu', [])) ? 'selected' : '' ?> value="<?= $role->id ?>"><?= $role->name ?></option>
|
132 |
| - <?php endforeach ?> |
| 132 | + <?php } ?> |
133 | 133 | </select>
|
134 |
| - <?php if (session('error.groups_menu')) : ?> |
| 134 | + <?php if (session('error.groups_menu')) { ?> |
135 | 135 | <h6 class="text-danger"><?= session('error.groups_menu') ?></h6>
|
136 |
| - <?php endif ?> |
| 136 | + <?php } ?> |
137 | 137 | </div>
|
138 | 138 | </div>
|
139 | 139 | <div class="form-group row">
|
|
0 commit comments