<input class="form-control" type="text" name="gallery_title" id="name" value="<?php echo $object->fields['gallery_title']; ?> "> </div> </div> <div class="form-group <?php if (isset($object->messages['gallery_title'])) { echo ' has-error'; } ?> "> <label class="col-lg-2 control-label">Описание</label> <div class="col-lg-10"> <textarea class="form-control" name="gallery_desc"><?php echo $object->fields['gallery_desc']; ?> </textarea> </div> </div> <div class="form-group"> <div class="col-lg-10 col-lg-offset-2"> <input type="submit" value="Сохранить изменения" class="btn btn-primary btn"> <a class="btn btn-primary" href="<?php echo M_Link::ToAdminGallery('all'); ?> ">Вернуться к списку галерей</a> </div> </div> </form>
public function action_editimg() { $this->title .= ' :: Галереи'; $mImages = M_MediaFiles::Instance(); $gallery_id = isset($_GET['param2']) ? (int) $_GET['param2'] : 0; $this->gallery = M_Gallery::Instance()->get($gallery_id); $this->error = false; if (empty($this->gallery)) { $this->p404(); } if ($this->isPost()) { if ($mImages->edit($_POST['fid'], $_POST)) { $this->redirect(M_Link::ToAdminGallery('images', $this->gallery['gallery_id'])); } $this->fields = $_POST; $this->error = true; } else { $this->fields = $mImages->get($_GET['param']); } if (empty($this->fields)) { $this->p404(); } // Получение пути к шаблону $templateName = $this->getTemplate('components/gallery/v_editimg.php'); $this->content = $this->Template($templateName, $this); }
"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label" for="sk">Альтернативный текст</label> <div class="col-md-10"> <input class="form-control" type="text" name="alt" id="sk" value="<?php echo $object->fields['alt']; ?> "> </div> </div> <div class="form-group <?php if (isset($object->messages['alt'])) { echo ' has-error'; } ?> "> <div class="col-md-10 col-md-offset-2"> <input type="submit" value="Сохранить изменения" class="btn btn-primary"> <a class="btn btn-default" href="<?php echo M_Link::ToAdminGallery('images', $object->gallery['gallery_id']); ?> ">Вернуться в галерею</a> </div> </div> </form> </div> </div> </div>
</li> <?php } ?> <?php if ($object->check_priv('C_Gallery:action_index')) { ?> <li <?php if ($active == 'C_Gallery') { echo 'class="active"'; } ?> > <a href="<?php echo M_Link::ToAdminGallery(); ?> ">Галерии</a> </li> <?php } ?> <?php if ($object->check_priv('C_Video:action_index')) { ?> <li <?php if ($active == 'C_Video') { echo 'class="active"'; } ?>