Track current collection id before setting new one
This commit is contained in:
parent
627ba8bc38
commit
78d86b7b23
1 changed files with 21 additions and 6 deletions
|
@ -144,6 +144,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label for="views">Views</label>
|
||||
<input class="form-control" name="cur_col" type="hidden" id="cur_col"/>
|
||||
<input class="form-control" name="views" id="views" value="{$data.views}" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
@ -228,16 +229,30 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<input type="submit" class="btn btn-primary" value="Update Photo Details" name="update" style="margin-top: 10px">
|
||||
<input id="edit_photo_submit" type="submit" class="btn btn-primary" value="Update Photo Details" name="update" style="margin-top: 10px">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var changed_col = false;
|
||||
var cur_col = false;
|
||||
$('#collection_id').focus(function(){
|
||||
console.log('hovered');
|
||||
if (changed_col == false) {
|
||||
changed_col = true;
|
||||
cur_col = $('#collection_id').val();
|
||||
$('#cur_col').attr('value',cur_col);
|
||||
}
|
||||
});
|
||||
|
||||
$('#edit_photo_submit').on("click",function(e){
|
||||
e.preventDefault();
|
||||
$('#edit_photo').submit();
|
||||
})
|
||||
</script>
|
Loading…
Add table
Reference in a new issue