OSDN Git Service

Cancelボタン戻り先をlistview変更
[trpgtools-onweb/cake-frame.git] / app / plugins / links / views / elements / link_edit.ctp
1 <?php 
2 /*
3  * Link Plugin for TRPG Databank
4  * 
5  * PHP version 5
6  *
7  * @copyright Copyright 2010, Cake. (http://trpgtools-onweb.sourceforge.jp/)
8  * @category Element
9  * @package  plugin for TRPG Data Bank
10  * @version  beta
11  * @author   Cake <cake_67@users.sourceforge.jp>
12  * @license  http://www.opensource.org/licenses/mit-license.php The MIT License
13  * @link     http://trpgtools-onweb.sourceforge.jp/
14  */
15 ?>
16 <div class="links form">
17 <?php 
18         echo $form->create('Link', array(
19                 'url' => $url,
20                 'type' => 'file',
21         ));
22 ?>
23 <fieldset>
24 <legend><?php if (!$isEdit): ?><?php __('Add Link'); ?><?php else: ?><?php __('Edit Link'); ?><?php endif ?></legend>
25 <?php
26         echo $this->Form->input('url', array(
27                 'type' => 'text',
28                 'label' =>  __('URL', true),
29                 'style' => 'ime-mode:inactive;',
30                 'class' => 'longInput',
31                 'after' => $html->div(
32                         'required',
33                         __(' required', true)
34                 )
35         ));
36
37         echo $this->Html->div(
38                 'attention', 
39                  __('URL must be less than 512 letters. The Multi-byte letters will counted after UTF-8 encoded.', true)
40         );
41
42         echo $this->element('medium_edit', array(
43                 'label' => __('Banner', true),
44                 'noCaption' => true,
45                 'plugin' => 'media',
46                 'previewVersion' => 's',
47         ));
48
49         echo $this->Form->input('title', array(
50                 'type' => 'text',
51                 'label' =>  __('Title', true),
52                 'class' => 'longInput',
53                 'after' => $html->div(
54                         '',
55                         __('If empty, the site title will be automatically inputted.', true)
56                 )
57         ));
58
59         echo $this->Form->input('notes', array(
60                 'type' => 'textarea',
61                 'label' => __('Description', true)
62         ));
63
64 if ($isAdmin) {
65         echo $select->create_boolean_select('pickup', array(
66                 'label' => __('PickUp', true),
67                 'default' => 0,
68         ));
69
70         echo $linkSelect->create_type_select($type);
71
72         echo $form->input('ring', array(
73                 'label' => __('Ring text', true),
74                 'after' => $html->tag('div',
75                         __('HTML tags OK. It is for RING Tags setting.', true),
76                         array('class' => 'attention')
77                 )
78         ));
79 }
80
81         echo $token->create();
82 ?>
83 </fieldset>
84 <?php echo $this->Form->end(__('Submit', true));?>
85 </div>
86
87 <div class="backButton">
88 <?php
89         echo $form->create('', array('url' => array(
90                         'plugin' => 'links',
91                         'controller' => 'links',
92                         'action' => 'listview',
93                 ), 
94                 'type' => 'GET', 
95                 'id' => 'CancelButton'
96         ));
97         echo $form->end(array('label' => __('Cancel', true)));
98 ?>
99 </div>