create-events: show selected duration

This commit is contained in:
Milan
2022-07-27 09:52:14 +02:00
parent 74243b159e
commit 24b874e065
2 changed files with 11 additions and 11 deletions

View File

@@ -52,7 +52,6 @@ my $request = {
}, },
}; };
$request = uac::prepare_request( $request, $user_presets ); $request = uac::prepare_request( $request, $user_presets );
$params = $request->{params}->{checked}; $params = $request->{params}->{checked};
#process header #process header
@@ -213,12 +212,13 @@ sub check_params {
my $checked = {}; my $checked = {};
$checked->{action} = entry::element_of($params->{action}, $checked->{action} = entry::element_of($params->{action},
['create_events', 'show_events']); ['create_events', 'show_events'])//'';
$checked->{exclude} = 0; $checked->{exclude} = 0;
$checked->{duration} = 28; $checked->{duration} = 28;
entry::set_numbers( $checked, $params, [ entry::set_numbers( $checked, $params, [
'id', 'project_id', 'studio_id', 'duration']); 'id', 'project_id', 'studio_id', 'duration']);
$checked->{"duration".$checked->{duration}}='selected="selected"';
if ( defined $checked->{studio_id} ) { if ( defined $checked->{studio_id} ) {
$checked->{default_studio_id} = $checked->{studio_id}; $checked->{default_studio_id} = $checked->{studio_id};

View File

@@ -13,15 +13,15 @@
value="<TMPL_VAR .project_id>"> <input type="hidden" value="<TMPL_VAR .project_id>"> <input type="hidden"
name="studio_id" value="<TMPL_VAR .studio_id>"> schedule events by name="studio_id" value="<TMPL_VAR .studio_id>"> schedule events by
<select name="duration"> <select name="duration">
<option value="7">1 week.</option> <option value="7" <TMPL_VAR duration7>>1 week</option>
<option value="14">2 weeks.</option> <option value="14" <TMPL_VAR duration14>>2 weeks</option>
<option value="21">3 weeks.</option> <option value="21" <TMPL_VAR duration21>>3 weeks</option>
<option value="28">4 weeks.</option> <option value="28" <TMPL_VAR duration28>>4 weeks</option>
<option value="56">8 weeks.</option> <option value="56" <TMPL_VAR duration56>>8 weeks</option>
</select> </select>
<TMPL_IF .allow.read_event> <TMPL_IF .allow.read_event>
<button target="_blank" type='submit' name="action" value="show">Show schedule</button> <button target="_blank" type='submit' name="action" value="show_events">Show schedule</button>
</TMPL_IF> </TMPL_IF>
<TMPL_IF .allow.assign_series_events> <TMPL_IF .allow.assign_series_events>
<button target="_blank" type='submit' name="action" <button target="_blank" type='submit' name="action"
@@ -30,9 +30,9 @@
</form> </form>
</div> </div>
<div class="panel view" style="clear: both"> <div class="panel view" style="clear: both">
<TMPL_VAR action> <TMPL_VAR created_total> <TMPL_VAR action> <TMPL_VAR total>
events from <TMPL_VAR from_date> till <TMPL_VAR till_date> events from <TMPL_VAR from_date> till <TMPL_VAR till_date>:
<br> <br><br>
<table> <table>
<TMPL_LOOP events> <TMPL_LOOP events>