Subversion Repositories SmartDukaan

Rev

Rev 17597 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17597 Rev 17894
Line 33... Line 33...
33
		$('.text-center').empty();
33
		$('.text-center').empty();
34
		$('.text-center').append(content);
34
		$('.text-center').append(content);
35
		$('#loadingModal').modal('show');
35
		$('#loadingModal').modal('show');
36
 
36
 
37
	});
37
	});
-
 
38
	
-
 
39
	$('#select_temp input').on('change', function() {
-
 
40
	   if($('input[name="data[Objects][template_id]"]:checked').val() == 'template2')
-
 
41
	   {
-
 
42
	   	$('#template2').removeClass('hidden');
-
 
43
	   	$('#template1').addClass('hidden');
-
 
44
	   } 
-
 
45
	   if($('input[name="data[Objects][template_id]"]:checked').val() == 'template1')
-
 
46
	   {
-
 
47
	   	$('#template1').removeClass('hidden');
-
 
48
	   	$('#template2').addClass('hidden');
-
 
49
	   }
-
 
50
	});
-
 
51
	
38
	$('.close').click(function(){
52
	$('.close').click(function(){
39
		$('#loadingModal').modal('hide');
53
		$('#loadingModal').modal('hide');
40
	});
54
	});
41
});
55
});
42
</script>
56
</script>
Line 56... Line 70...
56
		<div class="col-lg-3">
70
		<div class="col-lg-3">
57
			<?php echo $this->Element('adminactions');?>
71
			<?php echo $this->Element('adminactions');?>
58
		</div>
72
		</div>
59
		<div class="col-lg-4">
73
		<div class="col-lg-4">
60
			<legend><?php echo __('Add New Object'); ?></legend>
74
			<legend><?php echo __('Add New Object'); ?></legend>
-
 
75
			
-
 
76
			
-
 
77
			
-
 
78
			
61
			<div class="medium_image_wrapper">
79
			<div class="medium_image_wrapper">
62
				<div id="bootstrapped-fine-uploader"></div>
80
				<div id="bootstrapped-fine-uploader"></div>
63
				<div class="preview_wrapper"></div>
81
				<div class="preview_wrapper"></div>
64
			</div>
82
			</div>
65
			<input type= "button" value='Preview' id="preview" class='btn btn-primary'>
83
			<input type= "button" value='Preview' id="preview" class='btn btn-primary'>
66
		</div>
84
		</div>
67
		<div class="col-lg-5">
85
		  <div class="col-lg-5">
68
			<br><br>
86
			<br><br>
-
 
87
			
69
			<?php echo $this->Form->create('Objects'); ?>
88
			<?php echo $this->Form->create('Objects'); ?>
70
				<fieldset>
89
				<fieldset>
-
 
90
 
-
 
91
                    <div id = 'select_temp'>
-
 
92
                        Select Template : 
-
 
93
                        <input type= "radio" name= "data[Objects][template_id]" value="template1" checked>Template1
-
 
94
                        <input type= "radio" name= "data[Objects][template_id]" value="template2" >Template2
-
 
95
                    </div>
-
 
96
 
71
				<?php
97
				<?php
72
					echo $this->Form->input('name');
98
					echo $this->Form->input('name');
-
 
99
                    echo $this->Form->input('img_url',array('type'=>'hidden'));
-
 
100
				?>
-
 
101
                <div id="template1" class="">
-
 
102
				<?php
73
					echo $this->Form->input('link1',array('type'=>'textarea'));
103
					echo $this->Form->input('link1',array('type'=>'textarea'));
74
					echo $this->Form->input('link2',array('type'=>'textarea'));
104
					echo $this->Form->input('link2',array('type'=>'textarea'));
75
					echo $this->Form->input('link3',array('type'=>'textarea'));
105
					echo $this->Form->input('link3',array('type'=>'textarea'));
76
					echo $this->Form->input('link4',array('type'=>'textarea'));
106
					echo $this->Form->input('link4',array('type'=>'textarea'));
77
					echo $this->Form->input('link5',array('type'=>'textarea'));
107
					echo $this->Form->input('link5',array('type'=>'textarea'));					
78
					echo $this->Form->input('img_url',array('type'=>'hidden'));
-
 
79
				?>
108
				?>
-
 
109
                </div>
-
 
110
 
-
 
111
                <div class="hidden" id="template2">
-
 
112
                    
-
 
113
                    <?php
-
 
114
                        echo $this->Form->input('link');
-
 
115
                    ?>
-
 
116
                    
-
 
117
                </div>
-
 
118
 
80
				</fieldset>
119
				</fieldset>
81
			<?php echo $this->Form->end(__('Submit')); ?>
120
			<?php echo $this->Form->end(__('Submit')); ?>
-
 
121
			
-
 
122
			
82
			</div>
123
			
83
		</div>		
124
		</div>		
84
	</div>
125
	</div>
85
</div>
126
</div>
86
<script src="//cdn.ckeditor.com/4.5.2/full/ckeditor.js"></script>
127
<script src="//cdn.ckeditor.com/4.5.2/full/ckeditor.js"></script>
87
<script type="text/javascript">
128
<script type="text/javascript">